Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,557
edits
Timo.stripf (talk | contribs) No edit summary |
Timo.stripf (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local a=" | local a="regex1"; | ||
local b="regex2"; | local b="regex2"; | ||
local c=" | local c="regex3"; | ||
local d=" | local d="category"; | ||
local e="message"; | local e="message"; | ||
local f=" | local f="commit"; | ||
local g=" | local g="source"; | ||
local h=" | local h="tests2"; | ||
local i=" | local i="Semantic Issue"; | ||
local j=" | local j=""; | ||
local k=" | local k="note\\: "; | ||
local l=" | local l="maingroup"; | ||
local m=""; | local m="groups"; | ||
local n=" | local n="(?:warning|error|fatal error)\\: "; | ||
local o="clang/lib/Sema/SemaDeclAttr.cpp"; | |||
local | local p="clang/lib/Sema/SemaDecl.cpp"; | ||
local | local q="clang/lib/Sema/SemaOpenMP.cpp"; | ||
local r="clang/lib/Sema/SemaTemplate.cpp"; | |||
local | local s="clang/lib/Sema/SemaDeclCXX.cpp"; | ||
local | local t="ignored-attributes"; | ||
local | local u="clang/lib/Sema/SemaDeclObjC.cpp"; | ||
local | local v="clang/lib/Sema/SemaExpr.cpp"; | ||
local | local w="clang/lib/Sema/SemaOverload.cpp"; | ||
local | local x="clang/lib/Sema/SemaObjCProperty.cpp"; | ||
local | local y="clang/lib/Sema/SemaChecking.cpp"; | ||
local | local z="Lexical or Preprocessor Issue"; | ||
local | local A="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; | ||
local | local B="OpenMP Issue"; | ||
local C=" \\[(?:\\-Werror,)?\\-Wignored\\-attributes[^\\]]*\\]"; | |||
local | local D="clang/lib/Sema/AnalysisBasedWarnings.cpp"; | ||
local | local E="attributes"; | ||
local | local F="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 G="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; | ||
local | local H="b1c4d5507fad"; | ||
local | local I="clang/lib/Sema/JumpDiagnostics.cpp"; | ||
local | local J="clang/lib/Sema/SemaStmt.cpp"; | ||
local | local K="Parse Issue"; | ||
local | local L="clang/lib/Parse/ParseOpenMP.cpp"; | ||
local | local M="swift-name-attribute"; | ||
local | local N="clang/lib/Lex/PPDirectives.cpp"; | ||
local | local O="CL4"; | ||
local | local P="pre-c2x-compat"; | ||
local | local Q="clang/lib/Sema/SemaInit.cpp"; | ||
local | local R="5a8987ca5113"; | ||
local | local S="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 | local T="95f50964fbf5"; | ||
local U="Implement P2361 Unevaluated string literals\n\nThis patch proposes to handle in an uniform fashion\nthe..."; | |||
local V="all"; | |||
local W="clang/lib/Sema/SemaType.cpp"; | |||
local X="14f6bfcb52e7"; | |||
local | local Y="[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"; | ||
local | local Z="remark\\: "; | ||
local | local ab="[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the n..."; | ||
local | local bb="clang/lib/Sema/SemaTemplateInstantiate.cpp"; | ||
local | local cb="clang/lib/Lex/Lexer.cpp"; | ||
local db="clang/lib/Sema/SemaCast.cpp"; | |||
local eb="most"; | |||
local fb="clang/lib/Sema/SemaExprObjC.cpp"; | |||
local gb=" \\[(?:\\-Werror,)?\\-Wswift\\-name\\-attribute[^\\]]*\\]"; | |||
local hb="61d065e21ff3"; | |||
local ib="clang/test/SemaCXX/uninitialized.cpp:1242:5: note: during field initialization in this constructor"; | |||
local jb="Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to ..."; | |||
local | local kb="Let clang atomic builtins fetch add/sub support floating point types\n\nRecently atomicrmw started to support fadd/fsub:\n\nhttps://reviews.llvm.org/D53965\n\nHowever clang atomic builtins fetch add/sub still does not support\nemitting atomicrmw fadd/fsub.\n\nThis patch adds that.\n\nReviewed by: John McCall, Artem Belevich, Matt Arsenault, JF Bastien,\nJames Y Knight, Louis Dionne, Olivier Giroux\n\nDifferential Revision: https://reviews.llvm.org/D71726"; | ||
local | local lb="(?: \\[(?:\\-Werror)?[^\\]]*\\])?"; | ||
local | local mb="availability"; | ||
local | local nb="clang/lib/Sema/SemaAttr.cpp"; | ||
local | local ob=" \\[(?:\\-Werror,)?\\-Wpre\\-c2x\\-compat[^\\]]*\\]"; | ||
local | local pb="[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"; | ||
local | local qb="1228d42ddab8"; | ||
local | local rb="[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comments on r352930:\n\n - Removes redundant diagnostic checking code\n - Removes errnoneous use of diag::err_alias_is_definition, which\n turned out to be ineffective anyway since functions can be defined later\n in the translation unit and avoid detection.\n - Adds a test for various invalid cases for import_name and import_module.\n\nDifferential Revision: https://reviews.llvm.org/D59520"; | ||
local sb="pre-c2x-compat-pedantic"; | |||
local | local tb="[WebAssembly] Improve clang diagnostics for wasm attributes\n\nThis patch addresses the review comment..."; | ||
local | local ub="931fcd3ba011"; | ||
local | local vb="[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost comple..."; | ||
local wb="[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming ..."; | |||
local | local xb="fe17b30a7957"; | ||
local | local yb="overriding-method-mismatch"; | ||
local | local zb="deprecated"; | ||
local Ab="[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"; | |||
local | local Bb="3dbcea8b957a"; | ||
local Cb="clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp:4:50: note: in instantiation of exception specification for \'go\' requested here"; | |||
local Db="Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then ..."; | |||
local Eb="conversion"; | |||
local Fb="clang/test/SemaCXX/uninitialized.cpp:944:10: note: during field initialization in the implicit default constructor"; | |||
local Gb="called-once-parameter"; | |||
local Hb="clang/lib/Sema/SemaPseudoObject.cpp"; | |||
local Ib="non-gcc"; | |||
local Jb="Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"; | |||
local Kb="clang/test/SemaObjC/attr-swift_name.m"; | local Kb="clang/test/SemaObjC/attr-swift_name.m"; | ||
local Lb="clang/test/SemaCXX/uninitialized.cpp:928:5: note: during field initialization in this constructor"; | local Lb="clang/test/SemaCXX/uninitialized.cpp:928:5: note: during field initialization in this constructor"; | ||
local Mb | local Mb="clang/test/CXX/over/over.built/p16.cpp:3:12: note: second operand was implicitly converted to type \'decltype(nullptr)\' (aka \'std::nullptr_t\')"; | ||
local Nb="clang/lib/Sema/SemaAvailability.cpp"; | |||
local | local Ob="[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"; | ||
local | local Pb="[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a na..."; | ||
local Qb="clang/test/Lexer/deprecate-macro.c:29:29: note: macro marked \'deprecated\' here"; | |||
local Rb="trigraphs"; | |||
local | local Sb="7c11da0cfd33"; | ||
local Tb="clang/lib/Lex/Pragma.cpp"; | |||
local | local Ub="Deprecations"; | ||
local | local Vb="clang/test/CXX/over/over.built/p16.cpp:3:12: note: first operand was implicitly converted to type \'decltype(nullptr)\' (aka \'std::nullptr_t\')"; | ||
local | local Wb="module-build"; | ||
local | local Xb="clang/test/SemaSYCL/zero-length-arrays.cpp:31:24: note: within field of type \'InnerTemplated<0U>[1]\' declared here"; | ||
local Yb="clang/lib/Parse/ParseDecl.cpp"; | |||
local | local Zb="clang/lib/Sema/SemaExprCXX.cpp"; | ||
local ac="clang/lib/Serialization/ASTReader.cpp"; | |||
local bc="tautological-compare"; | |||
local cc="clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp:52:26: note: candidate template ignored: couldn\'t infer template argument \'T\'"; | |||
local dc="Modules Issue"; | |||
local | local ec="(?:error|fatal error)\\: "; | ||
local fc="gcc-compat"; | |||
local | local gc="Value Conversion Issue"; | ||
local | local hc="arc-unsafe-retained-assign"; | ||
local | local ic="clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:46:10: note: \'get\' returns a reference"; | ||
local | local jc="thread-safety-analysis"; | ||
local kc=" \\[(?:\\-Werror,)?\\-Wavailability[^\\]]*\\]"; | |||
local lc="ARC Semantic Issue"; | |||
local | local mc="Backend Issue"; | ||
local | local nc="clang/lib/Sema/SemaModule.cpp"; | ||
local | local oc="clang/test/Sema/div-sizeof-ptr.cpp:10:16: note: pointer \'p\' declared here"; | ||
local | local pc="enum-conversion"; | ||
local | local qc="clang/test/SemaObjC/warn-called-once.m"; | ||
local | local rc="array-bounds"; | ||
local | local sc="c99-compat"; | ||
local | local tc="completion-handler"; | ||
local | local uc="clang/lib/Frontend/CompilerInstance.cpp"; | ||
local | local vc="pass-analysis"; | ||
local | local wc="objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type mismatch.\nThis is a general solution for previous fixes\nfor // rdar://6191214 and // rdar://9352731\nand removes lots of duplicate code.\n\nllvm-svn: 137222"; | ||
local | local xc="clang/test/SemaObjC/scope-check.m"; | ||
local yc="clang/test/CXX/expr/expr.arith.conv/p2.cpp"; | |||
local | local zc="clang/lib/CodeGen/CodeGenModule.cpp"; | ||
local Ac="(?:error|warning|fatal error)\\: "; | |||
local | local Bc="clang/lib/Parse/ParseExpr.cpp"; | ||
local Cc="31168b077c36"; | |||
local Dc="Automatic Reference Counting.\n\nLanguage-design credit goes to a lot of people, but I particularly wa..."; | |||
local | local Ec="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 Fc="clang/test/SemaCXX/warn-consumed-parsing.cpp"; | ||
local | local Gc="objective-c: Using existing infrastructure for finding \noverridden methods to diagnose their type m..."; | ||
local | local Hc="%0"; | ||
local | local Ic="(.*?)"; | ||
local Jc="extra"; | |||
local | local Kc="arc"; | ||
local Lc="clang/lib/CodeGen/CodeGenAction.cpp"; | |||
local Mc="clang/lib/Sema/SemaExceptionSpec.cpp"; | |||
local Nc="clang/lib/Sema/Sema.cpp"; | |||
local Oc="3c12dd7675cd"; | |||
local | local Pc="clang/lib/Lex/PPMacroExpansion.cpp"; | ||
local Qc=" \\[(?:\\-Werror,)?\\-Woverriding\\-method\\-mismatch[^\\]]*\\]"; | |||
local | local Rc="clang/lib/Lex/LiteralSupport.cpp"; | ||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
local | |||
return { | return { | ||
["note_omp_atomic_capture"]={ | ["note_omp_atomic_capture"]={ | ||
[e]="%select{expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression}0", | [e]="%select{expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression}0", | ||
[ | [a]=k, | ||
[b]="(?:expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression)", | [b]="(?:expected assignment expression|expected compound statement|expected exactly two expression statements|expected in right hand side of the first expression)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"b78ca83d3b9f",1427859197,"[OPENMP] Sema analysis for \'atomic capture\' construct.\n\nAdded sema checks for forms of expressions/s...","[OPENMP] Sema analysis for \'atomic capture\' construct.\n\nAdded sema checks for forms of expressions/statements allowed under control of \'atomic capture\' directive + generation of helper objects for future codegen.\n\nllvm-svn: 233785"}, | ||
[ | [g]={{q,12793,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n } else if (AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) {\n // ...\n } else if (AtomicKind == OMPC_capture) {\n // ...\n if (const auto *AtomicBody = dyn_cast<Expr>(Body)) {\n // ...\n if (ErrorFound != NoError) {\n // ...\n Diag(NoteLoc, diag::note_omp_atomic_capture) << ErrorFound << NoteRange;"},{q,12956,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n } else if (AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) {\n // ...\n } else if (AtomicKind == OMPC_capture) {\n // ...\n if (ErrorFound != NoError) {\n // ...\n Diag(NoteLoc, diag::note_omp_atomic_capture) << ErrorFound << NoteRange;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:214:3: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:218:3: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:226:9: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:234:16: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:238:9: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:242:9: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:246:3: note: expected exactly two expression statements","clang/test/OpenMP/atomic_messages.c:250:3: note: expected exactly two expression statements","clang/test/OpenMP/atomic_messages.c:254:10: note: expected in right hand side of the first expression","clang/test/OpenMP/atomic_messages.c:258:11: note: expected in right hand side of the first expression","clang/test/OpenMP/atomic_messages.c:411:3: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:497:15: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:546:10: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:584:3: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:608:24: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:630:40: note: expected compound statement"} | ["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:214:3: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:218:3: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:226:9: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:234:16: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:238:9: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:242:9: note: expected assignment expression","clang/test/OpenMP/atomic_messages.c:246:3: note: expected exactly two expression statements","clang/test/OpenMP/atomic_messages.c:250:3: note: expected exactly two expression statements","clang/test/OpenMP/atomic_messages.c:254:10: note: expected in right hand side of the first expression","clang/test/OpenMP/atomic_messages.c:258:11: note: expected in right hand side of the first expression","clang/test/OpenMP/atomic_messages.c:411:3: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:497:15: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:546:10: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:584:3: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:608:24: note: expected compound statement","clang/test/OpenMP/atomic_messages.c:630:40: note: expected compound statement"} | ||
} | } | ||
}, | }, | ||
["note_omp_atomic_compare"]={ | ["note_omp_atomic_compare"]={ | ||
[e]="%select{expected compound statement|expected exactly one expression statement|expected assignment statement|expected conditional operator|expect result value to be at false expression|expect binary operator in conditional expression|expect \'<\', \'>\' or \'==\' as order operator|expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'|expect lvalue for result value|expect scalar value|expect integer value|unexpected \'else\' statement|expect \'==\' operator|expect an assignment statement \'v = x\'|expect a \'if\' statement|expect no more than two statements|expect a compound statement|expect \'else\' statement|expect a form \'r = x == e; if (r) ...\'}0", | [e]="%select{expected compound statement|expected exactly one expression statement|expected assignment statement|expected conditional operator|expect result value to be at false expression|expect binary operator in conditional expression|expect \'<\', \'>\' or \'==\' as order operator|expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'|expect lvalue for result value|expect scalar value|expect integer value|unexpected \'else\' statement|expect \'==\' operator|expect an assignment statement \'v = x\'|expect a \'if\' statement|expect no more than two statements|expect a compound statement|expect \'else\' statement|expect a form \'r = x == e; if (r) ...\'}0", | ||
[ | [a]=k, | ||
[b]="(?:expected compound statement|expected exactly one expression statement|expected assignment statement|expected conditional operator|expect result value to be at false expression|expect binary operator in conditional expression|expect \'\\<\', \'\\>\' or \'\\=\\=\' as order operator|expect comparison in a form of \'x \\=\\= e\', \'e \\=\\= x\', \'x ordop expr\', or \'expr ordop x\'|expect lvalue for result value|expect scalar value|expect integer value|unexpected \'else\' statement|expect \'\\=\\=\' operator|expect an assignment statement \'v \\= x\'|expect a \'if\' statement|expect no more than two statements|expect a compound statement|expect \'else\' statement|expect a form \'r \\= x \\=\\= e; if \\(r\\) \\.\\.\\.\')", | [b]="(?:expected compound statement|expected exactly one expression statement|expected assignment statement|expected conditional operator|expect result value to be at false expression|expect binary operator in conditional expression|expect \'\\<\', \'\\>\' or \'\\=\\=\' as order operator|expect comparison in a form of \'x \\=\\= e\', \'e \\=\\= x\', \'x ordop expr\', or \'expr ordop x\'|expect lvalue for result value|expect scalar value|expect integer value|unexpected \'else\' statement|expect \'\\=\\=\' operator|expect an assignment statement \'v \\= x\'|expect a \'if\' statement|expect no more than two statements|expect a compound statement|expect \'else\' statement|expect a form \'r \\= x \\=\\= e; if \\(r\\) \\.\\.\\.\')", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [g]={{q,12968,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n } else if (AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) {\n // ...\n } else if (AtomicKind == OMPC_capture) {\n // ...\n } else if (AtomicKind == OMPC_compare) {\n if (IsCompareCapture) {\n // ...\n if (!Checker.checkStmt(Body, ErrorInfo)) {\n // ...\n Diag(ErrorInfo.NoteLoc, diag::note_omp_atomic_compare) << ErrorInfo.Error << ErrorInfo.NoteRange;"},{q,12988,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n } else if (AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) {\n // ...\n } else if (AtomicKind == OMPC_capture) {\n // ...\n } else if (AtomicKind == OMPC_compare) {\n if (IsCompareCapture) {\n // ...\n } else {\n // ...\n if (!Checker.checkStmt(Body, ErrorInfo)) {\n // ...\n Diag(ErrorInfo.NoteLoc, diag::note_omp_atomic_compare) << ErrorInfo.Error << ErrorInfo.NoteRange;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:415:3: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:422:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:426:5: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:430:9: note: expected conditional operator","clang/test/OpenMP/atomic_messages.c:434:9: note: expect binary operator in conditional expression","clang/test/OpenMP/atomic_messages.c:438:11: note: expect \'<\', \'>\' or \'==\' as order operator","clang/test/OpenMP/atomic_messages.c:442:11: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:446:21: note: expect result value to be at false expression","clang/test/OpenMP/atomic_messages.c:451:9: note: expect binary operator in conditional expression","clang/test/OpenMP/atomic_messages.c:458:11: note: expect \'<\', \'>\' or \'==\' as order operator","clang/test/OpenMP/atomic_messages.c:465:11: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:471:3: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:483:7: note: unexpected \'else\' statement","clang/test/OpenMP/atomic_messages.c:501:15: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:509:5: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:515:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:520:7: note: expect binary operator in conditional expression","clang/test/OpenMP/atomic_messages.c:526:9: note: expect \'==\' operator","clang/test/OpenMP/atomic_messages.c:532:9: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:538:3: note: expect \'else\' statement","clang/test/OpenMP/atomic_messages.c:553:10: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:563:5: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:571:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:579:9: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:588:3: note: expect a compound statement","clang/test/OpenMP/atomic_messages.c:592:5: note: expect a \'if\' statement","clang/test/OpenMP/atomic_messages.c:596:23: note: expect a form \'r = x == e; if (r) ...\'","clang/test/OpenMP/atomic_messages.c:600:17: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:604:28: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:614:12: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:622:11: note: expect \'==\' operator","clang/test/OpenMP/atomic_messages.c:626:11: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:638:12: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:646:42: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:650:44: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:654:26: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:658:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:662:30: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:666:26: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:670:19: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:674:12: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:679:5: note: expect integer value"} | ["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:415:3: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:422:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:426:5: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:430:9: note: expected conditional operator","clang/test/OpenMP/atomic_messages.c:434:9: note: expect binary operator in conditional expression","clang/test/OpenMP/atomic_messages.c:438:11: note: expect \'<\', \'>\' or \'==\' as order operator","clang/test/OpenMP/atomic_messages.c:442:11: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:446:21: note: expect result value to be at false expression","clang/test/OpenMP/atomic_messages.c:451:9: note: expect binary operator in conditional expression","clang/test/OpenMP/atomic_messages.c:458:11: note: expect \'<\', \'>\' or \'==\' as order operator","clang/test/OpenMP/atomic_messages.c:465:11: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:471:3: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:483:7: note: unexpected \'else\' statement","clang/test/OpenMP/atomic_messages.c:501:15: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:509:5: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:515:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:520:7: note: expect binary operator in conditional expression","clang/test/OpenMP/atomic_messages.c:526:9: note: expect \'==\' operator","clang/test/OpenMP/atomic_messages.c:532:9: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:538:3: note: expect \'else\' statement","clang/test/OpenMP/atomic_messages.c:553:10: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:563:5: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:571:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:579:9: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:588:3: note: expect a compound statement","clang/test/OpenMP/atomic_messages.c:592:5: note: expect a \'if\' statement","clang/test/OpenMP/atomic_messages.c:596:23: note: expect a form \'r = x == e; if (r) ...\'","clang/test/OpenMP/atomic_messages.c:600:17: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:604:28: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:614:12: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:622:11: note: expect \'==\' operator","clang/test/OpenMP/atomic_messages.c:626:11: note: expect comparison in a form of \'x == e\', \'e == x\', \'x ordop expr\', or \'expr ordop x\'","clang/test/OpenMP/atomic_messages.c:638:12: note: expected exactly one expression statement","clang/test/OpenMP/atomic_messages.c:646:42: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:650:44: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:654:26: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:658:7: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:662:30: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:666:26: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:670:19: note: expect an assignment statement \'v = x\'","clang/test/OpenMP/atomic_messages.c:674:12: note: expected assignment statement","clang/test/OpenMP/atomic_messages.c:679:5: note: expect integer value"} | ||
} | } | ||
}, | }, | ||
["note_omp_atomic_read_write"]={ | ["note_omp_atomic_read_write"]={ | ||
[e]="%select{expected an expression statement|expected built-in assignment operator|expected expression of scalar type|expected lvalue expression}0", | [e]="%select{expected an expression statement|expected built-in assignment operator|expected expression of scalar type|expected lvalue expression}0", | ||
[ | [a]=k, | ||
[b]="(?:expected an expression statement|expected built\\-in assignment operator|expected expression of scalar type|expected lvalue expression)", | [b]="(?:expected an expression statement|expected built\\-in assignment operator|expected expression of scalar type|expected lvalue expression)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"f33eba65730d",1417159300,"[OPENMP] Additional processing of \'omp atomic write\' directive.\nAccording to OpenMP standard, Sectio...","[OPENMP] Additional processing of \'omp atomic write\' directive.\nAccording to OpenMP standard, Section 2.12.6, atomic Construct, \'#pragma omp atomic write\' is allowed to be used only for expression statements of form \'x = expr;\', where x is a lvalue expression and expr is an expression with scalar type. Patch adds checks for it.\n\nllvm-svn: 222913"}, | ||
[ | [g]={{q,12656,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n if (ErrorFound != NoError) {\n // ...\n Diag(NoteLoc, diag::note_omp_atomic_read_write) << ErrorFound << NoteRange;"},{q,12718,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n if (ErrorFound != NoError) {\n // ...\n Diag(NoteLoc, diag::note_omp_atomic_read_write) << ErrorFound << NoteRange;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:21:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:29:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:48:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:52:3: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:56:5: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:60:7: note: expected lvalue expression","clang/test/OpenMP/atomic_messages.c:76:7: note: expected expression of scalar type","clang/test/OpenMP/atomic_messages.c:87:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:91:3: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:95:5: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:113:3: note: expected expression of scalar type","clang/test/OpenMP/atomic_messages.c:124:3: note: expected an expression statement"} | ["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:21:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:29:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:48:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:52:3: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:56:5: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:60:7: note: expected lvalue expression","clang/test/OpenMP/atomic_messages.c:76:7: note: expected expression of scalar type","clang/test/OpenMP/atomic_messages.c:87:3: note: expected an expression statement","clang/test/OpenMP/atomic_messages.c:91:3: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:95:5: note: expected built-in assignment operator","clang/test/OpenMP/atomic_messages.c:113:3: note: expected expression of scalar type","clang/test/OpenMP/atomic_messages.c:124:3: note: expected an expression statement"} | ||
} | } | ||
}, | }, | ||
["note_omp_atomic_update"]={ | ["note_omp_atomic_update"]={ | ||
[e]="%select{expected an expression statement|expected built-in binary or unary operator|expected unary decrement/increment operation|expected expression of scalar type|expected assignment expression|expected built-in binary operator|expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'%|\', \'<<\', or \'>>\' built-in operations|expected in right hand side of expression}0", | [e]="%select{expected an expression statement|expected built-in binary or unary operator|expected unary decrement/increment operation|expected expression of scalar type|expected assignment expression|expected built-in binary operator|expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'%|\', \'<<\', or \'>>\' built-in operations|expected in right hand side of expression}0", | ||
[ | [a]=k, | ||
[b]="(?:expected an expression statement|expected built\\-in binary or unary operator|expected unary decrement\\/increment operation|expected expression of scalar type|expected assignment expression|expected built\\-in binary operator|expected one of \'\\+\', \'\\*\', \'\\-\', \'\\/\', \'&\', \'\\^\', \'\\|\', \'\\<\\<\', or \'\\>\\>\' built\\-in operations|expected in right hand side of expression)", | [b]="(?:expected an expression statement|expected built\\-in binary or unary operator|expected unary decrement\\/increment operation|expected expression of scalar type|expected assignment expression|expected built\\-in binary operator|expected one of \'\\+\', \'\\*\', \'\\-\', \'\\/\', \'&\', \'\\^\', \'\\|\', \'\\<\\<\', or \'\\>\\>\' built\\-in operations|expected in right hand side of expression)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"1d160b1945c2",1426249651,"[OPENMP] Additional sema analysis for \'omp atomic[ update]\'.\nAdds additional semantic analysis + gen...","[OPENMP] Additional sema analysis for \'omp atomic[ update]\'.\nAdds additional semantic analysis + generation of helper expressions for proper codegen.\n\nllvm-svn: 232164"}, | ||
[ | [g]={{q,12739,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n } else if (AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) {\n // ...\n if (Checker.checkStatement(Body, (AtomicKind == OMPC_update) ? diag::err_omp_atomic_update_not_expression_statement : diag::err_omp_atomic_not_expression_statement, diag::note_omp_atomic_update))"},{q,12774,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.12.6, atomic Construct]\n // In the next expressions:\n // * x and v (as applicable) are both l-value expressions with scalar type.\n // * During the execution of an atomic region, multiple syntactic\n // occurrences of x must designate the same storage location.\n // * Neither of v and expr (as applicable) may access the storage location\n // designated by x.\n // * Neither of x and expr (as applicable) may access the storage location\n // designated by v.\n // * expr is an expression with scalar type.\n // * binop is one of +, *, -, /, &, ^, |, <<, or >>.\n // * binop, binop=, ++, and -- are not overloaded operators.\n // * The expression x binop expr must be numerically equivalent to x binop\n // (expr). This requirement is satisfied if the operators in expr have\n // precedence greater than binop, or by using parentheses around expr or\n // subexpressions of expr.\n // * The expression expr binop x must be numerically equivalent to (expr)\n // binop x. This requirement is satisfied if the operators in expr have\n // precedence equal to or greater than binop, or by using parentheses around\n // expr or subexpressions of expr.\n // * For forms that allow multiple occurrences of x, the number of times\n // that x is evaluated is unspecified.\n if (AtomicKind == OMPC_read) {\n // ...\n } else if (AtomicKind == OMPC_write) {\n // ...\n } else if (AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) {\n // ...\n } else if (AtomicKind == OMPC_capture) {\n // ...\n if (const auto *AtomicBody = dyn_cast<Expr>(Body)) {\n // ...\n if (AtomicBinOp && AtomicBinOp->getOpcode() == BO_Assign) {\n // ...\n if (Checker.checkStatement(Body, diag::err_omp_atomic_capture_not_expression_statement, diag::note_omp_atomic_update))"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:128:3: note: expected built-in binary or unary operator","clang/test/OpenMP/atomic_messages.c:132:7: note: expected built-in binary operator","clang/test/OpenMP/atomic_messages.c:136:9: note: expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'|\', \'<<\', or \'>>\' built-in operations","clang/test/OpenMP/atomic_messages.c:140:9: note: expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'|\', \'<<\', or \'>>\' built-in operations","clang/test/OpenMP/atomic_messages.c:144:3: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:148:3: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:152:3: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:222:7: note: expected built-in binary or unary operator","clang/test/OpenMP/atomic_messages.c:230:13: note: expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'|\', \'<<\', or \'>>\' built-in operations","clang/test/OpenMP/atomic_messages.c:264:7: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:268:7: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:272:7: note: expected in right hand side of expression"} | ["clang/test/OpenMP/atomic_messages.c"]={"clang/test/OpenMP/atomic_messages.c:128:3: note: expected built-in binary or unary operator","clang/test/OpenMP/atomic_messages.c:132:7: note: expected built-in binary operator","clang/test/OpenMP/atomic_messages.c:136:9: note: expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'|\', \'<<\', or \'>>\' built-in operations","clang/test/OpenMP/atomic_messages.c:140:9: note: expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'|\', \'<<\', or \'>>\' built-in operations","clang/test/OpenMP/atomic_messages.c:144:3: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:148:3: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:152:3: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:222:7: note: expected built-in binary or unary operator","clang/test/OpenMP/atomic_messages.c:230:13: note: expected one of \'+\', \'*\', \'-\', \'/\', \'&\', \'^\', \'|\', \'<<\', or \'>>\' built-in operations","clang/test/OpenMP/atomic_messages.c:264:7: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:268:7: note: expected in right hand side of expression","clang/test/OpenMP/atomic_messages.c:272:7: note: expected in right hand side of expression"} | ||
} | } | ||
}, | }, | ||
["note_omp_collapse_ordered_expr"]={ | ["note_omp_collapse_ordered_expr"]={ | ||
[e]="as specified in %select{\'collapse\'|\'ordered\'|\'collapse\' and \'ordered\'}0 clause%select{||s}0", | [e]="as specified in %select{\'collapse\'|\'ordered\'|\'collapse\' and \'ordered\'}0 clause%select{||s}0", | ||
[ | [a]=k, | ||
[b]="as specified in (?:\'collapse\'|\'ordered\'|\'collapse\' and \'ordered\') clause(?:||s)", | [b]="as specified in (?:\'collapse\'|\'ordered\'|\'collapse\' and \'ordered\') clause(?:||s)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"10e775f4a882",1438256176,"[OPENMP 4.1] Initial support for extended \'ordered\' clause.\n\nOpenMP 4.1 introduces optional argument...","[OPENMP 4.1] Initial support for extended \'ordered\' clause.\n\nOpenMP 4.1 introduces optional argument \'(n)\' for \'ordered\' clause, where \'n\' is a number of loops that immediately follow the directive.\n\'n\' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.\nPatch adds parsing and semantic analysis for this optional argument.\n\nllvm-svn: 243635"}, | ||
[ | [g]={{q,9212,"/// Called on a for stmt to check and extract its iteration space\n/// for further processing (such as collapsing).\nstatic bool checkOpenMPIterationSpace(OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, unsigned CurrentNestedLoopCount, unsigned NestedLoopCount, unsigned TotalNestedLoopCount, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, llvm::MutableArrayRef<LoopIterationSpace> ResultIterSpaces, llvm::MapVector<const Expr *, DeclRefExpr *> &Captures) {\n // ...\n // Ranged for is supported only in OpenMP 5.0.\n if (!For && (SemaRef.LangOpts.OpenMP <= 45 || !CXXFor)) {\n // ...\n if (TotalNestedLoopCount > 1) {\n if (CollapseLoopCountExpr && OrderedLoopCountExpr)\n SemaRef.Diag(DSA.getConstructLoc(), diag::note_omp_collapse_ordered_expr) << 2 << CollapseLoopCountExpr->getSourceRange() << OrderedLoopCountExpr->getSourceRange();"},{q,9217,"/// Called on a for stmt to check and extract its iteration space\n/// for further processing (such as collapsing).\nstatic bool checkOpenMPIterationSpace(OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, unsigned CurrentNestedLoopCount, unsigned NestedLoopCount, unsigned TotalNestedLoopCount, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, llvm::MutableArrayRef<LoopIterationSpace> ResultIterSpaces, llvm::MapVector<const Expr *, DeclRefExpr *> &Captures) {\n // ...\n // Ranged for is supported only in OpenMP 5.0.\n if (!For && (SemaRef.LangOpts.OpenMP <= 45 || !CXXFor)) {\n // ...\n if (TotalNestedLoopCount > 1) {\n if (CollapseLoopCountExpr && OrderedLoopCountExpr)\n // ...\n else if (CollapseLoopCountExpr)\n SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), diag::note_omp_collapse_ordered_expr) << 0 << CollapseLoopCountExpr->getSourceRange();"},{q,9221,"/// Called on a for stmt to check and extract its iteration space\n/// for further processing (such as collapsing).\nstatic bool checkOpenMPIterationSpace(OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, unsigned CurrentNestedLoopCount, unsigned NestedLoopCount, unsigned TotalNestedLoopCount, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, llvm::MutableArrayRef<LoopIterationSpace> ResultIterSpaces, llvm::MapVector<const Expr *, DeclRefExpr *> &Captures) {\n // ...\n // Ranged for is supported only in OpenMP 5.0.\n if (!For && (SemaRef.LangOpts.OpenMP <= 45 || !CXXFor)) {\n // ...\n if (TotalNestedLoopCount > 1) {\n if (CollapseLoopCountExpr && OrderedLoopCountExpr)\n // ...\n else if (CollapseLoopCountExpr)\n // ...\n else\n SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), diag::note_omp_collapse_ordered_expr) << 1 << OrderedLoopCountExpr->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:108:28: note: as specified in \'collapse\' clause"} | ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:108:28: note: as specified in \'collapse\' clause"} | ||
} | } | ||
}, | }, | ||
["note_omp_conversion_here"]={ | ["note_omp_conversion_here"]={ | ||
[e]="conversion to %select{integral|enumeration}0 type %1 declared here", | [e]="conversion to %select{integral|enumeration}0 type %1 declared here", | ||
[ | [a]=k, | ||
[b]="conversion to (?:integral|enumeration) type (.*?) declared here", | [b]="conversion to (?:integral|enumeration) type (.*?) declared here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"568a833f68de",1394086519,"[OPENMP] Clause \'num_threads\'\n\nllvm-svn: 203087","[OPENMP] Clause \'num_threads\'\n\nllvm-svn: 203087"}, | ||
[ | [g]={{q,16406,"ExprResult Sema::PerformOpenMPImplicitIntegerConversion(SourceLocation Loc, Expr *Op) {\n // ...\n class IntConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_omp_conversion_here) << ConvTy->isEnumeralType() << ConvTy; }"},{q,16415,"ExprResult Sema::PerformOpenMPImplicitIntegerConversion(SourceLocation Loc, Expr *Op) {\n // ...\n class IntConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_omp_conversion_here) << ConvTy->isEnumeralType() << ConvTy; }"}} | ||
}, | }, | ||
["note_omp_critical_hint_here"]={ | ["note_omp_critical_hint_here"]={ | ||
[e]="%select{|previous }0\'hint\' clause with value \'%1\'", | [e]="%select{|previous }0\'hint\' clause with value \'%1\'", | ||
[ | [a]=k, | ||
[b]="(?:|previous )\'hint\' clause with value \'(.*?)\'", | [b]="(?:|previous )\'hint\' clause with value \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"28c75417b2c4",1450167564,"[OPENMP 4.5] Parsing/sema for \'hint\' clause of \'critical\' directive.\nOpenMP 4.5 adds \'hint\' clause t...","[OPENMP 4.5] Parsing/sema for \'hint\' clause of \'critical\' directive.\nOpenMP 4.5 adds \'hint\' clause to critical directive. Patch adds parsing/semantic analysis for this clause.\n\nllvm-svn: 255625"}, | ||
[ | [g]={{q,10890,"StmtResult Sema::ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (Pair.first && DirName.getName() && !DependentHint) {\n if (llvm::APSInt::compareValues(Hint, Pair.second) != 0) {\n // ...\n if (HintLoc.isValid())\n Diag(HintLoc, diag::note_omp_critical_hint_here) << 0 << toString(Hint, /*Radix=*/10, /*Signed=*/false);"},{q,10895,"StmtResult Sema::ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (Pair.first && DirName.getName() && !DependentHint) {\n if (llvm::APSInt::compareValues(Hint, Pair.second) != 0) {\n // ...\n if (const auto *C = Pair.first->getSingleClause<OMPHintClause>()) {\n Diag(C->getBeginLoc(), diag::note_omp_critical_hint_here) << 1"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/critical_messages.cpp"]={"clang/test/OpenMP/critical_messages.cpp:70:31: note: \'hint\' clause with value \'4\'","clang/test/OpenMP/critical_messages.cpp:137:31: note: previous \'hint\' clause with value \'23\'"} | ["clang/test/OpenMP/critical_messages.cpp"]={"clang/test/OpenMP/critical_messages.cpp:70:31: note: \'hint\' clause with value \'4\'","clang/test/OpenMP/critical_messages.cpp:137:31: note: previous \'hint\' clause with value \'23\'"} | ||
} | } | ||
}, | }, | ||
["note_omp_critical_no_hint"]={ | ["note_omp_critical_no_hint"]={ | ||
[e]="%select{|previous }0directive with no \'hint\' clause specified", | [e]="%select{|previous }0directive with no \'hint\' clause specified", | ||
[ | [a]=k, | ||
[b]="(?:|previous )directive with no \'hint\' clause specified", | [b]="(?:|previous )directive with no \'hint\' clause specified", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"28c75417b2c4",1450167564,"[OPENMP 4.5] Parsing/sema for \'hint\' clause of \'critical\' directive.\nOpenMP 4.5 adds \'hint\' clause t...","[OPENMP 4.5] Parsing/sema for \'hint\' clause of \'critical\' directive.\nOpenMP 4.5 adds \'hint\' clause to critical directive. Patch adds parsing/semantic analysis for this clause.\n\nllvm-svn: 255625"}, | ||
[ | [g]={{q,10893,"StmtResult Sema::ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (Pair.first && DirName.getName() && !DependentHint) {\n if (llvm::APSInt::compareValues(Hint, Pair.second) != 0) {\n // ...\n if (HintLoc.isValid())\n // ...\n else\n Diag(StartLoc, diag::note_omp_critical_no_hint) << 0;"},{q,10900,"StmtResult Sema::ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (Pair.first && DirName.getName() && !DependentHint) {\n if (llvm::APSInt::compareValues(Hint, Pair.second) != 0) {\n // ...\n if (const auto *C = Pair.first->getSingleClause<OMPHintClause>()) {\n // ...\n } else {\n Diag(Pair.first->getBeginLoc(), diag::note_omp_critical_no_hint) << 1;"}} | ||
}, | }, | ||
["note_omp_ctx_compatible_set_and_selector_for_property"]={ | ["note_omp_ctx_compatible_set_and_selector_for_property"]={ | ||
[e]="the context property \'%0\' can be nested in the context selector \'%1\' which is nested in the context set \'%2\'; try \'match(%2={%1(%0)})\'", | [e]="the context property \'%0\' can be nested in the context selector \'%1\' which is nested in the context set \'%2\'; try \'match(%2={%1(%0)})\'", | ||
[ | [a]=k, | ||
[b]="the context property \'(.*?)\' can be nested in the context selector \'(.*?)\' which is nested in the context set \'(.*?)\'; try \'match\\((.*?)\\=\\{(.*?)\\((.*?)\\)\\}\\)\'", | [b]="the context property \'(.*?)\' can be nested in the context selector \'(.*?)\' which is nested in the context set \'(.*?)\'; try \'match\\((.*?)\\=\\{(.*?)\\((.*?)\\)\\}\\)\'", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{L,1032,"void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(PropertyLoc, diag::note_omp_ctx_compatible_set_and_selector_for_property) << getOpenMPContextTraitPropertyName(TIProperty.Kind, TIProperty.RawString) << getOpenMPContextTraitSelectorName(getOpenMPContextTraitSelectorForProperty(TIProperty.Kind)) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForProperty(TIProperty.Kind));"}} | ||
}, | }, | ||
["note_omp_ctx_compatible_set_for_selector"]={ | ["note_omp_ctx_compatible_set_for_selector"]={ | ||
[e]="the context selector \'%0\' can be nested in the context set \'%1\'; try \'match(%1={%0%select{|(property)}2})\'", | [e]="the context selector \'%0\' can be nested in the context set \'%1\'; try \'match(%1={%0%select{|(property)}2})\'", | ||
[ | [a]=k, | ||
[b]="the context selector \'(.*?)\' can be nested in the context set \'(.*?)\'; try \'match\\((.*?)\\=\\{(.*?)(?:|\\(property\\))\\}\\)\'", | [b]="the context selector \'(.*?)\' can be nested in the context set \'(.*?)\'; try \'match\\((.*?)\\=\\{(.*?)(?:|\\(property\\))\\}\\)\'", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{L,1164,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n if (!isValidTraitSelectorForTraitSet(TISelector.Kind, Set, AllowsTraitScore, RequiresProperty)) {\n // ...\n Diag(SelectorLoc, diag::note_omp_ctx_compatible_set_for_selector) << getOpenMPContextTraitSelectorName(TISelector.Kind) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForSelector(TISelector.Kind)) << RequiresProperty;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/declare_variant_messages.c"]={"clang/test/OpenMP/declare_variant_messages.c:49:72: note: the context selector \'vendor\' can be nested in the context set \'implementation\'; try \'match(implementation={vendor(property)})\'","clang/test/OpenMP/declare_variant_messages.c:39:79: note: the context selector \'kind\' can be nested in the context set \'device\'; try \'match(device={kind(property)})\'"} | ["clang/test/OpenMP/declare_variant_messages.c"]={"clang/test/OpenMP/declare_variant_messages.c:49:72: note: the context selector \'vendor\' can be nested in the context set \'implementation\'; try \'match(implementation={vendor(property)})\'","clang/test/OpenMP/declare_variant_messages.c:39:79: note: the context selector \'kind\' can be nested in the context set \'device\'; try \'match(device={kind(property)})\'"} | ||
} | } | ||
}, | }, | ||
["note_omp_declare_variant_ctx_continue_here"]={ | ["note_omp_declare_variant_ctx_continue_here"]={ | ||
[e]="the ignored %select{set|selector|property}0 spans until here", | [e]="the ignored %select{set|selector|property}0 spans until here", | ||
[ | [a]=k, | ||
[b]="the ignored (?:set|selector|property) spans until here", | [b]="the ignored (?:set|selector|property) spans until here", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{L,1013,"void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n // If we have an invalid property here we already issued a warning.\n if (TIProperty.Kind == TraitProperty::invalid) {\n if (PropertyLoc != Tok.getLocation())\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) << CONTEXT_TRAIT_LVL;"},{L,1039,"void Parser::parseOMPContextProperty(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) << CONTEXT_TRAIT_LVL;"},{L,1148,"/// Parses an OpenMP context selector.\n///\n/// <trait-selector-name> [\'(\'[<trait-score>] <trait-property> [, <t-p>]* \')\']\nvoid Parser::parseOMPContextSelector(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &SeenSelectors) {\n // ...\n // If anything went wrong we issue an error or warning and then skip the rest\n // of the selector. However, commas are ambiguous so we look for the nesting\n // of parentheses here as well.\n auto FinishSelector = [OuterPC, this]() -> void {\n // ...\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) << CONTEXT_SELECTOR_LVL;"},{L,1318,"/// Parses an OpenMP context selector set.\n///\n/// <trait-set-selector-name> \'=\' \'{\' <trait-selector> [, <trait-selector>]* \'}\'\nvoid Parser::parseOMPContextSelectorSet(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &SeenSets) {\n // ...\n // If anything went wrong we issue an error or warning and then skip the rest\n // of the set. However, commas are ambiguous so we look for the nesting\n // of braces here as well.\n auto FinishSelectorSet = [this, OuterBC]() -> void {\n // ...\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) << CONTEXT_SELECTOR_SET_LVL;"}}, | ||
[ | [h]={ | ||
["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:6:87: note: the ignored property spans until here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:89: note: the ignored property spans until here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:12:101: note: the ignored property spans until here"} | ["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:6:87: note: the ignored property spans until here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:89: note: the ignored property spans until here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:12:101: note: the ignored property spans until here"} | ||
} | } | ||
}, | }, | ||
["note_omp_declare_variant_ctx_is_a"]={ | ["note_omp_declare_variant_ctx_is_a"]={ | ||
[e]="\'%0\' is a context %select{set|selector|property}1 not a context %select{set|selector|property}2", | [e]="\'%0\' is a context %select{set|selector|property}1 not a context %select{set|selector|property}2", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' is a context (?:set|selector|property) not a context (?:set|selector|property)", | [b]="\'(.*?)\' is a context (?:set|selector|property) not a context (?:set|selector|property)", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{L,905,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SetForName != TraitSet::invalid) {\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_is_a) << Name << CONTEXT_SELECTOR_SET_LVL << CONTEXT_TRAIT_LVL;"},{L,914,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SelectorForName != TraitSelector::invalid) {\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_is_a) << Name << CONTEXT_SELECTOR_LVL << CONTEXT_TRAIT_LVL;"},{L,1069,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SetForName != TraitSet::invalid) {\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_is_a) << Name << CONTEXT_SELECTOR_SET_LVL << CONTEXT_SELECTOR_LVL;"},{L,1083,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n for (const auto &PotentialSet : {TraitSet::construct, TraitSet::user, TraitSet::implementation, TraitSet::device}) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_is_a) << Name << CONTEXT_TRAIT_LVL << CONTEXT_SELECTOR_LVL;"},{L,1255,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SelectorForName != TraitSelector::invalid) {\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_is_a) << Name << CONTEXT_SELECTOR_LVL << CONTEXT_SELECTOR_SET_LVL;"},{L,1275,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n for (const auto &PotentialSet : {TraitSet::construct, TraitSet::user, TraitSet::implementation, TraitSet::device}) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_is_a) << Name << CONTEXT_TRAIT_LVL << CONTEXT_SELECTOR_SET_LVL;"}} | ||
}, | }, | ||
["note_omp_declare_variant_ctx_options"]={ | ["note_omp_declare_variant_ctx_options"]={ | ||
[e]="context %select{set|selector|property}0 options are: %1", | [e]="context %select{set|selector|property}0 options are: %1", | ||
[ | [a]=k, | ||
[b]="context (?:set|selector|property) options are\\: (.*?)", | [b]="context (?:set|selector|property) options are\\: (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{L,884,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (Name.empty()) {\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_options) << CONTEXT_TRAIT_LVL << listOpenMPContextTraitProperties(Set, Selector);"},{L,942,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_options) << CONTEXT_TRAIT_LVL << listOpenMPContextTraitProperties(Set, Selector);"},{L,1051,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (Name.empty()) {\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_options) << CONTEXT_SELECTOR_LVL << listOpenMPContextTraitSelectors(Set);"},{L,1093,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_options) << CONTEXT_SELECTOR_LVL << listOpenMPContextTraitSelectors(Set);"},{L,1237,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (Name.empty()) {\n Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_options) << CONTEXT_SELECTOR_SET_LVL << listOpenMPContextTraitSets();"},{L,1285,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_options) << CONTEXT_SELECTOR_SET_LVL << listOpenMPContextTraitSets();"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:8:32: note: context set options are: \'construct\' \'device\' \'implementation\' \'user\'","clang/test/OpenMP/metadirective_messages.cpp:10:39: note: context selector options are: \'kind\' \'arch\' \'isa\'"} | ["clang/test/OpenMP/metadirective_messages.cpp"]={"clang/test/OpenMP/metadirective_messages.cpp:8:32: note: context set options are: \'construct\' \'device\' \'implementation\' \'user\'","clang/test/OpenMP/metadirective_messages.cpp:10:39: note: context selector options are: \'kind\' \'arch\' \'isa\'"} | ||
} | } | ||
}, | }, | ||
["note_omp_declare_variant_ctx_try"]={ | ["note_omp_declare_variant_ctx_try"]={ | ||
[e]="try \'match(%0={%1%2})\'", | [e]="try \'match(%0={%1%2})\'", | ||
[ | [a]=k, | ||
[b]="try \'match\\((.*?)\\=\\{(.*?)(.*?)\\}\\)\'", | [b]="try \'match\\((.*?)\\=\\{(.*?)(.*?)\\}\\)\'", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{L,907,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SetForName != TraitSet::invalid) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << Name << \"<selector-name>\""},{L,921,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SelectorForName != TraitSelector::invalid) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForSelector(SelectorForName)) << Name << (RequiresProperty ? \"(<property-name>)\" : \"\");"},{L,934,"void Parser::parseOMPTraitPropertyKind(OMPTraitProperty &TIProperty, llvm::omp::TraitSet Set, llvm::omp::TraitSelector Selector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n for (const auto &PotentialSet : {TraitSet::construct, TraitSet::user, TraitSet::implementation, TraitSet::device}) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForProperty(PropertyForName)) << getOpenMPContextTraitSelectorName(getOpenMPContextTraitSelectorForProperty(PropertyForName)) << (\"(\" + Name + \")\").str();"},{L,1071,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SetForName != TraitSet::invalid) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << Name << \"<selector-name>\""},{L,1085,"void Parser::parseOMPTraitSelectorKind(OMPTraitSelector &TISelector, llvm::omp::TraitSet Set, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n for (const auto &PotentialSet : {TraitSet::construct, TraitSet::user, TraitSet::implementation, TraitSet::device}) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForProperty(PropertyForName)) << getOpenMPContextTraitSelectorName(getOpenMPContextTraitSelectorForProperty(PropertyForName)) << (\"(\" + Name + \")\").str();"},{L,1262,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (SelectorForName != TraitSelector::invalid) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForSelector(SelectorForName)) << Name << (RequiresProperty ? \"(<property-name>)\" : \"\");"},{L,1277,"void Parser::parseOMPTraitSetKind(OMPTraitSet &TISet, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n for (const auto &PotentialSet : {TraitSet::construct, TraitSet::user, TraitSet::implementation, TraitSet::device}) {\n // ...\n Diag(NameLoc, diag::note_omp_declare_variant_ctx_try) << getOpenMPContextTraitSetName(getOpenMPContextTraitSetForProperty(PropertyForName)) << getOpenMPContextTraitSelectorName(getOpenMPContextTraitSelectorForProperty(PropertyForName)) << (\"(\" + Name + \")\").str();"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/declare_variant_messages.c"]={"clang/test/OpenMP/declare_variant_messages.c:47:66: note: try \'match(implementation={vendor(ibm)})\'"} | ["clang/test/OpenMP/declare_variant_messages.c"]={"clang/test/OpenMP/declare_variant_messages.c:47:66: note: try \'match(implementation={vendor(ibm)})\'"} | ||
} | } | ||
}, | }, | ||
["note_omp_declare_variant_ctx_used_here"]={ | ["note_omp_declare_variant_ctx_used_here"]={ | ||
[e]="the previous context %select{set|selector|property}0 \'%1\' used here", | [e]="the previous context %select{set|selector|property}0 \'%1\' used here", | ||
[ | [a]=k, | ||
[b]="the previous context (?:set|selector|property) \'(.*?)\' used here", | [b]="the previous context (?:set|selector|property) \'(.*?)\' used here", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"70d2e5427ed3",1570556872,"[OPENMP50]Do not allow multiple same context traits in the same context\nselector.\n\nAccording to Open...","[OPENMP50]Do not allow multiple same context traits in the same context\nselector.\n\nAccording to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each\ntrait-selector-name can only be specified once. Added check for this\nrestriction.\n\nllvm-svn: 374093"}, | ||
[ | [g]={{L,869,"static bool checkForDuplicates(Parser &P, StringRef Name, SourceLocation NameLoc, llvm::StringMap<SourceLocation> &Seen, OMPContextLvl Lvl) {\n // ...\n P.Diag(Res.first->getValue(), diag::note_omp_declare_variant_ctx_used_here) << Lvl << Name;"},{L,985,"static bool checkExtensionProperty(Parser &P, SourceLocation Loc, OMPTraitProperty &TIProperty, OMPTraitSelector &TISelector, llvm::StringMap<SourceLocation> &Seen) {\n // ...\n if (IsMatchExtension(TIProperty)) {\n for (OMPTraitProperty &SeenProp : TISelector.Properties)\n if (IsMatchExtension(SeenProp)) {\n // ...\n P.Diag(SeenLoc, diag::note_omp_declare_variant_ctx_used_here) << CONTEXT_TRAIT_LVL << SeenName;"}}, | ||
[ | [h]={ | ||
["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:6:68: note: the previous context property \'match_any\' used here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:68: note: the previous context property \'match_none\' used here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:12:81: note: the previous context property \'match_none\' used here"} | ["clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c"]={"clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:6:68: note: the previous context property \'match_any\' used here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:9:68: note: the previous context property \'match_none\' used here","clang/test/AST/ast-dump-openmp-declare-variant-extensions-messages.c:12:81: note: the previous context property \'match_none\' used here"} | ||
} | } | ||
}, | }, | ||
["note_omp_default_dsa_none"]={ | ["note_omp_default_dsa_none"]={ | ||
[e]="explicit data sharing attribute requested here", | [e]="explicit data sharing attribute requested here", | ||
[ | [a]=k, | ||
[b]="explicit data sharing attribute requested here", | [b]="explicit data sharing attribute requested here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"cf9e7a282b74",1557164962,"[OPENMP]Fix PR41768: check DSA for globals with `default(none)` clauses.\n\nIf the `default(none)` was...","[OPENMP]Fix PR41768: check DSA for globals with `default(none)` clauses.\n\nIf the `default(none)` was specified for the construct, we might miss\ndiagnostic for the globals without explicitly specified data-sharing\nattributes. Patch fixes this problem.\n\nllvm-svn: 360061"}, | ||
[ | [g]={{q,6796,"StmtResult Sema::ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const auto &P : VarsWithInheritedDSA) {\n // ...\n if (DSAStack->getDefaultDSA() == DSA_none || DSAStack->getDefaultDSA() == DSA_private || DSAStack->getDefaultDSA() == DSA_firstprivate) {\n // ...\n Diag(DSAStack->getDefaultDSALocation(), diag::note_omp_default_dsa_none);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/parallel_messages.cpp"]={"clang/test/OpenMP/parallel_messages.cpp:64:30: note: explicit data sharing attribute requested here","clang/test/OpenMP/parallel_messages.cpp:64:30: note: explicit data sharing attribute requested here"} | ["clang/test/OpenMP/parallel_messages.cpp"]={"clang/test/OpenMP/parallel_messages.cpp:64:30: note: explicit data sharing attribute requested here","clang/test/OpenMP/parallel_messages.cpp:64:30: note: explicit data sharing attribute requested here"} | ||
} | } | ||
}, | }, | ||
["note_omp_defaultmap_attr_none"]={ | ["note_omp_defaultmap_attr_none"]={ | ||
[e]="explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here", | [e]="explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here", | ||
[ | [a]=k, | ||
[b]="explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here", | [b]="explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining\n\nSYCL is single source offload progr...","[SYCL] Add sycl_kernel attribute for accelerated code outlining\n\nSYCL is single source offload programming model relying on compiler to\nseparate device code (i.e. offloaded to an accelerator) from the code\nexecuted on the host.\n\nHere is code example of the SYCL program to demonstrate compiler\noutlining work:\n\n```\nint foo(int x) { return ++x; }\nint bar(int x) { throw std::exception(\"CPU code only!\"); }\n...\nusing namespace cl::sycl;\nqueue Q;\nbuffer<int, 1> a(range<1>{1024});\nQ.submit([&](handler& cgh) {\n auto A = a.get_access<access::mode::write>(cgh);\n cgh.parallel_for<init_a>(range<1>{1024}, [=](id<1> index) {\n A[index] = index[0] + foo(42);\n });\n}\n...\n```\n\nSYCL device compiler must compile lambda expression passed to\ncl::sycl::handler::parallel_for method and function foo called from this\nlambda expression for an \"accelerator\". SYCL device compiler also must\nignore bar function as it\'s not required for offloaded code execution.\n\nThis patch adds the sycl_kernel attribute, which is used to mark code\npassed to cl::sycl::handler::parallel_for as \"accelerated code\".\n\nAttribute must be applied to function templates which parameters include\nat least \"kernel name\" and \"kernel function object\". These parameters\nwill be used to establish an ABI between the host application and\noffloaded part.\n\nReviewers: jlebar, keryell, Naghasan, ABataev, Anastasia, bader, aaron.ballman, rjmccall, rsmith\n\nReviewed By: keryell, bader\n\nSubscribers: mgorny, OlegM, ArturGainullin, agozillon, aaron.ballman, ebevhan, Anastasia, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D60455\n\nSigned-off-by: Alexey Bader <alexey.bader@intel.com>"}, | ||
[ | [g]={{q,6802,"StmtResult Sema::ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const auto &P : VarsWithInheritedDSA) {\n // ...\n if (DSAStack->getDefaultDSA() == DSA_none || DSAStack->getDefaultDSA() == DSA_private || DSAStack->getDefaultDSA() == DSA_firstprivate) {\n // ...\n } else if (getLangOpts().OpenMP >= 50) {\n // ...\n Diag(DSAStack->getDefaultDSALocation(), diag::note_omp_defaultmap_attr_none);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_defaultmap_messages.cpp"]={"clang/test/OpenMP/target_defaultmap_messages.cpp:120:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:122:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:124:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:126:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:128:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:130:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:133:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:136:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:60:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:62:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:64:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:66:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:68:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:70:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:72:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:75:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:78:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here"} | ["clang/test/OpenMP/target_defaultmap_messages.cpp"]={"clang/test/OpenMP/target_defaultmap_messages.cpp:120:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:122:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:124:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:126:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:128:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:130:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:133:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:136:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:60:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:62:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:64:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:66:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:68:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:70:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:72:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:75:1: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here","clang/test/OpenMP/target_defaultmap_messages.cpp:78:3: note: explicit data sharing attribute, data mapping attribute, or is_device_ptr clause requested here"} | ||
} | } | ||
}, | }, | ||
["note_omp_directive_here"]={ | ["note_omp_directive_here"]={ | ||
[e]="\'%0\' directive found here", | [e]="\'%0\' directive found here", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' directive found here", | [b]="\'(.*?)\' directive found here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{q,14994,"StmtResult Sema::ActOnOpenMPUnrollDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (FullClause) {\n if (!VerifyPositiveIntegerConstantInClause(LoopHelper.NumIterations, OMPC_full, /*StrictlyPositive=*/false,\n // ...\n Diag(FullClause->getBeginLoc(), diag::note_omp_directive_here) << \"#pragma omp unroll full\";"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:83:22: note: \'#pragma omp unroll full\' directive found here","clang/test/OpenMP/unroll_messages.cpp:123:22: note: \'#pragma omp unroll full\' directive found here"} | ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:83:22: note: \'#pragma omp unroll full\' directive found here","clang/test/OpenMP/unroll_messages.cpp:123:22: note: \'#pragma omp unroll full\' directive found here"} | ||
} | } | ||
}, | }, | ||
["note_omp_exits_structured_block"]={ | ["note_omp_exits_structured_block"]={ | ||
[e]="jump exits scope of OpenMP structured block", | [e]="jump exits scope of OpenMP structured block", | ||
[ | [a]=k, | ||
[b]="jump exits scope of OpenMP structured block", | [b]="jump exits scope of OpenMP structured block", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{I,617,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n default:\n if (auto *ED = dyn_cast<OMPExecutableDirective>(S)) {\n if (!ED->isStandaloneDirective()) {\n // ...\n Scopes.emplace_back(ParentScope, diag::note_omp_protected_structured_block, diag::note_omp_exits_structured_block, ED->getStructuredBlock()->getBeginLoc());"},{I,946,"/// CheckJump - Validate that the specified jump statement is valid: that it is\n/// jumping within or out of its current scope, not into a deeper one.\nvoid JumpScopeChecker::CheckJump(Stmt *From, Stmt *To, SourceLocation DiagLoc, unsigned JumpDiagError, unsigned JumpDiagWarning, unsigned JumpDiagCXX98Compat) {\n // ...\n // Warn on gotos out of __finally blocks.\n if (isa<GotoStmt>(From) || isa<IndirectGotoStmt>(From)) {\n // If FromScope > ToScope, FromScope is more nested and the jump goes to a\n // less nested scope. Check if it crosses a __finally along the way.\n for (unsigned I = FromScope; I > ToScope; I = Scopes[I].ParentScope) {\n // ...\n if (Scopes[I].InDiag == diag::note_omp_protected_structured_block) {\n // ...\n S.Diag(To->getBeginLoc(), diag::note_omp_exits_structured_block);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/master_messages.cpp"]={"clang/test/OpenMP/master_messages.cpp:57:3: note: jump exits scope of OpenMP structured block"} | ["clang/test/OpenMP/master_messages.cpp"]={"clang/test/OpenMP/master_messages.cpp:57:3: note: jump exits scope of OpenMP structured block"} | ||
} | } | ||
}, | }, | ||
["note_omp_explicit_dsa"]={ | ["note_omp_explicit_dsa"]={ | ||
[e]="defined as %0", | [e]="defined as %0", | ||
[ | [a]=k, | ||
[b]="defined as (.*?)", | [b]="defined as (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"d4183dabd7a9",1378212952,"OpenMP: Data-sharing attributes analysis and clause \'shared\'\n\nllvm-svn: 189795","OpenMP: Data-sharing attributes analysis and clause \'shared\'\n\nllvm-svn: 189795"}, | ||
[ | [g]={{q,3569,"static void reportOriginalDsa(Sema &SemaRef, const DSAStackTy *Stack, const ValueDecl *D, const DSAStackTy::DSAVarData &DVar, bool IsLoopIterVar) {\n if (DVar.RefExpr) {\n SemaRef.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(DVar.CKind);"},{q,6909,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Aligneds) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // OpenMP [2.8.1, simd construct, Restrictions]\n // A list-item cannot appear in more than one aligned clause.\n if (AlignedArgs.count(CanonPVD) > 0) {\n // ...\n Diag(AlignedArgs[CanonPVD]->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(OMPC_aligned);"},{q,6931,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Aligneds) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n if (AlignedThis) {\n // ...\n Diag(AlignedThis->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(OMPC_aligned);"},{q,6980,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Linears) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // OpenMP [2.15.3.7, linear Clause, Restrictions]\n // A list-item cannot appear in more than one linear clause.\n if (LinearArgs.count(CanonPVD) > 0) {\n // ...\n Diag(LinearArgs[CanonPVD]->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(OMPC_linear);"},{q,6990,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Linears) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // ...\n // Each argument can appear in at most one uniform or linear clause.\n if (UniformedArgs.count(CanonPVD) > 0) {\n // ...\n Diag(UniformedArgs[CanonPVD]->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(OMPC_uniform);"},{q,7011,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Linears) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n if (UniformedLinearThis) {\n // ...\n Diag(UniformedLinearThis->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(IsUniformedThis ? OMPC_uniform : OMPC_linear);"},{q,20299,"OMPClause *Sema::ActOnOpenMPAlignedClause(ArrayRef<Expr *> VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.8.1, simd construct, Restrictions]\n // A list-item cannot appear in more than one aligned clause.\n if (const Expr *PrevRef = DSAStack->addUniqueAligned(D, SimpleRefExpr)) {\n // ...\n Diag(PrevRef->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(OMPC_aligned);"},{q,23732,"OMPClause *Sema::ActOnOpenMPNontemporalClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP 5.0, 2.9.3.1 simd Construct, Restrictions.\n // A list-item cannot appear in more than one nontemporal clause.\n if (const Expr *PrevRef = DSAStack->addUniqueNontemporal(D, SimpleRefExpr)) {\n // ...\n Diag(PrevRef->getExprLoc(), diag::note_omp_explicit_dsa) << getOpenMPClauseName(OMPC_nontemporal);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_uses_allocators_messages.cpp"]={"clang/test/OpenMP/target_uses_allocators_messages.cpp:49:62: note: defined as private"} | ["clang/test/OpenMP/target_uses_allocators_messages.cpp"]={"clang/test/OpenMP/target_uses_allocators_messages.cpp:49:62: note: defined as private"} | ||
} | } | ||
}, | }, | ||
["note_omp_flush_order_clause_here"]={ | ["note_omp_flush_order_clause_here"]={ | ||
[e]="memory order clause \'%0\' is specified here", | [e]="memory order clause \'%0\' is specified here", | ||
[ | [a]=k, | ||
[b]="memory order clause \'(.*?)\' is specified here", | [b]="memory order clause \'(.*?)\' is specified here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{q,11242,"StmtResult Sema::ActOnOpenMPFlushDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (FC && OrderClause) {\n // ...\n Diag(OrderClause->getBeginLoc(), diag::note_omp_flush_order_clause_here) << getOpenMPClauseName(OrderClause->getClauseKind());"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/flush_messages.cpp"]={"clang/test/OpenMP/flush_messages.cpp:146:25: note: memory order clause \'acq_rel\' is specified here"} | ["clang/test/OpenMP/flush_messages.cpp"]={"clang/test/OpenMP/flush_messages.cpp:146:25: note: memory order clause \'acq_rel\' is specified here"} | ||
} | } | ||
}, | }, | ||
["note_omp_implicit_dsa"]={ | ["note_omp_implicit_dsa"]={ | ||
[e]="implicitly determined as %0", | [e]="implicitly determined as %0", | ||
[ | [a]=k, | ||
[b]="implicitly determined as (.*?)", | [b]="implicitly determined as (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"bae9a793fdf7",1403865426,"[OPENMP] Parsing and sema analysis for \'copyprivate\' clause.\n\nllvm-svn: 211886","[OPENMP] Parsing and sema analysis for \'copyprivate\' clause.\n\nllvm-svn: 211886"}, | ||
[ | [g]={{q,3616,"static void reportOriginalDsa(Sema &SemaRef, const DSAStackTy *Stack, const ValueDecl *D, const DSAStackTy::DSAVarData &DVar, bool IsLoopIterVar) {\n // ...\n if (Reason != PDSA_Implicit) {\n // ...\n } else if (DVar.ImplicitDSALoc.isValid()) {\n SemaRef.Diag(DVar.ImplicitDSALoc, diag::note_omp_implicit_dsa) << getOpenMPClauseName(DVar.CKind);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/single_copyprivate_messages.cpp"]={"clang/test/OpenMP/single_copyprivate_messages.cpp:146:1: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:162:30: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:168:1: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:70:1: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:86:30: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:92:1: note: implicitly determined as shared"} | ["clang/test/OpenMP/single_copyprivate_messages.cpp"]={"clang/test/OpenMP/single_copyprivate_messages.cpp:146:1: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:162:30: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:168:1: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:70:1: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:86:30: note: implicitly determined as shared","clang/test/OpenMP/single_copyprivate_messages.cpp:92:1: note: implicitly determined as shared"} | ||
} | } | ||
}, | }, | ||
["note_omp_invalid_length_on_this_ptr_mapping"]={ | ["note_omp_invalid_length_on_this_ptr_mapping"]={ | ||
[e]="expected length on mapping of \'this\' array section expression to be \'1\'", | [e]="expected length on mapping of \'this\' array section expression to be \'1\'", | ||
[ | [a]=k, | ||
[b]="expected length on mapping of \'this\' array section expression to be \'1\'", | [b]="expected length on mapping of \'this\' array section expression to be \'1\'", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"e13b1e3299c1",1546457328,"[OpenMP] Added support for explicit mapping of classes using \'this\' pointer. Differential revision: ...","[OpenMP] Added support for explicit mapping of classes using \'this\' pointer. Differential revision: https://reviews.llvm.org/D55982\n\nllvm-svn: 350252"}, | ||
[ | [g]={{q,21319,"class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {\n // ...\n bool VisitOMPArraySectionExpr(OMPArraySectionExpr *OASE) {\n // ...\n if (const auto *TE = dyn_cast<CXXThisExpr>(E)) {\n // ...\n if (!OASE->getLength()->isValueDependent() && OASE->getLength()->EvaluateAsInt(ResultR, SemaRef.getASTContext()) && !ResultR.Val.getInt().isOne()) {\n // ...\n SemaRef.Diag(OASE->getLength()->getExprLoc(), diag::note_omp_invalid_length_on_this_ptr_mapping);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_messages.cpp"]={"clang/test/OpenMP/target_messages.cpp:51:34: note: expected length on mapping of \'this\' array section expression to be \'1\'"} | ["clang/test/OpenMP/target_messages.cpp"]={"clang/test/OpenMP/target_messages.cpp:51:34: note: expected length on mapping of \'this\' array section expression to be \'1\'"} | ||
} | } | ||
}, | }, | ||
["note_omp_invalid_lower_bound_on_this_ptr_mapping"]={ | ["note_omp_invalid_lower_bound_on_this_ptr_mapping"]={ | ||
[e]="expected lower bound on mapping of \'this\' array section expression to be \'0\' or not specified", | [e]="expected lower bound on mapping of \'this\' array section expression to be \'0\' or not specified", | ||
[ | [a]=k, | ||
[b]="expected lower bound on mapping of \'this\' array section expression to be \'0\' or not specified", | [b]="expected lower bound on mapping of \'this\' array section expression to be \'0\' or not specified", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"e13b1e3299c1",1546457328,"[OpenMP] Added support for explicit mapping of classes using \'this\' pointer. Differential revision: ...","[OpenMP] Added support for explicit mapping of classes using \'this\' pointer. Differential revision: https://reviews.llvm.org/D55982\n\nllvm-svn: 350252"}, | ||
[ | [g]={{q,21328,"class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {\n // ...\n bool VisitOMPArraySectionExpr(OMPArraySectionExpr *OASE) {\n // ...\n if (const auto *TE = dyn_cast<CXXThisExpr>(E)) {\n // ...\n if (OASE->getLowerBound() && !OASE->getLowerBound()->isValueDependent() && OASE->getLowerBound()->EvaluateAsInt(ResultL, SemaRef.getASTContext()) && !ResultL.Val.getInt().isZero()) {\n // ...\n SemaRef.Diag(OASE->getLowerBound()->getExprLoc(), diag::note_omp_invalid_lower_bound_on_this_ptr_mapping);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_messages.cpp"]={"clang/test/OpenMP/target_messages.cpp:53:33: note: expected lower bound on mapping of \'this\' array section expression to be \'0\' or not specified"} | ["clang/test/OpenMP/target_messages.cpp"]={"clang/test/OpenMP/target_messages.cpp:53:33: note: expected lower bound on mapping of \'this\' array section expression to be \'0\' or not specified"} | ||
} | } | ||
}, | }, | ||
["note_omp_invalid_subscript_on_this_ptr_map"]={ | ["note_omp_invalid_subscript_on_this_ptr_map"]={ | ||
[e]="expected \'this\' subscript expression on map clause to be \'this[0]\'", | [e]="expected \'this\' subscript expression on map clause to be \'this[0]\'", | ||
[ | [a]=k, | ||
[b]="expected \'this\' subscript expression on map clause to be \'this\\[0\\]\'", | [b]="expected \'this\' subscript expression on map clause to be \'this\\[0\\]\'", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"e13b1e3299c1",1546457328,"[OpenMP] Added support for explicit mapping of classes using \'this\' pointer. Differential revision: ...","[OpenMP] Added support for explicit mapping of classes using \'this\' pointer. Differential revision: https://reviews.llvm.org/D55982\n\nllvm-svn: 350252"}, | ||
[ | [g]={{q,21240,"class MapBaseChecker final : public StmtVisitor<MapBaseChecker, bool> {\n // ...\n bool VisitArraySubscriptExpr(ArraySubscriptExpr *AE) {\n // ...\n if (const auto *TE = dyn_cast<CXXThisExpr>(E->IgnoreParenCasts())) {\n // ...\n if (!AE->getIdx()->isValueDependent() && AE->getIdx()->EvaluateAsInt(Result, SemaRef.getASTContext()) && !Result.Val.getInt().isZero()) {\n // ...\n SemaRef.Diag(AE->getIdx()->getExprLoc(), diag::note_omp_invalid_subscript_on_this_ptr_map);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_messages.cpp"]={"clang/test/OpenMP/target_messages.cpp:55:33: note: expected \'this\' subscript expression on map clause to be \'this[0]\'"} | ["clang/test/OpenMP/target_messages.cpp"]={"clang/test/OpenMP/target_messages.cpp:55:33: note: expected \'this\' subscript expression on map clause to be \'this[0]\'"} | ||
} | } | ||
}, | }, | ||
["note_omp_loop_cond_requres_compatible_incr"]={ | ["note_omp_loop_cond_requres_compatible_incr"]={ | ||
[e]="loop step is expected to be %select{negative|positive}0 due to this condition", | [e]="loop step is expected to be %select{negative|positive}0 due to this condition", | ||
[ | [a]=k, | ||
[b]="loop step is expected to be (?:negative|positive) due to this condition", | [b]="loop step is expected to be (?:negative|positive) due to this condition", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"a8e9d2eccc6e",1401790607,"[OPENMP] Loop canonical form analysis (Sema)\n\nThis patch implements semantic analysis to make sure t...","[OPENMP] Loop canonical form analysis (Sema)\n\nThis patch implements semantic analysis to make sure that the loop is in OpenMP canonical form.\nThis is the form required for \'omp simd\', \'omp for\' and other loop pragmas.\n\nDifferential revision: http://reviews.llvm.org/D3778\n\nllvm-svn: 210095"}, | ||
[ | [g]={{q,8026,"bool OpenMPIterationSpaceChecker::setStep(Expr *NewStep, bool Subtract) {\n // ...\n if (!NewStep->isValueDependent()) {\n // ...\n if (UB && (IsConstZero || (*TestIsLessOp ? (IsConstNeg || (IsUnsigned && Subtract)) : (IsConstPos || (IsUnsigned && !Subtract))))) {\n // ...\n SemaRef.Diag(ConditionLoc, diag::note_omp_loop_cond_requres_compatible_incr) << *TestIsLessOp << ConditionSrcRange;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/parallel_for_simd_loop_messages.cpp"]={"clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:199:19: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:205:19: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:211:21: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:217:20: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:223:19: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:229:19: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:235:21: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:241:20: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:295:26: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:437:30: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:449:30: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:474:28: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:530:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:493:26: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:499:26: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:517:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:523:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:517:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:523:24: note: loop step is expected to be negative due to this condition"} | ["clang/test/OpenMP/parallel_for_simd_loop_messages.cpp"]={"clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:199:19: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:205:19: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:211:21: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:217:20: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:223:19: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:229:19: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:235:21: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:241:20: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:295:26: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:437:30: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:449:30: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:474:28: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:530:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:493:26: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:499:26: note: loop step is expected to be positive due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:517:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:523:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:517:24: note: loop step is expected to be negative due to this condition","clang/test/OpenMP/parallel_for_simd_loop_messages.cpp:523:24: note: loop step is expected to be negative due to this condition"} | ||
} | } | ||
}, | }, | ||
["note_omp_marked_declare_variant_here"]={ | ["note_omp_marked_declare_variant_here"]={ | ||
[e]="marked as \'declare variant\' here", | [e]="marked as \'declare variant\' here", | ||
[ | [a]=k, | ||
[b]="marked as \'declare variant\' here", | [b]="marked as \'declare variant\' here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{q,7584,"std::optional<std::pair<FunctionDecl *, Expr *>> Sema::checkOpenMPDeclareVariantFunction(Sema::DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR) {\n // ...\n // Check if variant function is not marked with declare variant directive.\n if (NewFD->hasAttrs() && NewFD->hasAttr<OMPDeclareVariantAttr>()) {\n // ...\n Diag(SR.getBegin(), diag::note_omp_marked_declare_variant_here) << SR;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/declare_variant_messages.c"]={"clang/test/OpenMP/declare_variant_messages.c:173:1: note: marked as \'declare variant\' here"} | ["clang/test/OpenMP/declare_variant_messages.c"]={"clang/test/OpenMP/declare_variant_messages.c:173:1: note: marked as \'declare variant\' here"} | ||
} | } | ||
}, | }, | ||
["note_omp_marked_device_type_here"]={ | ["note_omp_marked_device_type_here"]={ | ||
[e]="marked as \'device_type(%0)\' here", | [e]="marked as \'device_type(%0)\' here", | ||
[ | [a]=k, | ||
[b]="marked as \'device_type\\((.*?)\\)\' here", | [b]="marked as \'device_type\\((.*?)\\)\' here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"729e242a7972",1566576674,"[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced ne...","[OPENMP5.0]Add support for device_type clause in declare target\nconstruct.\n\nOpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means\nthat the function must be emitted only for the host, nohost - only for\nthe device, and any - for both, device and the host.\n\nllvm-svn: 369775"}, | ||
[ | [g]={{q,2722,"void Sema::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc) {\n // ...\n if (LangOpts.OpenMPIsTargetDevice && DevTy && *DevTy == OMPDeclareTargetDeclAttr::DT_Host) {\n // ...\n Diag(*OMPDeclareTargetDeclAttr::getLocation(FD), diag::note_omp_marked_device_type_here) << HostDevTy;"},{q,2751,"void Sema::finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc) {\n // ...\n if (!LangOpts.OpenMPIsTargetDevice && !LangOpts.OpenMPOffloadMandatory && DevTy && *DevTy == OMPDeclareTargetDeclAttr::DT_NoHost) {\n // ...\n Diag(*OMPDeclareTargetDeclAttr::getLocation(FD), diag::note_omp_marked_device_type_here) << NoHostDevTy;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/declare_target_nohost_variant_messages.cpp"]={"clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:15:34: note: marked as \'device_type(nohost)\' here","clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:18:27: note: marked as \'device_type(nohost)\' here"} | ["clang/test/OpenMP/declare_target_nohost_variant_messages.cpp"]={"clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:15:34: note: marked as \'device_type(nohost)\' here","clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:18:27: note: marked as \'device_type(nohost)\' here"} | ||
} | } | ||
}, | }, | ||
["note_omp_nested_statement_here"]={ | ["note_omp_nested_statement_here"]={ | ||
[e]="%select{statement|directive}0 outside teams construct here", | [e]="%select{statement|directive}0 outside teams construct here", | ||
[ | [a]=k, | ||
[b]="(?:statement|directive) outside teams construct here", | [b]="(?:statement|directive) outside teams construct here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"941bbec6f4d9",1412676813,"[OPENMP] \'omp teams\' directive basic support.\nIncludes parsing and semantic analysis for \'omp teams\'...","[OPENMP] \'omp teams\' directive basic support.\nIncludes parsing and semantic analysis for \'omp teams\' directive support from OpenMP 4.0. Adds additional analysis to \'omp target\' directive with \'omp teams\' directive.\n\nllvm-svn: 219197"}, | ||
[ | [g]={{q,13062,"StmtResult Sema::ActOnOpenMPTargetDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.16, Nesting of Regions]\n // If specified, a teams construct must be contained within a target\n // construct. That target construct must contain no statements or directives\n // outside of the teams construct.\n if (DSAStack->hasInnerTeamsRegion()) {\n // ...\n if (!OMPTeamsFound) {\n // ...\n Diag(S->getBeginLoc(), diag::note_omp_nested_statement_here) << isa<OMPExecutableDirective>(S);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:4882:1: note: directive outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4889:5: note: statement outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4895:5: note: statement outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13739:1: note: directive outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13746:5: note: statement outside teams construct here"} | ["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:4882:1: note: directive outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4889:5: note: statement outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4895:5: note: statement outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13739:1: note: directive outside teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13746:5: note: statement outside teams construct here"} | ||
} | } | ||
}, | }, | ||
["note_omp_nested_teams_construct_here"]={ | ["note_omp_nested_teams_construct_here"]={ | ||
[e]="nested teams construct here", | [e]="nested teams construct here", | ||
[ | [a]=k, | ||
[b]="nested teams construct here", | [b]="nested teams construct here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"941bbec6f4d9",1412676813,"[OPENMP] \'omp teams\' directive basic support.\nIncludes parsing and semantic analysis for \'omp teams\'...","[OPENMP] \'omp teams\' directive basic support.\nIncludes parsing and semantic analysis for \'omp teams\' directive support from OpenMP 4.0. Adds additional analysis to \'omp target\' directive with \'omp teams\' directive.\n\nllvm-svn: 219197"}, | ||
[ | [g]={{q,13061,"StmtResult Sema::ActOnOpenMPTargetDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP [2.16, Nesting of Regions]\n // If specified, a teams construct must be contained within a target\n // construct. That target construct must contain no statements or directives\n // outside of the teams construct.\n if (DSAStack->hasInnerTeamsRegion()) {\n // ...\n if (!OMPTeamsFound) {\n // ...\n Diag(DSAStack->getInnerTeamsRegionLoc(), diag::note_omp_nested_teams_construct_here);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:4884:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4890:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4896:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13741:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13747:1: note: nested teams construct here"} | ["clang/test/OpenMP/nesting_of_regions.cpp"]={"clang/test/OpenMP/nesting_of_regions.cpp:4884:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4890:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:4896:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13741:1: note: nested teams construct here","clang/test/OpenMP/nesting_of_regions.cpp:13747:1: note: nested teams construct here"} | ||
} | } | ||
}, | }, | ||
["note_omp_nowait_clause_here"]={ | ["note_omp_nowait_clause_here"]={ | ||
[e]="\'nowait\' clause is here", | [e]="\'nowait\' clause is here", | ||
[ | [a]=k, | ||
[b]="\'nowait\' clause is here", | [b]="\'nowait\' clause is here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"3255bf3aacbb",1421644846,"[OPENMP] Disable copyprivate an nowait clauses in \'single\' directive.\nThe copyprivate clause must no...","[OPENMP] Disable copyprivate an nowait clauses in \'single\' directive.\nThe copyprivate clause must not be used with the nowait clause in single\ndirective.\n\nllvm-svn: 226429"}, | ||
[ | [g]={{q,10826,"StmtResult Sema::ActOnOpenMPSingleDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *Clause : Clauses) {\n // ...\n if (Copyprivate && Nowait) {\n // ...\n Diag(Nowait->getBeginLoc(), diag::note_omp_nowait_clause_here);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/single_copyprivate_messages.cpp"]={"clang/test/OpenMP/single_copyprivate_messages.cpp:179:35: note: \'nowait\' clause is here"} | ["clang/test/OpenMP/single_copyprivate_messages.cpp"]={"clang/test/OpenMP/single_copyprivate_messages.cpp:179:35: note: \'nowait\' clause is here"} | ||
} | } | ||
}, | }, | ||
["note_omp_ordered_param"]={ | ["note_omp_ordered_param"]={ | ||
[e]="\'ordered\' clause%select{| with specified parameter}0", | [e]="\'ordered\' clause%select{| with specified parameter}0", | ||
[ | [a]=k, | ||
[b]="\'ordered\' clause(?:| with specified parameter)", | [b]="\'ordered\' clause(?:| with specified parameter)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"346265e3bcee",1443177432,"[OPENMP 4.1] Add \'threads\' clause for \'#pragma omp ordered\'.\nOpenMP 4.1 extends format of \'#pragma o...","[OPENMP 4.1] Add \'threads\' clause for \'#pragma omp ordered\'.\nOpenMP 4.1 extends format of \'#pragma omp ordered\'. It adds 3 additional clauses: \'threads\', \'simd\' and \'depend\'.\nIf no clause is specified, the ordered construct behaves as if the threads clause had been specified. If the threads clause is specified, the threads in the team executing the loop region execute ordered regions sequentially in the order of the loop iterations.\nThe loop region to which an ordered region without any clause or with a threads clause binds must have an ordered clause without the parameter specified on the corresponding loop directive.\n\nllvm-svn: 248569"}, | ||
[ | [g]={{q,4766,"static bool checkOrderedOrderSpecified(Sema &S, const ArrayRef<OMPClause *> Clauses) {\n // ...\n if (Ordered && Order) {\n // ...\n S.Diag(Ordered->getBeginLoc(), diag::note_omp_ordered_param) << 0 << SourceRange(Ordered->getBeginLoc(), Ordered->getEndLoc());"},{q,11384,"StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n if (!ErrorFound && !SC && isOpenMPSimdDirective(DSAStack->getParentDirective())) {\n // ...\n } else if ((DependFound || DoacrossFound) && (TC || SC)) {\n // ...\n } else if ((DependFound || DoacrossFound) && !DSAStack->getParentOrderedRegionParam().first) {\n // ...\n } else if (TC || Clauses.empty()) {\n if (const Expr *Param = DSAStack->getParentOrderedRegionParam().first) {\n // ...\n Diag(Param->getBeginLoc(), diag::note_omp_ordered_param) << 1;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/for_misc_messages.c"]={"clang/test/OpenMP/for_misc_messages.c:419:17: note: \'ordered\' clause"} | ["clang/test/OpenMP/for_misc_messages.c"]={"clang/test/OpenMP/for_misc_messages.c:419:17: note: \'ordered\' clause"} | ||
} | } | ||
}, | }, | ||
["note_omp_predefined_allocator"]={ | ["note_omp_predefined_allocator"]={ | ||
[e]="predefined trait \'%0\' used here", | [e]="predefined trait \'%0\' used here", | ||
[ | [a]=k, | ||
[b]="predefined trait \'(.*?)\' used here", | [b]="predefined trait \'(.*?)\' used here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{q,23913,"OMPClause *Sema::ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef<UsesAllocatorsData> Data) {\n // ...\n for (const UsesAllocatorsData &D : Data) {\n // ...\n // Check allocator expression.\n if (D.Allocator->isTypeDependent()) {\n // ...\n } else {\n // ...\n // OpenMP [2.12.5, target Construct]\n // Predefined allocators appearing in a uses_allocators clause cannot have\n // traits specified.\n if (IsPredefinedAllocator && D.AllocatorTraits) {\n // ...\n Diag(D.Allocator->getExprLoc(), diag::note_omp_predefined_allocator) << cast<NamedDecl>(DRE->getDecl())->getName() << D.Allocator->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_uses_allocators_messages.cpp"]={"clang/test/OpenMP/target_uses_allocators_messages.cpp:37:36: note: predefined trait \'omp_default_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:67: note: predefined trait \'omp_large_cap_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:100: note: predefined trait \'omp_const_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:129: note: predefined trait \'omp_high_bw_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:160: note: predefined trait \'omp_low_lat_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:191: note: predefined trait \'omp_cgroup_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:221: note: predefined trait \'omp_pteam_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:250: note: predefined trait \'omp_thread_mem_alloc\' used here"} | ["clang/test/OpenMP/target_uses_allocators_messages.cpp"]={"clang/test/OpenMP/target_uses_allocators_messages.cpp:37:36: note: predefined trait \'omp_default_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:67: note: predefined trait \'omp_large_cap_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:100: note: predefined trait \'omp_const_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:129: note: predefined trait \'omp_high_bw_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:160: note: predefined trait \'omp_low_lat_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:191: note: predefined trait \'omp_cgroup_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:221: note: predefined trait \'omp_pteam_mem_alloc\' used here","clang/test/OpenMP/target_uses_allocators_messages.cpp:37:250: note: predefined trait \'omp_thread_mem_alloc\' used here"} | ||
} | } | ||
}, | }, | ||
["note_omp_predetermined_dsa"]={ | ["note_omp_predetermined_dsa"]={ | ||
[e]="%select{static data member is predetermined as shared|variable with static storage duration is predetermined as shared|loop iteration variable is predetermined as private|loop iteration variable is predetermined as linear|loop iteration variable is predetermined as lastprivate|constant variable is predetermined as shared|global variable is predetermined as shared|non-shared variable in a task construct is predetermined as firstprivate|variable with automatic storage duration is predetermined as private}0%select{|; perhaps you forget to enclose \'omp %2\' directive into a parallel or another task region?}1", | [e]="%select{static data member is predetermined as shared|variable with static storage duration is predetermined as shared|loop iteration variable is predetermined as private|loop iteration variable is predetermined as linear|loop iteration variable is predetermined as lastprivate|constant variable is predetermined as shared|global variable is predetermined as shared|non-shared variable in a task construct is predetermined as firstprivate|variable with automatic storage duration is predetermined as private}0%select{|; perhaps you forget to enclose \'omp %2\' directive into a parallel or another task region?}1", | ||
[ | [a]=k, | ||
[b]="(?:static data member is predetermined as shared|variable with static storage duration is predetermined as shared|loop iteration variable is predetermined as private|loop iteration variable is predetermined as linear|loop iteration variable is predetermined as lastprivate|constant variable is predetermined as shared|global variable is predetermined as shared|non\\-shared variable in a task construct is predetermined as firstprivate|variable with automatic storage duration is predetermined as private)(?:|; perhaps you forget to enclose \'omp (.*?)\' directive into a parallel or another task region\\?)", | [b]="(?:static data member is predetermined as shared|variable with static storage duration is predetermined as shared|loop iteration variable is predetermined as private|loop iteration variable is predetermined as linear|loop iteration variable is predetermined as lastprivate|constant variable is predetermined as shared|global variable is predetermined as shared|non\\-shared variable in a task construct is predetermined as firstprivate|variable with automatic storage duration is predetermined as private)(?:|; perhaps you forget to enclose \'omp (.*?)\' directive into a parallel or another task region\\?)", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"d4183dabd7a9",1378212952,"OpenMP: Data-sharing attributes analysis and clause \'shared\'\n\nllvm-svn: 189795","OpenMP: Data-sharing attributes analysis and clause \'shared\'\n\nllvm-svn: 189795"}, | ||
[ | [g]={{q,3612,"static void reportOriginalDsa(Sema &SemaRef, const DSAStackTy *Stack, const ValueDecl *D, const DSAStackTy::DSAVarData &DVar, bool IsLoopIterVar) {\n // ...\n if (Reason != PDSA_Implicit) {\n SemaRef.Diag(ReportLoc, diag::note_omp_predetermined_dsa) << Reason << ReportHint << getOpenMPDirectiveName(Stack->getCurrentDirective());"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_teams_private_messages.cpp"]={"clang/test/OpenMP/target_teams_private_messages.cpp:29:16: note: static data member is predetermined as shared"} | ["clang/test/OpenMP/target_teams_private_messages.cpp"]={"clang/test/OpenMP/target_teams_private_messages.cpp:29:16: note: static data member is predetermined as shared"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_allocator"]={ | ["note_omp_previous_allocator"]={ | ||
[e]="previous allocator is specified here", | [e]="previous allocator is specified here", | ||
[ | [a]=k, | ||
[b]="previous allocator is specified here", | [b]="previous allocator is specified here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"282555ad8268",1553027624,"[OPENMP]Warn if the different allocator is used for the variable.\n\nIf the allocator was specified fo...","[OPENMP]Warn if the different allocator is used for the variable.\n\nIf the allocator was specified for the variable and next one is found\nwith the different allocator, the warning is emitted, and the allocator\nis ignored.\n\nllvm-svn: 356513"}, | ||
[ | [g]={{q,3347,"static bool checkPreviousOMPAllocateAttribute(Sema &S, DSAStackTy *Stack, Expr *RefExpr, VarDecl *VD, OMPAllocateDeclAttr::AllocatorTypeTy AllocatorKind, Expr *Allocator) {\n // ...\n if (!AllocatorsMatch) {\n // ...\n S.Diag(PrevAllocatorLoc, diag::note_omp_previous_allocator) << PrevAllocatorRange;"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/allocate_allocator_messages.cpp"]={"clang/test/OpenMP/allocate_allocator_messages.cpp:32:22: note: previous allocator is specified here","clang/test/OpenMP/allocate_allocator_messages.cpp:42:35: note: previous allocator is specified here","clang/test/OpenMP/allocate_allocator_messages.cpp:46:35: note: previous allocator is specified here"} | ["clang/test/OpenMP/allocate_allocator_messages.cpp"]={"clang/test/OpenMP/allocate_allocator_messages.cpp:32:22: note: previous allocator is specified here","clang/test/OpenMP/allocate_allocator_messages.cpp:42:35: note: previous allocator is specified here","clang/test/OpenMP/allocate_allocator_messages.cpp:46:35: note: previous allocator is specified here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_clause"]={ | ["note_omp_previous_clause"]={ | ||
[e]="\'%0\' clause is specified here", | [e]="\'%0\' clause is specified here", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' clause is specified here", | [b]="\'(.*?)\' clause is specified here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{q,11101,"/// Find and diagnose mutually exclusive clause kinds.\nstatic bool checkMutuallyExclusiveClauses(Sema &S, ArrayRef<OMPClause *> Clauses, ArrayRef<OpenMPClauseKind> MutuallyExclusiveClauses) {\n // ...\n for (const OMPClause *C : Clauses) {\n if (llvm::is_contained(MutuallyExclusiveClauses, C->getClauseKind())) {\n if (!PrevClause) {\n // ...\n } else if (PrevClause->getClauseKind() != C->getClauseKind()) {\n // ...\n S.Diag(PrevClause->getBeginLoc(), diag::note_omp_previous_clause) << getOpenMPClauseName(PrevClause->getClauseKind());"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:75:22: note: \'partial\' clause is specified here","clang/test/OpenMP/unroll_messages.cpp:79:22: note: \'full\' clause is specified here"} | ["clang/test/OpenMP/unroll_messages.cpp"]={"clang/test/OpenMP/unroll_messages.cpp:75:22: note: \'partial\' clause is specified here","clang/test/OpenMP/unroll_messages.cpp:79:22: note: \'full\' clause is specified here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_critical_region"]={ | ["note_omp_previous_critical_region"]={ | ||
[e]="previous \'critical\' region starts here", | [e]="previous \'critical\' region starts here", | ||
[ | [a]=k, | ||
[b]="previous \'critical\' region starts here", | [b]="previous \'critical\' region starts here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"d9ed09f7a5f1",1405935725,"[OPENMP] Parsing/Sema of the OpenMP directive \'critical\'.\n\nllvm-svn: 213510","[OPENMP] Parsing/Sema of the OpenMP directive \'critical\'.\n\nllvm-svn: 213510"}, | ||
[ | [g]={{q,5108,"static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) {\n if (Stack->getCurScope()) {\n // ...\n if (CurrentRegion == OMPD_cancellation_point || CurrentRegion == OMPD_cancel) {\n // ...\n } else if (CurrentRegion == OMPD_master || CurrentRegion == OMPD_masked) {\n // ...\n } else if (CurrentRegion == OMPD_critical && CurrentName.getName()) {\n // ...\n if (DeadLock) {\n // ...\n if (PreviousCriticalLoc.isValid())\n SemaRef.Diag(PreviousCriticalLoc, diag::note_omp_previous_critical_region);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/critical_messages.cpp"]={"clang/test/OpenMP/critical_messages.cpp:27:3: note: previous \'critical\' region starts here","clang/test/OpenMP/critical_messages.cpp:94:3: note: previous \'critical\' region starts here"} | ["clang/test/OpenMP/critical_messages.cpp"]={"clang/test/OpenMP/critical_messages.cpp:27:3: note: previous \'critical\' region starts here","clang/test/OpenMP/critical_messages.cpp:94:3: note: previous \'critical\' region starts here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_directive"]={ | ["note_omp_previous_directive"]={ | ||
[e]="previous \'%0\' directive used here", | [e]="previous \'%0\' directive used here", | ||
[ | [a]=k, | ||
[b]="previous \'(.*?)\' directive used here", | [b]="previous \'(.*?)\' directive used here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{q,11293,"StmtResult Sema::ActOnOpenMPScanDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // Check that only one instance of scan directives is used in the same outer\n // region.\n if (DSAStack->doesParentHasScanDirective()) {\n // ...\n Diag(DSAStack->getParentScanDirectiveLoc(), diag::note_omp_previous_directive) << \"scan\";"},{q,11400,"StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP 5.0, 2.17.9, ordered Construct, Restrictions.\n // During execution of an iteration of a worksharing-loop or a loop nest\n // within a worksharing-loop, simd, or worksharing-loop SIMD region, a thread\n // must not execute more than one ordered region corresponding to an ordered\n // construct without a depend clause.\n if (!DependFound && !DoacrossFound) {\n if (DSAStack->doesParentHasOrderedDirective()) {\n // ...\n Diag(DSAStack->getParentOrderedDirectiveLoc(), diag::note_omp_previous_directive) << \"ordered\";"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/scan_messages.cpp"]={"clang/test/OpenMP/scan_messages.cpp:80:1: note: previous \'scan\' directive used here","clang/test/OpenMP/scan_messages.cpp:172:1: note: previous \'scan\' directive used here"} | ["clang/test/OpenMP/scan_messages.cpp"]={"clang/test/OpenMP/scan_messages.cpp:80:1: note: previous \'scan\' directive used here","clang/test/OpenMP/scan_messages.cpp:172:1: note: previous \'scan\' directive used here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_inscan_reduction"]={ | ["note_omp_previous_inscan_reduction"]={ | ||
[e]="\'reduction\' clause with \'inscan\' modifier is used here", | [e]="\'reduction\' clause with \'inscan\' modifier is used here", | ||
[ | [a]=k, | ||
[b]="\'reduction\' clause with \'inscan\' modifier is used here", | [b]="\'reduction\' clause with \'inscan\' modifier is used here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{q,2821,"/// Check consistency of the reduction clauses.\nstatic void checkReductionClauses(Sema &S, DSAStackTy *Stack, ArrayRef<OMPClause *> Clauses) {\n // ...\n if (InscanFound) {\n for (OMPClause *C : Clauses) {\n // ...\n if (RC->getModifier() != OMPC_REDUCTION_inscan) {\n // ...\n S.Diag(InscanLoc, diag::note_omp_previous_inscan_reduction);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/parallel_for_reduction_messages.cpp"]={"clang/test/OpenMP/parallel_for_reduction_messages.cpp:362:36: note: \'reduction\' clause with \'inscan\' modifier is used here","clang/test/OpenMP/parallel_for_reduction_messages.cpp:362:36: note: \'reduction\' clause with \'inscan\' modifier is used here"} | ["clang/test/OpenMP/parallel_for_reduction_messages.cpp"]={"clang/test/OpenMP/parallel_for_reduction_messages.cpp:362:36: note: \'reduction\' clause with \'inscan\' modifier is used here","clang/test/OpenMP/parallel_for_reduction_messages.cpp:362:36: note: \'reduction\' clause with \'inscan\' modifier is used here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_mem_order_clause"]={ | ["note_omp_previous_mem_order_clause"]={ | ||
[e]="\'%0\' clause used here", | [e]="\'%0\' clause used here", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' clause used here", | [b]="\'(.*?)\' clause used here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{q,11231,"StmtResult Sema::ActOnOpenMPFlushDirective(ArrayRef<OMPClause *> Clauses, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n if (C->getClauseKind() == OMPC_acq_rel || C->getClauseKind() == OMPC_acquire || C->getClauseKind() == OMPC_release) {\n if (MemOrderKind != OMPC_unknown) {\n // ...\n Diag(MemOrderLoc, diag::note_omp_previous_mem_order_clause) << getOpenMPClauseName(MemOrderKind);"},{q,12496,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n // ...\n case OMPC_capture:\n case OMPC_compare: {\n if (AtomicKind != OMPC_unknown && MutexClauseEncountered) {\n // ...\n Diag(AtomicKindLoc, diag::note_omp_previous_mem_order_clause) << getOpenMPClauseName(AtomicKind);"},{q,12504,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n // ...\n case OMPC_capture:\n case OMPC_compare: {\n if (AtomicKind != OMPC_unknown && MutexClauseEncountered) {\n // ...\n } else {\n // ...\n if (!EncounteredAtomicKinds.insert(C->getClauseKind()).second) {\n // ...\n Diag(AtomicKindLoc, diag::note_omp_previous_mem_order_clause) << getOpenMPClauseName(AtomicKind);"},{q,12519,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n for (const OMPClause *C : Clauses) {\n // ...\n case OMPC_seq_cst:\n case OMPC_acq_rel:\n case OMPC_acquire:\n case OMPC_release:\n case OMPC_relaxed: {\n if (MemOrderKind != OMPC_unknown) {\n // ...\n Diag(MemOrderLoc, diag::note_omp_previous_mem_order_clause) << getOpenMPClauseName(MemOrderKind);"},{q,12559,"StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc) {\n // ...\n // OpenMP 5.0, 2.17.7 atomic Construct, Restrictions\n // If atomic-clause is read then memory-order-clause must not be acq_rel or\n // release.\n // If atomic-clause is write then memory-order-clause must not be acq_rel or\n // acquire.\n // If atomic-clause is update or not present then memory-order-clause must not\n // be acq_rel or acquire.\n if ((AtomicKind == OMPC_read && (MemOrderKind == OMPC_acq_rel || MemOrderKind == OMPC_release)) || ((AtomicKind == OMPC_write || AtomicKind == OMPC_update || AtomicKind == OMPC_unknown) && (MemOrderKind == OMPC_acq_rel || MemOrderKind == OMPC_acquire))) {\n // ...\n Diag(MemOrderLoc, diag::note_omp_previous_mem_order_clause) << getOpenMPClauseName(MemOrderKind);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/flush_messages.cpp"]={"clang/test/OpenMP/flush_messages.cpp:143:19: note: \'acq_rel\' clause used here","clang/test/OpenMP/flush_messages.cpp:144:19: note: \'release\' clause used here"} | ["clang/test/OpenMP/flush_messages.cpp"]={"clang/test/OpenMP/flush_messages.cpp:143:19: note: \'acq_rel\' clause used here","clang/test/OpenMP/flush_messages.cpp:144:19: note: \'release\' clause used here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_named_if_clause"]={ | ["note_omp_previous_named_if_clause"]={ | ||
[e]="previous clause with directive name modifier specified here", | [e]="previous clause with directive name modifier specified here", | ||
[ | [a]=k, | ||
[b]="previous clause with directive name modifier specified here", | [b]="previous clause with directive name modifier specified here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"6b8046addfce",1441265028,"[OPENMP 4.1] Parsing/sema analysis for extended format of \'if\' clause.\nOpenMP 4.1 added special \'dir...","[OPENMP 4.1] Parsing/sema analysis for extended format of \'if\' clause.\nOpenMP 4.1 added special \'directive-name-modifier\' to the \'if\' clause.\nFormat of \'if\' clause is as follows:\n```\nif([ directive-name-modifier :] scalar-logical-expression)\n```\n\nThe restriction rules are also changed.\n1. If any \'if\' clause on the directive includes a \'directive-name-modifier\' then all \'if\' clauses on the directive must include a \'directive-name-modifier\'.\n2. At most one \'if\' clause without a \'directive-name-modifier\' can appear on the directive.\n3. At most one \'if\' clause with some particular \'directive-name-modifier\' can appear on the directive.\n\n\'directive-name-modifier\' is important for combined directives and allows to separate conditions in \'if\' clause for simple sub-directives in combined directive. This \'directive-name-modifier\' identifies the sub-directive to which this \'if\' clause must be applied.\n\nllvm-svn: 246747"}, | ||
[ | [g]={{q,5320,"static bool checkIfClauses(Sema &S, OpenMPDirectiveKind Kind, ArrayRef<OMPClause *> Clauses, ArrayRef<OpenMPDirectiveKind> AllowedNameModifiers) {\n // ...\n // If any if clause on the directive includes a directive-name-modifier then\n // all if clauses on the directive must include a directive-name-modifier.\n if (FoundNameModifiers[OMPD_unknown] && NamedModifiersNumber > 0) {\n // ...\n for (SourceLocation Loc : NameModifierLoc) {\n S.Diag(Loc, diag::note_omp_previous_named_if_clause);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_data_if_messages.cpp"]={"clang/test/OpenMP/target_data_if_messages.cpp:38:41: note: previous clause with directive name modifier specified here"} | ["clang/test/OpenMP/target_data_if_messages.cpp"]={"clang/test/OpenMP/target_data_if_messages.cpp:38:41: note: previous clause with directive name modifier specified here"} | ||
} | } | ||
}, | }, | ||
["note_omp_previous_reduction_identifier"]={ | ["note_omp_previous_reduction_identifier"]={ | ||
[e]="previously marked as task_reduction with different reduction operation", | [e]="previously marked as task_reduction with different reduction operation", | ||
[ | [a]=k, | ||
[b]="previously marked as task_reduction with different reduction operation", | [b]="previously marked as task_reduction with different reduction operation", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"fa312f33f840",1500662901,"[OPENMP] Initial support for \'in_reduction\' clause.\n\nParsing/sema analysis for \'in_reduction\' clause...","[OPENMP] Initial support for \'in_reduction\' clause.\n\nParsing/sema analysis for \'in_reduction\' clause for task-based\ndirectives.\n\nllvm-svn: 308768"}, | ||
[ | [g]={{q,19812,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.15.4.6, Restrictions, p.2]\n // A list item that appears in an in_reduction clause of a task construct\n // must appear in a task_reduction clause of a construct associated with a\n // taskgroup region that includes the participating task in its taskgroup\n // set. The construct associated with the innermost region that meets this\n // condition must specify the same reduction-identifier as the in_reduction\n // clause.\n if (ClauseKind == OMPC_in_reduction) {\n // ...\n if ((DeclareReductionRef.isUnset() && IsParentReductionOp) || (DeclareReductionRef.isUsable() && IsParentBOK) || (IsParentBOK && BOK != ParentBOK) || IsParentReductionOp) {\n // ...\n if (EmitError) {\n // ...\n S.Diag(ParentSR.getBegin(), diag::note_omp_previous_reduction_identifier) << ParentSR << (IsParentBOK ? ParentBOKDSA.RefExpr : ParentReductionOpDSA.RefExpr)->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/task_in_reduction_message.cpp"]={"clang/test/OpenMP/task_in_reduction_message.cpp:49:38: note: previously marked as task_reduction with different reduction operation","clang/test/OpenMP/task_in_reduction_message.cpp:55:38: note: previously marked as task_reduction with different reduction operation","clang/test/OpenMP/task_in_reduction_message.cpp:260:38: note: previously marked as task_reduction with different reduction operation"} | ["clang/test/OpenMP/task_in_reduction_message.cpp"]={"clang/test/OpenMP/task_in_reduction_message.cpp:49:38: note: previously marked as task_reduction with different reduction operation","clang/test/OpenMP/task_in_reduction_message.cpp:55:38: note: previously marked as task_reduction with different reduction operation","clang/test/OpenMP/task_in_reduction_message.cpp:260:38: note: previously marked as task_reduction with different reduction operation"} | ||
} | } | ||
}, | }, | ||
["note_omp_protected_structured_block"]={ | ["note_omp_protected_structured_block"]={ | ||
[e]="jump bypasses OpenMP structured block", | [e]="jump bypasses OpenMP structured block", | ||
[ | [a]=k, | ||
[b]="jump bypasses OpenMP structured block", | [b]="jump bypasses OpenMP structured block", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{I,616,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n default:\n if (auto *ED = dyn_cast<OMPExecutableDirective>(S)) {\n if (!ED->isStandaloneDirective()) {\n // ...\n Scopes.emplace_back(ParentScope, diag::note_omp_protected_structured_block, diag::note_omp_exits_structured_block, ED->getStructuredBlock()->getBeginLoc());"},{I,944,"/// CheckJump - Validate that the specified jump statement is valid: that it is\n/// jumping within or out of its current scope, not into a deeper one.\nvoid JumpScopeChecker::CheckJump(Stmt *From, Stmt *To, SourceLocation DiagLoc, unsigned JumpDiagError, unsigned JumpDiagWarning, unsigned JumpDiagCXX98Compat) {\n // ...\n // Warn on gotos out of __finally blocks.\n if (isa<GotoStmt>(From) || isa<IndirectGotoStmt>(From)) {\n // If FromScope > ToScope, FromScope is more nested and the jump goes to a\n // less nested scope. Check if it crosses a __finally along the way.\n for (unsigned I = FromScope; I > ToScope; I = Scopes[I].ParentScope) {\n // ...\n if (Scopes[I].InDiag == diag::note_omp_protected_structured_block) {"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/master_messages.cpp"]={"clang/test/OpenMP/master_messages.cpp:66:3: note: jump bypasses OpenMP structured block"} | ["clang/test/OpenMP/master_messages.cpp"]={"clang/test/OpenMP/master_messages.cpp:66:3: note: jump bypasses OpenMP structured block"} | ||
} | } | ||
}, | }, | ||
["note_omp_referenced"]={ | ["note_omp_referenced"]={ | ||
[e]="previously referenced here", | [e]="previously referenced here", | ||
[ | [a]=k, | ||
[b]="previously referenced here", | [b]="previously referenced here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"c5e025831ba7",1402902515,"[OPENMP] Initial support of \'reduction\' clause\n\nllvm-svn: 211007","[OPENMP] Initial support of \'reduction\' clause\n\nllvm-svn: 211007"}, | ||
[ | [g]={{q,19368,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.3.6, Restrictions, C/C++, p.4]\n // If a list-item is a reference type then it must bind to the same object\n // for all threads of the team.\n if (!ASE && !OASE) {\n // ...\n if (DVar.CKind == OMPC_reduction) {\n // ...\n if (DVar.RefExpr)\n S.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_referenced);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:287:43: note: previously referenced here","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:182:43: note: previously referenced here","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:182:43: note: previously referenced here"} | ["clang/test/OpenMP/taskloop_reduction_messages_attr.cpp"]={"clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:287:43: note: previously referenced here","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:182:43: note: previously referenced here","clang/test/OpenMP/taskloop_reduction_messages_attr.cpp:182:43: note: previously referenced here"} | ||
} | } | ||
}, | }, | ||
["note_omp_requires_encountered_directive"]={ | ["note_omp_requires_encountered_directive"]={ | ||
[e]="\'%0\' previously encountered here", | [e]="\'%0\' previously encountered here", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' previously encountered here", | [b]="\'(.*?)\' previously encountered here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{q,3545,"OMPRequiresDecl *Sema::CheckOMPRequiresDecl(SourceLocation Loc, ArrayRef<OMPClause *> ClauseList) {\n // ...\n if (!TargetLocations.empty() || !AtomicLoc.isInvalid()) {\n for (const OMPClause *CNew : ClauseList) {\n // Check if any of the requires clauses affect target regions.\n if (isa<OMPUnifiedSharedMemoryClause>(CNew) || isa<OMPUnifiedAddressClause>(CNew) || isa<OMPReverseOffloadClause>(CNew) || isa<OMPDynamicAllocatorsClause>(CNew)) {\n // ...\n for (SourceLocation TargetLoc : TargetLocations) {\n Diag(TargetLoc, diag::note_omp_requires_encountered_directive) << \"target\";"},{q,3552,"OMPRequiresDecl *Sema::CheckOMPRequiresDecl(SourceLocation Loc, ArrayRef<OMPClause *> ClauseList) {\n // ...\n if (!TargetLocations.empty() || !AtomicLoc.isInvalid()) {\n for (const OMPClause *CNew : ClauseList) {\n // Check if any of the requires clauses affect target regions.\n if (isa<OMPUnifiedSharedMemoryClause>(CNew) || isa<OMPUnifiedAddressClause>(CNew) || isa<OMPReverseOffloadClause>(CNew) || isa<OMPDynamicAllocatorsClause>(CNew)) {\n // ...\n } else if (!AtomicLoc.isInvalid() && isa<OMPAtomicDefaultMemOrderClause>(CNew)) {\n // ...\n Diag(AtomicLoc, diag::note_omp_requires_encountered_directive) << \"atomic\";"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp"]={"clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:5:3: note: \'atomic\' previously encountered here","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:5:3: note: \'atomic\' previously encountered here","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:5:3: note: \'atomic\' previously encountered here"} | ["clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp"]={"clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:5:3: note: \'atomic\' previously encountered here","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:5:3: note: \'atomic\' previously encountered here","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:5:3: note: \'atomic\' previously encountered here"} | ||
} | } | ||
}, | }, | ||
["note_omp_requires_previous_clause"]={ | ["note_omp_requires_previous_clause"]={ | ||
[e]="%0 clause previously used here", | [e]="%0 clause previously used here", | ||
[ | [a]=k, | ||
[b]="(.*?) clause previously used here", | [b]="(.*?) clause previously used here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"1408f91a2588",1537936119,"[OPENMP] Add support for OMP5 requires directive + unified_address clause\n\nAdd support for OMP5.0 re...","[OPENMP] Add support for OMP5 requires directive + unified_address clause\n\nAdd support for OMP5.0 requires directive and unified_address clause.\nPatches to follow will include support for additional clauses.\n\nDifferential Revision: https://reviews.llvm.org/D52359\n\nllvm-svn: 343063"}, | ||
[ | [g]={{q,681,"/// Stack for tracking declarations used in OpenMP directives and\n/// clauses and their data-sharing attributes.\nclass DSAStackTy {\n // ...\n /// Checks for a duplicate clause amongst previously declared requires\n /// directives\n bool hasDuplicateRequiresClause(ArrayRef<OMPClause *> ClauseList) const {\n // ...\n for (OMPClause *CNew : ClauseList) {\n for (const OMPRequiresDecl *D : RequiresDecls) {\n for (const OMPClause *CPrev : D->clauselists()) {\n if (CNew->getClauseKind() == CPrev->getClauseKind()) {\n // ...\n SemaRef.Diag(CPrev->getBeginLoc(), diag::note_omp_requires_previous_clause) << getOpenMPClauseName(CPrev->getClauseKind());"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp"]={"clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:9:22: note: atomic_default_mem_order clause previously used here","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:9:22: note: atomic_default_mem_order clause previously used here"} | ["clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp"]={"clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:9:22: note: atomic_default_mem_order clause previously used here","clang/test/OpenMP/requires_default_atomic_mem_order_messages.cpp:9:22: note: atomic_default_mem_order clause previously used here"} | ||
} | } | ||
}, | }, | ||
["note_omp_task_predetermined_firstprivate_here"]={ | ["note_omp_task_predetermined_firstprivate_here"]={ | ||
[e]="predetermined as a firstprivate in a task construct here", | [e]="predetermined as a firstprivate in a task construct here", | ||
[ | [a]=k, | ||
[b]="predetermined as a firstprivate in a task construct here", | [b]="predetermined as a firstprivate in a task construct here", | ||
[ | [c]=j, | ||
[ | [d]=B, | ||
[ | [f]={"e7a5517a5835",1412764975,"[OPENMP] Codegen for \'firstprivate\' clause.\nThis patch generates some helper variables that used as ...","[OPENMP] Codegen for \'firstprivate\' clause.\nThis patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP \'parallel\' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy.\nIn outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.\nDifferential Revision: http://reviews.llvm.org/D5140\n\nllvm-svn: 219295"}, | ||
[ | [g]={{q,18440,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (VDPrivate->isInvalidDecl()) {\n if (IsImplicitClause) {\n Diag(RefExpr->getExprLoc(), diag::note_omp_task_predetermined_firstprivate_here);"}} | ||
}, | }, | ||
["note_opencl_typedef_access_qualifier"]={ | ["note_opencl_typedef_access_qualifier"]={ | ||
[e]="previously declared \'%0\' here", | [e]="previously declared \'%0\' here", | ||
[ | [a]=k, | ||
[b]="previously declared \'(.*?)\' here", | [b]="previously declared \'(.*?)\' here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c813c8113db7",1467992099,"[OpenCL] Fix access qualifiers handling for typedefs\n\nOpenCL s6.6: \"Access qualifier must be used wi...","[OpenCL] Fix access qualifiers handling for typedefs\n\nOpenCL s6.6: \"Access qualifier must be used with image object arguments\nof kernels and of user-defined functions [...] If no qualifier is\nprovided, read_only is assumed\".\n\nThis does not define the behavior for image types used in typedef\ndeclaration, but following the spec logic, we should allow access\nqualifiers specification in typedefs, e.g.:\n\n typedef write_only image1d_t img1d_wo;\n\nUnlike cv-qualifiers, user cannot add access qualifier to a typedef\ntype, i.e. this is not allowed:\n\n typedef image1d_t img1d; // note: previously declared \'read_only\' here\n void foo(write_only img1d im) {} // error: multiple access qualifier\n\nPatch by Andrew Savonichev.\nReviewers: Anastasia Stulova.\n\nDifferential revision: http://reviews.llvm.org/D20948\n\nllvm-svn: 274858"}, | ||
[ | [g]={{W,8443,"#include \"clang/Basic/OpenCLImageTypes.def\"\n // ...\n S.Diag(TypedefTy->getDecl()->getBeginLoc(), diag::note_opencl_typedef_access_qualifier) << PrevAccessQual;"}} | ||
}, | }, | ||
["note_operator_arrow_depth"]={ | ["note_operator_arrow_depth"]={ | ||
[e]="use -foperator-arrow-depth=N to increase \'operator->\' limit", | [e]="use -foperator-arrow-depth=N to increase \'operator->\' limit", | ||
[ | [a]=k, | ||
[b]="use \\-foperator\\-arrow\\-depth\\=N to increase \'operator\\-\\>\' limit", | [b]="use \\-foperator\\-arrow\\-depth\\=N to increase \'operator\\-\\>\' limit", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"79c927bfe9fc",1383766311,"Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a cla...","Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a class member access expression. Based on a patch by\nRahul Jain!\n\nllvm-svn: 194161"}, | ||
[ | [g]={{Zb,7591,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n if (OperatorArrows.size() >= getLangOpts().ArrowDepth) {\n // ...\n Diag(OpLoc, diag::note_operator_arrow_depth) << getLangOpts().ArrowDepth;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/operator-arrow-depth.cpp"]={"clang/test/SemaCXX/operator-arrow-depth.cpp:25:12: note: use -foperator-arrow-depth=N to increase \'operator->\' limit"} | ["clang/test/SemaCXX/operator-arrow-depth.cpp"]={"clang/test/SemaCXX/operator-arrow-depth.cpp:25:12: note: use -foperator-arrow-depth=N to increase \'operator->\' limit"} | ||
} | } | ||
}, | }, | ||
["note_operator_arrow_here"]={ | ["note_operator_arrow_here"]={ | ||
[e]="\'operator->\' declared here produces an object of type %0", | [e]="\'operator->\' declared here produces an object of type %0", | ||
[ | [a]=k, | ||
[b]="\'operator\\-\\>\' declared here produces an object of type (.*?)", | [b]="\'operator\\-\\>\' declared here produces an object of type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"79c927bfe9fc",1383766311,"Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a cla...","Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a class member access expression. Based on a patch by\nRahul Jain!\n\nllvm-svn: 194161"}, | ||
[ | [g]={{Zb,7537,"/// Note a set of \'operator->\' functions that were used for a member access.\nstatic void noteOperatorArrows(Sema &S, ArrayRef<FunctionDecl *> OperatorArrows) {\n // ...\n for (unsigned I = 0; I < OperatorArrows.size(); /**/) {\n if (I == SkipStart) {\n // ...\n } else {\n S.Diag(OperatorArrows[I]->getLocation(), diag::note_operator_arrow_here) << OperatorArrows[I]->getCallResultType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:269:7: note: \'operator->\' declared here produces an object of type \'AX\'","clang/test/SemaCXX/overloaded-operator.cpp:279:17: note: \'operator->\' declared here produces an object of type \'struct CircB\'","clang/test/SemaCXX/overloaded-operator.cpp:283:17: note: \'operator->\' declared here produces an object of type \'struct CircC\'","clang/test/SemaCXX/overloaded-operator.cpp:286:17: note: \'operator->\' declared here produces an object of type \'struct CircA\'"} | ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:269:7: note: \'operator->\' declared here produces an object of type \'AX\'","clang/test/SemaCXX/overloaded-operator.cpp:279:17: note: \'operator->\' declared here produces an object of type \'struct CircB\'","clang/test/SemaCXX/overloaded-operator.cpp:283:17: note: \'operator->\' declared here produces an object of type \'struct CircC\'","clang/test/SemaCXX/overloaded-operator.cpp:286:17: note: \'operator->\' declared here produces an object of type \'struct CircA\'"} | ||
} | } | ||
}, | }, | ||
["note_operator_arrows_suppressed"]={ | ["note_operator_arrows_suppressed"]={ | ||
[e]="(skipping %0 \'operator->\'%s0 in backtrace)", | [e]="(skipping %0 \'operator->\'%s0 in backtrace)", | ||
[ | [a]=k, | ||
[b]="\\(skipping (.*?) \'operator\\-\\>\'(.*?) in backtrace\\)", | [b]="\\(skipping (.*?) \'operator\\-\\>\'(.*?) in backtrace\\)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"79c927bfe9fc",1383766311,"Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a cla...","Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a class member access expression. Based on a patch by\nRahul Jain!\n\nllvm-svn: 194161"}, | ||
[ | [g]={{Zb,7533,"/// Note a set of \'operator->\' functions that were used for a member access.\nstatic void noteOperatorArrows(Sema &S, ArrayRef<FunctionDecl *> OperatorArrows) {\n // ...\n for (unsigned I = 0; I < OperatorArrows.size(); /**/) {\n if (I == SkipStart) {\n S.Diag(OperatorArrows[I]->getLocation(), diag::note_operator_arrows_suppressed) << SkipCount;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/operator-arrow-depth.cpp"]={"clang/test/SemaCXX/operator-arrow-depth.cpp:10:10: note: (skipping 2 \'operator->\'s in backtrace)"} | ["clang/test/SemaCXX/operator-arrow-depth.cpp"]={"clang/test/SemaCXX/operator-arrow-depth.cpp:10:10: note: (skipping 2 \'operator->\'s in backtrace)"} | ||
} | } | ||
}, | }, | ||
["note_overridden_marked_noescape"]={ | ["note_overridden_marked_noescape"]={ | ||
[e]="parameter of overridden method is annotated with __attribute__((noescape))", | [e]="parameter of overridden method is annotated with __attribute__((noescape))", | ||
[ | [a]=k, | ||
[b]="parameter of overridden method is annotated with __attribute__\\(\\(noescape\\)\\)", | [b]="parameter of overridden method is annotated with __attribute__\\(\\(noescape\\)\\)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fc587e6a5707",1505888571,"Add support for attribute \'noescape\'.\n\nThe attribute informs the compiler that the annotated pointer...","Add support for attribute \'noescape\'.\n\nThe attribute informs the compiler that the annotated pointer parameter\nof a function cannot escape and enables IRGen to attach attribute\n\'nocapture\' to parameters that are annotated with the attribute. That is\nthe only optimization that currently takes advantage of \'noescape\', but\nthere are other optimizations that will be added later that improves\nIRGen for ObjC blocks.\n\nrdar://problem/19886775\n\nDifferential Revision: https://reviews.llvm.org/D32520\n\nllvm-svn: 313720"}, | ||
[ | [g]={{s,17985,"bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (OldFT->hasExtParameterInfos()) {\n for (unsigned I = 0, E = OldFT->getNumParams(); I != E; ++I)\n // A parameter of the overriding method should be annotated with noescape\n // if the corresponding parameter of the overridden method is annotated.\n if (OldFT->getExtParameterInfo(I).isNoEscape() && !NewFT->getExtParameterInfo(I).isNoEscape()) {\n // ...\n Diag(Old->getParamDecl(I)->getLocation(), diag::note_overridden_marked_noescape);"},{u,119,"/// Issue a warning if the parameter of the overridden method is non-escaping\n/// but the parameter of the overriding method is not.\nstatic bool diagnoseNoescape(const ParmVarDecl *NewD, const ParmVarDecl *OldD, Sema &S) {\n if (OldD->hasAttr<NoEscapeAttr>() && !NewD->hasAttr<NoEscapeAttr>()) {\n // ...\n S.Diag(OldD->getLocation(), diag::note_overridden_marked_noescape);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:34:49: note: parameter of overridden method is annotated with __attribute__((noescape))","clang/test/SemaObjCXX/noescape.mm:47:44: note: parameter of overridden method is annotated with __attribute__((noescape))","clang/test/SemaObjCXX/noescape.mm:107:44: note: parameter of overridden method is annotated with __attribute__((noescape))","clang/test/SemaObjCXX/noescape.mm:107:44: note: parameter of overridden method is annotated with __attribute__((noescape))"} | ["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:34:49: note: parameter of overridden method is annotated with __attribute__((noescape))","clang/test/SemaObjCXX/noescape.mm:47:44: note: parameter of overridden method is annotated with __attribute__((noescape))","clang/test/SemaObjCXX/noescape.mm:107:44: note: parameter of overridden method is annotated with __attribute__((noescape))","clang/test/SemaObjCXX/noescape.mm:107:44: note: parameter of overridden method is annotated with __attribute__((noescape))"} | ||
} | } | ||
}, | }, | ||
["note_overridden_method"]={ | ["note_overridden_method"]={ | ||
[e]="overridden method is here", | [e]="overridden method is here", | ||
[ | [a]=k, | ||
[b]="overridden method is here", | [b]="overridden method is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"66a8ca0f7fef",1358289788,"When checking availability attributes for consistency between an\noverriding and overridden method, a...","When checking availability attributes for consistency between an\noverriding and overridden method, allow the overridden method to have\na narrower contract (introduced earlier, deprecated/obsoleted later)\nthan the overriding method. Fixes <rdar://problem/12992023>.\n\nllvm-svn: 172567"}, | ||
[ | [g]={{o,2546,"AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority) {\n // ...\n if (D->hasAttrs()) {\n // ...\n for (unsigned i = 0, e = Attrs.size(); i != e;) {\n // ...\n if (!versionsMatch(OldIntroduced, Introduced, OverrideOrImpl) || !versionsMatch(Deprecated, OldDeprecated, OverrideOrImpl) || !versionsMatch(Obsoleted, OldObsoleted, OverrideOrImpl) || !(OldIsUnavailable == IsUnavailable || (OverrideOrImpl && !OldIsUnavailable && IsUnavailable))) {\n if (OverrideOrImpl) {\n // ...\n if (AMK == AMK_Override)\n Diag(CI.getLoc(), diag::note_overridden_method);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/attr-availability-1.m"]={"clang/test/SemaObjC/attr-availability-1.m:17:35: note: overridden method is here","clang/test/SemaObjC/attr-availability-1.m:20:36: note: overridden method is here","clang/test/SemaObjC/attr-availability-1.m:22:36: note: overridden method is here"} | ["clang/test/SemaObjC/attr-availability-1.m"]={"clang/test/SemaObjC/attr-availability-1.m:17:35: note: overridden method is here","clang/test/SemaObjC/attr-availability-1.m:20:36: note: overridden method is here","clang/test/SemaObjC/attr-availability-1.m:22:36: note: overridden method is here"} | ||
} | } | ||
}, | }, | ||
["note_overridden_virtual_function"]={ | ["note_overridden_virtual_function"]={ | ||
[e]="overridden virtual function is here", | [e]="overridden virtual function is here", | ||
[ | [a]=k, | ||
[b]="overridden virtual function is here", | [b]="overridden virtual function is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f2a2e338ffec",1242263344,"Add return type checking for overriding virtual functions. We currently don\'t check covariance but t...","Add return type checking for overriding virtual functions. We currently don\'t check covariance but that\'s next.\n\nllvm-svn: 71759"}, | ||
[ | [g]={{p,19002,"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 (CXXRecord) {\n // ...\n if (!CXXRecord->isDependentType()) {\n if (!CXXRecord->isInvalidDecl()) {\n // If we have virtual base classes, we may end up finding multiple\n // final overriders for a given virtual function. Check for this\n // problem now.\n if (CXXRecord->getNumVBases()) {\n // ...\n for (CXXFinalOverriderMap::iterator M = FinalOverriders.begin(), MEnd = FinalOverriders.end(); M != MEnd; ++M) {\n for (OverridingMethods::iterator SO = M->second.begin(), SOEnd = M->second.end(); SO != SOEnd; ++SO) {\n // ...\n Diag(M->first->getLocation(), diag::note_overridden_virtual_function);"},{s,1823,"// Check whether a function declaration satisfies the requirements of a\n// constexpr function definition or a constexpr constructor definition. If so,\n// return true. If not, produce appropriate diagnostics (unless asked not to by\n// Kind) and return false.\n//\n// This implements C++11 [dcl.constexpr]p3,4, as amended by DR1360.\nbool Sema::CheckConstexprFunctionDefinition(const FunctionDecl *NewFD, CheckConstexprKind Kind) {\n // ...\n if (!isa<CXXConstructorDecl>(NewFD)) {\n // ...\n if (Method && Method->isVirtual()) {\n if (getLangOpts().CPlusPlus20) {\n // ...\n } else {\n // ...\n if (WrittenVirtual != Method)\n Diag(WrittenVirtual->getLocation(), diag::note_overridden_virtual_function);"},{s,3310,"void Sema::DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent) {\n // ...\n if (MD->size_overridden_methods() > 0) {\n auto EmitDiag = [&](unsigned DiagInconsistent, unsigned DiagSuggest) {\n // ...\n Diag(OMD->getLocation(), diag::note_overridden_virtual_function);"},{s,3334,"/// CheckIfOverriddenFunctionIsMarkedFinal - Checks whether a virtual member\n/// function overrides a virtual member function marked \'final\', according to\n/// C++11 [class.virtual]p4.\nbool Sema::CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function);"},{s,6892,"/// Report an error regarding overriding, along with any relevant\n/// overridden methods.\n///\n/// \\param DiagID the primary error to report.\n/// \\param MD the overriding method.\nstatic bool ReportOverrides(Sema &S, unsigned DiagID, const CXXMethodDecl *MD, llvm::function_ref<bool(const CXXMethodDecl *)> Report) {\n // ...\n for (const CXXMethodDecl *O : MD->overridden_methods()) {\n if (Report(O)) {\n // ...\n S.Diag(O->getLocation(), diag::note_overridden_virtual_function);"},{s,18015,"bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function);"},{s,18052,"bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n // The return types aren\'t either both pointers or references to a class type.\n if (NewClassTy.isNull()) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function) << Old->getReturnTypeSourceRange();"},{s,18077,"bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (!Context.hasSameUnqualifiedType(NewClassTy, OldClassTy)) {\n // ...\n // Check if the new class derives from the old class.\n if (!IsDerivedFrom(New->getLocation(), NewClassTy, OldClassTy)) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function) << Old->getReturnTypeSourceRange();"},{s,18093,"bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n if (!Context.hasSameUnqualifiedType(NewClassTy, OldClassTy)) {\n // ...\n // Check if we the conversion from derived to base is valid.\n if (CheckDerivedToBaseConversion(NewClassTy, OldClassTy, diag::err_covariant_return_inaccessible_base, diag::err_covariant_return_ambiguous_derived_to_base_conv, New->getLocation(), New->getReturnTypeSourceRange(), New->getDeclName(), nullptr)) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function) << Old->getReturnTypeSourceRange();"},{s,18105,"bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n // The qualifiers of the return types must be the same.\n if (NewTy.getLocalCVRQualifiers() != OldTy.getLocalCVRQualifiers()) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function) << Old->getReturnTypeSourceRange();"},{s,18117,"bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n // The new class type must have the same or less qualifiers as the old type.\n if (NewClassTy.isMoreQualifiedThan(OldClassTy)) {\n // ...\n Diag(Old->getLocation(), diag::note_overridden_virtual_function) << Old->getReturnTypeSourceRange();"},{Mc,995,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n return CheckExceptionSpecSubset(PDiag(DiagID), PDiag(diag::err_deep_exception_specs_differ), PDiag(diag::note_overridden_virtual_function), PDiag(diag::ext_override_exception_spec), Old->getType()->castAs<FunctionProtoType>(), Old->getLocation(), New->getType()->castAs<FunctionProtoType>(), New->getLocation());"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class.derived/class.abstract/p16.cpp"]={"clang/test/CXX/class.derived/class.abstract/p16.cpp:4:16: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:5:16: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:32:11: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:23:14: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:32:11: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:25:14: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:26:14: note: overridden virtual function is here"} | ["clang/test/CXX/class.derived/class.abstract/p16.cpp"]={"clang/test/CXX/class.derived/class.abstract/p16.cpp:4:16: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:5:16: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:32:11: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:23:14: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:32:11: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:25:14: note: overridden virtual function is here","clang/test/CXX/class.derived/class.abstract/p16.cpp:26:14: note: overridden virtual function is here"} | ||
} | } | ||
}, | }, | ||
["note_ovl_ambiguous_eqeq_reversed_self_non_const"]={ | ["note_ovl_ambiguous_eqeq_reversed_self_non_const"]={ | ||
[e]="mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity", | [e]="mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity", | ||
[ | [a]=k, | ||
[b]="mark \'operator\\=\\=\' as const or add a matching \'operator\\!\\=\' to resolve the ambiguity", | [b]="mark \'operator\\=\\=\' as const or add a matching \'operator\\!\\=\' to resolve the ambiguity", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{w,14067,"/// 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 if (AmbiguousWithSelf) {\n // ...\n // Mark member== const or provide matching != to disallow reversed\n // args. Eg.\n // struct S { bool operator==(const S&); };\n // S()==S();\n if (auto *MD = dyn_cast<CXXMethodDecl>(FnDecl))\n if (Op == OverloadedOperatorKind::OO_EqualEqual && !MD->isConst() && Context.hasSameUnqualifiedType(MD->getThisObjectType(), MD->getParamDecl(0)->getType().getNonReferenceType()) && Context.hasSameUnqualifiedType(MD->getThisObjectType(), Args[0]->getType()) && Context.hasSameUnqualifiedType(MD->getThisObjectType(), Args[1]->getType()))\n Diag(FnDecl->getLocation(), diag::note_ovl_ambiguous_eqeq_reversed_self_non_const);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:131:8: note: mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:263:27: note: mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:319:8: note: mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity"} | ["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:131:8: note: mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:263:27: note: mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:319:8: note: mark \'operator==\' as const or add a matching \'operator!=\' to resolve the ambiguity"} | ||
} | } | ||
}, | }, | ||
["note_ovl_ambiguous_oper_binary_reversed_candidate"]={ | ["note_ovl_ambiguous_oper_binary_reversed_candidate"]={ | ||
[e]="ambiguous candidate function with reversed arguments", | [e]="ambiguous candidate function with reversed arguments", | ||
[ | [a]=k, | ||
[b]="ambiguous candidate function with reversed arguments", | [b]="ambiguous candidate function with reversed arguments", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{w,14073,"/// 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 if (AmbiguousWithSelf) {\n // ...\n } else {\n // ...\n for (auto *F : AmbiguousWith)\n Diag(F->getLocation(), diag::note_ovl_ambiguous_oper_binary_reversed_candidate);"}} | ||
}, | }, | ||
["note_ovl_ambiguous_oper_binary_reversed_self"]={ | ["note_ovl_ambiguous_oper_binary_reversed_self"]={ | ||
[e]="ambiguity is between a regular call to this operator and a call with the argument order reversed", | [e]="ambiguity is between a regular call to this operator and a call with the argument order reversed", | ||
[ | [a]=k, | ||
[b]="ambiguity is between a regular call to this operator and a call with the argument order reversed", | [b]="ambiguity is between a regular call to this operator and a call with the argument order reversed", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{w,14051,"/// 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 if (AmbiguousWithSelf) {\n Diag(FnDecl->getLocation(), diag::note_ovl_ambiguous_oper_binary_reversed_self);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/class.compare/class.eq/p2.cpp"]={"clang/test/CXX/class/class.compare/class.eq/p2.cpp:121:10: note: ambiguity is between a regular call to this operator and a call with the argument order reversed"} | ["clang/test/CXX/class/class.compare/class.eq/p2.cpp"]={"clang/test/CXX/class/class.compare/class.eq/p2.cpp:121:10: note: ambiguity is between a regular call to this operator and a call with the argument order reversed"} | ||
} | } | ||
}, | }, | ||
["note_ovl_ambiguous_oper_binary_selected_candidate"]={ | ["note_ovl_ambiguous_oper_binary_selected_candidate"]={ | ||
[e]="candidate function with non-reversed arguments", | [e]="candidate function with non-reversed arguments", | ||
[ | [a]=k, | ||
[b]="candidate function with non\\-reversed arguments", | [b]="candidate function with non\\-reversed arguments", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{w,14070,"/// 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 if (AmbiguousWithSelf) {\n // ...\n } else {\n Diag(FnDecl->getLocation(), diag::note_ovl_ambiguous_oper_binary_selected_candidate);"}} | ||
}, | }, | ||
["note_ovl_builtin_candidate"]={ | ["note_ovl_builtin_candidate"]={ | ||
[e]="built-in candidate %0", | [e]="built-in candidate %0", | ||
[ | [a]=k, | ||
[b]="built\\-in candidate (.*?)", | [b]="built\\-in candidate (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{w,11681,"static void NoteBuiltinOperatorCandidate(Sema &S, StringRef Opc, SourceLocation OpLoc, OverloadCandidate *Cand) {\n // ...\n if (Cand->Conversions.size() == 1) {\n // ...\n S.Diag(OpLoc, diag::note_ovl_builtin_candidate) << TypeStr;"},{w,11686,"static void NoteBuiltinOperatorCandidate(Sema &S, StringRef Opc, SourceLocation OpLoc, OverloadCandidate *Cand) {\n // ...\n if (Cand->Conversions.size() == 1) {\n // ...\n } else {\n // ...\n S.Diag(OpLoc, diag::note_ovl_builtin_candidate) << TypeStr;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: built-in candidate operator->*(struct E *, int struct E::*)","clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: built-in candidate operator->*(const struct E *, int struct E::*)"} | ["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: built-in candidate operator->*(struct E *, int struct E::*)","clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: built-in candidate operator->*(const struct E *, int struct E::*)"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate"]={ | ["note_ovl_candidate"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %3}1%select{| has different class%diff{ (expected $ but has $)|}5,6| has different number of parameters (expected %5 but has %6)| has type mismatch at %ordinal5 parameter%diff{ (expected $ but has $)|}6,7| has different return type%diff{ ($ expected but has $)|}5,6| has different qualifiers (expected %5 but found %6)| has different exception specification}4", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %3}1%select{| has different class%diff{ (expected $ but has $)|}5,6| has different number of parameters (expected %5 but has %6)| has type mismatch at %ordinal5 parameter%diff{ (expected $ but has $)|}6,7| has different return type%diff{ ($ expected but has $)|}5,6| has different qualifiers (expected %5 but found %6)| has different exception specification}4", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?))(?:| has different class(?: \\(expected (.*?) but has (.*?)\\)|)| has different number of parameters \\(expected (.*?) but has (.*?)\\)| has type mismatch at (.*?) parameter(?: \\(expected (.*?) but has (.*?)\\)|)| has different return type(?: \\((.*?) expected but has (.*?)\\)|)| has different qualifiers \\(expected (.*?) but found (.*?)\\)| has different exception specification)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?))(?:| has different class(?: \\(expected (.*?) but has (.*?)\\)|)| has different number of parameters \\(expected (.*?) but has (.*?)\\)| has type mismatch at (.*?) parameter(?: \\(expected (.*?) but has (.*?)\\)|)| has different return type(?: \\((.*?) expected but has (.*?)\\)|)| has different qualifiers \\(expected (.*?) but found (.*?)\\)| has different exception specification)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fd0b2f8fe486",1262770994,"Improve the diagnostics used to report implicitly-generated class members\nas parts of overload sets....","Improve the diagnostics used to report implicitly-generated class members\nas parts of overload sets. Also, refer to constructors as \'constructors\'\nrather than functions.\n\nAdjust a lot of tests.\n\nllvm-svn: 92832"}, | ||
[ | [g]={{w,10669,"// Notes the location of an overload candidate.\nvoid Sema::NoteOverloadCandidate(const NamedDecl *Found, const FunctionDecl *Fn, OverloadCandidateRewriteKind RewriteKind, QualType DestType, bool TakingAddress) {\n // ...\n PartialDiagnostic PD = PDiag(diag::note_ovl_candidate) << (unsigned)KSPair.first << (unsigned)KSPair.second << Fn << FnDesc;"},{w,12565,"// A helper class to help with address of function resolution\n// - allows us to avoid passing around all those ugly parameters\nclass AddressOfFunctionResolver {\n // ...\n void EliminateAllExceptMostSpecializedTemplate() {\n // ...\n UnresolvedSetIterator Result = S.getMostSpecialized(MatchesCopy.begin(), MatchesCopy.end(), FailedCandidates, SourceExpr->getBeginLoc(), S.PDiag(), S.PDiag(diag::err_addr_ovl_ambiguous) << Matches[0].second->getDeclName(), S.PDiag(diag::note_ovl_candidate) << (unsigned)oc_function << (unsigned)ocs_described_template, Complain, TargetFunctionType);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/overloadable-complex.c"]={"clang/test/Sema/overloadable-complex.c:30:7: note: candidate function","clang/test/Sema/overloadable-complex.c:31:6: note: candidate function","clang/test/Sema/overloadable-complex.c:30:7: note: candidate function","clang/test/Sema/overloadable-complex.c:31:6: note: candidate function"} | ["clang/test/Sema/overloadable-complex.c"]={"clang/test/Sema/overloadable-complex.c:30:7: note: candidate function","clang/test/Sema/overloadable-complex.c:31:6: note: candidate function","clang/test/Sema/overloadable-complex.c:30:7: note: candidate function","clang/test/Sema/overloadable-complex.c:31:6: note: candidate function"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_arity"]={ | ["note_ovl_candidate_arity"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: requires%select{ at least| at most|}3 %4 argument%s4, but %5 %plural{1:was|:were}5 provided", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: requires%select{ at least| at most|}3 %4 argument%s4, but %5 %plural{1:was|:were}5 provided", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: requires(?: at least| at most|) (.*?) argument(.*?), but (.*?) (?:was|were) provided", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: requires(?: at least| at most|) (.*?) argument(.*?), but (.*?) (?:was|were) provided", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e1ac8d174220",1263342319,"Improve the reporting of non-viable overload candidates by noting the reason\nwhy the candidate is no...","Improve the reporting of non-viable overload candidates by noting the reason\nwhy the candidate is non-viable. There\'s a lot we can do to improve this, but\nit\'s a good start. Further improvements should probably be integrated with the\nbad-initialization reporting routines.\n\nllvm-svn: 93277"}, | ||
[ | [g]={{w,11072,"/// General arity mismatch diagnosis over a candidate in a candidate set.\nstatic void DiagnoseArityMismatch(Sema &S, NamedDecl *Found, Decl *D, unsigned NumFormalArgs) {\n // ...\n if (modeCount == 1 && Fn->getParamDecl(0)->getDeclName())\n // ...\n else\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_arity) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << Description << mode << modeCount << NumFormalArgs << Fn->getParametersSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.post/expr.call/p4.cpp"]={"clang/test/CXX/expr/expr.post/expr.call/p4.cpp:3:6: note: candidate function not viable: requires 2 arguments, but 0 were provided","clang/test/CXX/expr/expr.post/expr.call/p4.cpp:3:6: note: candidate function not viable: requires 2 arguments, but 1 was provided","clang/test/CXX/expr/expr.post/expr.call/p4.cpp:17:30: note: candidate function [with T = <int>] not viable: requires 2 arguments, but 0 were provided","clang/test/CXX/expr/expr.post/expr.call/p4.cpp:17:30: note: candidate function [with T = <int>] not viable: requires 2 arguments, but 1 was provided"} | ["clang/test/CXX/expr/expr.post/expr.call/p4.cpp"]={"clang/test/CXX/expr/expr.post/expr.call/p4.cpp:3:6: note: candidate function not viable: requires 2 arguments, but 0 were provided","clang/test/CXX/expr/expr.post/expr.call/p4.cpp:3:6: note: candidate function not viable: requires 2 arguments, but 1 was provided","clang/test/CXX/expr/expr.post/expr.call/p4.cpp:17:30: note: candidate function [with T = <int>] not viable: requires 2 arguments, but 0 were provided","clang/test/CXX/expr/expr.post/expr.call/p4.cpp:17:30: note: candidate function [with T = <int>] not viable: requires 2 arguments, but 1 was provided"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_arity_one"]={ | ["note_ovl_candidate_arity_one"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{requires at least|allows at most single|requires single}3 argument %4, but %plural{0:no|:%5}5 arguments were provided", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{requires at least|allows at most single|requires single}3 argument %4, but %plural{0:no|:%5}5 arguments were provided", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:requires at least|allows at most single|requires single) argument (.*?), but (?:no|(.*?)) arguments were provided", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:requires at least|allows at most single|requires single) argument (.*?), but (?:no|(.*?)) arguments were provided", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"10ff50d7d8d6",1336713401,"PR11857: When the wrong number of arguments are provided for a function\nwhich expects exactly one ar...","PR11857: When the wrong number of arguments are provided for a function\nwhich expects exactly one argument, include the name of the argument in\nthe diagnostic text. Patch by Terry Long!\n\nllvm-svn: 156607"}, | ||
[ | [g]={{w,11067,"/// General arity mismatch diagnosis over a candidate in a candidate set.\nstatic void DiagnoseArityMismatch(Sema &S, NamedDecl *Found, Decl *D, unsigned NumFormalArgs) {\n // ...\n if (modeCount == 1 && Fn->getParamDecl(0)->getDeclName())\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_arity_one) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << Description << mode << Fn->getParamDecl(0) << NumFormalArgs << Fn->getParametersSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/matrix-type.cpp"]={"clang/test/SemaTemplate/matrix-type.cpp:61:29: note: candidate function template not viable: requires single argument \'m\', but 2 arguments were provided","clang/test/SemaTemplate/matrix-type.cpp:61:29: note: candidate function template not viable: requires single argument \'m\', but 2 arguments were provided"} | ["clang/test/SemaTemplate/matrix-type.cpp"]={"clang/test/SemaTemplate/matrix-type.cpp:61:29: note: candidate function template not viable: requires single argument \'m\', but 2 arguments were provided","clang/test/SemaTemplate/matrix-type.cpp:61:29: note: candidate function template not viable: requires single argument \'m\', but 2 arguments were provided"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_addrspace"]={ | ["note_ovl_candidate_bad_addrspace"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot %select{pass pointer to|bind reference in}5 %3 %select{as a pointer to|to object in}5 %4 in %ordinal6 argument", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot %select{pass pointer to|bind reference in}5 %3 %select{as a pointer to|to object in}5 %4 in %ordinal6 argument", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot (?:pass pointer to|bind reference in) (.*?) (?:as a pointer to|to object in) (.*?) in (.*?) argument", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot (?:pass pointer to|bind reference in) (.*?) (?:as a pointer to|to object in) (.*?) in (.*?) argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"47000997193c",1263439737,"Improve overload diagnostics some more by calling out qualifier mismatches\nfor special diagnostics. ...","Improve overload diagnostics some more by calling out qualifier mismatches\nfor special diagnostics. Unfortunately, the non-overload diagnostics are not\nthis good.\n\nllvm-svn: 93420"}, | ||
[ | [g]={{w,10841,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) {\n // ...\n if (FromQs.getAddressSpace() != ToQs.getAddressSpace()) {\n if (isObjectArgument)\n // ...\n else\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_addrspace) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromQs.getAddressSpace() << ToQs.getAddressSpace() << ToTy->isReferenceType() << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaSYCL/address-space-conversions.cpp"]={"clang/test/SemaSYCL/address-space-conversions.cpp:9:6: note: candidate function not viable: cannot pass pointer to generic address space as a pointer to address space \'__private\' in 1st argument"} | ["clang/test/SemaSYCL/address-space-conversions.cpp"]={"clang/test/SemaSYCL/address-space-conversions.cpp:9:6: note: candidate function not viable: cannot pass pointer to generic address space as a pointer to address space \'__private\' in 1st argument"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_addrspace_this"]={ | ["note_ovl_candidate_bad_addrspace_this"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: \'this\' object is in %3, but method expects object in %4", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: \'this\' object is in %3, but method expects object in %4", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: \'this\' object is in (.*?), but method expects object in (.*?)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: \'this\' object is in (.*?), but method expects object in (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{w,10837,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) {\n // ...\n if (FromQs.getAddressSpace() != ToQs.getAddressSpace()) {\n if (isObjectArgument)\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_addrspace_this) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << FromQs.getAddressSpace() << ToQs.getAddressSpace();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp"]={"clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp:4:8: note: candidate function not viable: \'this\' object is in address space \'__private\', but method expects object in address space \'__local\'","clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp:6:8: note: candidate function not viable: \'this\' object is in address space \'__private\', but method expects object in address space \'__global\'"} | ["clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp"]={"clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp:4:8: note: candidate function not viable: \'this\' object is in address space \'__private\', but method expects object in address space \'__local\'","clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp:6:8: note: candidate function not viable: \'this\' object is in address space \'__private\', but method expects object in address space \'__global\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_arc_conv"]={ | ["note_ovl_candidate_bad_arc_conv"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot implicitly convert argument %diff{of type $ to $|type to parameter type}3,4 for %select{%ordinal6 argument|object argument}5 under ARC", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot implicitly convert argument %diff{of type $ to $|type to parameter type}3,4 for %select{%ordinal6 argument|object argument}5 under ARC", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot implicitly convert argument (?:of type (.*?) to (.*?)|type to parameter type) for (?:(.*?) argument|object argument) under ARC", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot implicitly convert argument (?:of type (.*?) to (.*?)|type to parameter type) for (?:(.*?) argument|object argument) under ARC", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"a644f9cb73a1",1311182049,"arc-objc++: Issue an arc specific diagnostic when overload resolution\nfails because of lifetime diff...","arc-objc++: Issue an arc specific diagnostic when overload resolution\nfails because of lifetime differences of parameter and argument type.\n// rdar://9790531\n\nllvm-svn: 135593"}, | ||
[ | [g]={{w,10970,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (isa<ObjCObjectPointerType>(CFromTy) && isa<PointerType>(CToTy)) {\n // ...\n if (FromQs.getObjCLifetime() != ToQs.getObjCLifetime()) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_arc_conv) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromTy << ToTy << (unsigned)isObjectArgument << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/arc-overloading.mm"]={"clang/test/SemaObjCXX/arc-overloading.mm:208:6: note: candidate function not viable: cannot implicitly convert argument of type \'MixerEQGraphTestDelegate *const __strong\' to \'void *\' for 1st argument under ARC","clang/test/SemaObjCXX/arc-overloading.mm:209:6: note: candidate function not viable: cannot implicitly convert argument of type \'MixerEQGraphTestDelegate *const __strong\' to \'struct S *\' for 1st argument under ARC","clang/test/SemaObjCXX/arc-overloading.mm:210:6: note: candidate function not viable: cannot implicitly convert argument of type \'MixerEQGraphTestDelegate *const __strong\' to \'char *\' for 1st argument under ARC"} | ["clang/test/SemaObjCXX/arc-overloading.mm"]={"clang/test/SemaObjCXX/arc-overloading.mm:208:6: note: candidate function not viable: cannot implicitly convert argument of type \'MixerEQGraphTestDelegate *const __strong\' to \'void *\' for 1st argument under ARC","clang/test/SemaObjCXX/arc-overloading.mm:209:6: note: candidate function not viable: cannot implicitly convert argument of type \'MixerEQGraphTestDelegate *const __strong\' to \'struct S *\' for 1st argument under ARC","clang/test/SemaObjCXX/arc-overloading.mm:210:6: note: candidate function not viable: cannot implicitly convert argument of type \'MixerEQGraphTestDelegate *const __strong\' to \'char *\' for 1st argument under ARC"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_base_to_derived_conv"]={ | ["note_ovl_candidate_bad_base_to_derived_conv"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot %select{convert from|convert from|bind}3 %select{base class pointer|superclass|base class object of type}3 %4 to %select{derived class pointer|subclass|derived class reference}3 %5 for %ordinal6 argument", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot %select{convert from|convert from|bind}3 %select{base class pointer|superclass|base class object of type}3 %4 to %select{derived class pointer|subclass|derived class reference}3 %5 for %ordinal6 argument", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot (?:convert from|convert from|bind) (?:base class pointer|superclass|base class object of type) (.*?) to (?:derived class pointer|subclass|derived class reference) (.*?) for (.*?) argument", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot (?:convert from|convert from|bind) (?:base class pointer|superclass|base class object of type) (.*?) to (?:derived class pointer|subclass|derived class reference) (.*?) for (.*?) argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fb0c0d37b7f2",1277950485,"Extend the \"cannot convert from base class pointer to derived class\npointer\" diagnostic to handle re...","Extend the \"cannot convert from base class pointer to derived class\npointer\" diagnostic to handle references, too.\n\nllvm-svn: 107372"}, | ||
[ | [g]={{w,10957,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (BaseToDerivedConversion) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_base_to_derived_conv) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << (BaseToDerivedConversion - 1) << FromTy << ToTy << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx11-inheriting-ctors.cpp"]={"clang/test/SemaCXX/cxx11-inheriting-ctors.cpp:72:10: note: candidate constructor (the implicit copy constructor) not viable: cannot bind base class object of type \'struct B\' to derived class reference \'const D &\' for 1st argument","clang/test/SemaCXX/cxx11-inheriting-ctors.cpp:72:10: note: candidate constructor (the implicit move constructor) not viable: cannot bind base class object of type \'struct B\' to derived class reference \'D &&\' for 1st argument"} | ["clang/test/SemaCXX/cxx11-inheriting-ctors.cpp"]={"clang/test/SemaCXX/cxx11-inheriting-ctors.cpp:72:10: note: candidate constructor (the implicit copy constructor) not viable: cannot bind base class object of type \'struct B\' to derived class reference \'const D &\' for 1st argument","clang/test/SemaCXX/cxx11-inheriting-ctors.cpp:72:10: note: candidate constructor (the implicit move constructor) not viable: cannot bind base class object of type \'struct B\' to derived class reference \'D &&\' for 1st argument"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_conv"]={ | ["note_ovl_candidate_bad_conv"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: no known conversion %diff{from $ to $|from argument type to parameter type}3,4 for %select{%ordinal6 argument|object argument}5%select{|; dereference the argument with *|; take the address of the argument with &|; remove *|; remove &}7", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: no known conversion %diff{from $ to $|from argument type to parameter type}3,4 for %select{%ordinal6 argument|object argument}5%select{|; dereference the argument with *|; take the address of the argument with &|; remove *|; remove &}7", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: no known conversion (?:from (.*?) to (.*?)|from argument type to parameter type) for (?:(.*?) argument|object argument)(?:|; dereference the argument with \\*|; take the address of the argument with &|; remove \\*|; remove &)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: no known conversion (?:from (.*?) to (.*?)|from argument type to parameter type) for (?:(.*?) argument|object argument)(?:|; dereference the argument with \\*|; take the address of the argument with &|; remove \\*|; remove &)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e1ac8d174220",1263342319,"Improve the reporting of non-viable overload candidates by noting the reason\nwhy the candidate is no...","Improve the reporting of non-viable overload candidates by noting the reason\nwhy the candidate is non-viable. There\'s a lot we can do to improve this, but\nit\'s a good start. Further improvements should probably be integrated with the\nbad-initialization reporting routines.\n\nllvm-svn: 93277"}, | ||
[ | [g]={{w,10984,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n PartialDiagnostic FDiag = S.PDiag(diag::note_ovl_candidate_bad_conv);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaOpenCL/queue_t_overload.cl"]={"clang/test/SemaOpenCL/queue_t_overload.cl:3:36: note: candidate function not viable: no known conversion from \'__global int *__private\' to \'__local char *__private\' for 2nd argument","clang/test/SemaOpenCL/queue_t_overload.cl:4:36: note: candidate function not viable: no known conversion from \'__global int *__private\' to \'__local float *__private\' for 2nd argument","clang/test/SemaOpenCL/queue_t_overload.cl:3:36: note: candidate function not viable: no known conversion from \'int\' to \'__private queue_t\' for 1st argument","clang/test/SemaOpenCL/queue_t_overload.cl:4:36: note: candidate function not viable: no known conversion from \'int\' to \'__private queue_t\' for 1st argument"} | ["clang/test/SemaOpenCL/queue_t_overload.cl"]={"clang/test/SemaOpenCL/queue_t_overload.cl:3:36: note: candidate function not viable: no known conversion from \'__global int *__private\' to \'__local char *__private\' for 2nd argument","clang/test/SemaOpenCL/queue_t_overload.cl:4:36: note: candidate function not viable: no known conversion from \'__global int *__private\' to \'__local float *__private\' for 2nd argument","clang/test/SemaOpenCL/queue_t_overload.cl:3:36: note: candidate function not viable: no known conversion from \'int\' to \'__private queue_t\' for 1st argument","clang/test/SemaOpenCL/queue_t_overload.cl:4:36: note: candidate function not viable: no known conversion from \'int\' to \'__private queue_t\' for 1st argument"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_conv_incomplete"]={ | ["note_ovl_candidate_bad_conv_incomplete"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot convert argument of incomplete type %diff{$ to $|to parameter type}3,4 for %select{%ordinal6 argument|object argument}5%select{|; dereference the argument with *|; take the address of the argument with &|; remove *|; remove &}7", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: cannot convert argument of incomplete type %diff{$ to $|to parameter type}3,4 for %select{%ordinal6 argument|object argument}5%select{|; dereference the argument with *|; take the address of the argument with &|; remove *|; remove &}7", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot convert argument of incomplete type (?:(.*?) to (.*?)|to parameter type) for (?:(.*?) argument|object argument)(?:|; dereference the argument with \\*|; take the address of the argument with &|; remove \\*|; remove &)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: cannot convert argument of incomplete type (?:(.*?) to (.*?)|to parameter type) for (?:(.*?) argument|object argument)(?:|; dereference the argument with \\*|; take the address of the argument with &|; remove \\*|; remove &)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d174646dd1a",1264234249,"Produce a special diagnostic when users call a function with an argument of\nincomplete type (or a po...","Produce a special diagnostic when users call a function with an argument of\nincomplete type (or a pointer/reference to such).\n\nThe causes of this problem are different enough to justify a different \"design\"\nfor the diagnostic. Most notably, it doesn\'t give an operand index:\nit\'s usually pretty obvious which operand is the problem, it adds a lot of\nclutter to mention it, and the fix is usually in a different part of the file\nanyway.\n\nThis is yet another diagnostic that should really have an analogue in the\nnon-overloaded case --- which should be much easier to write because of\nthe weaker space constraints.\n\nllvm-svn: 94303"}, | ||
[ | [g]={{w,10916,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (TempFromTy->isIncompleteType()) {\n // ...\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_conv_incomplete) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromTy << ToTy << (unsigned)isObjectArgument << I + 1 << (unsigned)(Cand->Fix.Kind);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/arc-type-conversion.mm"]={"clang/test/SemaObjCXX/arc-type-conversion.mm:4:8: note: candidate function not viable: cannot convert argument of incomplete type \'void *\' to \'__strong id\' for 1st argument"} | ["clang/test/SemaObjCXX/arc-type-conversion.mm"]={"clang/test/SemaObjCXX/arc-type-conversion.mm:4:8: note: candidate function not viable: cannot convert argument of incomplete type \'void *\' to \'__strong id\' for 1st argument"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_cvr"]={ | ["note_ovl_candidate_bad_cvr"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %ordinal5 argument (%3) would lose %select{const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict}4 qualifier%select{||s||s|s|s}4", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %ordinal5 argument (%3) would lose %select{const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict}4 qualifier%select{||s||s|s|s}4", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (.*?) argument \\((.*?)\\) would lose (?:const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict) qualifier(?:||s||s|s|s)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (.*?) argument \\((.*?)\\) would lose (?:const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict) qualifier(?:||s||s|s|s)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"47000997193c",1263439737,"Improve overload diagnostics some more by calling out qualifier mismatches\nfor special diagnostics. ...","Improve overload diagnostics some more by calling out qualifier mismatches\nfor special diagnostics. Unfortunately, the non-overload diagnostics are not\nthis good.\n\nllvm-svn: 93420"}, | ||
[ | [g]={{w,10875,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) {\n // ...\n if (isObjectArgument) {\n // ...\n } else {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_cvr) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromTy << (CVR - 1) << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/unused-with-error.cpp"]={"clang/test/SemaCXX/unused-with-error.cpp:4:13: note: candidate function not viable: 1st argument (\'const int *\') would lose const qualifier"} | ["clang/test/SemaCXX/unused-with-error.cpp"]={"clang/test/SemaCXX/unused-with-error.cpp:4:13: note: candidate function not viable: 1st argument (\'const int *\') would lose const qualifier"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_cvr_this"]={ | ["note_ovl_candidate_bad_cvr_this"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: \'this\' argument has type %3, but method is not marked %select{const|restrict|const or restrict|volatile|const or volatile|volatile or restrict|const, volatile, or restrict}4", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: \'this\' argument has type %3, but method is not marked %select{const|restrict|const or restrict|volatile|const or volatile|volatile or restrict|const, volatile, or restrict}4", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: \'this\' argument has type (.*?), but method is not marked (?:const|restrict|const or restrict|volatile|const or volatile|volatile or restrict|const, volatile, or restrict)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: \'this\' argument has type (.*?), but method is not marked (?:const|restrict|const or restrict|volatile|const or volatile|volatile or restrict|const, volatile, or restrict)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"47000997193c",1263439737,"Improve overload diagnostics some more by calling out qualifier mismatches\nfor special diagnostics. ...","Improve overload diagnostics some more by calling out qualifier mismatches\nfor special diagnostics. Unfortunately, the non-overload diagnostics are not\nthis good.\n\nllvm-svn: 93420"}, | ||
[ | [g]={{w,10871,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) {\n // ...\n if (isObjectArgument) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_cvr_this) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << FromTy << (CVR - 1);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13: note: candidate function not viable: \'this\' argument has type \'const decltype(ml)\' (aka \'const (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\'), but method is not marked const","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12: note: candidate function not viable: \'this\' argument has type \'volatile decltype(l)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12)\'), but method is not marked volatile","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13: note: candidate function not viable: \'this\' argument has type \'volatile decltype(ml)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\'), but method is not marked volatile"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13: note: candidate function not viable: \'this\' argument has type \'const decltype(ml)\' (aka \'const (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\'), but method is not marked const","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12: note: candidate function not viable: \'this\' argument has type \'volatile decltype(l)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12)\'), but method is not marked volatile","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13: note: candidate function not viable: \'this\' argument has type \'volatile decltype(ml)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\'), but method is not marked volatile"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_deduction"]={ | ["note_ovl_candidate_bad_deduction"]={ | ||
[e]="candidate template ignored: failed template argument deduction", | [e]="candidate template ignored: failed template argument deduction", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: failed template argument deduction", | [b]="candidate template ignored\\: failed template argument deduction", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"8b9ed55bfbea",1265050406,"Note that an overload candidate was non-viable because template argument\ndeduction failed. Right no...","Note that an overload candidate was non-viable because template argument\ndeduction failed. Right now there\'s a very vague diagnostic for most cases\nand a good diagnostic for incomplete deduction.\n\nllvm-svn: 94988"}, | ||
[ | [g]={{w,11361,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n // TODO: diagnose these individually, then kill off\n // note_ovl_candidate_bad_deduction, which is uselessly vague.\n case Sema::TDK_MiscellaneousDeductionFailure:\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_bad_deduction);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:35:42: note: candidate template ignored: failed template argument deduction"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:35:42: note: candidate template ignored: failed template argument deduction"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_gc"]={ | ["note_ovl_candidate_bad_gc"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{%ordinal7|\'this\'}6 argument (%3) has %select{no|__weak|__strong}4 ownership, but parameter has %select{no|__weak|__strong}5 ownership", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{%ordinal7|\'this\'}6 argument (%3) has %select{no|__weak|__strong}4 ownership, but parameter has %select{no|__weak|__strong}5 ownership", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:(.*?)|\'this\') argument \\((.*?)\\) has (?:no|__weak|__strong) ownership, but parameter has (?:no|__weak|__strong) ownership", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:(.*?)|\'this\') argument \\((.*?)\\) has (?:no|__weak|__strong) ownership, but parameter has (?:no|__weak|__strong) ownership", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"aec25847606f",1303859806,"When computing Objective-C pointer conversions in C++, retain\nthe qualifiers (e.g., GC qualifiers) o...","When computing Objective-C pointer conversions in C++, retain\nthe qualifiers (e.g., GC qualifiers) on the type we\'re converting\nfrom, rather than just blindly adopting the qualifiers of the type\nwe\'re converting to or dropping qualifiers altogether. \n\nAs an added bonus, properly diagnose GC qualifier mismatches to\neliminate a crash in the overload resolution failure diagnostics.\n\nllvm-svn: 130255"}, | ||
[ | [g]={{w,10859,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) {\n // ...\n if (FromQs.getObjCGCAttr() != ToQs.getObjCGCAttr()) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_gc) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromTy << FromQs.getObjCGCAttr() << ToQs.getObjCGCAttr() << (unsigned)isObjectArgument << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/gc-attributes.mm"]={"clang/test/SemaObjCXX/gc-attributes.mm:6:6: note: candidate function not viable: 1st argument (\'A *__weak *\') has __weak ownership, but parameter has __strong ownership","clang/test/SemaObjCXX/gc-attributes.mm:15:6: note: candidate function not viable: 1st argument (\'A *__strong *\') has __strong ownership, but parameter has __weak ownership"} | ["clang/test/SemaObjCXX/gc-attributes.mm"]={"clang/test/SemaObjCXX/gc-attributes.mm:6:6: note: candidate function not viable: 1st argument (\'A *__weak *\') has __weak ownership, but parameter has __strong ownership","clang/test/SemaObjCXX/gc-attributes.mm:15:6: note: candidate function not viable: 1st argument (\'A *__strong *\') has __strong ownership, but parameter has __weak ownership"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_list_argument"]={ | ["note_ovl_candidate_bad_list_argument"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{cannot convert initializer list|too few initializers in list|too many initializers in list}7 argument to %4", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{cannot convert initializer list|too few initializers in list|too many initializers in list}7 argument to %4", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:cannot convert initializer list|too few initializers in list|too many initializers in list) argument to (.*?)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:cannot convert initializer list|too few initializers in list|too many initializers in list) argument to (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"a72462cdf43b",1316886512,"Add a special note for overload resolution when an initializer list argument\ncannot be converted.\nTh...","Add a special note for overload resolution when an initializer list argument\ncannot be converted.\nThis is in preparation for overload resolution of initializer lists.\nCurrently, you will always get this message when you try to pass an init\nlist to an overloaded function.\n\nllvm-svn: 140461"}, | ||
[ | [g]={{w,10897,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n // Special diagnostic for failure to convert an initializer list, since\n // telling the user that it has type void is not useful.\n if (FromExpr && isa<InitListExpr>(FromExpr)) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_list_argument) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromTy << ToTy << (unsigned)isObjectArgument << I + 1 << (Conv.Bad.Kind == BadConversionSequence::too_few_initializers ? 1 : Conv.Bad.Kind == BadConversionSequence::too_many_initializers ? 2 : 0);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:119:10: note: candidate constructor (the implicit copy constructor) not viable: cannot convert initializer list argument to \'const C\'","clang/test/SemaCXX/cxx0x-initializer-references.cpp:119:10: note: candidate constructor (the implicit move constructor) not viable: cannot convert initializer list argument to \'C\'","clang/test/SemaCXX/cxx0x-initializer-references.cpp:119:14: note: candidate constructor not viable: cannot convert initializer list argument to \'int\'"} | ["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:119:10: note: candidate constructor (the implicit copy constructor) not viable: cannot convert initializer list argument to \'const C\'","clang/test/SemaCXX/cxx0x-initializer-references.cpp:119:10: note: candidate constructor (the implicit move constructor) not viable: cannot convert initializer list argument to \'C\'","clang/test/SemaCXX/cxx0x-initializer-references.cpp:119:14: note: candidate constructor not viable: cannot convert initializer list argument to \'int\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_overload"]={ | ["note_ovl_candidate_bad_overload"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: no overload of %4 matching %3 for %ordinal5 argument", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: no overload of %4 matching %3 for %ordinal5 argument", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: no overload of (.*?) matching (.*?) for (.*?) argument", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: no overload of (.*?) matching (.*?) for (.*?) argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fb7ad0f57a0c",1265078572,"Improve the diagnostic used when an incompatible overload set is passed\nas an argument during overlo...","Improve the diagnostic used when an incompatible overload set is passed\nas an argument during overload resolution.\n\nllvm-svn: 95057"}, | ||
[ | [g]={{w,10808,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (FromTy == S.Context.OverloadTy) {\n // ...\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_overload) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << ToTy << Name << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp:4:26: note: candidate function [with T = int] not viable: no overload of \'temp2\' matching \'void (*)(int)\' for 2nd argument"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp:4:26: note: candidate function [with T = int] not viable: no overload of \'temp2\' matching \'void (*)(int)\' for 2nd argument"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_ownership"]={ | ["note_ovl_candidate_bad_ownership"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{%ordinal7|\'this\'}6 argument (%3) has %select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}4 ownership, but parameter has %select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}5 ownership", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: %select{%ordinal7|\'this\'}6 argument (%3) has %select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}4 ownership, but parameter has %select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}5 ownership", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:(.*?)|\'this\') argument \\((.*?)\\) has (?:no|__unsafe_unretained|__strong|__weak|__autoreleasing) ownership, but parameter has (?:no|__unsafe_unretained|__strong|__weak|__autoreleasing) ownership", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: (?:(.*?)|\'this\') argument \\((.*?)\\) has (?:no|__unsafe_unretained|__strong|__weak|__autoreleasing) ownership, but parameter has (?:no|__unsafe_unretained|__strong|__weak|__autoreleasing) ownership", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"cff00d9c127c",1308874139,"Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about \'ownership\', not \'lifet...","Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about \'ownership\', not \'lifetime\'.\n\nrdar://9477613.\n\nllvm-svn: 133779"}, | ||
[ | [g]={{w,10850,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (CToTy.getUnqualifiedType() == CFromTy.getUnqualifiedType() && !CToTy.isAtLeastAsQualifiedAs(CFromTy)) {\n // ...\n if (FromQs.getObjCLifetime() != ToQs.getObjCLifetime()) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_ownership) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << ToParamRange << FromTy << FromQs.getObjCLifetime() << ToQs.getObjCLifetime() << (unsigned)isObjectArgument << I + 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/arc-overloading.mm"]={"clang/test/SemaObjCXX/arc-overloading.mm:58:6: note: candidate function not viable: 1st argument (\'__unsafe_unretained id *\') has __unsafe_unretained ownership, but parameter has __autoreleasing ownership","clang/test/SemaObjCXX/arc-overloading.mm:119:6: note: candidate function not viable: 1st argument (\'__autoreleasing id\') has __autoreleasing ownership, but parameter has __strong ownership","clang/test/SemaObjCXX/arc-overloading.mm:119:6: note: candidate function not viable: 1st argument (\'__unsafe_unretained id\') has __unsafe_unretained ownership, but parameter has __strong ownership","clang/test/SemaObjCXX/arc-overloading.mm:193:8: note: candidate function not viable: 1st argument (\'__weak id *\') has __weak ownership, but parameter has __autoreleasing ownership"} | ["clang/test/SemaObjCXX/arc-overloading.mm"]={"clang/test/SemaObjCXX/arc-overloading.mm:58:6: note: candidate function not viable: 1st argument (\'__unsafe_unretained id *\') has __unsafe_unretained ownership, but parameter has __autoreleasing ownership","clang/test/SemaObjCXX/arc-overloading.mm:119:6: note: candidate function not viable: 1st argument (\'__autoreleasing id\') has __autoreleasing ownership, but parameter has __strong ownership","clang/test/SemaObjCXX/arc-overloading.mm:119:6: note: candidate function not viable: 1st argument (\'__unsafe_unretained id\') has __unsafe_unretained ownership, but parameter has __strong ownership","clang/test/SemaObjCXX/arc-overloading.mm:193:8: note: candidate function not viable: 1st argument (\'__weak id *\') has __weak ownership, but parameter has __autoreleasing ownership"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_target"]={ | ["note_ovl_candidate_bad_target"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: call to %select{__device__|__global__|__host__|__host__ __device__|invalid}3 function from %select{__device__|__global__|__host__|__host__ __device__|invalid}4 function", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: call to %select{__device__|__global__|__host__|__host__ __device__|invalid}3 function from %select{__device__|__global__|__host__|__host__ __device__|invalid}4 function", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: call to (?:__device__|__global__|__host__|__host__ __device__|invalid) function from (?:__device__|__global__|__host__|__host__ __device__|invalid) function", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: call to (?:__device__|__global__|__host__|__host__ __device__|invalid) function from (?:__device__|__global__|__host__|__host__ __device__|invalid) function", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"7277fe8aed6e",1317599380,"CUDA: diagnose invalid calls across targets\n\nllvm-svn: 140978","CUDA: diagnose invalid calls across targets\n\nllvm-svn: 140978"}, | ||
[ | [g]={{w,11397,"/// CUDA: diagnose an invalid call across targets.\nstatic void DiagnoseBadTarget(Sema &S, OverloadCandidate *Cand) {\n // ...\n S.Diag(Callee->getLocation(), diag::note_ovl_candidate_bad_target) << (unsigned)FnKindPair.first << (unsigned)ocs_non_template << FnDesc /* Ignored */"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCUDA/implicit-member-target-collision.cu"]={"clang/test/SemaCUDA/implicit-member-target-collision.cu:16:8: note: candidate constructor (the implicit default constructor) not viable: call to invalid function from __host__ function","clang/test/SemaCUDA/implicit-member-target-collision.cu:31:8: note: candidate constructor (the implicit default constructor) not viable: call to invalid function from __host__ function","clang/test/SemaCUDA/implicit-member-target-collision.cu:49:8: note: candidate constructor (the implicit default constructor) not viable: call to invalid function from __host__ function"} | ["clang/test/SemaCUDA/implicit-member-target-collision.cu"]={"clang/test/SemaCUDA/implicit-member-target-collision.cu:16:8: note: candidate constructor (the implicit default constructor) not viable: call to invalid function from __host__ function","clang/test/SemaCUDA/implicit-member-target-collision.cu:31:8: note: candidate constructor (the implicit default constructor) not viable: call to invalid function from __host__ function","clang/test/SemaCUDA/implicit-member-target-collision.cu:49:8: note: candidate constructor (the implicit default constructor) not viable: call to invalid function from __host__ function"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_bad_value_category"]={ | ["note_ovl_candidate_bad_value_category"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: expects an %select{lvalue|rvalue}5 for %select{%ordinal4 argument|object argument}3", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: expects an %select{lvalue|rvalue}5 for %select{%ordinal4 argument|object argument}3", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: expects an (?:lvalue|rvalue) for (?:(.*?) argument|object argument)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: expects an (?:lvalue|rvalue) for (?:(.*?) argument|object argument)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{w,10885,"static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I, bool TakingCandidateAddress) {\n // ...\n if (Conv.Bad.Kind == BadConversionSequence::lvalue_ref_to_rvalue || Conv.Bad.Kind == BadConversionSequence::rvalue_ref_to_lvalue) {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_value_category) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << (unsigned)isObjectArgument << I + 1 << (Conv.Bad.Kind == BadConversionSequence::rvalue_ref_to_lvalue) << ToParamRange;"}}, | ||
[ | [h]={ | ||
["clang/test/Misc/integer-literal-printing.cpp"]={"clang/test/Misc/integer-literal-printing.cpp:5:25: note: candidate function [with T = -42] not viable: expects an lvalue for 1st argument","clang/test/Misc/integer-literal-printing.cpp:8:34: note: candidate function [with T = 42] not viable: expects an lvalue for 1st argument"} | ["clang/test/Misc/integer-literal-printing.cpp"]={"clang/test/Misc/integer-literal-printing.cpp:5:25: note: candidate function [with T = -42] not viable: expects an lvalue for 1st argument","clang/test/Misc/integer-literal-printing.cpp:8:34: note: candidate function [with T = 42] not viable: expects an lvalue for 1st argument"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_constraints_not_satisfied"]={ | ["note_ovl_candidate_constraints_not_satisfied"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: constraints not satisfied", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 not viable: constraints not satisfied", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: constraints not satisfied", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) not viable\\: constraints not satisfied", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on V...","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"}, | ||
[ | [g]={{w,11615,"/// Generates a \'note\' diagnostic for an overload candidate. We\'ve\n/// already generated a primary error at the call site.\n///\n/// It really does need to be a single diagnostic with its caret\n/// pointed at the candidate declaration. Yes, this creates some\n/// major challenges of technical writing. Yes, this makes pointing\n/// out problems with specific arguments quite awkward. It\'s still\n/// better than generating twenty screens of text for every failed\n/// overload.\n///\n/// It would be great to be able to express per-candidate problems\n/// more richly for those diagnostic clients that cared, but we\'d\n/// still have to be just as careful with the default diagnostics.\n/// \\param CtorDestAS Addr space of object being constructed (for ctor\n/// candidates only).\nstatic void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, unsigned NumArgs, bool TakingCandidateAddress, LangAS CtorDestAS = LangAS::Default) {\n // ...\n case ovl_fail_constraints_not_satisfied: {\n // ...\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_constraints_not_satisfied) << (unsigned)FnKindPair.first << (unsigned)ocs_non_template << FnDesc /* Ignored */;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/class.dtor/p4.cpp"]={"clang/test/CXX/class/class.dtor/p4.cpp:33:3: note: candidate function not viable: constraints not satisfied","clang/test/CXX/class/class.dtor/p4.cpp:37:3: note: candidate function not viable: constraints not satisfied"} | ["clang/test/CXX/class/class.dtor/p4.cpp"]={"clang/test/CXX/class/class.dtor/p4.cpp:33:3: note: candidate function not viable: constraints not satisfied","clang/test/CXX/class/class.dtor/p4.cpp:37:3: note: candidate function not viable: constraints not satisfied"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_deduced_mismatch"]={ | ["note_ovl_candidate_deduced_mismatch"]={ | ||
[e]="candidate template ignored: deduced type %diff{$ of %select{|element of }4%ordinal0 parameter does not match adjusted type $ of %select{|element of }4argument|of %select{|element of }4%ordinal0 parameter does not match adjusted type of %select{|element of }4argument}1,2%3", | [e]="candidate template ignored: deduced type %diff{$ of %select{|element of }4%ordinal0 parameter does not match adjusted type $ of %select{|element of }4argument|of %select{|element of }4%ordinal0 parameter does not match adjusted type of %select{|element of }4argument}1,2%3", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: deduced type (?:(.*?) of (?:|element of )(.*?) parameter does not match adjusted type (.*?) of (?:|element of )argument|of (?:|element of )(.*?) parameter does not match adjusted type of (?:|element of )argument)(.*?)", | [b]="candidate template ignored\\: deduced type (?:(.*?) of (?:|element of )(.*?) parameter does not match adjusted type (.*?) of (?:|element of )argument|of (?:|element of )(.*?) parameter does not match adjusted type of (?:|element of )argument)(.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"9b534547250a",1451527374,"Improve diagnostic for the case where a function template candidate is rejected\nby overload resoluti...","Improve diagnostic for the case where a function template candidate is rejected\nby overload resolution because deduction succeeds, but the substituted\nparameter type for some parameter (with deduced type) doesn\'t exactly match the\ncorresponding adjusted argument type.\n\nllvm-svn: 256657"}, | ||
[ | [g]={{w,11311,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_DeducedMismatch:\n case Sema::TDK_DeducedMismatchNested: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_deduced_mismatch) << (*DeductionFailure.getCallArgIndex() + 1) << *DeductionFailure.getFirstArg() << *DeductionFailure.getSecondArg() << TemplateArgString << (DeductionFailure.Result == Sema::TDK_DeducedMismatchNested);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/matrix-type.cpp"]={"clang/test/SemaTemplate/matrix-type.cpp:66:6: note: candidate template ignored: deduced type \'matrix<float, 3UL, 4UL>\' of 2nd parameter does not match adjusted type \'matrix<int, 3, 4>\' of argument [with R = 3, C = 4]","clang/test/SemaTemplate/matrix-type.cpp:71:6: note: candidate template ignored: deduced type \'matrix<[...], 3UL + 4UL, 4UL>\' of 1st parameter does not match adjusted type \'matrix<[...], 3, 4>\' of argument [with T = int, R = 3, C = 4]","clang/test/SemaTemplate/matrix-type.cpp:76:6: note: candidate template ignored: deduced type \'matrix<[...], 5UL - 2, 5UL>\' of 1st parameter does not match adjusted type \'matrix<[...], 5, 5>\' of argument [with T = unsigned int, R = 5]"} | ["clang/test/SemaTemplate/matrix-type.cpp"]={"clang/test/SemaTemplate/matrix-type.cpp:66:6: note: candidate template ignored: deduced type \'matrix<float, 3UL, 4UL>\' of 2nd parameter does not match adjusted type \'matrix<int, 3, 4>\' of argument [with R = 3, C = 4]","clang/test/SemaTemplate/matrix-type.cpp:71:6: note: candidate template ignored: deduced type \'matrix<[...], 3UL + 4UL, 4UL>\' of 1st parameter does not match adjusted type \'matrix<[...], 3, 4>\' of argument [with T = int, R = 3, C = 4]","clang/test/SemaTemplate/matrix-type.cpp:76:6: note: candidate template ignored: deduced type \'matrix<[...], 5UL - 2, 5UL>\' of 1st parameter does not match adjusted type \'matrix<[...], 5, 5>\' of argument [with T = unsigned int, R = 5]"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_deleted"]={ | ["note_ovl_candidate_deleted"]={ | ||
[e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 has been %select{explicitly made unavailable|explicitly deleted|implicitly deleted}3", | [e]="candidate %select{function|function|function (with reversed parameter order)|constructor|constructor (the implicit default constructor)|constructor (the implicit copy constructor)|constructor (the implicit move constructor)|function (the implicit copy assignment operator)|function (the implicit move assignment operator)|function (the implicit \'operator==\' for this \'operator<=>)\'|inherited constructor}0%select{| template| %2}1 has been %select{explicitly made unavailable|explicitly deleted|implicitly deleted}3", | ||
[ | [a]=k, | ||
[b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) has been (?:explicitly made unavailable|explicitly deleted|implicitly deleted)", | [b]="candidate (?:function|function|function \\(with reversed parameter order\\)|constructor|constructor \\(the implicit default constructor\\)|constructor \\(the implicit copy constructor\\)|constructor \\(the implicit move constructor\\)|function \\(the implicit copy assignment operator\\)|function \\(the implicit move assignment operator\\)|function \\(the implicit \'operator\\=\\=\' for this \'operator\\<\\=\\>\\)\'|inherited constructor)(?:| template| (.*?)) has been (?:explicitly made unavailable|explicitly deleted|implicitly deleted)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fd0b2f8fe486",1262770994,"Improve the diagnostics used to report implicitly-generated class members\nas parts of overload sets....","Improve the diagnostics used to report implicitly-generated class members\nas parts of overload sets. Also, refer to constructors as \'constructors\'\nrather than functions.\n\nAdjust a lot of tests.\n\nllvm-svn: 92832"}, | ||
[ | [g]={{w,11523,"/// Generates a \'note\' diagnostic for an overload candidate. We\'ve\n/// already generated a primary error at the call site.\n///\n/// It really does need to be a single diagnostic with its caret\n/// pointed at the candidate declaration. Yes, this creates some\n/// major challenges of technical writing. Yes, this makes pointing\n/// out problems with specific arguments quite awkward. It\'s still\n/// better than generating twenty screens of text for every failed\n/// overload.\n///\n/// It would be great to be able to express per-candidate problems\n/// more richly for those diagnostic clients that cared, but we\'d\n/// still have to be just as careful with the default diagnostics.\n/// \\param CtorDestAS Addr space of object being constructed (for ctor\n/// candidates only).\nstatic void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, unsigned NumArgs, bool TakingCandidateAddress, LangAS CtorDestAS = LangAS::Default) {\n // ...\n // Note deleted candidates, but only if they\'re viable.\n if (Cand->Viable) {\n if (Fn->isDeleted()) {\n // ...\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_deleted) << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc << (Fn->isDeleted() ? (Fn->isDeletedAsWritten() ? 1 : 2) : 0);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/class.dtor/p4.cpp"]={"clang/test/CXX/class/class.dtor/p4.cpp:33:3: note: candidate function has been explicitly deleted","clang/test/CXX/class/class.dtor/p4.cpp:37:3: note: candidate function has been explicitly deleted"} | ["clang/test/CXX/class/class.dtor/p4.cpp"]={"clang/test/CXX/class/class.dtor/p4.cpp:33:3: note: candidate function has been explicitly deleted","clang/test/CXX/class/class.dtor/p4.cpp:37:3: note: candidate function has been explicitly deleted"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_disabled_by_enable_if"]={ | ["note_ovl_candidate_disabled_by_enable_if"]={ | ||
[e]="candidate template ignored: disabled by %0%1", | [e]="candidate template ignored: disabled by %0%1", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: disabled by (.*?)(.*?)", | [b]="candidate template ignored\\: disabled by (.*?)(.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6f8d2c6c9c34",1336540620,"A little tweak to the SFINAE condition reporting. Don\'t say:\n\n candidate template ignored: substitu...","A little tweak to the SFINAE condition reporting. Don\'t say:\n\n candidate template ignored: substitution failed [with T = int]: no type named \'type\' in \'std::enable_if<false, void>\'\n\nInstead, just say:\n\n candidate template ignored: disabled by \'enable_if\' [with T = int]\n\n... and point at the enable_if condition which (we assume) failed.\n\nThis is applied to all cases where the user writes \'typename enable_if<...>::type\' (optionally prefixed with a nested name specifier), and \'enable_if<...>\' names a complete class type which does not have a member named \'type\', and this results in a candidate function being ignored in a SFINAE context. Thus it catches \'std::enable_if\', \'std::__1::enable_if\', \'boost::enable_if\' and \'llvm::enable_if\'.\n\nllvm-svn: 156463"}, | ||
[ | [g]={{w,11266,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_SubstitutionFailure: {\n // ...\n if (PDiag && PDiag->second.getDiagID() == diag::err_typename_nested_not_found_enable_if) {\n // ...\n S.Diag(PDiag->first, diag::note_ovl_candidate_disabled_by_enable_if) << \"\'enable_if\'\" << TemplateArgString;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/overload-candidates.cpp"]={"clang/test/SemaTemplate/overload-candidates.cpp:58:22: note: candidate template ignored: disabled by \'enable_if\' [with T = char]"} | ["clang/test/SemaTemplate/overload-candidates.cpp"]={"clang/test/SemaTemplate/overload-candidates.cpp:58:22: note: candidate template ignored: disabled by \'enable_if\' [with T = char]"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_disabled_by_function_cond_attr"]={ | ["note_ovl_candidate_disabled_by_function_cond_attr"]={ | ||
[e]="candidate disabled: %0", | [e]="candidate disabled: %0", | ||
[ | [a]=k, | ||
[b]="candidate disabled\\: (.*?)", | [b]="candidate disabled\\: (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang.\n\n`diagnose_if` can be used to have clang emit either warning...","Add the diagnose_if attribute to clang.\n\n`diagnose_if` can be used to have clang emit either warnings or errors\nfor function calls that meet user-specified conditions. For example:\n\n```\nconstexpr int foo(int a)\n __attribute__((diagnose_if(a > 10, \"configurations with a > 10 are \"\n \"expensive.\", \"warning\")));\n\nint f1 = foo(9);\nint f2 = foo(10); // warning: configuration with a > 10 are expensive.\nint f3 = foo(f2);\n```\n\nIt currently only emits diagnostics in cases where the condition is\nguaranteed to always be true. So, the following code will emit no\nwarnings:\n\n```\nconstexpr int bar(int a) {\n foo(a);\n return 0;\n}\n\nconstexpr int i = bar(10);\n```\n\nWe hope to support optionally emitting diagnostics for cases like that\n(and emitting runtime checks) in the future.\n\nRelease notes will appear shortly. :)\n\nDifferential Revision: https://reviews.llvm.org/D27424\n\nllvm-svn: 291418"}, | ||
[ | [g]={{v,7023,"static void checkDirectCallValidity(Sema &S, const Expr *Fn, FunctionDecl *Callee, MultiExprArg ArgExprs) {\n // ...\n if (const EnableIfAttr *Attr = S.CheckEnableIf(Callee, Fn->getBeginLoc(), ArgExprs, true)) {\n // ...\n S.Diag(Callee->getLocation(), diag::note_ovl_candidate_disabled_by_function_cond_attr) << Attr->getCond()->getSourceRange() << Attr->getMessage();"},{w,11448,"static void DiagnoseFailedEnableIfAttr(Sema &S, OverloadCandidate *Cand) {\n // ...\n S.Diag(Callee->getLocation(), diag::note_ovl_candidate_disabled_by_function_cond_attr) << Attr->getCond()->getSourceRange() << Attr->getMessage();"},{w,14906,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n // In the case the method to call was not selected by the overloading\n // resolution process, we still need to handle the enable_if attribute. Do\n // that here, so it will not hide previous -- and more relevant -- errors.\n if (auto *MemE = dyn_cast<MemberExpr>(NakedMemExpr)) {\n if (const EnableIfAttr *Attr = CheckEnableIf(Method, LParenLoc, Args, true)) {\n // ...\n Diag(Method->getLocation(), diag::note_ovl_candidate_disabled_by_function_cond_attr) << Attr->getCond()->getSourceRange() << Attr->getMessage();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/builtin-object-size-cxx14.cpp"]={"clang/test/SemaCXX/builtin-object-size-cxx14.cpp:42:6: note: candidate disabled: <no message provided>","clang/test/SemaCXX/builtin-object-size-cxx14.cpp:49:6: note: candidate disabled: <no message provided>"} | ["clang/test/SemaCXX/builtin-object-size-cxx14.cpp"]={"clang/test/SemaCXX/builtin-object-size-cxx14.cpp:42:6: note: candidate disabled: <no message provided>","clang/test/SemaCXX/builtin-object-size-cxx14.cpp:49:6: note: candidate disabled: <no message provided>"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_disabled_by_requirement"]={ | ["note_ovl_candidate_disabled_by_requirement"]={ | ||
[e]="candidate template ignored: requirement \'%0\' was not satisfied%1", | [e]="candidate template ignored: requirement \'%0\' was not satisfied%1", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: requirement \'(.*?)\' was not satisfied(.*?)", | [b]="candidate template ignored\\: requirement \'(.*?)\' was not satisfied(.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"00fa10b43f25",1499286014,"Customize the SFINAE diagnostics for enable_if to provide the failed condition.\n\nWhen enable_if disa...","Customize the SFINAE diagnostics for enable_if to provide the failed condition.\n\nWhen enable_if disables a particular overload resolution candidate,\nrummage through the enable_if condition to find the specific condition\nthat caused the failure. For example, if we have something like:\n\n template<\n typename Iter,\n typename = std::enable_if_t<Random_access_iterator<Iter> &&\n Comparable<Iterator_value_type<Iter>>>>\n void mysort(Iter first, Iter last) {}\n\nand we call \"mysort\" with \"std::list<int>\" iterators, we\'ll get a\ndiagnostic saying that the \"Random_access_iterator<Iter>\" requirement\nfailed. If we call \"mysort\" with\n\"std::vector<something_not_comparable>\", we\'ll get a diagnostic saying\nthat the \"Comparable<...>\" requirement failed.\n\nllvm-svn: 307196"}, | ||
[ | [g]={{w,11275,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_SubstitutionFailure: {\n // ...\n // We found a specific requirement that disabled the enable_if.\n if (PDiag && PDiag->second.getDiagID() == diag::err_typename_nested_not_found_requirement) {\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_disabled_by_requirement) << PDiag->second.getStringArg(0) << TemplateArgString;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCUDA/autoret-global.cu"]={"clang/test/SemaCUDA/autoret-global.cu:29:6: note: candidate template ignored: requirement \'3 == 1\' was not satisfied [with N = 3]","clang/test/SemaCUDA/autoret-global.cu:35:6: note: candidate template ignored: requirement \'3 == 2\' was not satisfied [with N = 3]"} | ["clang/test/SemaCUDA/autoret-global.cu"]={"clang/test/SemaCUDA/autoret-global.cu:29:6: note: candidate template ignored: requirement \'3 == 1\' was not satisfied [with N = 3]","clang/test/SemaCUDA/autoret-global.cu:35:6: note: candidate template ignored: requirement \'3 == 2\' was not satisfied [with N = 3]"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_explicit"]={ | ["note_ovl_candidate_explicit"]={ | ||
[e]="explicit %select{constructor|conversion function|deduction guide}0 is not a candidate%select{| (explicit specifier evaluates to true)}1", | [e]="explicit %select{constructor|conversion function|deduction guide}0 is not a candidate%select{| (explicit specifier evaluates to true)}1", | ||
[ | [a]=k, | ||
[b]="explicit (?:constructor|conversion function|deduction guide) is not a candidate(?:| \\(explicit specifier evaluates to true\\))", | [b]="explicit (?:constructor|conversion function|deduction guide) is not a candidate(?:| \\(explicit specifier evaluates to true\\))", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on V...","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"}, | ||
[ | [g]={{w,11480,"static void DiagnoseFailedExplicitSpec(Sema &S, OverloadCandidate *Cand) {\n // ...\n S.Diag(First->getLocation(), diag::note_ovl_candidate_explicit) << Kind << (ES.getExpr() ? 1 : 0) << (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp:8:12: note: explicit constructor is not a candidate"} | ["clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp:8:12: note: explicit constructor is not a candidate"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_explicit_arg_mismatch_named"]={ | ["note_ovl_candidate_explicit_arg_mismatch_named"]={ | ||
[e]="candidate template ignored: invalid explicitly-specified argument for template parameter %0", | [e]="candidate template ignored: invalid explicitly-specified argument for template parameter %0", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: invalid explicitly\\-specified argument for template parameter (.*?)", | [b]="candidate template ignored\\: invalid explicitly\\-specified argument for template parameter (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1d72edd7c55a",1273346154,"Improve overload-candidate diagnostic for a function template that\nfailed because the explicitly-spe...","Improve overload-candidate diagnostic for a function template that\nfailed because the explicitly-specified template arguments did not\nmatch its template parameters, e.g.,\n\ntest/SemaTemplate/overload-candidates.cpp:18:8: note: candidate\ntemplate\n ignored: invalid explicitly-specified argument for template\n parameter \'I\'\n void get(const T&);\n ^\ntest/SemaTemplate/overload-candidates.cpp:20:8: note: candidate\ntemplate\n ignored: invalid explicitly-specified argument for 1st template\n parameter\n void get(const T&);\n ^\n\nllvm-svn: 103344"}, | ||
[ | [g]={{w,11202,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_InvalidExplicitArguments:\n // ...\n if (ParamD->getDeclName())\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_explicit_arg_mismatch_named) << ParamD->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.param/p8-cxx20.cpp"]={"clang/test/CXX/temp/temp.param/p8-cxx20.cpp:43:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter \'d\'","clang/test/CXX/temp/temp.param/p8-cxx20.cpp:43:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter \'d\'"} | ["clang/test/CXX/temp/temp.param/p8-cxx20.cpp"]={"clang/test/CXX/temp/temp.param/p8-cxx20.cpp:43:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter \'d\'","clang/test/CXX/temp/temp.param/p8-cxx20.cpp:43:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter \'d\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_explicit_arg_mismatch_unnamed"]={ | ["note_ovl_candidate_explicit_arg_mismatch_unnamed"]={ | ||
[e]="candidate template ignored: invalid explicitly-specified argument for %ordinal0 template parameter", | [e]="candidate template ignored: invalid explicitly-specified argument for %ordinal0 template parameter", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: invalid explicitly\\-specified argument for (.*?) template parameter", | [b]="candidate template ignored\\: invalid explicitly\\-specified argument for (.*?) template parameter", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1d72edd7c55a",1273346154,"Improve overload-candidate diagnostic for a function template that\nfailed because the explicitly-spe...","Improve overload-candidate diagnostic for a function template that\nfailed because the explicitly-specified template arguments did not\nmatch its template parameters, e.g.,\n\ntest/SemaTemplate/overload-candidates.cpp:18:8: note: candidate\ntemplate\n ignored: invalid explicitly-specified argument for template\n parameter \'I\'\n void get(const T&);\n ^\ntest/SemaTemplate/overload-candidates.cpp:20:8: note: candidate\ntemplate\n ignored: invalid explicitly-specified argument for 1st template\n parameter\n void get(const T&);\n ^\n\nllvm-svn: 103344"}, | ||
[ | [g]={{w,11214,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_InvalidExplicitArguments:\n // ...\n if (ParamD->getDeclName())\n // ...\n else {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_explicit_arg_mismatch_unnamed) << (index + 1);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.res/temp.local/p1.cpp"]={"clang/test/CXX/temp/temp.res/temp.local/p1.cpp:15:20: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter","clang/test/CXX/temp/temp.res/temp.local/p1.cpp:13:25: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter","clang/test/CXX/temp/temp.res/temp.local/p1.cpp:15:20: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter"} | ["clang/test/CXX/temp/temp.res/temp.local/p1.cpp"]={"clang/test/CXX/temp/temp.res/temp.local/p1.cpp:15:20: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter","clang/test/CXX/temp/temp.res/temp.local/p1.cpp:13:25: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter","clang/test/CXX/temp/temp.res/temp.local/p1.cpp:15:20: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_has_pass_object_size_params"]={ | ["note_ovl_candidate_has_pass_object_size_params"]={ | ||
[e]="candidate address cannot be taken because parameter %0 has pass_object_size attribute", | [e]="candidate address cannot be taken because parameter %0 has pass_object_size attribute", | ||
[ | [a]=k, | ||
[b]="candidate address cannot be taken because parameter (.*?) has pass_object_size attribute", | [b]="candidate address cannot be taken because parameter (.*?) has pass_object_size attribute", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang.\n\n`pass_object_size` is our way of enabling `__builtin...","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"}, | ||
[ | [g]={{w,10606,"/// 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 // ...\n if (Complain) {\n // ...\n if (InOverloadResolution)\n S.Diag(FD->getLocation(), diag::note_ovl_candidate_has_pass_object_size_params) << ParamNo;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pass-object-size.c"]={"clang/test/Sema/pass-object-size.c:38:6: note: candidate address cannot be taken because parameter 1 has pass_object_size attribute","clang/test/Sema/pass-object-size.c:38:6: note: candidate address cannot be taken because parameter 1 has pass_object_size attribute"} | ["clang/test/Sema/pass-object-size.c"]={"clang/test/Sema/pass-object-size.c:38:6: note: candidate address cannot be taken because parameter 1 has pass_object_size attribute","clang/test/Sema/pass-object-size.c:38:6: note: candidate address cannot be taken because parameter 1 has pass_object_size attribute"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_illegal_constructor"]={ | ["note_ovl_candidate_illegal_constructor"]={ | ||
[e]="candidate %select{constructor|template}0 ignored: instantiation %select{takes|would take}0 its own class type by value", | [e]="candidate %select{constructor|template}0 ignored: instantiation %select{takes|would take}0 its own class type by value", | ||
[ | [a]=k, | ||
[b]="candidate (?:constructor|template) ignored\\: instantiation (?:takes|would take) its own class type by value", | [b]="candidate (?:constructor|template) ignored\\: instantiation (?:takes|would take) its own class type by value", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"578a1f8c6d27",1418521613,"If a non-template constructor instantiated to X(X),\nignore it during overload resolution when initia...","If a non-template constructor instantiated to X(X),\nignore it during overload resolution when initializing\nX from a value of type cv X.\n\nPreviously, our rule here only ignored specializations\nof constructor templates. That\'s probably because the\nstandard says that constructors are outright ill-formed\nif their first parameter is literally X and they\'re\ncallable with one argument. However, Clang only\nenforces that prohibition against non-implicit\ninstantiations; I\'m not sure why, but it seems to be\ndeliberate. Given that, the most sensible thing to\ndo is to just ignore the \"illegal\" constructor\nregardless of where it came from.\n\nAlso, stop ignoring such constructors silently:\nprint a note explaining why they\'re being ignored.\n\nFixes <rdar://19199836>.\n\nllvm-svn: 224205"}, | ||
[ | [g]={{w,11545,"/// Generates a \'note\' diagnostic for an overload candidate. We\'ve\n/// already generated a primary error at the call site.\n///\n/// It really does need to be a single diagnostic with its caret\n/// pointed at the candidate declaration. Yes, this creates some\n/// major challenges of technical writing. Yes, this makes pointing\n/// out problems with specific arguments quite awkward. It\'s still\n/// better than generating twenty screens of text for every failed\n/// overload.\n///\n/// It would be great to be able to express per-candidate problems\n/// more richly for those diagnostic clients that cared, but we\'d\n/// still have to be just as careful with the default diagnostics.\n/// \\param CtorDestAS Addr space of object being constructed (for ctor\n/// candidates only).\nstatic void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, unsigned NumArgs, bool TakingCandidateAddress, LangAS CtorDestAS = LangAS::Default) {\n // ...\n case ovl_fail_illegal_constructor: {\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_illegal_constructor) << (Fn->getPrimaryTemplate() ? 1 : 0);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/constructor-template.cpp"]={"clang/test/SemaTemplate/constructor-template.cpp:62:24: note: candidate template ignored: instantiation would take its own class type by value","clang/test/SemaTemplate/constructor-template.cpp:161:5: note: candidate constructor ignored: instantiation takes its own class type by value"} | ["clang/test/SemaTemplate/constructor-template.cpp"]={"clang/test/SemaTemplate/constructor-template.cpp:62:24: note: candidate template ignored: instantiation would take its own class type by value","clang/test/SemaTemplate/constructor-template.cpp:161:5: note: candidate constructor ignored: instantiation takes its own class type by value"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_illegal_constructor_adrspace_mismatch"]={ | ["note_ovl_candidate_illegal_constructor_adrspace_mismatch"]={ | ||
[e]="candidate constructor ignored: cannot be used to construct an object in address space %0", | [e]="candidate constructor ignored: cannot be used to construct an object in address space %0", | ||
[ | [a]=k, | ||
[b]="candidate constructor ignored\\: cannot be used to construct an object in address space (.*?)", | [b]="candidate constructor ignored\\: cannot be used to construct an object in address space (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c25ea86d4392",1561047808,"[Sema] Diagnose addr space mismatch while constructing objects\n\nIf we construct an object in some ar...","[Sema] Diagnose addr space mismatch while constructing objects\n\nIf we construct an object in some arbitrary non-default addr space\nit should fail unless either:\n- There is an implicit conversion from the address space to default\n/generic address space.\n- There is a matching ctor qualified with an address space that is\neither exactly matching or convertible to the address space of an\nobject.\n\nDifferential Revision: https://reviews.llvm.org/D62156\n\nllvm-svn: 363944"}, | ||
[ | [g]={{w,11555,"/// Generates a \'note\' diagnostic for an overload candidate. We\'ve\n/// already generated a primary error at the call site.\n///\n/// It really does need to be a single diagnostic with its caret\n/// pointed at the candidate declaration. Yes, this creates some\n/// major challenges of technical writing. Yes, this makes pointing\n/// out problems with specific arguments quite awkward. It\'s still\n/// better than generating twenty screens of text for every failed\n/// overload.\n///\n/// It would be great to be able to express per-candidate problems\n/// more richly for those diagnostic clients that cared, but we\'d\n/// still have to be just as careful with the default diagnostics.\n/// \\param CtorDestAS Addr space of object being constructed (for ctor\n/// candidates only).\nstatic void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, unsigned NumArgs, bool TakingCandidateAddress, LangAS CtorDestAS = LangAS::Default) {\n // ...\n case ovl_fail_object_addrspace_mismatch: {\n // ...\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_illegal_constructor_adrspace_mismatch) << QualsForPrinting;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenCXX/address-space-of-this.cpp"]={"clang/test/CodeGenCXX/address-space-of-this.cpp:8:3: note: candidate constructor ignored: cannot be used to construct an object in address space \'__attribute__((address_space(10)))\'"} | ["clang/test/CodeGenCXX/address-space-of-this.cpp"]={"clang/test/CodeGenCXX/address-space-of-this.cpp:8:3: note: candidate constructor ignored: cannot be used to construct an object in address space \'__attribute__((address_space(10)))\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_incomplete_deduction"]={ | ["note_ovl_candidate_incomplete_deduction"]={ | ||
[e]="candidate template ignored: couldn\'t infer template argument %0", | [e]="candidate template ignored: couldn\'t infer template argument %0", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: couldn\'t infer template argument (.*?)", | [b]="candidate template ignored\\: couldn\'t infer template argument (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"8b9ed55bfbea",1265050406,"Note that an overload candidate was non-viable because template argument\ndeduction failed. Right no...","Note that an overload candidate was non-viable because template argument\ndeduction failed. Right now there\'s a very vague diagnostic for most cases\nand a good diagnostic for incomplete deduction.\n\nllvm-svn: 94988"}, | ||
[ | [g]={{w,11111,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_Incomplete: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_incomplete_deduction) << ParamD->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp"]={ | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp"]={cc,cc,cc,cc,cc,cc,cc,"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp:99:41: note: candidate template ignored: couldn\'t infer template argument \'R\'","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p6.cpp:100:41: note: candidate template ignored: couldn\'t infer template argument \'R\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_incomplete_deduction_pack"]={ | ["note_ovl_candidate_incomplete_deduction_pack"]={ | ||
[e]="candidate template ignored: deduced too few arguments for expanded pack %0; no argument for %ordinal1 expanded parameter in deduced argument pack %2", | [e]="candidate template ignored: deduced too few arguments for expanded pack %0; no argument for %ordinal1 expanded parameter in deduced argument pack %2", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: deduced too few arguments for expanded pack (.*?); no argument for (.*?) expanded parameter in deduced argument pack (.*?)", | [b]="candidate template ignored\\: deduced too few arguments for expanded pack (.*?); no argument for (.*?) expanded parameter in deduced argument pack (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4a8f3518cb14",1532026837,"Fix template argument deduction when a parameter pack has a value\nprovided by an outer template.\n\nWe...","Fix template argument deduction when a parameter pack has a value\nprovided by an outer template.\n\nWe made the incorrect assumption in various places that the only way we\ncan have any arguments already provided for a pack during template\nargument deduction was from a partially-specified pack. That\'s not true;\nwe can also have arguments from an enclosing already-instantiated\ntemplate, and that can even result in the function template\'s own pack\nparameters having a fixed length and not being packs for the purposes of\ntemplate argument deduction.\n\nllvm-svn: 337481"}, | ||
[ | [g]={{w,11120,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_IncompletePack: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_incomplete_deduction_pack) << ParamD->getDeclName() << (DeductionFailure.getFirstArg()->pack_size() + 1) << *DeductionFailure.getFirstArg();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:20:17: note: candidate template ignored: deduced too few arguments for expanded pack \'Us\'; no argument for 2nd expanded parameter in deduced argument pack <int>"} | ["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:20:17: note: candidate template ignored: deduced too few arguments for expanded pack \'Us\'; no argument for 2nd expanded parameter in deduced argument pack <int>"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_inconsistent_deduction"]={ | ["note_ovl_candidate_inconsistent_deduction"]={ | ||
[e]="candidate template ignored: deduced %select{conflicting types|conflicting values|conflicting templates|packs of different lengths}0 for parameter %1%diff{ ($ vs. $)|}2,3", | [e]="candidate template ignored: deduced %select{conflicting types|conflicting values|conflicting templates|packs of different lengths}0 for parameter %1%diff{ ($ vs. $)|}2,3", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: deduced (?:conflicting types|conflicting values|conflicting templates|packs of different lengths) for parameter (.*?)(?: \\((.*?) vs\\. (.*?)\\)|)", | [b]="candidate template ignored\\: deduced (?:conflicting types|conflicting values|conflicting templates|packs of different lengths) for parameter (.*?)(?: \\((.*?) vs\\. (.*?)\\)|)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3626a5cac2ed",1273340492,"When printing a non-viable overload candidate that failed due to\nconflicting deduced template argume...","When printing a non-viable overload candidate that failed due to\nconflicting deduced template argument values, give a more specific\nreason along with those values, e.g.,\n\ntest/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template\n ignored: deduced conflicting types for parameter \'T\' (\'int\' vs. \'long\')\nconst T& min(const T&, const T&); \n ^\n\nllvm-svn: 103339"}, | ||
[ | [g]={{w,11191,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_Inconsistent: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_inconsistent_deduction) << which << ParamD->getDeclName() << *DeductionFailure.getFirstArg() << *DeductionFailure.getSecondArg();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp:18:27: note: candidate template ignored: deduced conflicting types for parameter \'T\' (\'int\' vs. \'float\')"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp:18:27: note: candidate template ignored: deduced conflicting types for parameter \'T\' (\'int\' vs. \'float\')"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_inconsistent_deduction_types"]={ | ["note_ovl_candidate_inconsistent_deduction_types"]={ | ||
[e]="candidate template ignored: deduced values %diff{of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|%1 and %3 of conflicting types for parameter %0}2,4", | [e]="candidate template ignored: deduced values %diff{of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|%1 and %3 of conflicting types for parameter %0}2,4", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: deduced values (?:of conflicting types for parameter (.*?) \\((.*?) of type (.*?) vs\\. (.*?) of type (.*?)\\)|(.*?) and (.*?) of conflicting types for parameter (.*?))", | [b]="candidate template ignored\\: deduced values (?:of conflicting types for parameter (.*?) \\((.*?) of type (.*?) vs\\. (.*?) of type (.*?)\\)|(.*?) and (.*?) of conflicting types for parameter (.*?))", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"593d6a168f45",1482456639,"When merging two deduced non-type template arguments for the same parameter,\nfail the merge if the a...","When merging two deduced non-type template arguments for the same parameter,\nfail the merge if the arguments have different types (except if one of them was\ndeduced from an array bound, in which case take the type from the other).\n\nThis is correct because (except in the array bound case) the type of the\ntemplate argument in each deduction must match the type of the parameter, so at\nleast one of the two deduced arguments must have a mismatched type.\n\nThis is necessary because we would otherwise lose the type information for the\ndiscarded template argument in the merge, and fail to diagnose the mismatch.\n\nIn order to power this, we now properly retain the type of a deduced non-type\ntemplate argument deduced from a declaration, rather than giving it the type of\nthe template parameter; we\'ll convert it to the template parameter type when\nchecking the deduced arguments.\n\nllvm-svn: 290399"}, | ||
[ | [g]={{w,11168,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_Inconsistent: {\n // ...\n if (isa<TemplateTypeParmDecl>(ParamD))\n // ...\n else if (isa<NonTypeTemplateParmDecl>(ParamD)) {\n // ...\n if (!T1.isNull() && !T2.isNull() && !S.Context.hasSameType(T1, T2)) {\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_inconsistent_deduction_types) << ParamD->getDeclName() << *DeductionFailure.getFirstArg() << T1 << *DeductionFailure.getSecondArg() << T2;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp:34:8: note: candidate template ignored: deduced values of conflicting types for parameter \'Value\' (10 of type \'int\' vs. 10 of type \'char\')","clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp:34:8: note: candidate template ignored: deduced values of conflicting types for parameter \'Value\' (10 of type \'char\' vs. 10 of type \'int\')"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp:34:8: note: candidate template ignored: deduced values of conflicting types for parameter \'Value\' (10 of type \'int\' vs. 10 of type \'char\')","clang/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp:34:8: note: candidate template ignored: deduced values of conflicting types for parameter \'Value\' (10 of type \'char\' vs. 10 of type \'int\')"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_inherited_constructor"]={ | ["note_ovl_candidate_inherited_constructor"]={ | ||
[e]="constructor from base class %0 inherited here", | [e]="constructor from base class %0 inherited here", | ||
[ | [a]=k, | ||
[b]="constructor from base class (.*?) inherited here", | [b]="constructor from base class (.*?) inherited here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0890502f44a1",1296933799,"Basic implementation of inherited constructors. Only generates declarations, and probably only works...","Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases.\n\nllvm-svn: 124970"}, | ||
[ | [g]={{w,10527,"void MaybeEmitInheritedConstructorNote(Sema &S, const Decl *FoundDecl) {\n // FIXME: It\'d be nice to only emit a note once per using-decl per overload\n // set.\n if (const auto *Shadow = dyn_cast<ConstructorUsingShadowDecl>(FoundDecl))\n S.Diag(FoundDecl->getLocation(), diag::note_ovl_candidate_inherited_constructor) << Shadow->getNominatedBaseClass();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/special/class.inhctor/p3.cpp"]={"clang/test/CXX/special/class.inhctor/p3.cpp:31:13: note: constructor from base class \'B3\' inherited here"} | ["clang/test/CXX/special/class.inhctor/p3.cpp"]={"clang/test/CXX/special/class.inhctor/p3.cpp:31:13: note: constructor from base class \'B3\' inherited here"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_inherited_constructor_slice"]={ | ["note_ovl_candidate_inherited_constructor_slice"]={ | ||
[e]="candidate %select{constructor|template}0 ignored: inherited constructor cannot be used to %select{copy|move}1 object", | [e]="candidate %select{constructor|template}0 ignored: inherited constructor cannot be used to %select{copy|move}1 object", | ||
[ | [a]=k, | ||
[b]="candidate (?:constructor|template) ignored\\: inherited constructor cannot be used to (?:copy|move) object", | [b]="candidate (?:constructor|template) ignored\\: inherited constructor cannot be used to (?:copy|move) object", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f9c59b71220c",1483911944,"PR30305: Implement proposed DR resolution to prevent slicing via inherited constructor.\n\nThe rule we...","PR30305: Implement proposed DR resolution to prevent slicing via inherited constructor.\n\nThe rule we use is that a construction of a class type T from an argument of\ntype U cannot use an inherited constructor if U is the same as T or is derived\nfrom T (or if the initialization would first convert it to such a type). This\n(approximately) matches the rule in use by GCC, and matches the current proposed\nDR resolution.\n\nllvm-svn: 291403"}, | ||
[ | [g]={{w,11592,"/// Generates a \'note\' diagnostic for an overload candidate. We\'ve\n/// already generated a primary error at the call site.\n///\n/// It really does need to be a single diagnostic with its caret\n/// pointed at the candidate declaration. Yes, this creates some\n/// major challenges of technical writing. Yes, this makes pointing\n/// out problems with specific arguments quite awkward. It\'s still\n/// better than generating twenty screens of text for every failed\n/// overload.\n///\n/// It would be great to be able to express per-candidate problems\n/// more richly for those diagnostic clients that cared, but we\'d\n/// still have to be just as careful with the default diagnostics.\n/// \\param CtorDestAS Addr space of object being constructed (for ctor\n/// candidates only).\nstatic void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, unsigned NumArgs, bool TakingCandidateAddress, LangAS CtorDestAS = LangAS::Default) {\n // ...\n case ovl_fail_inhctor_slice:\n // ...\n S.Diag(Fn->getLocation(), diag::note_ovl_candidate_inherited_constructor_slice) << (Fn->getPrimaryTemplate() ? 1 : 0) << Fn->getParamDecl(0)->getType()->isRValueReferenceType();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:100:5: note: candidate constructor ignored: inherited constructor cannot be used to copy object","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:100:5: note: candidate constructor ignored: inherited constructor cannot be used to copy object","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:100:5: note: candidate constructor ignored: inherited constructor cannot be used to copy object"} | ["clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:100:5: note: candidate constructor ignored: inherited constructor cannot be used to copy object","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:100:5: note: candidate constructor ignored: inherited constructor cannot be used to copy object","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:100:5: note: candidate constructor ignored: inherited constructor cannot be used to copy object"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_instantiation_depth"]={ | ["note_ovl_candidate_instantiation_depth"]={ | ||
[e]="candidate template ignored: substitution exceeded maximum template instantiation depth", | [e]="candidate template ignored: substitution exceeded maximum template instantiation depth", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: substitution exceeded maximum template instantiation depth", | [b]="candidate template ignored\\: substitution exceeded maximum template instantiation depth", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d09efd43d3f8",1273349246,"When printing an overload candidate that failed due to SFINAE, print a\nspecific message that include...","When printing an overload candidate that failed due to SFINAE, print a\nspecific message that includes the template arguments, e.g.,\n\ntest/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template\n ignored: substitution failure [with T = int *]\n typename T::type get_type(const T&); // expected-note{{candidate ...\n ^\n\nllvm-svn: 103348"}, | ||
[ | [g]={{w,11244,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_InstantiationDepth:\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_instantiation_depth);"}} | ||
}, | }, | ||
["note_ovl_candidate_non_deduced_mismatch"]={ | ["note_ovl_candidate_non_deduced_mismatch"]={ | ||
[e]="candidate template ignored: could not match %diff{$ against $|types}0,1", | [e]="candidate template ignored: could not match %diff{$ against $|types}0,1", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: could not match (?:(.*?) against (.*?)|types)", | [b]="candidate template ignored\\: could not match (?:(.*?) against (.*?)|types)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"44ecdbdc6134",1359609589,"Improve \'failed template argument deduction\' diagnostic for the case where we\nhave a direct mismatch...","Improve \'failed template argument deduction\' diagnostic for the case where we\nhave a direct mismatch between some component of the template and some\ncomponent of the argument. The diagnostic now says what the mismatch was, but\ndoesn\'t yet say which part of the template doesn\'t match.\n\nllvm-svn: 174039"}, | ||
[ | [g]={{w,11354,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_NonDeducedMismatch: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_non_deduced_mismatch) << FirstTA << SecondTA;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp:18:27: note: candidate template ignored: could not match \'T *\' against \'ConvToIntPtr\'","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp:41:8: note: candidate template ignored: could not match \'bar\' against \'foo\'"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp:18:27: note: candidate template ignored: could not match \'T *\' against \'ConvToIntPtr\'","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/basic.cpp:41:8: note: candidate template ignored: could not match \'bar\' against \'foo\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_non_deduced_mismatch_qualified"]={ | ["note_ovl_candidate_non_deduced_mismatch_qualified"]={ | ||
[e]="candidate template ignored: could not match %q0 against %q1", | [e]="candidate template ignored: could not match %q0 against %q1", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: could not match (.*?) against (.*?)", | [b]="candidate template ignored\\: could not match (.*?) against (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e373235c7cf8",1365455500,"Fix PR15634, better error message for template deduction failure.\n\nWhen two template decls with the ...","Fix PR15634, better error message for template deduction failure.\n\nWhen two template decls with the same name are used in this diagnostic,\nforce them to print their qualified names. This changes the bad message of:\n\ncandidate template ignored: could not match \'array\' against \'array\'\n\nto the better message of:\n\ncandidate template ignored: could not match \'NS2::array\' against \'NS1::array\'\n\nllvm-svn: 179056"}, | ||
[ | [g]={{w,11338,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_NonDeducedMismatch: {\n // ...\n if (FirstTA.getKind() == TemplateArgument::Template && SecondTA.getKind() == TemplateArgument::Template) {\n // ...\n if (FirstTN.getKind() == TemplateName::Template && SecondTN.getKind() == TemplateName::Template) {\n if (FirstTN.getAsTemplateDecl()->getName() == SecondTN.getAsTemplateDecl()->getName()) {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_non_deduced_mismatch_qualified) << FirstTN.getAsTemplateDecl() << SecondTN.getAsTemplateDecl();"}} | ||
}, | }, | ||
["note_ovl_candidate_substitution_failure"]={ | ["note_ovl_candidate_substitution_failure"]={ | ||
[e]="candidate template ignored: substitution failure%0%1", | [e]="candidate template ignored: substitution failure%0%1", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: substitution failure(.*?)(.*?)", | [b]="candidate template ignored\\: substitution failure(.*?)(.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d09efd43d3f8",1273349246,"When printing an overload candidate that failed due to SFINAE, print a\nspecific message that include...","When printing an overload candidate that failed due to SFINAE, print a\nspecific message that includes the template arguments, e.g.,\n\ntest/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template\n ignored: substitution failure [with T = int *]\n typename T::type get_type(const T&); // expected-note{{candidate ...\n ^\n\nllvm-svn: 103348"}, | ||
[ | [g]={{w,11292,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_SubstitutionFailure: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_substitution_failure) << TemplateArgString << SFINAEArgString << R;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:54:32: note: candidate template ignored: substitution failure: deduced incomplete pack <(no value)> for template parameter \'T\'"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:54:32: note: candidate template ignored: substitution failure: deduced incomplete pack <(no value)> for template parameter \'T\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_underqualified"]={ | ["note_ovl_candidate_underqualified"]={ | ||
[e]="candidate template ignored: cannot deduce a type for %0 that would make %2 equal %1", | [e]="candidate template ignored: cannot deduce a type for %0 that would make %2 equal %1", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: cannot deduce a type for (.*?) that would make (.*?) equal (.*?)", | [b]="candidate template ignored\\: cannot deduce a type for (.*?) that would make (.*?) equal (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"42d7d19710d0",1280999108,"TDK_InconsistentQuals is really totally different from TDK_Inconsistent.\nRename it to TDK_Underquali...","TDK_InconsistentQuals is really totally different from TDK_Inconsistent.\nRename it to TDK_Underqualified to avoid this sort of confusion and give it\nits own diagnostic.\n\nllvm-svn: 110318"}, | ||
[ | [g]={{w,11147,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_Underqualified: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_underqualified) << ParamD->getDeclName() << Arg << NonCanonParam;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p1.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p1.cpp:8:29: note: candidate template ignored: cannot deduce a type for \'T\' that would make \'const T\' equal \'volatile int\'"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p1.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p1.cpp:8:29: note: candidate template ignored: cannot deduce a type for \'T\' that would make \'const T\' equal \'volatile int\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_candidate_unsatisfied_constraints"]={ | ["note_ovl_candidate_unsatisfied_constraints"]={ | ||
[e]="candidate template ignored: constraints not satisfied%0", | [e]="candidate template ignored: constraints not satisfied%0", | ||
[ | [a]=k, | ||
[b]="candidate template ignored\\: constraints not satisfied(.*?)", | [b]="candidate template ignored\\: constraints not satisfied(.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nTh...","[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"}, | ||
[ | [g]={{w,10584,"/// 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 // ...\n if (FD->getTrailingRequiresClause()) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n if (Complain) {\n if (InOverloadResolution) {\n // ...\n S.Diag(FD->getBeginLoc(), diag::note_ovl_candidate_unsatisfied_constraints) << TemplateArgString;"},{w,11230,"/// Diagnose a failed template-argument deduction.\nstatic void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, DeductionFailureInfo &DeductionFailure, unsigned NumArgs, bool TakingCandidateAddress) {\n // ...\n case Sema::TDK_ConstraintsNotSatisfied: {\n // ...\n S.Diag(Templated->getLocation(), diag::note_ovl_candidate_unsatisfied_constraints) << TemplateArgString;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:20:17: note: candidate template ignored: constraints not satisfied [with Us = <int, int>]"} | ["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:20:17: note: candidate template ignored: constraints not satisfied [with Us = <int, int>]"} | ||
} | } | ||
}, | }, | ||
["note_ovl_surrogate_cand"]={ | ["note_ovl_surrogate_cand"]={ | ||
[e]="conversion candidate of type %0", | [e]="conversion candidate of type %0", | ||
[ | [a]=k, | ||
[b]="conversion candidate of type (.*?)", | [b]="conversion candidate of type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fd0b2f8fe486",1262770994,"Improve the diagnostics used to report implicitly-generated class members\nas parts of overload sets....","Improve the diagnostics used to report implicitly-generated class members\nas parts of overload sets. Also, refer to constructors as \'constructors\'\nrather than functions.\n\nAdjust a lot of tests.\n\nllvm-svn: 92832"}, | ||
[ | [g]={{w,11666,"static void NoteSurrogateCandidate(Sema &S, OverloadCandidate *Cand) {\n // ...\n if (!Cand->Viable && Cand->FailureKind == ovl_fail_constraints_not_satisfied) {\n // ...\n } else {\n S.Diag(Cand->Surrogate->getLocation(), diag::note_ovl_surrogate_cand) << FnType;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:201:3: note: conversion candidate of type \'INTREF (*)(FLOAT, double)\' (aka \'int &(*)(float, double)\')","clang/test/SemaCXX/overloaded-operator.cpp:202:3: note: conversion candidate of type \'float &(&)(int, double)\'","clang/test/SemaCXX/overloaded-operator.cpp:201:3: note: conversion candidate of type \'INTREF (*)(FLOAT, double)\' (aka \'int &(*)(float, double)\')","clang/test/SemaCXX/overloaded-operator.cpp:202:3: note: conversion candidate of type \'float &(&)(int, double)\'"} | ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:201:3: note: conversion candidate of type \'INTREF (*)(FLOAT, double)\' (aka \'int &(*)(float, double)\')","clang/test/SemaCXX/overloaded-operator.cpp:202:3: note: conversion candidate of type \'float &(&)(int, double)\'","clang/test/SemaCXX/overloaded-operator.cpp:201:3: note: conversion candidate of type \'INTREF (*)(FLOAT, double)\' (aka \'int &(*)(float, double)\')","clang/test/SemaCXX/overloaded-operator.cpp:202:3: note: conversion candidate of type \'float &(&)(int, double)\'"} | ||
} | } | ||
}, | }, | ||
["note_ovl_surrogate_constraints_not_satisfied"]={ | ["note_ovl_surrogate_constraints_not_satisfied"]={ | ||
[e]="conversion candidate %0 not viable: constraints not satisfied", | [e]="conversion candidate %0 not viable: constraints not satisfied", | ||
[ | [a]=k, | ||
[b]="conversion candidate (.*?) not viable\\: constraints not satisfied", | [b]="conversion candidate (.*?) not viable\\: constraints not satisfied", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f9caa12328b2",1688403744,"[Clang] Fix constraint checking of non-generic lambdas.\n\nA lambda call operator can be a templated e...","[Clang] Fix constraint checking of non-generic lambdas.\n\nA lambda call operator can be a templated entity -\nand therefore have constraints while not being a function template\n\n template<class T> void f() {\n []() requires false { }();\n }\n\nIn that case, we would check the constraints of the call operator\nwhich is non-viable. However, we would find a viable candidate:\nthe conversion operator to function pointer, and use it to\nperform a surrogate call.\nThese constraints were not checked because:\n * We never check the constraints of surrogate functions\n * The lambda conversion operator has non constraints.\n\nFrom the wording, it is not clear what the intent is but\nit seems reasonable to expect the constraints of the lambda conversion\noperator to be checked and it is consistent with GCC and MSVC.\n\nThis patch also improve the diagnostics for constraint failure\non surrogate calls.\n\nFixes #63181\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154368"}, | ||
[ | [g]={{w,11660,"static void NoteSurrogateCandidate(Sema &S, OverloadCandidate *Cand) {\n // ...\n if (!Cand->Viable && Cand->FailureKind == ovl_fail_constraints_not_satisfied) {\n S.Diag(Cand->Surrogate->getLocation(), diag::note_ovl_surrogate_constraints_not_satisfied) << Cand->Surrogate;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/concepts.cpp"]={"clang/test/SemaTemplate/concepts.cpp:727:5: note: conversion candidate \'operator int (*)(int)\' not viable: constraints not satisfied"} | ["clang/test/SemaTemplate/concepts.cpp"]={"clang/test/SemaTemplate/concepts.cpp:727:5: note: conversion candidate \'operator int (*)(int)\' not viable: constraints not satisfied"} | ||
} | } | ||
}, | }, | ||
["note_ovl_too_many_candidates"]={ | ["note_ovl_too_many_candidates"]={ | ||
[e]="remaining %0 candidate%s0 omitted; pass -fshow-overloads=all to show them", | [e]="remaining %0 candidate%s0 omitted; pass -fshow-overloads=all to show them", | ||
[ | [a]=k, | ||
[b]="remaining (.*?) candidate(.*?) omitted; pass \\-fshow\\-overloads\\=all to show them", | [b]="remaining (.*?) candidate(.*?) omitted; pass \\-fshow\\-overloads\\=all to show them", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"2b99c6fc4f3e",1276235867,"Add an option -fshow-overloads=best|all to limit the number of overload\ncandidates printed. We defa...","Add an option -fshow-overloads=best|all to limit the number of overload\ncandidates printed. We default to \'all\'. At the moment, \'best\' prints only\nthe first 4 overloads, but we\'ll improve that over time.\n\nllvm-svn: 105815"}, | ||
[ | [g]={{Nc,2589,"/// Give notes for a set of overloads.\n///\n/// A companion to tryExprAsCall. In cases when the name that the programmer\n/// wrote was an overloaded function, we may be able to make some guesses about\n/// plausible overloads based on their return types; such guesses can be handed\n/// off to this method to be emitted as notes.\n///\n/// \\param Overloads - The overloads to note.\n/// \\param FinalNoteLoc - If we\'ve suppressed printing some overloads due to\n/// -fshow-overloads=best, this is the location to attach to the note about too\n/// many candidates. Typically this will be the location of the original\n/// ill-formed expression.\nstatic void noteOverloads(Sema &S, const UnresolvedSetImpl &Overloads, const SourceLocation FinalNoteLoc) {\n // ...\n if (SuppressedOverloads)\n S.Diag(FinalNoteLoc, diag::note_ovl_too_many_candidates) << SuppressedOverloads;"},{w,10769,"/// Diagnoses an ambiguous conversion. The partial diagnostic is the\n/// \"lead\" diagnostic; it will be given two arguments, the source and\n/// target types of the conversion.\nvoid ImplicitConversionSequence::DiagnoseAmbiguousConversion(Sema &S, SourceLocation CaretLoc, const PartialDiagnostic &PDiag) const {\n // ...\n if (I != E)\n S.Diag(SourceLocation(), diag::note_ovl_too_many_candidates) << int(E - I);"},{w,12124,"void OverloadCandidateSet::NoteCandidates(Sema &S, ArrayRef<Expr *> Args, ArrayRef<OverloadCandidate *> Cands, StringRef Opc, SourceLocation OpLoc) {\n // ...\n if (I != E)\n S.Diag(OpLoc, diag::note_ovl_too_many_candidates, shouldDeferDiags(S, Args, OpLoc)) << int(E - I);"},{w,12230,"/// NoteCandidates - When no template specialization match is found, prints\n/// diagnostic messages containing the non-matching specializations that form\n/// the candidate set.\n/// This is analoguous to OverloadCandidateSet::NoteCandidates() with\n/// OCD == OCD_AllCandidates and Cand->Viable == false.\nvoid TemplateSpecCandidateSet::NoteCandidates(Sema &S, SourceLocation Loc) {\n // ...\n if (I != E)\n S.Diag(Loc, diag::note_ovl_too_many_candidates) << int(E - I);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/overloaded-builtin-operators.cpp"]={"clang/test/SemaCXX/overloaded-builtin-operators.cpp:239:16: note: remaining 142 candidates omitted; pass -fshow-overloads=all to show them"} | ["clang/test/SemaCXX/overloaded-builtin-operators.cpp"]={"clang/test/SemaCXX/overloaded-builtin-operators.cpp:239:16: note: remaining 142 candidates omitted; pass -fshow-overloads=all to show them"} | ||
} | } | ||
}, | }, | ||
["note_ownership_returns_index_mismatch"]={ | ["note_ownership_returns_index_mismatch"]={ | ||
[e]="declared with index %0 here", | [e]="declared with index %0 here", | ||
[ | [a]=k, | ||
[b]="declared with index (.*?) here", | [b]="declared with index (.*?) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ef7aef8fe5d3",1406839466,"Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declar...","Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declaration. This removes a FIXME from the code.\n\nllvm-svn: 214436"}, | ||
[ | [g]={{o,1898,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned i = 1; i < AL.getNumArgs(); ++i) {\n // ...\n // Check we don\'t have a conflict with another ownership attribute.\n for (const auto *I : D->specific_attrs<OwnershipAttr>()) {\n // Cannot have two ownership attributes of different kinds for the same\n // index.\n if (I->getOwnKind() != K && llvm::is_contained(I->args(), Idx)) {\n // ...\n } else if (K == OwnershipAttr::Returns && I->getOwnKind() == OwnershipAttr::Returns) {\n // A returns attribute conflicts with any other returns attribute using\n // a different index.\n if (!llvm::is_contained(I->args(), Idx)) {\n // ...\n if (I->args_size())\n S.Diag(AL.getLoc(), diag::note_ownership_returns_index_mismatch) << Idx.getSourceIndex() << Ex->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-ownership.cpp"]={"clang/test/Sema/attr-ownership.cpp:6:22: note: declared with index 3 here"} | ["clang/test/Sema/attr-ownership.cpp"]={"clang/test/Sema/attr-ownership.cpp:6:22: note: declared with index 3 here"} | ||
} | } | ||
}, | }, | ||
["note_parameter_here"]={ | ["note_parameter_here"]={ | ||
[e]="passing argument to parameter here", | [e]="passing argument to parameter here", | ||
[ | [a]=k, | ||
[b]="passing argument to parameter here", | [b]="passing argument to parameter here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4f4946aaaa19",1271895618,"Whenever we complain about a failed initialization of a function or\nmethod parameter, provide a note...","Whenever we complain about a failed initialization of a function or\nmethod parameter, provide a note pointing at the parameter itself so\nthe user does not have to manually look for the function/method being\ncalled and match up parameters to arguments. For example, we now get:\n\nt.c:4:5: warning: incompatible pointer types passing \'long *\' to\nparameter of\n type \'int *\' [-pedantic]\n f(long_ptr);\n ^~~~~~~~\nt.c:1:13: note: passing argument to parameter \'x\' here\nvoid f(int *x);\n ^\n\nllvm-svn: 102038"}, | ||
[ | [g]={{Q,6965,"void InitializationSequence::PrintInitLocationNote(Sema &S, const InitializedEntity &Entity) {\n if (Entity.isParamOrTemplateParamKind() && Entity.getDecl()) {\n // ...\n if (Entity.getDecl()->getDeclName())\n // ...\n else\n S.Diag(Entity.getDecl()->getLocation(), diag::note_parameter_here);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:5:31: note: passing argument to parameter here","clang/test/SemaObjC/argument-checking.m:6:25: note: passing argument to parameter here"} | ["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:5:31: note: passing argument to parameter here","clang/test/SemaObjC/argument-checking.m:6:25: note: passing argument to parameter here"} | ||
} | } | ||
}, | }, | ||
["note_parameter_mapping_substitution_here"]={ | ["note_parameter_mapping_substitution_here"]={ | ||
[e]="while substituting into concept arguments here; substitution failures not allowed in concept arguments", | [e]="while substituting into concept arguments here; substitution failures not allowed in concept arguments", | ||
[ | [a]=k, | ||
[b]="while substituting into concept arguments here; substitution failures not allowed in concept arguments", | [b]="while substituting into concept arguments here; substitution failures not allowed in concept arguments", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on V...","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"}, | ||
[ | [g]={{bb,1065,"/// 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::ParameterMappingSubstitution:\n Diags.Report(Active->PointOfInstantiation, diag::note_parameter_mapping_substitution_here) << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp:12:42: note: while substituting into concept arguments here; substitution failures not allowed in concept arguments"} | ["clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp:12:42: note: while substituting into concept arguments here; substitution failures not allowed in concept arguments"} | ||
} | } | ||
}, | }, | ||
["note_parameter_named_here"]={ | ["note_parameter_named_here"]={ | ||
[e]="passing argument to parameter %0 here", | [e]="passing argument to parameter %0 here", | ||
[ | [a]=k, | ||
[b]="passing argument to parameter (.*?) here", | [b]="passing argument to parameter (.*?) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4f4946aaaa19",1271895618,"Whenever we complain about a failed initialization of a function or\nmethod parameter, provide a note...","Whenever we complain about a failed initialization of a function or\nmethod parameter, provide a note pointing at the parameter itself so\nthe user does not have to manually look for the function/method being\ncalled and match up parameters to arguments. For example, we now get:\n\nt.c:4:5: warning: incompatible pointer types passing \'long *\' to\nparameter of\n type \'int *\' [-pedantic]\n f(long_ptr);\n ^~~~~~~~\nt.c:1:13: note: passing argument to parameter \'x\' here\nvoid f(int *x);\n ^\n\nllvm-svn: 102038"}, | ||
[ | [g]={{Q,6962,"void InitializationSequence::PrintInitLocationNote(Sema &S, const InitializedEntity &Entity) {\n if (Entity.isParamOrTemplateParamKind() && Entity.getDecl()) {\n // ...\n if (Entity.getDecl()->getDeclName())\n S.Diag(Entity.getDecl()->getLocation(), diag::note_parameter_named_here) << Entity.getDecl()->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:10:28: note: passing argument to parameter \'s\' here","clang/test/SemaObjC/argument-checking.m:11:23: note: passing argument to parameter \'s\' here","clang/test/SemaObjC/argument-checking.m:13:15: note: passing argument to parameter \'s2\' here"} | ["clang/test/SemaObjC/argument-checking.m"]={"clang/test/SemaObjC/argument-checking.m:10:28: note: passing argument to parameter \'s\' here","clang/test/SemaObjC/argument-checking.m:11:23: note: passing argument to parameter \'s\' here","clang/test/SemaObjC/argument-checking.m:13:15: note: passing argument to parameter \'s2\' here"} | ||
} | } | ||
}, | }, | ||
["note_parameter_pack_here"]={ | ["note_parameter_pack_here"]={ | ||
[e]="parameter pack %0 declared here", | [e]="parameter pack %0 declared here", | ||
[ | [a]=k, | ||
[b]="parameter pack (.*?) declared here", | [b]="parameter pack (.*?) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"820ba7ba43a2",1294162438,"Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re...","Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re missing proper libclang support for the new\nSizeOfPackExpr expression node.\n\nllvm-svn: 122813"}, | ||
[ | [g]={{"clang/lib/Sema/SemaTemplateVariadic.cpp",1032,"/// Called when an expression computing the size of a parameter pack\n/// is parsed.\n///\n/// \\code\n/// template<typename ...Types> struct count {\n/// static const unsigned value = sizeof...(Types);\n/// };\n/// \\endcode\n///\n//\n/// \\param OpLoc The location of the \"sizeof\" keyword.\n/// \\param Name The name of the parameter pack whose size will be determined.\n/// \\param NameLoc The source location of the name of the parameter pack.\n/// \\param RParenLoc The location of the closing parentheses.\nExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc) {\n // ...\n case LookupResult::NotFound:\n case LookupResult::NotFoundInCurrentInstantiation: {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, nullptr, CCC, CTK_ErrorRecovery)) {\n diagnoseTypo(Corrected, PDiag(diag::err_sizeof_pack_no_pack_name_suggest) << &Name, PDiag(diag::note_parameter_pack_here));"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp"]={"clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp:33:22: note: parameter pack \'Types\' declared here"} | ["clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp"]={"clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp:33:22: note: parameter pack \'Types\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_parameter_type"]={ | ["note_parameter_type"]={ | ||
[e]="parameter of type %0 is declared here", | [e]="parameter of type %0 is declared here", | ||
[ | [a]=k, | ||
[b]="parameter of type (.*?) is declared here", | [b]="parameter of type (.*?) is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolea...","Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,\nNSNumber, and boolean literals. This includes both Sema and Codegen support.\nIncluded is also support for new Objective-C container subscripting.\n\nMy apologies for the large patch. It was very difficult to break apart.\nThe patch introduces changes to the driver as well to cause clang to link\nin additional runtime support when needed to support the new language features.\n\nDocs are forthcoming to document the implementation and behavior of these features.\n\nllvm-svn: 152137"}, | ||
[ | [g]={{y,8172,"/// Check the arguments to \'__builtin_va_start\' or \'__builtin_ms_va_start\'\n/// for validity. Emit an error and return true on failure; return false\n/// on success.\nbool Sema::SemaBuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!SecondArgIsLastNamedArgument)\n // ...\n else if (IsCRegister || Type->isReferenceType() || Type->isSpecificBuiltinType(BuiltinType::Float) || [=] {\n // ...\n Diag(ParamLoc, diag::note_parameter_type) << Type;"},{Hb,1232,"bool ObjCSubscriptOpBuilder::findAtIndexGetter() {\n // ...\n if (AtIndexGetter) {\n // ...\n if ((arrayRef && !T->isIntegralOrEnumerationType()) || (!arrayRef && !T->isObjCObjectPointerType())) {\n // ...\n S.Diag(AtIndexGetter->parameters()[0]->getLocation(), diag::note_parameter_type) << T;"},{Hb,1348,"bool ObjCSubscriptOpBuilder::findAtIndexSetter() {\n // ...\n if (AtIndexSetter && arrayRef) {\n // ...\n if (!T->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(AtIndexSetter->parameters()[1]->getLocation(), diag::note_parameter_type) << T;"},{Hb,1356,"bool ObjCSubscriptOpBuilder::findAtIndexSetter() {\n // ...\n if (AtIndexSetter && arrayRef) {\n // ...\n if (!T->isObjCObjectPointerType()) {\n // ...\n S.Diag(AtIndexSetter->parameters()[0]->getLocation(), diag::note_parameter_type) << T;"},{Hb,1371,"bool ObjCSubscriptOpBuilder::findAtIndexSetter() {\n // ...\n if (AtIndexSetter && arrayRef) {\n // ...\n } else if (AtIndexSetter && !arrayRef)\n for (unsigned i = 0; i < 2; i++) {\n // ...\n if (!T->isObjCObjectPointerType()) {\n // ...\n S.Diag(AtIndexSetter->parameters()[i]->getLocation(), diag::note_parameter_type) << T;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/objc-container-subscripting.m"]={"clang/test/SemaObjC/objc-container-subscripting.m:7:40: note: parameter of type \'double\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:8:59: note: parameter of type \'void *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:8:25: note: parameter of type \'id *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:29:36: note: parameter of type \'id *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:30:26: note: parameter of type \'void *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:30:56: note: parameter of type \'id *\' is declared here"} | ["clang/test/SemaObjC/objc-container-subscripting.m"]={"clang/test/SemaObjC/objc-container-subscripting.m:7:40: note: parameter of type \'double\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:8:59: note: parameter of type \'void *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:8:25: note: parameter of type \'id *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:29:36: note: parameter of type \'id *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:30:26: note: parameter of type \'void *\' is declared here","clang/test/SemaObjC/objc-container-subscripting.m:30:56: note: parameter of type \'id *\' is declared here"} | ||
} | } | ||
}, | }, | ||
["note_partial_availability_specified_here"]={ | ["note_partial_availability_specified_here"]={ | ||
[e]="%0 has been marked as being introduced in %1 %2 here, but the deployment target is %1 %3", | [e]="%0 has been marked as being introduced in %1 %2 here, but the deployment target is %1 %3", | ||
[ | [a]=k, | ||
[b]="(.*?) has been marked as being introduced in (.*?) (.*?) here, but the deployment target is (.*?) (.*?)", | [b]="(.*?) has been marked as being introduced in (.*?) (.*?) here, but the deployment target is (.*?) (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0535b0f38731",1547493451,"Improve a -Wunguarded-availability note\n\nMention the deployment target, and don\'t say \"partial\" whic...","Improve a -Wunguarded-availability note\n\nMention the deployment target, and don\'t say \"partial\" which doesn\'t\nreally mean anything to users.\n\nrdar://problem/33601513\n\nDifferential revision: https://reviews.llvm.org/D56523\n\nllvm-svn: 351108"}, | ||
[ | [g]={{Nb,396,"/// 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_NotYetIntroduced: {\n // ...\n S.Diag(OffendingDecl->getLocation(), diag::note_partial_availability_specified_here) << OffendingDecl << PlatformName << Introduced.getAsString() << S.Context.getTargetInfo().getPlatformMinVersion().getAsString();"},{Nb,781,"void DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(NamedDecl *D, SourceRange Range, ObjCInterfaceDecl *ReceiverClass) {\n // ...\n if (Result != AR_Available) {\n // ...\n SemaRef.Diag(OffendingDecl->getLocation(), diag::note_partial_availability_specified_here) << OffendingDecl << PlatformName << Introduced.getAsString() << SemaRef.Context.getTargetInfo().getPlatformMinVersion().getAsString();"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/objc-implementation-attrs.m"]={"clang/test/Parser/objc-implementation-attrs.m:25:24: note: \'unavail_int\' has been marked as being introduced in macOS 1000 here, but the deployment target is macOS 10.14.0"} | ["clang/test/Parser/objc-implementation-attrs.m"]={"clang/test/Parser/objc-implementation-attrs.m:25:24: note: \'unavail_int\' has been marked as being introduced in macOS 1000 here, but the deployment target is macOS 10.14.0"} | ||
} | } | ||
}, | }, | ||
["note_partial_spec_match"]={ | ["note_partial_spec_match"]={ | ||
[e]="partial specialization matches %0", | [e]="partial specialization matches %0", | ||
[ | [a]=k, | ||
[b]="partial specialization matches (.*?)", | [b]="partial specialization matches (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"be999390ebc7",1253031831,"Implement partial ordering of class template partial specializations \n(C++ [temp.class.order]).\n\nllv...","Implement partial ordering of class template partial specializations \n(C++ [temp.class.order]).\n\nllvm-svn: 81866"}, | ||
[ | [g]={{r,4857,"DeclResult Sema::CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs) {\n // ...\n if (AmbiguousPartialSpec) {\n // ...\n // Print the matching partial specializations.\n for (MatchResult P : Matched)\n Diag(P.Partial->getLocation(), diag::note_partial_spec_match) << getTemplateArgumentBindingsText(P.Partial->getTemplateParameters(), *P.Args);"},{bb,3698,"/// Get the instantiation pattern to use to instantiate the definition of a\n/// given ClassTemplateSpecializationDecl (either the pattern of the primary\n/// template or of a partial specialization).\nstatic ActionResult<CXXRecordDecl *> getPatternForClassTemplateSpecialization(Sema &S, SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK) {\n // ...\n if (!Specialized.is<ClassTemplatePartialSpecializationDecl *>()) {\n // ...\n if (Matched.size() >= 1) {\n // ...\n if (Matched.size() == 1) {\n // ...\n } else {\n // ...\n if (Ambiguous) {\n // ...\n // Print the matching partial specializations.\n for (SmallVectorImpl<MatchResult>::iterator P = Matched.begin(), PEnd = Matched.end(); P != PEnd; ++P)\n S.Diag(P->Partial->getLocation(), diag::note_partial_spec_match) << S.getTemplateArgumentBindingsText(P->Partial->getTemplateParameters(), *P->Args);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/temp_class_order.cpp"]={"clang/test/SemaTemplate/temp_class_order.cpp:33:8: note: partial specialization matches [with T = int, U = int *]","clang/test/SemaTemplate/temp_class_order.cpp:36:8: note: partial specialization matches [with T = int *, U = int]"} | ["clang/test/SemaTemplate/temp_class_order.cpp"]={"clang/test/SemaTemplate/temp_class_order.cpp:33:8: note: partial specialization matches [with T = int, U = int *]","clang/test/SemaTemplate/temp_class_order.cpp:36:8: note: partial specialization matches [with T = int *, U = int]"} | ||
} | } | ||
}, | }, | ||
["note_pch_rebuild_required"]={ | ["note_pch_rebuild_required"]={ | ||
[e]="please rebuild precompiled header \'%0\'", | [e]="please rebuild precompiled header \'%0\'", | ||
[ | [a]=k, | ||
[b]="please rebuild precompiled header \'(.*?)\'", | [b]="please rebuild precompiled header \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]="AST Deserialization Issue", | ||
[ | [f]={"e82630d5d55d",1389917949,"Improve the error message when a PCH dependency is modified\n\nShow the top-level pch file as the culp...","Improve the error message when a PCH dependency is modified\n\nShow the top-level pch file as the culprit, rather than the immediate\ndependency when a pch file imports a pcm from a module. To clarify the\nrelationship, the pch import stack is printed as notes. The old behaviour was\nmisleading when a pch imported a pcm (from a module), since removing the pcm\nwould not fix the problem, whereas rebuilding the pch would.\n\nllvm-svn: 199446"}, | ||
[ | [g]={{ac,2519,"InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {\n // ...\n // For an overridden file, there is nothing to validate.\n if (!Overridden && FileChange.Kind != Change::None) {\n if (Complain && !Diags.isDiagnosticInFlight()) {\n // ...\n Diag(diag::note_pch_rebuild_required) << TopLevelPCHName;"}} | ||
}, | }, | ||
["note_pch_required_by"]={ | ["note_pch_required_by"]={ | ||
[e]="\'%0\' required by \'%1\'", | [e]="\'%0\' required by \'%1\'", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' required by \'(.*?)\'", | [b]="\'(.*?)\' required by \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]="AST Deserialization Issue", | ||
[ | [f]={"e82630d5d55d",1389917949,"Improve the error message when a PCH dependency is modified\n\nShow the top-level pch file as the culp...","Improve the error message when a PCH dependency is modified\n\nShow the top-level pch file as the culprit, rather than the immediate\ndependency when a pch file imports a pcm from a module. To clarify the\nrelationship, the pch import stack is printed as notes. The old behaviour was\nmisleading when a pch imported a pcm (from a module), since removing the pcm\nwould not fix the problem, whereas rebuilding the pch would.\n\nllvm-svn: 199446"}, | ||
[ | [g]={{ac,2512,"InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {\n // ...\n // For an overridden file, there is nothing to validate.\n if (!Overridden && FileChange.Kind != Change::None) {\n if (Complain && !Diags.isDiagnosticInFlight()) {\n // ...\n // Print the import stack.\n if (ImportStack.size() > 1) {\n Diag(diag::note_pch_required_by) << Filename << ImportStack[0]->FileName;"},{ac,2515,"InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {\n // ...\n // For an overridden file, there is nothing to validate.\n if (!Overridden && FileChange.Kind != Change::None) {\n if (Complain && !Diags.isDiagnosticInFlight()) {\n // ...\n // Print the import stack.\n if (ImportStack.size() > 1) {\n // ...\n for (unsigned I = 1; I < ImportStack.size(); ++I)\n Diag(diag::note_pch_required_by) << ImportStack[I - 1]->FileName << ImportStack[I]->FileName;"}} | ||
}, | }, | ||
["note_performs_forbidden_arc_conversion"]={ | ["note_performs_forbidden_arc_conversion"]={ | ||
[e]="inline function performs a conversion which is forbidden in ARC", | [e]="inline function performs a conversion which is forbidden in ARC", | ||
[ | [a]=k, | ||
[b]="inline function performs a conversion which is forbidden in ARC", | [b]="inline function performs a conversion which is forbidden in ARC", | ||
[ | [c]=j, | ||
[ | [d]="ARC Restrictions", | ||
[ | [f]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes ...","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | ||
[ | [g]={{Nb,482,"/// 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_ARCForbiddenConversion:\n // ...\n diag_available_here = diag::note_performs_forbidden_arc_conversion;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-system-header.m"]={"clang/test/SemaObjC/Inputs/arc-system-header.h:1:21: note: inline function performs a conversion which is forbidden in ARC","clang/test/SemaObjC/Inputs/arc-system-header.h:5:22: note: inline function performs a conversion which is forbidden in ARC"} | ["clang/test/SemaObjC/arc-system-header.m"]={"clang/test/SemaObjC/Inputs/arc-system-header.h:1:21: note: inline function performs a conversion which is forbidden in ARC","clang/test/SemaObjC/Inputs/arc-system-header.h:5:22: note: inline function performs a conversion which is forbidden in ARC"} | ||
} | } | ||
}, | }, | ||
["note_pointer_declared_here"]={ | ["note_pointer_declared_here"]={ | ||
[e]="pointer %0 declared here", | [e]="pointer %0 declared here", | ||
[ | [a]=k, | ||
[b]="pointer (.*?) declared here", | [b]="pointer (.*?) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b4806822d2d5",1566123009,"[Diagnostics] Improve -Wsizeof-pointer-div\n\nEmit diag note with a location of pointer declaration.\nR...","[Diagnostics] Improve -Wsizeof-pointer-div\n\nEmit diag note with a location of pointer declaration.\nRevisited/added tests.\n\nllvm-svn: 369206"}, | ||
[ | [g]={{v,11325,"static void DiagnoseDivisionSizeofPointerOrArray(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc) {\n // ...\n if (LHSTy->isPointerType() && !RHSTy->isPointerType()) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSArg)) {\n if (const ValueDecl *LHSArgDecl = DRE->getDecl())\n S.Diag(LHSArgDecl->getLocation(), diag::note_pointer_declared_here) << LHSArgDecl;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/div-sizeof-ptr.cpp"]={ | ["clang/test/Sema/div-sizeof-ptr.cpp"]={oc,oc,oc,oc,oc,"clang/test/Sema/div-sizeof-ptr.cpp:11:14: note: pointer \'r\' declared here","clang/test/Sema/div-sizeof-ptr.cpp:19:10: note: pointer \'d\' declared here","clang/test/Sema/div-sizeof-ptr.cpp:19:10: note: pointer \'d\' declared here",oc} | ||
} | } | ||
}, | }, | ||
["note_possibility"]={ | ["note_possibility"]={ | ||
[e]="one possibility", | [e]="one possibility", | ||
[ | [a]=k, | ||
[b]="one possibility", | [b]="one possibility", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={Cc,1308178962,Dc,Ec}, | ||
[ | [g]={{u,3642,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n if (issueDiagnostic) {\n // ...\n Diag(Methods[0]->getBeginLoc(), issueError ? diag::note_possibility : diag::note_using) << Methods[0]->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:386:1: note: one possibility","clang/test/SemaObjC/arc.m:387:1: note: one possibility","clang/test/SemaObjC/arc.m:388:1: note: one possibility","clang/test/SemaObjC/arc.m:389:1: note: one possibility","clang/test/SemaObjC/arc.m:390:1: note: one possibility"} | ["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:386:1: note: one possibility","clang/test/SemaObjC/arc.m:387:1: note: one possibility","clang/test/SemaObjC/arc.m:388:1: note: one possibility","clang/test/SemaObjC/arc.m:389:1: note: one possibility","clang/test/SemaObjC/arc.m:390:1: note: one possibility"} | ||
} | } | ||
}, | }, | ||
["note_possible_target_of_call"]={ | ["note_possible_target_of_call"]={ | ||
[e]="possible target for call", | [e]="possible target for call", | ||
[ | [a]=k, | ||
[b]="possible target for call", | [b]="possible target for call", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"50a2c2c19de5",1318374870,"Catch placeholder types in DefaultLvalueConversion\nand DefaultFunctionArrayLvalueConversion. To pre...","Catch placeholder types in DefaultLvalueConversion\nand DefaultFunctionArrayLvalueConversion. To prevent\nsignificant regression for should-this-be-a-call fixits,\nand to repair some such regression from the introduction of\nbound member placeholders, make those placeholder checks\ntry to build calls appropriately. Harden the build-a-call\nlogic while we\'re at it.\n\nllvm-svn: 141738"}, | ||
[ | [g]={{Nc,2582,"/// Give notes for a set of overloads.\n///\n/// A companion to tryExprAsCall. In cases when the name that the programmer\n/// wrote was an overloaded function, we may be able to make some guesses about\n/// plausible overloads based on their return types; such guesses can be handed\n/// off to this method to be emitted as notes.\n///\n/// \\param Overloads - The overloads to note.\n/// \\param FinalNoteLoc - If we\'ve suppressed printing some overloads due to\n/// -fshow-overloads=best, this is the location to attach to the note about too\n/// many candidates. Typically this will be the location of the original\n/// ill-formed expression.\nstatic void noteOverloads(Sema &S, const UnresolvedSetImpl &Overloads, const SourceLocation FinalNoteLoc) {\n // ...\n for (UnresolvedSetImpl::iterator It = Overloads.begin(), DeclsEnd = Overloads.end(); It != DeclsEnd; ++It) {\n // ...\n S.Diag(Fn->getLocation(), diag::note_possible_target_of_call);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-target-mv.c"]={"clang/test/Sema/attr-target-mv.c:12:42: note: possible target for call"} | ["clang/test/Sema/attr-target-mv.c"]={"clang/test/Sema/attr-target-mv.c:12:42: note: possible target for call"} | ||
} | } | ||
}, | }, | ||
["note_pp_ambiguous_macro_chosen"]={ | ["note_pp_ambiguous_macro_chosen"]={ | ||
[e]="expanding this definition of %0", | [e]="expanding this definition of %0", | ||
[ | [a]=k, | ||
[b]="expanding this definition of (.*?)", | [b]="expanding this definition of (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"5968b1b71f88",1349989659,"Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two d...","Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two disjoint modules #define the same\nidentifier to different token sequences.\n\nllvm-svn: 165746"}, | ||
[ | [g]={{Pc,561,"/// HandleMacroExpandedIdentifier - If an identifier token is read that is to be\n/// expanded as a macro, handle it and return the next token as \'Identifier\'.\nbool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, const MacroDefinition &M) {\n // ...\n // If the macro definition is ambiguous, complain.\n if (M.isAmbiguous()) {\n // ...\n Diag(MI->getDefinitionLoc(), diag::note_pp_ambiguous_macro_chosen) << Identifier.getIdentifierInfo();"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/macros2.c"]={"clang/test/Modules/Inputs/macros_top.h:22:9: note: expanding this definition of \'TOP_OTHER_DEF_RIGHT_UNDEF\'","clang/test/Modules/Inputs/macros_left.h:14:9: note: expanding this definition of \'LEFT_RIGHT_DIFFERENT\'","clang/test/Modules/Inputs/macros_left.h:11:9: note: expanding this definition of \'LEFT_RIGHT_DIFFERENT2\'","clang/test/Modules/Inputs/macros_top.h:19:9: note: expanding this definition of \'TOP_OTHER_REDEF1\'"} | ["clang/test/Modules/macros2.c"]={"clang/test/Modules/Inputs/macros_top.h:22:9: note: expanding this definition of \'TOP_OTHER_DEF_RIGHT_UNDEF\'","clang/test/Modules/Inputs/macros_left.h:14:9: note: expanding this definition of \'LEFT_RIGHT_DIFFERENT\'","clang/test/Modules/Inputs/macros_left.h:11:9: note: expanding this definition of \'LEFT_RIGHT_DIFFERENT2\'","clang/test/Modules/Inputs/macros_top.h:19:9: note: expanding this definition of \'TOP_OTHER_REDEF1\'"} | ||
} | } | ||
}, | }, | ||
["note_pp_ambiguous_macro_other"]={ | ["note_pp_ambiguous_macro_other"]={ | ||
[e]="other definition of %0", | [e]="other definition of %0", | ||
[ | [a]=k, | ||
[b]="other definition of (.*?)", | [b]="other definition of (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"5968b1b71f88",1349989659,"Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two d...","Diagnose the expansion of ambiguous macro definitions. This can happen\nonly with modules, when two disjoint modules #define the same\nidentifier to different token sequences.\n\nllvm-svn: 165746"}, | ||
[ | [g]={{Pc,565,"/// HandleMacroExpandedIdentifier - If an identifier token is read that is to be\n/// expanded as a macro, handle it and return the next token as \'Identifier\'.\nbool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, const MacroDefinition &M) {\n // ...\n // If the macro definition is ambiguous, complain.\n if (M.isAmbiguous()) {\n // ...\n M.forAllDefinitions([&](const MacroInfo *OtherMI) {\n if (OtherMI != MI)\n Diag(OtherMI->getDefinitionLoc(), diag::note_pp_ambiguous_macro_other) << Identifier.getIdentifierInfo();"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/macros2.c"]={"clang/test/Modules/Inputs/macros_other.h:6:9: note: other definition of \'TOP_OTHER_DEF_RIGHT_UNDEF\'","clang/test/Modules/Inputs/macros_right.h:12:9: note: other definition of \'LEFT_RIGHT_DIFFERENT\'","clang/test/Modules/Inputs/macros_right.h:13:9: note: other definition of \'LEFT_RIGHT_DIFFERENT2\'","clang/test/Modules/Inputs/macros_other.h:4:9: note: other definition of \'TOP_OTHER_REDEF1\'"} | ["clang/test/Modules/macros2.c"]={"clang/test/Modules/Inputs/macros_other.h:6:9: note: other definition of \'TOP_OTHER_DEF_RIGHT_UNDEF\'","clang/test/Modules/Inputs/macros_right.h:12:9: note: other definition of \'LEFT_RIGHT_DIFFERENT\'","clang/test/Modules/Inputs/macros_right.h:13:9: note: other definition of \'LEFT_RIGHT_DIFFERENT2\'","clang/test/Modules/Inputs/macros_other.h:4:9: note: other definition of \'TOP_OTHER_REDEF1\'"} | ||
} | } | ||
}, | }, | ||
["note_pp_framework_without_header"]={ | ["note_pp_framework_without_header"]={ | ||
[e]="did not find header \'%0\' in framework \'%1\' (loaded from \'%2\')", | [e]="did not find header \'%0\' in framework \'%1\' (loaded from \'%2\')", | ||
[ | [a]=k, | ||
[b]="did not find header \'(.*?)\' in framework \'(.*?)\' \\(loaded from \'(.*?)\'\\)", | [b]="did not find header \'(.*?)\' in framework \'(.*?)\' \\(loaded from \'(.*?)\'\\)", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"421380a10816",1549406095,"[Preprocessor] Add a note with framework location for \"file not found\" error.\n\nWhen a framework with...","[Preprocessor] Add a note with framework location for \"file not found\" error.\n\nWhen a framework with the same name is available at multiple framework\nsearch paths, we use the first matching location. If a framework at this\nlocation doesn\'t have all the headers, it can be confusing for\ndevelopers because they see only an error `\'Foo/Foo.h\' file not found`,\ncan find the complete framework with required header, and don\'t know the\nincomplete framework was used instead.\n\nAdd a note explaining a framework without required header was found.\nAlso mention framework directory path to make it easier to find the\nincomplete framework.\n\nrdar://problem/39246514\n\nReviewers: arphaman, erik.pilkington, jkorous\n\nReviewed By: jkorous\n\nSubscribers: jkorous, dexonsmith, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D56561\n\nllvm-svn: 353231"}, | ||
[ | [g]={{N,2101,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n if (IsFrameworkFound) {\n // ...\n Diag(FilenameTok, diag::note_pp_framework_without_header) << OriginalFilename.substr(SlashPos + 1) << FrameworkName << CacheEntry.Directory->getName();"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/include-header-missing-in-framework.c"]={"clang/test/Preprocessor/include-header-missing-in-framework.c:10:10: note: did not find header \'NotExistingHeader.h\' in framework \'TestFramework\' (loaded from \'clang/test/Preprocessor/Inputs\')"} | ["clang/test/Preprocessor/include-header-missing-in-framework.c"]={"clang/test/Preprocessor/include-header-missing-in-framework.c:10:10: note: did not find header \'NotExistingHeader.h\' in framework \'TestFramework\' (loaded from \'clang/test/Preprocessor/Inputs\')"} | ||
} | } | ||
}, | }, | ||
["note_pp_macro_annotation"]={ | ["note_pp_macro_annotation"]={ | ||
[e]="macro marked \'%select{deprecated|restrict_expansion|final}0\' here", | [e]="macro marked \'%select{deprecated|restrict_expansion|final}0\' here", | ||
[ | [a]=k, | ||
[b]="macro marked \'(?:deprecated|restrict_expansion|final)\' here", | [b]="macro marked \'(?:deprecated|restrict_expansion|final)\' here", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{"clang/lib/Lex/Preprocessor.cpp",1460,"void Preprocessor::emitMacroDeprecationWarning(const Token &Identifier) const {\n // ...\n Diag(Info.Location, diag::note_pp_macro_annotation) << 0;"},{"clang/lib/Lex/Preprocessor.cpp",1475,"void Preprocessor::emitRestrictExpansionWarning(const Token &Identifier) const {\n // ...\n Diag(Info.Location, diag::note_pp_macro_annotation) << 1;"},{"clang/lib/Lex/Preprocessor.cpp",1487,"void Preprocessor::emitFinalMacroWarning(const Token &Identifier, bool IsUndef) const {\n // ...\n Diag(*A.FinalAnnotationLoc, diag::note_pp_macro_annotation) << 2;"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:14:56: note: macro marked \'deprecated\' here", | ["clang/test/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:14:56: note: macro marked \'deprecated\' here",Qb,Qb,Qb,Qb,Qb,Qb,Qb,Qb} | ||
} | } | ||
}, | }, | ||
["note_pp_module_begin_here"]={ | ["note_pp_module_begin_here"]={ | ||
[e]="entering module \'%0\' due to this pragma", | [e]="entering module \'%0\' due to this pragma", | ||
[ | [a]=k, | ||
[b]="entering module \'(.*?)\' due to this pragma", | [b]="entering module \'(.*?)\' due to this pragma", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"51d09c512b95",1496121779,"Diagnose attempts to build a preprocessed module that defines an unavailable submodule.\n\nThe errors ...","Diagnose attempts to build a preprocessed module that defines an unavailable submodule.\n\nThe errors we would otherwise get are incomprehensible, as we would enter the\nmodule but not make its contents visible to itself.\n\nllvm-svn: 304190"}, | ||
[ | [g]={{Tb,1774,"/// 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 the module isn\'t available, it doesn\'t make sense to enter it.\n if (Preprocessor::checkModuleIsAvailable(PP.getLangOpts(), PP.getTargetInfo(), PP.getDiagnostics(), M)) {\n PP.Diag(BeginLoc, diag::note_pp_module_begin_here) << M->getTopLevelModuleName();"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/preprocess-unavailable.cpp"]={"clang/test/Modules/preprocess-unavailable.cpp:9:22: note: entering module \'a\' due to this pragma"} | ["clang/test/Modules/preprocess-unavailable.cpp"]={"clang/test/Modules/preprocess-unavailable.cpp:9:22: note: entering module \'a\' due to this pragma"} | ||
} | } | ||
}, | }, | ||
["note_pragma_attribute_applied_decl_here"]={ | ["note_pragma_attribute_applied_decl_here"]={ | ||
[e]="when applied to this declaration", | [e]="when applied to this declaration", | ||
[ | [a]=k, | ||
[b]="when applied to this declaration", | [b]="when applied to this declaration", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0a849f47d2f7",1492508507,"Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attrib...","Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"}, | ||
[ | [g]={{nb,1137,"void Sema::PrintPragmaAttributeInstantiationPoint() {\n // ...\n Diags.Report(PragmaAttributeCurrentTargetDecl->getBeginLoc(), diag::note_pragma_attribute_applied_decl_here);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:12:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:13:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:17:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:17:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:21:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:21:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:31:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:36:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:44:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:44:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:53:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:56:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:56:1: note: when applied to this declaration"} | ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:12:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:13:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:17:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:17:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:21:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:21:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:31:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:36:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:44:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:44:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:53:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:56:1: note: when applied to this declaration","clang/test/Sema/pragma-attribute.c:56:1: note: when applied to this declaration"} | ||
} | } | ||
}, | }, | ||
["note_pragma_attribute_namespace_on_attribute"]={ | ["note_pragma_attribute_namespace_on_attribute"]={ | ||
[e]="omit the namespace to add attributes to the most-recently pushed attribute group", | [e]="omit the namespace to add attributes to the most-recently pushed attribute group", | ||
[ | [a]=k, | ||
[b]="omit the namespace to add attributes to the most\\-recently pushed attribute group", | [b]="omit the namespace to add attributes to the most\\-recently pushed attribute group", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"0876cae0d749",1545345124,"Add support for namespaces on #pragma clang attribute\n\nNamespaces are introduced by adding an \"ident...","Add support for namespaces on #pragma clang attribute\n\nNamespaces are introduced by adding an \"identifier.\" before a\npush/pop directive. Pop directives with namespaces can only pop a\nattribute group that was pushed with the same namespace. Push and pop\ndirectives that don\'t opt into namespaces have the same semantics.\n\nThis is necessary to prevent a pitfall of using multiple #pragma\nclang attribute directives spread out in a large file, particularly\nwhen macros are involved. It isn\'t easy to see which pop corripsonds\nto which push, so its easy to inadvertently pop the wrong group.\n\nDifferential revision: https://reviews.llvm.org/D55628\n\nllvm-svn: 349845"}, | ||
[ | [g]={{"clang/lib/Parse/ParsePragma.cpp",3886,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Determine what action this pragma clang attribute represents.\n if (Tok.is(tok::l_paren)) {\n if (Info->Namespace) {\n // ...\n PP.Diag(Tok.getLocation(), diag::note_pragma_attribute_namespace_on_attribute);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pragma-attribute-namespace.c"]={"clang/test/Sema/pragma-attribute-namespace.c:25:31: note: omit the namespace to add attributes to the most-recently pushed attribute group"} | ["clang/test/Sema/pragma-attribute-namespace.c"]={"clang/test/Sema/pragma-attribute-namespace.c:25:31: note: omit the namespace to add attributes to the most-recently pushed attribute group"} | ||
} | } | ||
}, | }, | ||
["note_pragma_attribute_region_ends_here"]={ | ["note_pragma_attribute_region_ends_here"]={ | ||
[e]="\'#pragma clang attribute push\' regions ends here", | [e]="\'#pragma clang attribute push\' regions ends here", | ||
[ | [a]=k, | ||
[b]="\'\\#pragma clang attribute push\' regions ends here", | [b]="\'\\#pragma clang attribute push\' regions ends here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0a849f47d2f7",1492508507,"Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attrib...","Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"}, | ||
[ | [g]={{nb,1092,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n // Dig back through the stack trying to find the most recently pushed group\n // that in Namespace. Note that this works fine if no namespace is present,\n // think of push/pops without namespaces as having an implicit \"nullptr\"\n // namespace.\n for (size_t Index = PragmaAttributeStack.size(); Index;) {\n // ...\n if (PragmaAttributeStack[Index].Namespace == Namespace) {\n for (const PragmaAttributeEntry &Entry : PragmaAttributeStack[Index].Entries) {\n if (!Entry.IsUsed) {\n // ...\n Diag(PragmaLoc, diag::note_pragma_attribute_region_ends_here);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:7:15: note: \'#pragma clang attribute push\' regions ends here"} | ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:7:15: note: \'#pragma clang attribute push\' regions ends here"} | ||
} | } | ||
}, | }, | ||
["note_pragma_attribute_use_attribute_kw"]={ | ["note_pragma_attribute_use_attribute_kw"]={ | ||
[e]="use the GNU \'__attribute__\' syntax", | [e]="use the GNU \'__attribute__\' syntax", | ||
[ | [a]=k, | ||
[b]="use the GNU \'__attribute__\' syntax", | [b]="use the GNU \'__attribute__\' syntax", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"0a849f47d2f7",1492508507,"Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attrib...","Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"}, | ||
[ | [g]={{"clang/lib/Parse/ParsePragma.cpp",1887,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n } else if (Tok.is(tok::kw___declspec)) {\n // ...\n } else {\n // ...\n if (Tok.getIdentifierInfo()) {\n // If we suspect that this is an attribute suggest the use of\n // \'__attribute__\'.\n if (ParsedAttr::getParsedKind(Tok.getIdentifierInfo(), /*ScopeName=*/nullptr, ParsedAttr::AS_GNU) != ParsedAttr::UnknownAttribute) {\n // ...\n Diag(Tok, diag::note_pragma_attribute_use_attribute_kw) << FixItHint::CreateInsertion(InsertStartLoc, \"__attribute__((\") << FixItHint::CreateInsertion(Tok.getEndLoc(), \"))\");"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/pragma-attribute.cpp"]={"clang/test/Parser/pragma-attribute.cpp:178:39: note: use the GNU \'__attribute__\' syntax","clang/test/Parser/pragma-attribute.cpp:180:46: note: use the GNU \'__attribute__\' syntax"} | ["clang/test/Parser/pragma-attribute.cpp"]={"clang/test/Parser/pragma-attribute.cpp:178:39: note: use the GNU \'__attribute__\' syntax","clang/test/Parser/pragma-attribute.cpp:180:46: note: use the GNU \'__attribute__\' syntax"} | ||
} | } | ||
}, | }, | ||
["note_pragma_entered_here"]={ | ["note_pragma_entered_here"]={ | ||
[e]="#pragma entered here", | [e]="#pragma entered here", | ||
[ | [a]=k, | ||
[b]="\\#pragma entered here", | [b]="\\#pragma entered here", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"32f5fe1467c4",1317359532,"Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer propert...","Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"}, | ||
[ | [g]={{N,2146,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Complain about attempts to #include files in an audit pragma.\n if (PragmaARCCFCodeAuditedInfo.second.isValid()) {\n // ...\n Diag(PragmaARCCFCodeAuditedInfo.second, diag::note_pragma_entered_here);"},{N,2155,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Complain about attempts to #include files in an assume-nonnull pragma.\n if (PragmaAssumeNonNullLoc.isValid()) {\n // ...\n Diag(PragmaAssumeNonNullLoc, diag::note_pragma_entered_here);"},{Pc,1642,"/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded\n/// as a builtin macro, handle it and return the next token as \'Tok\'.\nvoid Preprocessor::ExpandBuiltinMacro(Token &Tok) {\n // ...\n if (II == Ident__LINE__) {\n // ...\n } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__ || II == Ident__FILE_NAME__) {\n // ...\n } else if (II == Ident__DATE__) {\n // ...\n } else if (II == Ident__TIME__) {\n // ...\n } else if (II == Ident__INCLUDE_LEVEL__) {\n // ...\n } else if (II == Ident__TIMESTAMP__) {\n // ...\n } else if (II == Ident__FLT_EVAL_METHOD__) {\n // ...\n if (getLastFPEvalPragmaLocation().isValid()) {\n // ...\n Diag(getLastFPEvalPragmaLocation(), diag::note_pragma_entered_here);"},{Tb,1900,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // Complain about attempts to re-enter an audit.\n if (BeginLoc.isValid()) {\n // ...\n PP.Diag(BeginLoc, diag::note_pragma_entered_here);"},{Tb,1956,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // Complain about attempts to re-enter an audit.\n if (BeginLoc.isValid()) {\n // ...\n PP.Diag(BeginLoc, diag::note_pragma_entered_here);"},{nb,705,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *Decl) {\n // ...\n if (PragmaLocation.isValid())\n Diag(PragmaLocation, diag::note_pragma_entered_here);"},{nb,707,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *Decl) {\n // ...\n if (Section.PragmaSectionLocation.isValid())\n Diag(Section.PragmaSectionLocation, diag::note_pragma_entered_here);"},{nb,726,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation) {\n // ...\n if (SectionIt != Context.SectionInfos.end()) {\n // ...\n if (!(Section.SectionFlags & ASTContext::PSF_Implicit)) {\n // ...\n if (Section.PragmaSectionLocation.isValid())\n Diag(Section.PragmaSectionLocation, diag::note_pragma_entered_here);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pragma-arc-cf-code-audited.c"]={"clang/test/Sema/pragma-arc-cf-code-audited.c:10:15: note: #pragma entered here","clang/test/Sema/pragma-arc-cf-code-audited.c:11:15: note: #pragma entered here"} | ["clang/test/Sema/pragma-arc-cf-code-audited.c"]={"clang/test/Sema/pragma-arc-cf-code-audited.c:10:15: note: #pragma entered here","clang/test/Sema/pragma-arc-cf-code-audited.c:11:15: note: #pragma entered here"} | ||
} | } | ||
}, | }, | ||
["note_pragma_loop_invalid_vectorize_option"]={ | ["note_pragma_loop_invalid_vectorize_option"]={ | ||
[e]="vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')", | [e]="vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')", | ||
[ | [a]=k, | ||
[b]="vectorize_width loop hint malformed; use vectorize_width\\(X, fixed\\) or vectorize_width\\(X, scalable\\) where X is an integer, or vectorize_width\\(\'fixed\' or \'scalable\'\\)", | [b]="vectorize_width loop hint malformed; use vectorize_width\\(X, fixed\\) or vectorize_width\\(X, scalable\\) where X is an integer, or vectorize_width\\(\'fixed\' or \'scalable\'\\)", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for t...","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | ||
[ | [g]={{"clang/lib/Parse/ParsePragma.cpp",1455,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n // Look for vectorize_width(fixed|scalable)\n if (IsScalableStr == \"scalable\" || IsScalableStr == \"fixed\") {\n // ...\n } else {\n // ...\n if (R.isInvalid() && !Tok.is(tok::comma))\n Diag(Toks[0].getLocation(), diag::note_pragma_loop_invalid_vectorize_option);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/pragma-loop.cpp"]={"clang/test/Parser/pragma-loop.cpp:63:98: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:198:81: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:200:102: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:205:101: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:227:144: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')"} | ["clang/test/Parser/pragma-loop.cpp"]={"clang/test/Parser/pragma-loop.cpp:63:98: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:198:81: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:200:102: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:205:101: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')","clang/test/Parser/pragma-loop.cpp:227:144: note: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')"} | ||
} | } | ||
}, | }, | ||
["note_pragma_pack_here"]={ | ["note_pragma_pack_here"]={ | ||
[e]="previous \'#pragma pack\' directive that modifies alignment is here", | [e]="previous \'#pragma pack\' directive that modifies alignment is here", | ||
[ | [a]=k, | ||
[b]="previous \'\\#pragma pack\' directive that modifies alignment is here", | [b]="previous \'\\#pragma pack\' directive that modifies alignment is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ad273341a452",1500398631,"Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included fil...","Add a warning for missing \'#pragma pack (pop)\' and suspicious uses\nof \'#pragma pack\' in included files\n\nThis commit adds a new -Wpragma-pack warning. It warns in the following cases:\n\n- When a translation unit is missing terminating #pragma pack (pop) directives.\n- When entering an included file if the current alignment value as determined\n by \'#pragma pack\' directives is different from the default alignment value.\n- When leaving an included file that changed the state of the current alignment\n value.\n\nrdar://10184173\n\nDifferential Revision: https://reviews.llvm.org/D35484\n\nllvm-svn: 308327"}, | ||
[ | [g]={{nb,467,"void Sema::DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc) {\n // ...\n // FIXME: AlignPackStack may contain both #pragma align and #pragma pack\n // information, diagnostics below might not be accurate if we have mixed\n // pragmas.\n if (PrevAlignPackState.ShouldWarnOnInclude) {\n // ...\n Diag(PrevAlignPackState.CurrentPragmaLocation, diag::note_pragma_pack_here);"},{nb,472,"void Sema::DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc) {\n // ...\n // Warn about modified alignment after #includes.\n if (PrevAlignPackState.CurrentValue != AlignPackStack.CurrentValue) {\n // ...\n Diag(AlignPackStack.CurrentPragmaLocation, diag::note_pragma_pack_here);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/suspicious-pragma-pack.m"]={"clang/test/SemaObjC/suspicious-pragma-pack.m:3:9: note: previous \'#pragma pack\' directive that modifies alignment is here"} | ["clang/test/SemaObjC/suspicious-pragma-pack.m"]={"clang/test/SemaObjC/suspicious-pragma-pack.m:3:9: note: previous \'#pragma pack\' directive that modifies alignment is here"} | ||
} | } | ||
}, | }, | ||
["note_pragma_pack_pop_instead_reset"]={ | ["note_pragma_pack_pop_instead_reset"]={ | ||
[e]="did you intend to use \'#pragma pack (pop)\' instead of \'#pragma pack()\'?", | [e]="did you intend to use \'#pragma pack (pop)\' instead of \'#pragma pack()\'?", | ||
[ | [a]=k, | ||
[b]="did you intend to use \'\\#pragma pack \\(pop\\)\' instead of \'\\#pragma pack\\(\\)\'\\?", | [b]="did you intend to use \'\\#pragma pack \\(pop\\)\' instead of \'\\#pragma pack\\(\\)\'\\?", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"a1479d798870",1501508270,"-Wpragma-pack: add an additional note and fixit when warning\nabout unterminated push directives that...","-Wpragma-pack: add an additional note and fixit when warning\nabout unterminated push directives that are followed by a reset\n(\'#pragma pack()\')\n\nThis has been suggested by Hans Wennborg.\n\nllvm-svn: 309559"}, | ||
[ | [g]={{nb,491,"void Sema::DiagnoseUnterminatedPragmaAlignPack() {\n // ...\n // FIXME: AlignPackStack may contain both #pragma align and #pragma pack\n // information, diagnostics below might not be accurate if we have mixed\n // pragmas.\n for (const auto &StackSlot : llvm::reverse(AlignPackStack.Stack)) {\n // ...\n // The user might have already reset the alignment, so suggest replacing\n // the reset with a pop.\n if (IsInnermost && AlignPackStack.CurrentValue == AlignPackStack.DefaultValue) {\n auto DB = Diag(AlignPackStack.CurrentPragmaLocation, diag::note_pragma_pack_pop_instead_reset);"}}, | ||
[ | [h]={ | ||
["clang/test/FixIt/fixit-pragma-pack.c"]={"clang/test/FixIt/fixit-pragma-pack.c:4:9: note: did you intend to use \'#pragma pack (pop)\' instead of \'#pragma pack()\'?"} | ["clang/test/FixIt/fixit-pragma-pack.c"]={"clang/test/FixIt/fixit-pragma-pack.c:4:9: note: did you intend to use \'#pragma pack (pop)\' instead of \'#pragma pack()\'?"} | ||
} | } | ||
}, | }, | ||
["note_precedence_bitwise_first"]={ | ["note_precedence_bitwise_first"]={ | ||
[e]="place parentheses around the %0 expression to evaluate it first", | [e]="place parentheses around the %0 expression to evaluate it first", | ||
[ | [a]=k, | ||
[b]="place parentheses around the (.*?) expression to evaluate it first", | [b]="place parentheses around the (.*?) expression to evaluate it first", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fa1e36d0de87",1262910023,"Improve the fix-its for -Wparentheses to ensure that the fix-it\nsuggestions follow recovery. Additio...","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"}, | ||
[ | [g]={{v,15778,"/// DiagnoseBitwisePrecedence - Emit a warning when bitwise and comparison\n/// operators are mixed in a way that suggests that the programmer forgot that\n/// comparison operators have higher precedence. The most typical example of\n/// such code is \"flags & 0x0020 != 0\", which is equivalent to \"flags & 1\".\nstatic void DiagnoseBitwisePrecedence(Sema &Self, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n SuggestParentheses(Self, OpLoc, Self.PDiag(diag::note_precedence_bitwise_first) << BinaryOperator::getOpcodeStr(Opc), ParensRange);"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/2008-10-13-FrontendCrash.c"]={"clang/test/CodeGen/2008-10-13-FrontendCrash.c:8:18: note: place parentheses around the ^ expression to evaluate it first"} | ["clang/test/CodeGen/2008-10-13-FrontendCrash.c"]={"clang/test/CodeGen/2008-10-13-FrontendCrash.c:8:18: note: place parentheses around the ^ expression to evaluate it first"} | ||
} | } | ||
}, | }, | ||
["note_precedence_conditional_first"]={ | ["note_precedence_conditional_first"]={ | ||
[e]="place parentheses around the \'?:\' expression to evaluate it first", | [e]="place parentheses around the \'?:\' expression to evaluate it first", | ||
[ | [a]=k, | ||
[b]="place parentheses around the \'\\?\\:\' expression to evaluate it first", | [b]="place parentheses around the \'\\?\\:\' expression to evaluate it first", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"cf9bac4bc9dd",1307124036,"Warn about missing parentheses for conditional operator.\n\nWarn in cases such as \"x + someCondition ?...","Warn about missing parentheses for conditional operator.\n\nWarn in cases such as \"x + someCondition ? 42 : 0;\",\nwhere the condition expression looks arithmetic, and has\na right-hand side that looks boolean.\n\nThis (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969\n\nllvm-svn: 132565"}, | ||
[ | [g]={{v,9778,"/// DiagnoseConditionalPrecedence - Emit a warning when a conditional operator\n/// and binary operator are mixed in a way that suggests the programmer assumed\n/// the conditional operator has higher precedence, for example:\n/// \"int x = a + someBinaryCondition ? 1 : 2\".\nstatic void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n SuggestParentheses(Self, OpLoc, Self.PDiag(diag::note_precedence_conditional_first), SourceRange(CondRHS->getBeginLoc(), RHSExpr->getEndLoc()));"}}, | ||
[ | [h]={ | ||
["clang/test/Misc/caret-diags-macros.c"]={"clang/test/Misc/caret-diags-macros.c:125:38: note: place parentheses around the \'?:\' expression to evaluate it first","clang/test/Misc/caret-diags-macros.c:139:9: note: place parentheses around the \'?:\' expression to evaluate it first","clang/test/Misc/caret-diags-macros.c:158:9: note: place parentheses around the \'?:\' expression to evaluate it first","clang/test/Misc/caret-diags-macros.c:174:21: note: place parentheses around the \'?:\' expression to evaluate it first"} | ["clang/test/Misc/caret-diags-macros.c"]={"clang/test/Misc/caret-diags-macros.c:125:38: note: place parentheses around the \'?:\' expression to evaluate it first","clang/test/Misc/caret-diags-macros.c:139:9: note: place parentheses around the \'?:\' expression to evaluate it first","clang/test/Misc/caret-diags-macros.c:158:9: note: place parentheses around the \'?:\' expression to evaluate it first","clang/test/Misc/caret-diags-macros.c:174:21: note: place parentheses around the \'?:\' expression to evaluate it first"} | ||
} | } | ||
}, | }, | ||
["note_precedence_silence"]={ | ["note_precedence_silence"]={ | ||
[e]="place parentheses around the \'%0\' expression to silence this warning", | [e]="place parentheses around the \'%0\' expression to silence this warning", | ||
[ | [a]=k, | ||
[b]="place parentheses around the \'(.*?)\' expression to silence this warning", | [b]="place parentheses around the \'(.*?)\' expression to silence this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"dac86fd24c56",1349659189,"Use a single note diagnostic for all the precedent/parentheses warnings.\n\nllvm-svn: 165384","Use a single note diagnostic for all the precedent/parentheses warnings.\n\nllvm-svn: 165384"}, | ||
[ | [g]={{v,9521,"/// DiagnoseConditionalPrecedence - Emit a warning when a conditional operator\n/// and binary operator are mixed in a way that suggests the programmer assumed\n/// the conditional operator has higher precedence, for example:\n/// \"int x = a + someBinaryCondition ? 1 : 2\".\nstatic void DiagnoseConditionalPrecedence(Sema &Self, SourceLocation OpLoc, Expr *Condition, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n SuggestParentheses(Self, OpLoc, Self.PDiag(diag::note_precedence_silence) << BinaryOperator::getOpcodeStr(CondOpcode), SourceRange(Condition->getBeginLoc(), Condition->getEndLoc()));"},{v,11346,"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 S.Diag(Loc, diag::note_precedence_silence) << RHS;"},{v,15766,"/// DiagnoseBitwisePrecedence - Emit a warning when bitwise and comparison\n/// operators are mixed in a way that suggests that the programmer forgot that\n/// comparison operators have higher precedence. The most typical example of\n/// such code is \"flags & 0x0020 != 0\", which is equivalent to \"flags & 1\".\nstatic void DiagnoseBitwisePrecedence(Sema &Self, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n SuggestParentheses(Self, OpLoc, Self.PDiag(diag::note_precedence_silence) << OpStr, (isLeftComp ? LHSExpr : RHSExpr)->getSourceRange());"},{v,15827,"/// It accepts a \'&&\' expr that is inside a \'||\' one.\n/// Emit a diagnostic together with a fixit hint that wraps the \'&&\' expression\n/// in parentheses.\nstatic void EmitDiagnosticForLogicalAndInLogicalOr(Sema &Self, SourceLocation OpLoc, BinaryOperator *Bop) {\n // ...\n SuggestParentheses(Self, Bop->getOperatorLoc(), Self.PDiag(diag::note_precedence_silence) << Bop->getOpcodeStr(), Bop->getSourceRange());"},{v,15843,"/// Look for bitwise op in the left or right hand of a bitwise op with\n/// lower precedence and emit a diagnostic together with a fixit hint that wraps\n/// the \'&\' expression in parentheses.\nstatic void DiagnoseBitwiseOpInBitwiseOp(Sema &S, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *SubExpr) {\n if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(SubExpr)) {\n if (Bop->isBitwiseOp() && Bop->getOpcode() < Opc) {\n // ...\n SuggestParentheses(S, Bop->getOperatorLoc(), S.PDiag(diag::note_precedence_silence) << Bop->getOpcodeStr(), Bop->getSourceRange());"},{v,15866,"static void DiagnoseAdditionInShift(Sema &S, SourceLocation OpLoc, Expr *SubExpr, StringRef Shift) {\n if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(SubExpr)) {\n if (Bop->getOpcode() == BO_Add || Bop->getOpcode() == BO_Sub) {\n // ...\n SuggestParentheses(S, Bop->getOperatorLoc(), S.PDiag(diag::note_precedence_silence) << Op, Bop->getSourceRange());"},{v,15874,"static void DiagnoseShiftCompare(Sema &S, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n SuggestParentheses(S, OCE->getOperatorLoc(), S.PDiag(diag::note_precedence_silence) << (Kind == OO_LessLess ? \"<<\" : \">>\"), OCE->getSourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:15: note: place parentheses around the \'<<\' expression to silence this warning","clang/test/Parser/cxx2a-spaceship.cpp:17:15: note: place parentheses around the \'<<\' expression to silence this warning"} | ["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:15: note: place parentheses around the \'<<\' expression to silence this warning","clang/test/Parser/cxx2a-spaceship.cpp:17:15: note: place parentheses around the \'<<\' expression to silence this warning"} | ||
} | } | ||
}, | }, | ||
["note_prev_module_declaration"]={ | ["note_prev_module_declaration"]={ | ||
[e]="previous module declaration is here", | [e]="previous module declaration is here", | ||
[ | [a]=k, | ||
[b]="previous module declaration is here", | [b]="previous module declaration is here", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={"18057cb34c83",1507682216,"[Modules TS] Diagnose missing/duplicate module-declaration.\n\nllvm-svn: 315397","[Modules TS] Diagnose missing/duplicate module-declaration.\n\nllvm-svn: 315397"}, | ||
[ | [g]={{nc,238,"Sema::DeclGroupPtrTy Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState) {\n // ...\n // Only one module-declaration is permitted per source file.\n if (isCurrentModulePurview()) {\n // ...\n Diag(VisibleModules.getImportLoc(ModuleScopes.back().Module), diag::note_prev_module_declaration);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/basic/basic.link/p3.cpp"]={"clang/test/CXX/basic/basic.link/p3.cpp:14:8: note: previous module declaration is here"} | ["clang/test/CXX/basic/basic.link/p3.cpp"]={"clang/test/CXX/basic/basic.link/p3.cpp:14:8: note: previous module declaration is here"} | ||
} | } | ||
}, | }, | ||
["note_prev_module_definition"]={ | ["note_prev_module_definition"]={ | ||
[e]="previously defined here", | [e]="previously defined here", | ||
[ | [a]=k, | ||
[b]="previously defined here", | [b]="previously defined here", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={"bbcc9f0462c1",1472170478,"C++ Modules TS: add frontend support for building pcm files from module\ninterface files. At the mome...","C++ Modules TS: add frontend support for building pcm files from module\ninterface files. At the moment, all declarations (and no macros) are exported,\nand \'export\' declarations are not supported yet.\n\nllvm-svn: 279794"}, | ||
[ | [g]={{nc,315,"Sema::DeclGroupPtrTy Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState) {\n // ...\n case ModuleDeclKind::Interface:\n case ModuleDeclKind::PartitionInterface: {\n // We can\'t have parsed or imported a definition of this module or parsed a\n // module map defining it already.\n if (auto *M = Map.findModule(ModuleName)) {\n // ...\n if (M->DefinitionLoc.isValid())\n Diag(M->DefinitionLoc, diag::note_prev_module_definition);"}} | ||
}, | }, | ||
["note_prev_module_definition_from_ast_file"]={ | ["note_prev_module_definition_from_ast_file"]={ | ||
[e]="module loaded from \'%0\'", | [e]="module loaded from \'%0\'", | ||
[ | [a]=k, | ||
[b]="module loaded from \'(.*?)\'", | [b]="module loaded from \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={"bbcc9f0462c1",1472170478,"C++ Modules TS: add frontend support for building pcm files from module\ninterface files. At the mome...","C++ Modules TS: add frontend support for building pcm files from module\ninterface files. At the moment, all declarations (and no macros) are exported,\nand \'export\' declarations are not supported yet.\n\nllvm-svn: 279794"}, | ||
[ | [g]={{nc,317,"Sema::DeclGroupPtrTy Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState) {\n // ...\n case ModuleDeclKind::Interface:\n case ModuleDeclKind::PartitionInterface: {\n // We can\'t have parsed or imported a definition of this module or parsed a\n // module map defining it already.\n if (auto *M = Map.findModule(ModuleName)) {\n // ...\n if (M->DefinitionLoc.isValid())\n // ...\n else if (OptionalFileEntryRef FE = M->getASTFile())\n Diag(M->DefinitionLoc, diag::note_prev_module_definition_from_ast_file) << FE->getName();"}} | ||
}, | }, | ||
["note_prev_partial_spec_here"]={ | ["note_prev_partial_spec_here"]={ | ||
[e]="previous declaration of class template partial specialization %0 is here", | [e]="previous declaration of class template partial specialization %0 is here", | ||
[ | [a]=k, | ||
[b]="previous declaration of class template partial specialization (.*?) is here", | [b]="previous declaration of class template partial specialization (.*?) is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"21610380de97",1256774651,"Implement support for semantic checking and template instantiation of\nclass template partial special...","Implement support for semantic checking and template instantiation of\nclass template partial specializations of member templates. Also,\nfixes a silly little bug in the marking of \"used\" template parameters\nin member templates. Fixes PR5236.\n\nllvm-svn: 85447"}, | ||
[ | [g]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",4246,"/// Instantiate the declaration of a class template partial\n/// specialization.\n///\n/// \\param ClassTemplate the (instantiated) class template that is partially\n// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) class template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nClassTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(ClassTemplateDecl *ClassTemplate, ClassTemplatePartialSpecializationDecl *PartialSpec) {\n // ...\n if (PrevDecl) {\n // ...\n SemaRef.Diag(PrevDecl->getLocation(), diag::note_prev_partial_spec_here) << SemaRef.Context.getTypeDeclType(PrevDecl);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:41:31: note: previous declaration of class template partial specialization \'Inner<int, type-parameter-0-0>\' is here","clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:82:29: note: previous declaration of class template partial specialization \'Bar<0, int, type-parameter-0-0>\' is here"} | ["clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:41:31: note: previous declaration of class template partial specialization \'Inner<int, type-parameter-0-0>\' is here","clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:82:29: note: previous declaration of class template partial specialization \'Bar<0, int, type-parameter-0-0>\' is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_access_declaration"]={ | ["note_previous_access_declaration"]={ | ||
[e]="previously declared \'%1\' here", | [e]="previously declared \'%1\' here", | ||
[ | [a]=k, | ||
[b]="previously declared \'(.*?)\' here", | [b]="previously declared \'(.*?)\' here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"2ed6ceba1d90",1238027057,"Check that the access specifier of a member redeclaration is the same as the original declaration.\n\n...","Check that the access specifier of a member redeclaration is the same as the original declaration.\n\nllvm-svn: 67722"}, | ||
[ | [g]={{"clang/lib/Sema/SemaAccess.cpp",55,"/// SetMemberAccessSpecifier - Set the access specifier of a member.\n/// Returns true on error (when the previous member decl access specifier\n/// is different from the new member decl access specifier).\nbool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS) {\n // ...\n // C++ [class.access.spec]p3: When a member is redeclared its access\n // specifier must be same as its initial declaration.\n if (LexicalAS != AS_none && LexicalAS != PrevMemberDecl->getAccess()) {\n // ...\n Diag(PrevMemberDecl->getLocation(), diag::note_previous_access_declaration) << PrevMemberDecl << PrevMemberDecl->getAccess();"},{x,1355,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (!Ivar) {\n // ...\n } else if (getLangOpts().ObjCRuntime.isNonFragile() && !declaresSameEntity(ClassDeclared, IDecl)) {\n // ...\n Diag(Ivar->getLocation(), diag::note_previous_access_declaration) << Ivar << Ivar->getName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/ivar-sem-check-2.m"]={"clang/test/SemaObjC/ivar-sem-check-2.m:4:6: note: previously declared \'value2\' here"} | ["clang/test/SemaObjC/ivar-sem-check-2.m"]={"clang/test/SemaObjC/ivar-sem-check-2.m:4:6: note: previously declared \'value2\' here"} | ||
} | } | ||
}, | }, | ||
["note_previous_attribute"]={ | ["note_previous_attribute"]={ | ||
[e]="previous attribute is here", | [e]="previous attribute is here", | ||
[ | [a]=k, | ||
[b]="previous attribute is here", | [b]="previous attribute is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4c3db23d1c93",1335403563,"Reject cases like\n\nstruct __attribute__((visibility(\"hidden\"))) a;\nstruct __attribute__((visibility(...","Reject cases like\n\nstruct __attribute__((visibility(\"hidden\"))) a;\nstruct __attribute__((visibility(\"default\"))) b;\n\nwhich gcc already rejects.\n\nllvm-svn: 155603"}, | ||
[ | [g]={{p,7150,"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 // ...\n } else if (IsMicrosoftABI && IsSpecialization) {\n // ...\n } else {\n // ...\n S.Diag(OldImportAttr->getLocation(), diag::note_previous_attribute);"},{o,2551,"AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority) {\n // ...\n if (D->hasAttrs()) {\n // ...\n for (unsigned i = 0, e = Attrs.size(); i != e;) {\n // ...\n if (!versionsMatch(OldIntroduced, Introduced, OverrideOrImpl) || !versionsMatch(Deprecated, OldDeprecated, OverrideOrImpl) || !versionsMatch(Obsoleted, OldObsoleted, OverrideOrImpl) || !(OldIsUnavailable == IsUnavailable || (OverrideOrImpl && !OldIsUnavailable && IsUnavailable))) {\n if (OverrideOrImpl) {\n // ...\n } else {\n // ...\n Diag(CI.getLoc(), diag::note_previous_attribute);"},{o,2875,"template <class T> static T *mergeVisibilityAttr(Sema &S, Decl *D, const AttributeCommonInfo &CI, typename T::VisibilityType value) {\n // ...\n if (existingAttr) {\n // ...\n S.Diag(CI.getLoc(), diag::note_previous_attribute);"},{o,3299,"SectionAttr *Sema::mergeSectionAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name) {\n // ...\n if (SectionAttr *ExistingAttr = D->getAttr<SectionAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_previous_attribute);"},{o,3383,"CodeSegAttr *Sema::mergeCodeSegAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name) {\n // ...\n if (const auto *ExistingAttr = D->getAttr<CodeSegAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_previous_attribute);"},{o,3907,"ErrorAttr *Sema::mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic) {\n if (const auto *EA = D->getAttr<ErrorAttr>()) {\n // ...\n if (EA->getUserDiagnostic() != NewUserDiagnostic) {\n // ...\n Diag(EA->getLoc(), diag::note_previous_attribute);"},{o,7684,"WebAssemblyImportModuleAttr *Sema::mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL) {\n // ...\n if (const auto *ExistingAttr = FD->getAttr<WebAssemblyImportModuleAttr>()) {\n // ...\n Diag(AL.getLoc(), diag::note_previous_attribute);"},{o,7704,"WebAssemblyImportNameAttr *Sema::mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL) {\n // ...\n if (const auto *ExistingAttr = FD->getAttr<WebAssemblyImportNameAttr>()) {\n // ...\n Diag(AL.getLoc(), diag::note_previous_attribute);"},{s,6485,"/// Check class-level dllimport/dllexport attribute.\nvoid Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) {\n // ...\n if (Context.getTargetInfo().shouldDLLImportComdatSymbols() && !ClassAttr->isInherited()) {\n // Diagnose dll attributes on members of class with dll attribute.\n for (Decl *Member : Class->decls()) {\n // ...\n Diag(ClassAttr->getLocation(), diag::note_previous_attribute);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-wasm.c"]={"clang/test/Sema/attr-wasm.c:11:34: note: previous attribute is here","clang/test/Sema/attr-wasm.c:23:36: note: previous attribute is here"} | ["clang/test/Sema/attr-wasm.c"]={"clang/test/Sema/attr-wasm.c:11:34: note: previous attribute is here","clang/test/Sema/attr-wasm.c:23:36: note: previous attribute is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_builtin_declaration"]={ | ["note_previous_builtin_declaration"]={ | ||
[e]="%0 is a builtin with type %1", | [e]="%0 is a builtin with type %1", | ||
[ | [a]=k, | ||
[b]="(.*?) is a builtin with type (.*?)", | [b]="(.*?) is a builtin with type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,3478,"// Determine whether the previous declaration was a definition, implicit\n// declaration, or a declaration.\ntemplate <typename T> static std::pair<diag::kind, SourceLocation> getNoteDiagForInvalidRedeclaration(const T *Old, const T *New) {\n // ...\n if (Old->isThisDeclarationADefinition())\n // ...\n else if (Old->isImplicit()) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(Old)) {\n if (FD->getBuiltinID())\n PrevDiag = diag::note_previous_builtin_declaration;"},{p,3679,"/// 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 // Disallow redeclaration of some builtins.\n if (!getASTContext().canBuiltinBeRedeclared(Old)) {\n // ...\n Diag(Old->getLocation(), diag::note_previous_builtin_declaration) << Old << Old->getType();"},{p,4297,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (Old->isImplicit() && (BuiltinID = Old->getBuiltinID())) {\n // If it\'s actually a library-defined builtin function like \'malloc\'\n // or \'printf\', just warn about the incompatible redeclaration.\n if (Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID)) {\n // ...\n Diag(OldLocation, diag::note_previous_builtin_declaration) << Old << Old->getType();"},{p,4302,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (Old->isImplicit() && (BuiltinID = Old->getBuiltinID())) {\n // ...\n PrevDiag = diag::note_previous_builtin_declaration;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/crash-invalid-builtin.c"]={"clang/test/Sema/crash-invalid-builtin.c:4:1: note: \'__builtin_isinf\' is a builtin with type \'int ()\'"} | ["clang/test/Sema/crash-invalid-builtin.c"]={"clang/test/Sema/crash-invalid-builtin.c:4:1: note: \'__builtin_isinf\' is a builtin with type \'int ()\'"} | ||
} | } | ||
}, | }, | ||
["note_previous_decl"]={ | ["note_previous_decl"]={ | ||
[e]="%0 declared here", | [e]="%0 declared here", | ||
[ | [a]=k, | ||
[b]="(.*?) declared here", | [b]="(.*?) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e7488b904ca9",1259686698,"Don\'t automatically assume that an id-expression refers to a\nValueDecl, because that isn\'t always th...","Don\'t automatically assume that an id-expression refers to a\nValueDecl, because that isn\'t always the case in ill-formed\ncode. Diagnose a common mistake (forgetting to provide a template\nargument list for a class template, PR5655) and dyn_cast so that we\nhandle the general problem of referring to a non-value declaration\ngracefully.\n\nllvm-svn: 90239"}, | ||
[ | [g]={ | ||
[1]={"clang/lib/Sema/SemaCUDA.cpp",641,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n } else {\n // ...\n if (InitFn) {\n // ...\n if (InitFnTarget != CFT_Host && InitFnTarget != CFT_HostDevice) {\n // ...\n Diag(InitFn->getLocation(), diag::note_previous_decl) << InitFn;"}, | [1]={"clang/lib/Sema/SemaCUDA.cpp",641,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n } else {\n // ...\n if (InitFn) {\n // ...\n if (InitFnTarget != CFT_Host && InitFnTarget != CFT_HostDevice) {\n // ...\n Diag(InitFn->getLocation(), diag::note_previous_decl) << InitFn;"}, | ||
[2]={"clang/lib/Sema/SemaCUDA.cpp",840,"bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) {\n // ...\n if (!Callee->getBuiltinID())\n SemaDiagnosticBuilder(DiagKind, Callee->getLocation(), diag::note_previous_decl, Caller, *this) << Callee;"}, | [2]={"clang/lib/Sema/SemaCUDA.cpp",840,"bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) {\n // ...\n if (!Callee->getBuiltinID())\n SemaDiagnosticBuilder(DiagKind, Callee->getLocation(), diag::note_previous_decl, Caller, *this) << Callee;"}, | ||
[3]={ | [3]={p,12302,"void Sema::CheckHLSLEntryPoint(FunctionDecl *FD) {\n // ...\n for (const auto *Param : FD->parameters()) {\n if (!Param->hasAttr<HLSLAnnotationAttr>()) {\n // ...\n Diag(Param->getLocation(), diag::note_previous_decl) << Param;"}, | ||
[4]={ | [4]={p,17443,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n } else if (!isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n } else if (TUK == TUK_Reference || TUK == TUK_Friend) {\n // ...\n Diag(PrevDecl->getLocation(), diag::note_previous_decl) << PrevDecl;"}, | ||
[5]={ | [5]={p,17453,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n } else if (!isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n } else if (TUK == TUK_Reference || TUK == TUK_Friend) {\n // ...\n } else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(PrevDecl)) {\n // ...\n Diag(PrevDecl->getLocation(), diag::note_previous_decl) << PrevDecl;"}, | ||
[6]={ | [6]={s,2689,"/// 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 (BaseType->isDependentType()) {\n // Make sure that we don\'t have circular inheritance among our dependent\n // bases. For non-dependent bases, the check for completeness below handles\n // this.\n if (CXXRecordDecl *BaseDecl = BaseType->getAsCXXRecordDecl()) {\n if (BaseDecl->getCanonicalDecl() == Class->getCanonicalDecl() || ((BaseDecl = BaseDecl->getDefinition()) && findCircularInheritance(Class, BaseDecl))) {\n // ...\n if (BaseDecl->getCanonicalDecl() != Class->getCanonicalDecl())\n Diag(BaseDecl->getLocation(), diag::note_previous_decl) << BaseType;"}, | ||
[7]={ | [7]={u,192,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n if ((NewMethod->hasAttr<NSReturnsRetainedAttr>() != Overridden->hasAttr<NSReturnsRetainedAttr>())) {\n // ...\n Diag(Overridden->getLocation(), diag::note_previous_decl) << \"method\";"}, | ||
[8]={ | [8]={u,201,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n if ((NewMethod->hasAttr<NSReturnsNotRetainedAttr>() != Overridden->hasAttr<NSReturnsNotRetainedAttr>())) {\n // ...\n Diag(Overridden->getLocation(), diag::note_previous_decl) << \"method\";"}, | ||
[9]={ | [9]={u,217,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n // ...\n for (ObjCMethodDecl::param_iterator ni = NewMethod->param_begin(), ne = NewMethod->param_end(); ni != ne && oi != oe; ++ni, ++oi) {\n // ...\n if (newDecl->hasAttr<NSConsumedAttr>() != oldDecl->hasAttr<NSConsumedAttr>()) {\n // ...\n Diag(oldDecl->getLocation(), diag::note_previous_decl) << \"parameter\";"}, | ||
[10]={ | [10]={u,324,"static void DiagnoseObjCImplementedDeprecations(Sema &S, const NamedDecl *ND, SourceLocation ImplLoc) {\n // ...\n if (isa<ObjCMethodDecl>(ND))\n // ...\n else\n S.Diag(ND->getLocation(), diag::note_previous_decl) << (isa<ObjCCategoryDecl>(ND) ? \"category\" : \"class\");"}, | ||
[11]={ | [11]={u,1028,"ObjCInterfaceDecl *Sema::ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody) {\n // ...\n // If there was a forward declaration with type parameters, check\n // for consistency.\n if (PrevIDecl) {\n if (ObjCTypeParamList *prevTypeParamList = PrevIDecl->getTypeParamList()) {\n if (typeParamList) {\n // ...\n } else {\n // ...\n Diag(prevTypeParamList->getLAngleLoc(), diag::note_previous_decl) << ClassName;"}, | ||
[12]={ | [12]={v,2289,"static void emitEmptyLookupTypoDiagnostic(const TypoCorrection &TC, Sema &SemaRef, const CXXScopeSpec &SS, DeclarationName Typo, SourceLocation TypoLoc, ArrayRef<Expr *> Args, unsigned DiagnosticID, unsigned DiagnosticSuggestID) {\n // ...\n unsigned NoteID = TC.getCorrectionDeclAs<ImplicitParamDecl>() ? diag::note_implicit_param_decl : diag::note_previous_decl;"}, | ||
[13]={ | [13]={v,2506,"/// Diagnose an empty lookup.\n///\n/// \\return false if new lookup candidates were found\nbool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, TypoExpr **Out) {\n // ...\n if (S && Out) {\n // ...\n } else if (S && (Corrected = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, &SS, CCC, CTK_ErrorRecovery))) {\n // ...\n if (AcceptableWithRecovery || AcceptableWithoutRecovery) {\n unsigned NoteID = Corrected.getCorrectionDeclAs<ImplicitParamDecl>() ? diag::note_implicit_param_decl : diag::note_previous_decl;"}, | ||
[14]={ | [14]={v,18118,"void Sema::WarnOnPendingNoDerefs(ExpressionEvaluationContextRecord &Rec) {\n for (const Expr *E : Rec.PossibleDerefs) {\n // ...\n if (DeclRef) {\n // ...\n Diag(Decl->getLocation(), diag::note_previous_decl) << Decl->getName();"}, | ||
[15]={ | [15]={v,19175,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n // Prohibit variably-modified types in blocks; they\'re difficult to deal with.\n if (Var->getType()->isVariablyModifiedType() && IsBlock) {\n if (Diagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[16]={ | [16]={v,19188,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n // Prohibit structs with flexible array members too.\n // We cannot capture what is in the tail end of the struct.\n if (const RecordType *VTTy = Var->getType()->getAs<RecordType>()) {\n if (VTTy->getDecl()->hasFlexibleArrayMember()) {\n if (Diagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[17]={ | [17]={v,19197,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n // Lambdas and captured statements are not allowed to capture __block\n // variables; they don\'t support the expected semantics.\n if (HasBlocksAttr && (IsLambda || isa<CapturedRegionScopeInfo>(CSI))) {\n if (Diagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[18]={ | [18]={v,19242,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // ...\n // Blocks are not allowed to capture arrays, excepting OpenCL.\n // OpenCL v2.0 s1.12.5 (revision 40): arrays are captured by reference\n // (decayed to pointers).\n if (!Invalid && !S.getLangOpts().OpenCL && CaptureType->isArrayType()) {\n if (BuildAndDiagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[19]={ | [19]={v,19260,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // ...\n // Forbid the block-capture of autoreleasing variables.\n if (!Invalid && CaptureType.getObjCLifetime() == Qualifiers::OCL_Autoreleasing) {\n if (BuildAndDiagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[20]={ | [20]={v,19407,"/// Capture the given variable in the lambda.\nstatic bool captureInLambda(LambdaScopeInfo *LSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool RefersToCapturedVariable, const Sema::TryCaptureKind Kind, SourceLocation EllipsisLoc, const bool IsTopScope, Sema &S, bool Invalid) {\n // ...\n // Compute the type of the field that will capture this variable.\n if (ByRef) {\n // ...\n } else {\n // ...\n // Forbid the lambda copy-capture of autoreleasing variables.\n if (!Invalid && CaptureType.getObjCLifetime() == Qualifiers::OCL_Autoreleasing) {\n if (BuildAndDiagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_previous_decl) << Var->getDeclName();"}, | ||
[21]={ | [21]={v,19667,"bool Sema::tryCaptureVariable(ValueDecl *Var, SourceLocation ExprLoc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt) {\n // ...\n do {\n // ...\n // If we are instantiating a generic lambda call operator body,\n // we do not want to capture new variables. What was captured\n // during either a lambdas transformation or initial parsing\n // should be used.\n if (isGenericLambdaCallOperatorSpecialization(DC)) {\n if (BuildAndDiagnose) {\n // ...\n if (LSI->ImpCaptureStyle == CapturingScopeInfo::ImpCap_None) {\n // ...\n Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[22]={ | [22]={v,19749,"bool Sema::tryCaptureVariable(ValueDecl *Var, SourceLocation ExprLoc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt) {\n // ...\n do {\n // ...\n if (CSI->ImpCaptureStyle == CapturingScopeInfo::ImpCap_None && !Explicit) {\n // No capture-default, and this is not an explicit capture\n // so cannot capture this variable.\n if (BuildAndDiagnose) {\n // ...\n Diag(Var->getLocation(), diag::note_previous_decl) << Var;"}, | ||
[23]={ | [23]={Zb,2928,"bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose) {\n // ...\n // C++ [expr.new]p20:\n // [...] If the lookup finds a single matching deallocation\n // function, that function will be called; otherwise, no\n // deallocation function will be called.\n if (Matches.size() == 1) {\n // ...\n // C++1z [expr.new]p23:\n // If the lookup finds a usual deallocation function (3.7.4.2)\n // with a parameter of type std::size_t and that function, considered\n // as a placement deallocation function, would have been\n // selected as a match for the allocation function, the program\n // is ill-formed.\n if (getLangOpts().CPlusPlus11 && isPlacementNew && isNonPlacementDeallocationFunction(*this, OperatorDelete)) {\n // ...\n if (IsSizedDelete) {\n // ...\n if (!OperatorDelete->isImplicit())\n Diag(OperatorDelete->getLocation(), diag::note_previous_decl) << DeleteName;"}, | ||
[24]={ | [24]={Q,9888,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_No_Viable_Function:\n if (Kind.getKind() == InitializationKind::IK_Default && (Entity.getKind() == InitializedEntity::EK_Base || Entity.getKind() == InitializedEntity::EK_Member || Entity.getKind() == InitializedEntity::EK_ParenAggInitMember) && isa<CXXConstructorDecl>(S.CurContext)) {\n // ...\n if (Entity.getKind() == InitializedEntity::EK_Base) {\n // ...\n S.Diag(BaseDecl->getLocation(), diag::note_previous_decl) << S.Context.getTagDeclType(BaseDecl);"}, | ||
[25]={ | [25]={Q,9903,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ListConstructorOverloadFailed:\n case FK_ConstructorOverloadFailed: {\n // ...\n case OR_No_Viable_Function:\n if (Kind.getKind() == InitializationKind::IK_Default && (Entity.getKind() == InitializedEntity::EK_Base || Entity.getKind() == InitializedEntity::EK_Member || Entity.getKind() == InitializedEntity::EK_ParenAggInitMember) && isa<CXXConstructorDecl>(S.CurContext)) {\n // ...\n if (Entity.getKind() == InitializedEntity::EK_Base) {\n // ...\n } else {\n // ...\n if (const RecordType *Record = Entity.getType()->getAs<RecordType>())\n S.Diag(Record->getDecl()->getLocation(), diag::note_previous_decl) << S.Context.getTagDeclType(Record->getDecl());"}, | ||
[26]={ | [26]={Q,9962,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_DefaultInitOfConst:\n if (Entity.getKind() == InitializedEntity::EK_Member && isa<CXXConstructorDecl>(S.CurContext)) {\n // ...\n S.Diag(Entity.getDecl()->getLocation(), diag::note_previous_decl) << Entity.getName();"}, | ||
[27]={"clang/lib/Sema/SemaLambda.cpp",1187,"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 (!Underlying->hasLocalStorage()) {\n // ...\n Diag(Var->getLocation(), diag::note_previous_decl) << C->Id;"}, | [27]={"clang/lib/Sema/SemaLambda.cpp",1187,"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 (!Underlying->hasLocalStorage()) {\n // ...\n Diag(Var->getLocation(), diag::note_previous_decl) << C->Id;"}, | ||
[28]={"clang/lib/Sema/SemaLookup.cpp",5635,"void Sema::diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery) { diagnoseTypo(Correction, TypoDiag, PDiag(diag::note_previous_decl), ErrorRecovery); }"}, | [28]={"clang/lib/Sema/SemaLookup.cpp",5635,"void Sema::diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery) { diagnoseTypo(Correction, TypoDiag, PDiag(diag::note_previous_decl), ErrorRecovery); }"}, | ||
[29]={ | [29]={q,1720,"static bool rejectConstNotMutableType(Sema &SemaRef, const ValueDecl *D, QualType Type, OpenMPClauseKind CKind, SourceLocation ELoc, bool AcceptIfMutable = true, bool ListItemNotVar = false) {\n // ...\n if (isConstNotMutableType(SemaRef, Type, AcceptIfMutable, &IsClassType)) {\n // ...\n if (!ListItemNotVar && D) {\n // ...\n SemaRef.Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[30]={ | [30]={q,3073,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Syntax, C/C++]\n // Variables must be file-scope, namespace-scope, or static block-scope.\n if (Kind == OMPD_threadprivate && !VD->hasGlobalStorage()) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[31]={ | [31]={q,3090,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.2]\n // A threadprivate directive for file-scope variables must appear outside\n // any definition or declaration.\n if (CanonicalVD->getDeclContext()->isTranslationUnit() && !getCurLexicalContext()->isTranslationUnit()) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[32]={ | [32]={q,3105,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.3]\n // A threadprivate directive for static class member variables must appear\n // in the class definition, in the same scope in which the member\n // variables are declared.\n if (CanonicalVD->isStaticDataMember() && !CanonicalVD->getDeclContext()->Equals(getCurLexicalContext())) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[33]={ | [33]={q,3121,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.4]\n // A threadprivate directive for namespace-scope variables must appear\n // outside any definition or declaration other than the namespace\n // definition itself.\n if (CanonicalVD->getDeclContext()->isNamespace() && (!getCurLexicalContext()->isFileContext() || !getCurLexicalContext()->Encloses(CanonicalVD->getDeclContext()))) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[34]={ | [34]={q,3135,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.6]\n // A threadprivate directive for static block-scope variables must appear\n // in the scope of the variable and not in a nested scope.\n if (CanonicalVD->isLocalVarDecl() && CurScope && !isDeclInScope(ND, getCurLexicalContext(), CurScope)) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[35]={ | [35]={q,3231,"OMPThreadPrivateDecl *Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.9.2, Restrictions, C/C++, p.10]\n // A threadprivate variable must not have a reference type.\n if (VD->getType()->isReferenceType()) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[36]={ | [36]={q,3249,"OMPThreadPrivateDecl *Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Check if this is a TLS variable. If TLS is not being supported, produce\n // the corresponding diagnostic.\n if ((VD->getTLSKind() != VarDecl::TLS_None && !(VD->hasAttr<OMPThreadPrivateDeclAttr>() && getLangOpts().OpenMPUseTLS && getASTContext().getTargetInfo().isTLSSupported())) || (VD->getStorageClass() == SC_Register && VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl())) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[37]={ | [37]={q,3434,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPAllocateDirective(SourceLocation Loc, ArrayRef<Expr *> VarList, ArrayRef<OMPClause *> Clauses, DeclContext *Owner) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP, 2.11.3 allocate Directive, Restrictions, C / C++\n // If a list item has a static storage type, the allocator expression in the\n // allocator clause must be a constant expression that evaluates to one of\n // the predefined memory allocator values.\n if (Allocator && VD->hasGlobalStorage()) {\n if (AllocatorKind == OMPAllocateDeclAttr::OMPUserDefinedMemAlloc) {\n // ...\n Diag(VD->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << VD;"}, | ||
[38]={ | [38]={q,6922,"Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds, ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears, ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR) {\n // ...\n for (const Expr *E : Aligneds) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(E))\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (FD->getNumParams() > PVD->getFunctionScopeIndex() && FD->getParamDecl(PVD->getFunctionScopeIndex())->getCanonicalDecl() == CanonPVD) {\n // ...\n if (!Ty || (!Ty->isArrayType() && !Ty->isPointerType())) {\n // ...\n Diag(PVD->getLocation(), diag::note_previous_decl) << PVD;"}, | ||
[39]={ | [39]={q,8074,"/// Checker for the non-rectangular loops. Checks if the initializer or\n/// condition expression references loop counter variable.\nclass LoopCounterRefChecker final : public ConstStmtVisitor<LoopCounterRefChecker, bool> {\n // ...\n bool checkDecl(const Expr *E, const ValueDecl *VD) {\n // ...\n // OpenMP, 2.9.1 Canonical Loop Form, Restrictions.\n // The type of the loop iterator on which we depend may not have a random\n // access iterator type.\n if (Data.first && VD->getType()->isRecordType()) {\n // ...\n SemaRef.Diag(VD->getLocation(), diag::note_previous_decl) << VD;"}, | ||
[40]={ | [40]={q,18117,"OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Variably modified types are not supported for tasks.\n if (!Type->isAnyPointerType() && Type->isVariablyModifiedType() && isOpenMPTaskingDirective(CurrDir)) {\n // ...\n Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[41]={ | [41]={q,18390,"OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Variably modified types are not supported for tasks.\n if (!Type->isAnyPointerType() && Type->isVariablyModifiedType() && isOpenMPTaskingDirective(DSAStack->getCurrentDirective())) {\n // ...\n Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[42]={ | [42]={q,18547,"OMPClause *Sema::ActOnOpenMPLastprivateClause(ArrayRef<Expr *> VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP 5.0 [2.19.4.5 lastprivate Clause, Restrictions]\n // A list item that appears in a lastprivate clause with the conditional\n // modifier must be a scalar variable.\n if (LPKind == OMPC_LASTPRIVATE_conditional && !Type->isScalarType()) {\n // ...\n Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[43]={ | [43]={q,19453,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.14.3.6, reduction clause, Restrictions]\n // The type of a list item that appears in a reduction clause must be valid\n // for the reduction-identifier. For a max or min reduction in C, the type\n // of the list item must be an allowed arithmetic data type: char, int,\n // float, double, or _Bool, possibly modified with long, short, signed, or\n // unsigned. For a max or min reduction in C++, the type of the list item\n // must be an allowed arithmetic data type: char, wchar_t, int, float,\n // double, or bool, possibly modified with long, short, signed, or unsigned.\n if (DeclareReductionRef.isUnset()) {\n if ((BOK == BO_GT || BOK == BO_LT) && !(Type->isScalarType() || (S.getLangOpts().CPlusPlus && Type->isArithmeticType()))) {\n // ...\n if (!ASE && !OASE) {\n // ...\n S.Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[44]={ | [44]={q,19466,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // OpenMP [2.14.3.6, reduction clause, Restrictions]\n // The type of a list item that appears in a reduction clause must be valid\n // for the reduction-identifier. For a max or min reduction in C, the type\n // of the list item must be an allowed arithmetic data type: char, int,\n // float, double, or _Bool, possibly modified with long, short, signed, or\n // unsigned. For a max or min reduction in C++, the type of the list item\n // must be an allowed arithmetic data type: char, wchar_t, int, float,\n // double, or bool, possibly modified with long, short, signed, or unsigned.\n if (DeclareReductionRef.isUnset()) {\n // ...\n if ((BOK == BO_OrAssign || BOK == BO_AndAssign || BOK == BO_XorAssign) && !S.getLangOpts().CPlusPlus && Type->isFloatingType()) {\n // ...\n if (!ASE && !OASE) {\n // ...\n S.Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[45]={ | [45]={q,19664,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!RHSVD->hasInit() && DeclareReductionRef.isUnset()) {\n // ...\n S.Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[46]={ | [46]={q,20012,"bool Sema::CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd) {\n // ...\n if (!Ty || (LinKind != OMPC_LINEAR_ref && !Ty->isDependentType() && !Ty->isIntegralType(Context) && !Ty->isPointerType())) {\n // ...\n if (D) {\n // ...\n Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[47]={ | [47]={q,20289,"OMPClause *Sema::ActOnOpenMPAlignedClause(ArrayRef<Expr *> VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (!Ty || (!Ty->isArrayType() && !Ty->isPointerType())) {\n // ...\n Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[48]={ | [48]={q,20491,"OMPClause *Sema::ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n // Variably modified types are not supported.\n if (!Type->isAnyPointerType() && Type->isVariablyModifiedType()) {\n // ...\n Diag(D->getLocation(), IsDecl ? diag::note_previous_decl : diag::note_defined_here) << D;"}, | ||
[49]={ | [49]={w,5654,"/// PerformObjectArgumentInitialization - Perform initialization of\n/// the implicit object parameter for the given Method with the given\n/// expression.\nExprResult Sema::PerformObjectArgumentInitialization(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method) {\n // ...\n if (ICS.isBad()) {\n // ...\n case BadConversionSequence::bad_qualifiers: {\n // ...\n if (CVR) {\n // ...\n Diag(Method->getLocation(), diag::note_previous_decl) << Method->getDeclName();"}, | ||
[50]={ | [50]={w,5668,"/// PerformObjectArgumentInitialization - Perform initialization of\n/// the implicit object parameter for the given Method with the given\n/// expression.\nExprResult Sema::PerformObjectArgumentInitialization(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method) {\n // ...\n if (ICS.isBad()) {\n // ...\n case BadConversionSequence::lvalue_ref_to_rvalue:\n case BadConversionSequence::rvalue_ref_to_lvalue: {\n // ...\n Diag(Method->getLocation(), diag::note_previous_decl) << Method->getDeclName();"}, | ||
[51]={ | [51]={w,14924,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if ((isa<CXXConstructorDecl>(CurContext) || isa<CXXDestructorDecl>(CurContext)) && TheCall->getMethodDecl()->isPure()) {\n // ...\n if (isa<CXXThisExpr>(MemExpr->getBase()->IgnoreParenCasts()) && MemExpr->performsVirtualDispatch(getLangOpts())) {\n // ...\n Diag(MD->getBeginLoc(), diag::note_previous_decl) << MD->getDeclName();"}, | ||
[52]={ | [52]={W,932,"/// Apply Objective-C type arguments to the given type.\nstatic QualType applyObjCTypeArgs(Sema &S, SourceLocation loc, QualType type, ArrayRef<TypeSourceInfo *> typeArgs, SourceRange typeArgsRange, bool failOnError, bool rebuilding) {\n // ...\n for (unsigned i = 0, n = typeArgs.size(); i != n; ++i) {\n // ...\n if (!anyPackExpansions) {\n if (i < numTypeParams) {\n // ...\n } else {\n // ...\n S.Diag(objcClass->getLocation(), diag::note_previous_decl) << objcClass;"}, | ||
[53]={ | [53]={W,1031,"/// Apply Objective-C type arguments to the given type.\nstatic QualType applyObjCTypeArgs(Sema &S, SourceLocation loc, QualType type, ArrayRef<TypeSourceInfo *> typeArgs, SourceRange typeArgsRange, bool failOnError, bool rebuilding) {\n // ...\n // Make sure we didn\'t have the wrong number of arguments.\n if (!anyPackExpansions && finalTypeArgs.size() != numTypeParams) {\n // ...\n S.Diag(objcClass->getLocation(), diag::note_previous_decl) << objcClass;"} | ||
}, | }, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-invalid.m"]={"clang/test/SemaObjC/arc-invalid.m:16:22: note: \'p\' declared here"} | ["clang/test/SemaObjC/arc-invalid.m"]={"clang/test/SemaObjC/arc-invalid.m:16:22: note: \'p\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_previous_declaration"]={ | ["note_previous_declaration"]={ | ||
[e]="previous declaration is here", | [e]="previous declaration is here", | ||
[ | [a]=k, | ||
[b]="previous declaration is here", | [b]="previous declaration is here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={ | ||
[1]={"clang/lib/Sema/SemaCUDA.cpp",926,"void Sema::checkCUDATargetOverload(FunctionDecl *NewFD, const LookupResult &Previous) {\n // ...\n for (NamedDecl *OldND : Previous) {\n // ...\n // Don\'t allow HD and global functions to overload other functions with the\n // same signature. We allow overloading based on CUDA attributes so that\n // functions can have different implementations on the host and device, but\n // HD/global functions \"exist\" in some sense on both the host and device, so\n // should have the same implementation on both sides.\n if (NewTarget != OldTarget && ((NewTarget == CFT_HostDevice) || (OldTarget == CFT_HostDevice) || (NewTarget == CFT_Global) || (OldTarget == CFT_Global)) &&\n // ...\n Diag(OldFD->getLocation(), diag::note_previous_declaration);"}, | [1]={"clang/lib/Sema/SemaCUDA.cpp",926,"void Sema::checkCUDATargetOverload(FunctionDecl *NewFD, const LookupResult &Previous) {\n // ...\n for (NamedDecl *OldND : Previous) {\n // ...\n // Don\'t allow HD and global functions to overload other functions with the\n // same signature. We allow overloading based on CUDA attributes so that\n // functions can have different implementations on the host and device, but\n // HD/global functions \"exist\" in some sense on both the host and device, so\n // should have the same implementation on both sides.\n if (NewTarget != OldTarget && ((NewTarget == CFT_HostDevice) || (OldTarget == CFT_HostDevice) || (NewTarget == CFT_Global) || (OldTarget == CFT_Global)) &&\n // ...\n Diag(OldFD->getLocation(), diag::note_previous_declaration);"}, | ||
[2]={p,1692,"/// We\'ve determined that \\p New is a redeclaration of \\p Old. Check that they\n/// have compatible owning modules.\nbool Sema::CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old) {\n // ...\n if (NewIsModuleInterface || OldIsModuleInterface) {\n // .. | |||
}, | }, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp:4:1: note: previous declaration is here"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp:4:1: note: previous declaration is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_declaration_as"]={ | ["note_previous_declaration_as"]={ | ||
[e]="previously declared as %0 here", | [e]="previously declared as %0 here", | ||
[ | [a]=k, | ||
[b]="previously declared as (.*?) here", | [b]="previously declared as (.*?) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{p,3447,"static void mergeParamDeclTypes(ParmVarDecl *NewParam, const ParmVarDecl *OldParam, Sema &S) {\n // ...\n if (OldParamDT && NewParamDT && OldParamDT->getPointeeType() == NewParamDT->getPointeeType()) {\n // ...\n if (!EquivalentArrayTypes(OldParamOT, NewParamOT, S.getASTContext())) {\n // ...\n S.Diag(OldParam->getLocation(), diag::note_previous_declaration_as) << OldParamOT;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/array-parameter.cpp"]={"clang/test/Sema/array-parameter.cpp:4:15: note: previously declared as \'int[10]\' here"} | ["clang/test/Sema/array-parameter.cpp"]={"clang/test/Sema/array-parameter.cpp:4:15: note: previously declared as \'int[10]\' here"} | ||
} | } | ||
}, | }, | ||
["note_previous_default_assoc"]={ | ["note_previous_default_assoc"]={ | ||
[e]="previous default generic association is here", | [e]="previous default generic association is here", | ||
[ | [a]=k, | ||
[b]="previous default generic association is here", | [b]="previous default generic association is here", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"91147596414d",1302827748,"C1X: implement generic selections\n\nAs an extension, generic selection support has been added for all...","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"}, | ||
[ | [g]={{Bc,3363,"/// ParseGenericSelectionExpression - Parse a C11 generic-selection\n/// [C11 6.5.1.1].\n///\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( assignment-expression , generic-assoc-list )\n/// generic-assoc-list:\n/// generic-association\n/// generic-assoc-list , generic-association\n/// generic-association:\n/// type-name : assignment-expression\n/// default : assignment-expression\n/// \\endverbatim\n///\n/// As an extension, Clang also accepts:\n/// \\verbatim\n/// generic-selection:\n/// _Generic ( type-name, generic-assoc-list )\n/// \\endverbatim\nExprResult Parser::ParseGenericSelectionExpression() {\n // ...\n do {\n // ...\n if (Tok.is(tok::kw_default)) {\n // C11 6.5.1.1p2 \"A generic selection shall have no more than one default\n // generic association.\"\n if (!DefaultLoc.isInvalid()) {\n // ...\n Diag(DefaultLoc, diag::note_previous_default_assoc);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/c1x-generic-selection.c"]={"clang/test/Parser/c1x-generic-selection.c:8:7: note: previous default generic association is here"} | ["clang/test/Parser/c1x-generic-selection.c"]={"clang/test/Parser/c1x-generic-selection.c:8:7: note: previous default generic association is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_definition"]={ | ["note_previous_definition"]={ | ||
[e]="previous definition is here", | [e]="previous definition is here", | ||
[ | [a]=k, | ||
[b]="previous definition is here", | [b]="previous definition is here", | ||
[c]=j, | |||
[d]=j, | |||
[f]={H,1236199783,G,F}, | |||
[g]={ | |||
[1]={zc,4323,"/// GetOrCreateLLVMFunction - If the specified mangled | |||
[56]={"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",3840,"Decl *TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D) {\n // ...\n // If PrevDecl was a definition and D is also a definition, diagnose.\n // This happens in cases like:\n //\n // template<typename T, typename U>\n // struct Outer {\n // template<typename X> struct Inner;\n // template<> struct Inner<T> {};\n // template<> struct Inner<U> {};\n // };\n //\n // Outer<int, int> outer; // error: the explicit specializations of Inner\n // // have the same signature.\n if (PrevDecl && PrevDecl->getDefinition() && D->isThisDeclarationADefinition()) {\n // ...\n SemaRef.Diag(PrevDecl->getDefinition()->getLocation(), diag::note_previous_definition);"}, | [56]={"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",3840,"Decl *TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D) {\n // ...\n // If PrevDecl was a definition and D is also a definition, diagnose.\n // This happens in cases like:\n //\n // template<typename T, typename U>\n // struct Outer {\n // template<typename X> struct Inner;\n // template<> struct Inner<T> {};\n // template<> struct Inner<U> {};\n // };\n //\n // Outer<int, int> outer; // error: the explicit specializations of Inner\n // // have the same signature.\n if (PrevDecl && PrevDecl->getDefinition() && D->isThisDeclarationADefinition()) {\n // ...\n SemaRef.Diag(PrevDecl->getDefinition()->getLocation(), diag::note_previous_definition);"}, | ||
[57]={ | [57]={ac,9475,"void ASTReader::finishPendingActions() {\n while (!PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() || !PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.empty() || !PendingDeclChains.empty() || !PendingMacroIDs.empty() || !PendingDeclContextInfos.empty() || !PendingUpdateRecords.empty() || !PendingObjCExtensionIvarRedeclarations.empty()) {\n // ...\n while (!PendingObjCExtensionIvarRedeclarations.empty()) {\n // ...\n if (Ctx.IsEquivalent(ExtensionsPair.first, ExtensionsPair.second)) {\n // ...\n } else {\n for (auto IvarPair : DuplicateIvars) {\n // ...\n Diag(IvarPair.second->getLocation(), diag::note_previous_definition);"}, | ||
[58]={"clang/lib/Serialization/ASTReaderDecl.cpp",1349,"void ASTDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) {\n // ...\n if (PrevIvar && PrevIvar != IVD) {\n // ...\n if (ParentExt && PrevParentExt) {\n // ...\n } else if (ParentExt || PrevParentExt) {\n // ...\n Reader.Diag(PrevIvar->getLocation(), diag::note_previous_definition);"}, | [58]={"clang/lib/Serialization/ASTReaderDecl.cpp",1349,"void ASTDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) {\n // ...\n if (PrevIvar && PrevIvar != IVD) {\n // ...\n if (ParentExt && PrevParentExt) {\n // ...\n } else if (ParentExt || PrevParentExt) {\n // ...\n Reader.Diag(PrevIvar->getLocation(), diag::note_previous_definition);"}, | ||
[59]={"clang/lib/Serialization/ASTReaderDecl.cpp",4314,"/// Given an ObjC interface, goes through the modules and links to the\n/// interface all the categories for it.\nclass ObjCCategoriesVisitor {\n // ...\n void add(ObjCCategoryDecl *Cat) {\n // ...\n // Check for duplicate categories.\n if (Cat->getDeclName()) {\n // ...\n if (Existing && Reader.getOwningModuleFile(Existing) != Reader.getOwningModuleFile(Cat)) {\n // ...\n if (!Ctx.IsEquivalent(Cat, Existing)) {\n // ...\n Reader.Diag(Existing->getLocation(), diag::note_previous_definition);"} | [59]={"clang/lib/Serialization/ASTReaderDecl.cpp",4314,"/// Given an ObjC interface, goes through the modules and links to the\n/// interface all the categories for it.\nclass ObjCCategoriesVisitor {\n // ...\n void add(ObjCCategoryDecl *Cat) {\n // ...\n // Check for duplicate categories.\n if (Cat->getDeclName()) {\n // ...\n if (Existing && Reader.getOwningModuleFile(Existing) != Reader.getOwningModuleFile(Cat)) {\n // ...\n if (!Ctx.IsEquivalent(Cat, Existing)) {\n // ...\n Reader.Diag(Existing->getLocation(), diag::note_previous_definition);"} | ||
}, | }, | ||
[ | [h]={ | ||
["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:5:10: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:7:9: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:10:10: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:12:28: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:15:10: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:17:24: note: previous definition is here"} | ["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:5:10: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:7:9: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:10:10: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:12:28: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:15:10: note: previous definition is here","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:17:24: note: previous definition is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_exception_handler"]={ | ["note_previous_exception_handler"]={ | ||
[e]="for type %0", | [e]="for type %0", | ||
[ | [a]=k, | ||
[b]="for type (.*?)", | [b]="for type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"63c4da01c819",1248887745,"Check for identical types in C++ catch expression. Patch by Erik Verbruggen.\n\nllvm-svn: 77475","Check for identical types in C++ catch expression. Patch by Erik Verbruggen.\n\nllvm-svn: 77475"}, | ||
[ | [g]={{J,4546,"/// 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 for (unsigned i = 0; i < NumHandlers; ++i) {\n // ...\n if (auto *RD = Underlying->getAsCXXRecordDecl()) {\n // ...\n if (RD->lookupInBases(CTPB, Paths)) {\n // ...\n if (!Paths.isAmbiguous(CanQualType::CreateUnsafe(CTPB.getFoundHandlerType()))) {\n // ...\n Diag(Problem->getExceptionDecl()->getTypeSpecStartLoc(), diag::note_previous_exception_handler) << Problem->getCaughtType();"},{J,4566,"/// 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 for (unsigned i = 0; i < NumHandlers; ++i) {\n // ...\n if (!R.second) {\n // ...\n Diag(Problem->getExceptionDecl()->getTypeSpecStartLoc(), diag::note_previous_exception_handler) << Problem->getCaughtType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/unreachable-catch-clauses.cpp"]={"clang/test/SemaCXX/unreachable-catch-clauses.cpp:11:8: note: for type \'BaseEx &\'","clang/test/SemaCXX/unreachable-catch-clauses.cpp:11:8: note: for type \'BaseEx &\'","clang/test/SemaCXX/unreachable-catch-clauses.cpp:12:8: note: for type \'Ex1 &\'"} | ["clang/test/SemaCXX/unreachable-catch-clauses.cpp"]={"clang/test/SemaCXX/unreachable-catch-clauses.cpp:11:8: note: for type \'BaseEx &\'","clang/test/SemaCXX/unreachable-catch-clauses.cpp:11:8: note: for type \'BaseEx &\'","clang/test/SemaCXX/unreachable-catch-clauses.cpp:12:8: note: for type \'Ex1 &\'"} | ||
} | } | ||
}, | }, | ||
["note_previous_explicit_instantiation"]={ | ["note_previous_explicit_instantiation"]={ | ||
[e]="previous explicit instantiation is here", | [e]="previous explicit instantiation is here", | ||
[ | [a]=k, | ||
[b]="previous explicit instantiation is here", | [b]="previous explicit instantiation is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f61eca93c05f",1242239300,"Improve the semantic checking for explicit instantiations of\ntemplates. In particular:\n - An explic...","Improve the semantic checking for explicit instantiations of\ntemplates. In particular:\n - An explicit instantiation can follow an implicit instantiation (we\n were improperly diagnosing this as an error, previously).\n - In C++0x, an explicit instantiation that follows an explicit\n specialization of the same template specialization is ignored. In\n C++98, we just emit an extension warning.\n - In C++0x, an explicit instantiation must be in a namespace\n enclosing the original template. C++98 has no such requirement.\n\nAlso, fixed a longstanding FIXME regarding the integral type that is\nused for the size of a constant array type when it is being instantiated.\n\nllvm-svn: 71689"}, | ||
[ | [g]={{r,9301,"/// Diagnose cases where we have an explicit template specialization\n/// before/after an explicit template instantiation, producing diagnostics\n/// for those cases where they are required and determining whether the\n/// new specialization/instantiation will have any effect.\n///\n/// \\param NewLoc the location of the new explicit specialization or\n/// instantiation.\n///\n/// \\param NewTSK the kind of the new explicit specialization or instantiation.\n///\n/// \\param PrevDecl the previous declaration of the entity.\n///\n/// \\param PrevTSK the kind of the old explicit specialization or instantiatin.\n///\n/// \\param PrevPointOfInstantiation if valid, indicates where the previous\n/// declaration was instantiated (either implicitly or explicitly).\n///\n/// \\param HasNoEffect will be set to true to indicate that the new\n/// specialization or instantiation has no effect and should be ignored.\n///\n/// \\returns true if there was an error that should prevent the introduction of\n/// the new declaration into the AST, false otherwise.\nbool Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPointOfInstantiation, bool &HasNoEffect) {\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(DiagLocForExplicitInstantiation(PrevDecl, PrevPointOfInstantiation), diag::note_previous_explicit_instantiation);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:308:20: note: previous explicit instantiation is here"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:308:20: note: previous explicit instantiation is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_field_init"]={ | ["note_previous_field_init"]={ | ||
[e]="previous initialization for field %0 is here", | [e]="previous initialization for field %0 is here", | ||
[ | [a]=k, | ||
[b]="previous initialization for field (.*?) is here", | [b]="previous initialization for field (.*?) is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5030928d60a1",1567205575,"[c++20] Implement semantic restrictions for C++20 designated\ninitializers.\n\nThis has some interestin...","[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"}, | ||
[ | [g]={{Q,2855,"/// Check the well-formedness of a C99 designated initializer.\n///\n/// Determines whether the designated initializer @p DIE, which\n/// resides at the given @p Index within the initializer list @p\n/// IList, is well-formed for a current object of type @p DeclType\n/// (C99 6.7.8). The actual subobject that this designator refers to\n/// within the current subobject is returned in either\n/// @p NextField or @p NextElementIndex (whichever is appropriate).\n///\n/// @param IList The initializer list in which this designated\n/// initializer occurs.\n///\n/// @param DIE The designated initializer expression.\n///\n/// @param DesigIdx The index of the current designator.\n///\n/// @param CurrentObjectType The type of the \"current object\" (C99 6.7.8p17),\n/// into which the designation in @p DIE should refer.\n///\n/// @param NextField If non-NULL and the first designator in @p DIE is\n/// a field, this will be set to the field declaration corresponding\n/// to the field named by the designator. On input, this is expected to be\n/// the next field that would be initialized in the absence of designation,\n/// if the complete object being initialized is a struct.\n///\n/// @param NextElementIndex If non-NULL and the first designator in @p\n/// DIE is an array designator or GNU array-range designator, this\n/// will be set to the last index initialized by this designator.\n///\n/// @param Index Index into @p IList where the designated initializer\n/// @p DIE occurs.\n///\n/// @param StructuredList The initializer list expression that\n/// describes all of the subobject initializers in the order they\'ll\n/// actually be initialized.\n///\n/// @returns true if there was an error, false otherwise.\nbool InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, InitListExpr *IList, DesignatedInitExpr *DIE, unsigned DesigIdx, QualType &CurrentObjectType, RecordDecl::field_iterator *NextField, llvm::APSInt *NextElementIndex, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex, bool FinishSubobjectInit, bool TopLevelObject) {\n // ...\n if (D->isFieldDesignator()) {\n // ...\n // C++20 [dcl.init.list]p3:\n // The ordered identifiers in the designators of the designated-\n // initializer-list shall form a subsequence of the ordered identifiers\n // in the direct non-static data members of T.\n //\n // Note that this is not a condition on forming the aggregate\n // initialization, only on actually performing initialization,\n // so it is not checked in VerifyOnly mode.\n //\n // FIXME: This is the only reordering diagnostic we produce, and it only\n // catches cases where we have a top-level field designator that jumps\n // backwards. This is the only such case that is reachable in an\n // otherwise-valid C++20 program, so is the only case that\'s required for\n // conformance, but for consistency, we should diagnose all the other\n // cases where a designator takes us backwards too.\n if (IsFirstDesignator && !VerifyOnly && SemaRef.getLangOpts().CPlusPlus && NextField && (*NextField == RD->field_end() || (*NextField)->getFieldIndex() > Field->getFieldIndex() + 1)) {\n // ...\n if (PrevField && PrevField->getFieldIndex() > KnownField->getFieldIndex()) {\n // ...\n if (StructuredList && OldIndex <= StructuredList->getNumInits()) {\n if (Expr *PrevInit = StructuredList->getInit(OldIndex)) {\n SemaRef.Diag(PrevInit->getBeginLoc(), diag::note_previous_field_init) << PrevField << PrevInit->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:36:8: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:66:8: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:109:13: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:203:7: note: previous initialization for field \'z\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:206:7: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:209:7: note: previous initialization for field \'b\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:211:10: note: previous initialization for field \'e\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:213:10: note: previous initialization for field \'d\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:215:10: note: previous initialization for field \'c\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:216:10: note: previous initialization for field \'b\' is here"} | ["clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:36:8: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:66:8: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:109:13: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:203:7: note: previous initialization for field \'z\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:206:7: note: previous initialization for field \'y\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:209:7: note: previous initialization for field \'b\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:211:10: note: previous initialization for field \'e\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:213:10: note: previous initialization for field \'d\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:215:10: note: previous initialization for field \'c\' is here","clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp:216:10: note: previous initialization for field \'b\' is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_implicit_declaration"]={ | ["note_previous_implicit_declaration"]={ | ||
[e]="previous implicit declaration is here", | [e]="previous implicit declaration is here", | ||
[ | [a]=k, | ||
[b]="previous implicit declaration is here", | [b]="previous implicit declaration is here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,3475,"// Determine whether the previous declaration was a definition, implicit\n// declaration, or a declaration.\ntemplate <typename T> static std::pair<diag::kind, SourceLocation> getNoteDiagForInvalidRedeclaration(const T *Old, const T *New) {\n // ...\n if (Old->isThisDeclarationADefinition())\n // ...\n else if (Old->isImplicit()) {\n PrevDiag = diag::note_previous_implicit_declaration;"},{s,17814,"void Sema::SetDeclDeleted(Decl *Dcl, SourceLocation DelLoc) {\n // ...\n if (const FunctionDecl *Prev = Fn->getPreviousDecl()) {\n // Don\'t consider the implicit declaration we generate for explicit\n // specializations. FIXME: Do not generate these implicit declarations.\n if ((Prev->getTemplateSpecializationKind() != TSK_ExplicitSpecialization || Prev->getPreviousDecl()) && !Prev->isDefined()) {\n // ...\n Diag(Prev->getLocation().isInvalid() ? DelLoc : Prev->getLocation(), Prev->isImplicit() ? diag::note_previous_implicit_declaration : diag::note_previous_declaration);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:11:13: note: previous implicit declaration is here"} | ["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:11:13: note: previous implicit declaration is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_initializer"]={ | ["note_previous_initializer"]={ | ||
[e]="previous initialization %select{|with side effects }0is here%select{| (side effects will not occur at run time)}0", | [e]="previous initialization %select{|with side effects }0is here%select{| (side effects will not occur at run time)}0", | ||
[ | [a]=k, | ||
[b]="previous initialization (?:|with side effects )is here(?:| \\(side effects will not occur at run time\\))", | [b]="previous initialization (?:|with side effects )is here(?:| \\(side effects will not occur at run time\\))", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,5485,"static void checkDuplicateDefaultInit(Sema &S, CXXRecordDecl *Parent, SourceLocation DefaultInitLoc) {\n // ...\n S.Diag(findDefaultInitializer(Parent), diag::note_previous_initializer) << 0;"},{p,13252,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // C++ [class.static.data]p4\n // If a static data member is of const integral or const\n // enumeration type, its declaration in the class definition can\n // specify a constant-initializer which shall be an integral\n // constant expression (5.19). In that case, the member can appear\n // in integral constant expressions. The member shall still be\n // defined in a namespace scope if it is used in the program and the\n // namespace scope definition shall not contain an initializer.\n //\n // We already performed a redefinition check above, but for static\n // data members we also need to check whether there was an in-class\n // declaration with an initializer.\n if (VDecl->isStaticDataMember() && VDecl->getCanonicalDecl()->hasInit()) {\n // ...\n Diag(VDecl->getCanonicalDecl()->getInit()->getExprLoc(), diag::note_previous_initializer) << 0;"},{s,5644,"bool CheckRedundantInit(Sema &S, CXXCtorInitializer *Init, CXXCtorInitializer *&PrevInit) {\n // ...\n S.Diag(PrevInit->getSourceLocation(), diag::note_previous_initializer) << 0 << PrevInit->getSourceRange();"},{s,5668,"bool CheckRedundantUnionInit(Sema &S, CXXCtorInitializer *Init, RedundantUnionMap &Unions) {\n // ...\n while (Parent->isAnonymousStructOrUnion() || Parent->isUnion()) {\n if (Parent->isUnion()) {\n // ...\n if (En.first && En.first != Child) {\n // ...\n S.Diag(En.second->getSourceLocation(), diag::note_previous_initializer) << 0 << En.second->getSourceRange();"},{Q,460,"/// 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 if (!VerifyOnly) {\n // ...\n SemaRef.Diag(OldInit->getBeginLoc(), diag::note_previous_initializer) << (OldInit->HasSideEffects(SemaRef.Context) && FullyOverwritten) << OldInit->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp"]={"clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:19:7: note: previous initialization is here","clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:25:15: note: previous initialization is here"} | ["clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp"]={"clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:19:7: note: previous initialization is here","clang/test/CXX/special/class.init/class.base.init/p8-0x.cpp:25:15: note: previous initialization is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_ms_inheritance"]={ | ["note_previous_ms_inheritance"]={ | ||
[e]="previous inheritance model specified here", | [e]="previous inheritance model specified here", | ||
[ | [a]=k, | ||
[b]="previous inheritance model specified here", | [b]="previous inheritance model specified here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"2c4e00ac1cc8",1391033256,"Sema: Diagnose improper application of inheritance keywords\n\nWe would previously allow inappropriate...","Sema: Diagnose improper application of inheritance keywords\n\nWe would previously allow inappropriate inheritance keywords to appear\non class declarations. We would also allow inheritance keywords on\ntemplates which were not fully specialized; this was divergent from\nMSVC.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2585\n\nllvm-svn: 200423"}, | ||
[ | [g]={{o,8070,"MSInheritanceAttr *Sema::mergeMSInheritanceAttr(Decl *D, const AttributeCommonInfo &CI, bool BestCase, MSInheritanceModel Model) {\n if (MSInheritanceAttr *IA = D->getAttr<MSInheritanceAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_previous_ms_inheritance);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/member-pointer-ms.cpp"]={"clang/test/SemaCXX/member-pointer-ms.cpp:299:8: note: previous inheritance model specified here"} | ["clang/test/SemaCXX/member-pointer-ms.cpp"]={"clang/test/SemaCXX/member-pointer-ms.cpp:299:8: note: previous inheritance model specified here"} | ||
} | } | ||
}, | }, | ||
["note_previous_namespace_alias"]={ | ["note_previous_namespace_alias"]={ | ||
[e]="previously defined as an alias for %0", | [e]="previously defined as an alias for %0", | ||
[ | [a]=k, | ||
[b]="previously defined as an alias for (.*?)", | [b]="previously defined as an alias for (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f463436d9c02",1409785882,"[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes\nmerging of namespace ali...","[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes\nmerging of namespace aliases across modules and improves source fidelity.\nIncidentally also fixes PR20816.\n\nllvm-svn: 217103"}, | ||
[ | [g]={{s,13437,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // We already have an alias with the same name that points to the same\n // namespace; check that it matches.\n if (AD->getNamespace()->Equals(getNamespaceDecl(ND))) {\n // ...\n } else if (isVisible(PrevDecl)) {\n // ...\n Diag(AD->getLocation(), diag::note_previous_namespace_alias) << AD->getNamespace();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/namespace-alias.cpp"]={"clang/test/SemaCXX/namespace-alias.cpp:41:13: note: previously defined as an alias for \'A1\'"} | ["clang/test/SemaCXX/namespace-alias.cpp"]={"clang/test/SemaCXX/namespace-alias.cpp:41:13: note: previously defined as an alias for \'A1\'"} | ||
} | } | ||
}, | }, | ||
["note_previous_statement"]={ | ["note_previous_statement"]={ | ||
[e]="previous statement is here", | [e]="previous statement is here", | ||
[ | [a]=k, | ||
[b]="previous statement is here", | [b]="previous statement is here", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\n...","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, | ||
[ | [g]={{"clang/lib/Parse/ParseStmt.cpp",1443,"struct MisleadingIndentationChecker {\n // ...\n void Check() {\n // ...\n if (PrevColNum != 0 && CurColNum != 0 && StmtColNum != 0 && ((PrevColNum > StmtColNum && PrevColNum == CurColNum) || !Tok.isAtStartOfLine()) && SM.getPresumedLineNumber(StmtLoc) != SM.getPresumedLineNumber(Tok.getLocation()) && (Tok.isNot(tok::identifier) || P.getPreprocessor().LookAhead(0).isNot(tok::colon))) {\n // ...\n P.Diag(StmtLoc, diag::note_previous_statement);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/warn-misleading-indentation.cpp"]={"clang/test/Parser/warn-misleading-indentation.cpp:13:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:24:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:37:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:50:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:64:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:89:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:100:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:128:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:153:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:175:17: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:220:5: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:243:2: note: previous statement is here"} | ["clang/test/Parser/warn-misleading-indentation.cpp"]={"clang/test/Parser/warn-misleading-indentation.cpp:13:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:24:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:37:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:50:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:64:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:89:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:100:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:128:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:153:3: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:175:17: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:220:5: note: previous statement is here","clang/test/Parser/warn-misleading-indentation.cpp:243:2: note: previous statement is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_template_specialization"]={ | ["note_previous_template_specialization"]={ | ||
[e]="previous template specialization is here", | [e]="previous template specialization is here", | ||
[ | [a]=k, | ||
[b]="previous template specialization is here", | [b]="previous template specialization is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f61eca93c05f",1242239300,"Improve the semantic checking for explicit instantiations of\ntemplates. In particular:\n - An explic...","Improve the semantic checking for explicit instantiations of\ntemplates. In particular:\n - An explicit instantiation can follow an implicit instantiation (we\n were improperly diagnosing this as an error, previously).\n - In C++0x, an explicit instantiation that follows an explicit\n specialization of the same template specialization is ignored. In\n C++98, we just emit an extension warning.\n - In C++0x, an explicit instantiation must be in a namespace\n enclosing the original template. C++98 has no such requirement.\n\nAlso, fixed a longstanding FIXME regarding the integral type that is\nused for the size of a constant array type when it is being instantiated.\n\nllvm-svn: 71689"}, | ||
[ | [g]={{r,9266,"/// Diagnose cases where we have an explicit template specialization\n/// before/after an explicit template instantiation, producing diagnostics\n/// for those cases where they are required and determining whether the\n/// new specialization/instantiation will have any effect.\n///\n/// \\param NewLoc the location of the new explicit specialization or\n/// instantiation.\n///\n/// \\param NewTSK the kind of the new explicit specialization or instantiation.\n///\n/// \\param PrevDecl the previous declaration of the entity.\n///\n/// \\param PrevTSK the kind of the old explicit specialization or instantiatin.\n///\n/// \\param PrevPointOfInstantiation if valid, indicates where the previous\n/// declaration was instantiated (either implicitly or explicitly).\n///\n/// \\param HasNoEffect will be set to true to indicate that the new\n/// specialization or instantiation has no effect and should be ignored.\n///\n/// \\returns true if there was an error that should prevent the introduction of\n/// the new declaration into the AST, false otherwise.\nbool Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPointOfInstantiation, bool &HasNoEffect) {\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n case TSK_ExplicitSpecialization:\n // ...\n Diag(PrevDecl->getLocation(), diag::note_previous_template_specialization);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:226:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:255:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:270:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:307:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:314:23: note: previous template specialization is here"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:226:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:255:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:270:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:307:23: note: previous template specialization is here","clang/test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp:314:23: note: previous template specialization is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_use"]={ | ["note_previous_use"]={ | ||
[e]="previous use is here", | [e]="previous use is here", | ||
[ | [a]=k, | ||
[b]="previous use is here", | [b]="previous use is here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,16676,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n if (Redecl->getTagKind() != NewTag) {\n // ...\n Diag(Redecl->getLocation(), diag::note_previous_use);"},{p,17247,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // If this is a use of a previous tag, or if the tag is already declared\n // in the same scope (so that the definition/declaration completes or\n // rementions the tag), reuse the decl.\n if (TUK == TUK_Reference || TUK == TUK_Friend || isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // Make sure that this wasn\'t declared as an enum and now used as a\n // struct or something similar.\n if (!isAcceptableTagRedeclaration(PrevTagDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n // ...\n Diag(PrevTagDecl->getLocation(), diag::note_previous_use);"},{x,1564,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n if (Synthesize)\n if (ObjCPropertyImplDecl *PPIDecl = IC->FindPropertyImplIvarDecl(PropertyIvar)) {\n // ...\n Diag(PPIDecl->getLocation(), diag::note_previous_use);"},{x,1603,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n // ...\n } else {\n if (Synthesize)\n if (ObjCPropertyImplDecl *PPIDecl = CatImplClass->FindPropertyImplIvarDecl(PropertyIvar)) {\n // ...\n Diag(PPIDecl->getLocation(), diag::note_previous_use);"},{r,2009,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevClassTemplate) {\n // ...\n if (!isAcceptableTagRedeclaration(PrevRecordDecl, Kind, TUK == TUK_Definition, KWLoc, Name)) {\n // ...\n Diag(PrevRecordDecl->getLocation(), diag::note_previous_use);"},{r,4305,"TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n // ...\n // Check the tag kind\n if (const RecordType *RT = Result->getAs<RecordType>()) {\n // ...\n if (!isAcceptableTagRedeclaration(D, TagKind, TUK == TUK_Definition, TagLoc, Id)) {\n // ...\n Diag(D->getLocation(), diag::note_previous_use);"},{r,8719,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n if (!isAcceptableTagRedeclaration(ClassTemplate->getTemplatedDecl(), Kind, TUK == TUK_Definition, KWLoc, ClassTemplate->getIdentifier())) {\n // ...\n Diag(ClassTemplate->getTemplatedDecl()->getLocation(), diag::note_previous_use);"},{r,9964,"// Explicit instantiation of a class template specialization\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!ClassTemplate) {\n // ...\n Diag(TD->getLocation(), diag::note_previous_use);"},{r,9976,"// Explicit instantiation of a class template specialization\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!isAcceptableTagRedeclaration(ClassTemplate->getTemplatedDecl(), Kind, /*isDefinition*/ false, KWLoc, ClassTemplate->getIdentifier())) {\n // ...\n Diag(ClassTemplate->getTemplatedDecl()->getLocation(), diag::note_previous_use);"},{bb,1687,"QualType TemplateInstantiator::RebuildElaboratedType(SourceLocation KeywordLoc, ElaboratedTypeKeyword Keyword, NestedNameSpecifierLoc QualifierLoc, QualType T) {\n if (const TagType *TT = T->getAs<TagType>()) {\n // ...\n // TODO: should we even warn on struct/class mismatches for this? Seems\n // like it\'s likely to produce a lot of spurious errors.\n if (Id && Keyword != ETK_None && Keyword != ETK_Typename) {\n // ...\n if (!SemaRef.isAcceptableTagRedeclaration(TD, Kind, /*isDefinition*/ false, TagLocation, Id)) {\n // ...\n SemaRef.Diag(TD->getLocation(), diag::note_previous_use);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/property-impl-misuse.m"]={"clang/test/SemaObjC/property-impl-misuse.m:14:13: note: previous use is here"} | ["clang/test/SemaObjC/property-impl-misuse.m"]={"clang/test/SemaObjC/property-impl-misuse.m:14:13: note: previous use is here"} | ||
} | } | ||
}, | }, | ||
["note_previous_uuid"]={ | ["note_previous_uuid"]={ | ||
[e]="previous uuid specified here", | [e]="previous uuid specified here", | ||
[ | [a]=k, | ||
[b]="previous uuid specified here", | [b]="previous uuid specified here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"88f5ed9430a9",1473792926,"[clang-cl] Diagnose duplicate uuids.\n\nThis mostly behaves cl.exe\'s behavior, even though clang-cl is...","[clang-cl] Diagnose duplicate uuids.\n\nThis mostly behaves cl.exe\'s behavior, even though clang-cl is stricter in some\ncorner cases and more lenient in others (see the included test).\n\nTo make the uuid declared previously here diagnostic work correctly, tweak\nstripTypeAttributesOffDeclSpec() to keep attributes in the right order.\n\nhttps://reviews.llvm.org/D24469\n\nllvm-svn: 281367"}, | ||
[ | [g]={{o,6979,"UuidAttr *Sema::mergeUuidAttr(Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl) {\n if (const auto *UA = D->getAttr<UuidAttr>()) {\n // ...\n if (!UA->getGuid().empty()) {\n // ...\n Diag(CI.getLoc(), diag::note_previous_uuid);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/ms-uuid.cpp"]={"clang/test/SemaCXX/ms-uuid.cpp:39:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:39:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:46:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:58:2: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:58:2: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:68:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:73:2: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:81:2: note: previous uuid specified here"} | ["clang/test/SemaCXX/ms-uuid.cpp"]={"clang/test/SemaCXX/ms-uuid.cpp:39:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:39:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:46:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:58:2: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:58:2: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:68:18: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:73:2: note: previous uuid specified here","clang/test/SemaCXX/ms-uuid.cpp:81:2: note: previous uuid specified here"} | ||
} | } | ||
}, | }, | ||
["note_printf_c_str"]={ | ["note_printf_c_str"]={ | ||
[e]="did you mean to call the %0 method?", | [e]="did you mean to call the %0 method?", | ||
[ | [a]=k, | ||
[b]="did you mean to call the (.*?) method\\?", | [b]="did you mean to call the (.*?) method\\?", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c7b0bdffe75c",1340240915,"If an object (such as a std::string) with an appropriate c_str() member function\nis passed to a vari...","If an object (such as a std::string) with an appropriate c_str() member function\nis passed to a variadic function in a position where a format string indicates\nthat c_str()\'s return type is desired, provide a note suggesting that the user\nmay have intended to call the c_str() member.\n\nFactor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and\nmove it to SemaChecking in order to facilitate this. Factor the call checking\nout of function call checking and block call checking, and extend it to cover\nconstructor calls too.\n\nPatch by Sam Panzer!\n\nllvm-svn: 158887"}, | ||
[ | [g]={{y,10730,"// Check if a (w)string was passed when a (w)char* was needed, and offer a\n// better diagnostic if so. AT is assumed to be valid.\n// Returns true when a c_str() conversion method is found.\nbool CheckPrintfHandler::checkForCStrMembers(const analyze_printf::ArgType &AT, const Expr *E) {\n // ...\n for (MethodSet::iterator MI = Results.begin(), ME = Results.end(); MI != ME; ++MI) {\n // ...\n if (Method->getMinRequiredArguments() == 0 && AT.matchesType(S.Context, Method->getReturnType())) {\n // ...\n S.Diag(E->getBeginLoc(), diag::note_printf_c_str) << \"c_str()\" << FixItHint::CreateInsertion(EndLoc, \".c_str()\");"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:39:11: note: did you mean to call the c_str() method?"} | ["clang/test/SemaCXX/vararg-class.cpp"]={"clang/test/SemaCXX/vararg-class.cpp:39:11: note: did you mean to call the c_str() method?"} | ||
} | } | ||
}, | }, | ||
["note_prior_template_arg_substitution"]={ | ["note_prior_template_arg_substitution"]={ | ||
[e]="while substituting prior template arguments into %select{non-type|template}0 template parameter%1 %2", | [e]="while substituting prior template arguments into %select{non-type|template}0 template parameter%1 %2", | ||
[ | [a]=k, | ||
[b]="while substituting prior template arguments into (?:non\\-type|template) template parameter(.*?) (.*?)", | [b]="while substituting prior template arguments into (?:non\\-type|template) template parameter(.*?) (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e62e6a0191d2",1257966828,"Before checking a template template argument against its corresponding\ntemplate template parameter, ...","Before checking a template template argument against its corresponding\ntemplate template parameter, substitute any prior template arguments\ninto the template template parameter. This, for example, allows us to\nproperly check the template template argument for a class such as:\n\n template<typename T, template<T Value> class X> struct Foo;\n\nThe actual implementation of this feature was trivial; most of the\nchange is dedicated to giving decent diagnostics when this\nsubstitution goes horribly wrong. We now get a note like:\n\n note: while substituting prior template arguments into template\n template parameter \'X\' [with T = float]\n\nAs part of this change, enabled some very pedantic checking when\ncomparing template template parameter lists, which shook out a bug in\nour overly-eager checking of default arguments of template template\nparameters. We now perform only minimal checking of such default\narguments when they are initially parsed.\n\nllvm-svn: 86864"}, | ||
[ | [g]={{bb,897,"/// 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::PriorTemplateArgumentSubstitution: {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_prior_template_arg_substitution) << isa<TemplateTemplateParmDecl>(Parm) << Name << getTemplateArgumentBindingsText(TemplateParams, Active->TemplateArgs, Active->NumTemplateArgs) << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-template-template-parm.cpp"]={"clang/test/SemaTemplate/instantiate-template-template-parm.cpp:31:1: note: while substituting prior template arguments into template template parameter \'X\' [with T = float]"} | ["clang/test/SemaTemplate/instantiate-template-template-parm.cpp"]={"clang/test/SemaTemplate/instantiate-template-template-parm.cpp:31:1: note: while substituting prior template arguments into template template parameter \'X\' [with T = float]"} | ||
} | } | ||
}, | }, | ||
["note_private_extern"]={ | ["note_private_extern"]={ | ||
[e]="use __attribute__((visibility(\"hidden\"))) attribute instead", | [e]="use __attribute__((visibility(\"hidden\"))) attribute instead", | ||
[ | [a]=k, | ||
[b]="use __attribute__\\(\\(visibility\\(\"hidden\"\\)\\)\\) attribute instead", | [b]="use __attribute__\\(\\(visibility\\(\"hidden\"\\)\\)\\) attribute instead", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f85f33863455",1345239895,"c: privide deprecated warning when __private_extern__ storage\nspecifier is unsed in a declaration; a...","c: privide deprecated warning when __private_extern__ storage\nspecifier is unsed in a declaration; as it may not make the symbol\nlocal to linkage unit as intended. Suggest using \"hidden\" visibility \nattribute instead. // rdar://7703982\n\nllvm-svn: 162138"}, | ||
[ | [g]={{p,13782,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n case VarDecl::DeclarationOnly:\n // ...\n if (!Type->isDependentType() && !Var->isInvalidDecl() && Var->getStorageClass() == SC_PrivateExtern) {\n // ...\n Diag(Var->getLocation(), diag::note_private_extern);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:36:24: note: use __attribute__((visibility(\"hidden\"))) attribute instead"} | ["clang/test/Sema/tentative-decls.c"]={"clang/test/Sema/tentative-decls.c:36:24: note: use __attribute__((visibility(\"hidden\"))) attribute instead"} | ||
} | } | ||
}, | }, | ||
["note_private_module_fragment"]={ | ["note_private_module_fragment"]={ | ||
[e]="private module fragment begins here", | [e]="private module fragment begins here", | ||
[ | [a]=k, | ||
[b]="private module fragment begins here", | [b]="private module fragment begins here", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | ||
[ | [g]={{Nc,1274,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n // C++ standard modules. Diagnose cases where a function is declared inline\n // in the module purview but has no definition before the end of the TU or\n // the start of a Private Module Fragment (if one is present).\n if (!PendingInlineFuncDecls.empty()) {\n for (auto *D : PendingInlineFuncDecls) {\n if (auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n // If we have a PMF it should be at the end of the ModuleScopes.\n if (DefInPMF && ModuleScopes.back().Module->Kind == Module::PrivateModuleFragment) {\n Diag(ModuleScopes.back().BeginLoc, diag::note_private_module_fragment);"},{nc,779,"/// 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 // C++2a [module.interface]p1:\n // An export-declaration shall appear only [...] in the purview of a module\n // interface unit. An export-declaration shall not appear directly or\n // indirectly within [...] a private-module-fragment.\n if (!isCurrentModulePurview()) {\n // ...\n } else if (!ModuleScopes.back().ModuleInterface) {\n // ...\n } else if (ModuleScopes.back().Module->Kind == Module::PrivateModuleFragment) {\n // ...\n Diag(ModuleScopes.back().BeginLoc, diag::note_private_module_fragment);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/module/module.interface/p1.cpp"]={"clang/test/CXX/module/module.interface/p1.cpp:36:1: note: private module fragment begins here"} | ["clang/test/CXX/module/module.interface/p1.cpp"]={"clang/test/CXX/module/module.interface/p1.cpp:36:1: note: private module fragment begins here"} | ||
} | } | ||
}, | }, | ||
["note_private_top_level_defined"]={ | ["note_private_top_level_defined"]={ | ||
[e]="module defined here", | [e]="module defined here", | ||
[ | [a]=k, | ||
[b]="module defined here", | [b]="module defined here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"84bc0a271dcd",1513919083,"[Modules] Map missing private submodules from Foo.Private to Foo_Private\n\nIn case `@import Foo.Priva...","[Modules] Map missing private submodules from Foo.Private to Foo_Private\n\nIn case `@import Foo.Private` fails because the submodule doesn\'t exist,\nlook for `Foo_Private` (if available) and build/load that module\ninstead. In that process emit a warning and tell the user about the\nassumption.\n\nThe intention here is to assist all existing private modules owners\n(in ObjC and Swift) to migrate to the new `Foo_Private` syntax.\n\nrdar://problem/36023940\n\nllvm-svn: 321342"}, | ||
[ | [g]={{uc,2054,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n for (unsigned I = 1, N = Path.size(); I != N; ++I) {\n // ...\n // If the user is requesting Foo.Private and it doesn\'t exist, try to\n // match Foo_Private and emit a warning asking for the user to write\n // @import Foo_Private instead. FIXME: remove this when existing clients\n // migrate off of Foo.Private syntax.\n if (!Sub && Name == \"Private\" && Module == Module->getTopLevelModule()) {\n // ...\n if (Sub) {\n // ...\n if (!getDiagnostics().isIgnored(diag::warn_no_priv_submodule_use_toplevel, ImportLoc)) {\n // ...\n getDiagnostics().Report(Sub->DefinitionLoc, diag::note_private_top_level_defined);"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/implicit-map-dot-private.m"]={"clang/test/Modules/Inputs/implicit-private-canonical/A.framework/Modules/module.private.modulemap:1:18: note: module defined here"} | ["clang/test/Modules/implicit-map-dot-private.m"]={"clang/test/Modules/Inputs/implicit-private-canonical/A.framework/Modules/module.private.modulemap:1:18: note: module defined here"} | ||
} | } | ||
}, | }, | ||
["note_property_attribute"]={ | ["note_property_attribute"]={ | ||
[e]="property %0 is declared %select{deprecated|unavailable|partial}1 here", | [e]="property %0 is declared %select{deprecated|unavailable|partial}1 here", | ||
[ | [a]=k, | ||
[b]="property (.*?) is declared (?:deprecated|unavailable|partial) here", | [b]="property (.*?) is declared (?:deprecated|unavailable|partial) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"974c94804986",1348260397,"objective-C: when diagnosing deprecated/unavailable usage of\nsetter or getter backing a deprecated/u...","objective-C: when diagnosing deprecated/unavailable usage of\nsetter or getter backing a deprecated/unavailable property,\nalso not location of the property. // rdar://12324295\n\nllvm-svn: 164412"}, | ||
[ | [g]={{Nb,340,"/// 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_property_attribute\' options."},{Nb,543,"/// 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 if (!Message.empty()) {\n // ...\n if (ObjCProperty)\n S.Diag(ObjCProperty->getLocation(), diag::note_property_attribute) << ObjCProperty->getDeclName() << property_note_select;"},{Nb,548,"/// 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 if (!Message.empty()) {\n // ...\n } else if (!UnknownObjCClass) {\n // ...\n if (ObjCProperty)\n S.Diag(ObjCProperty->getLocation(), diag::note_property_attribute) << ObjCProperty->getDeclName() << property_note_select;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/property-noninherited-availability-attr.m"]={"clang/test/SemaObjC/property-noninherited-availability-attr.m:13:15: note: property \'myProperty\' is declared deprecated here","clang/test/SemaObjC/property-noninherited-availability-attr.m:8:15: note: property \'myProtocolProperty\' is declared deprecated here"} | ["clang/test/SemaObjC/property-noninherited-availability-attr.m"]={"clang/test/SemaObjC/property-noninherited-availability-attr.m:13:15: note: property \'myProperty\' is declared deprecated here","clang/test/SemaObjC/property-noninherited-availability-attr.m:8:15: note: property \'myProtocolProperty\' is declared deprecated here"} | ||
} | } | ||
}, | }, | ||
["note_property_declare"]={ | ["note_property_declare"]={ | ||
[e]="property declared here", | [e]="property declared here", | ||
[ | [a]=k, | ||
[b]="property declared here", | [b]="property declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"de8db16a7daa",1257201915,"Property declared in continuation class can only be used to\nchange a readonly property declared in t...","Property declared in continuation class can only be used to\nchange a readonly property declared in the class (and its inherited protocols)\nto writable property. (Fixes radar 7350645).\n\nllvm-svn: 85836"}, | ||
[ | [g]={{u,5370,"void Sema::DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCImplementationDecl *ImplD) {\n // ...\n for (const auto *CurMethod : ImplD->instance_methods()) {\n // ...\n // Do not issue this warning if backing ivar is used somewhere and accessor\n // implementation makes a self call. This is to prevent false positive in\n // cases where the ivar is accessed by another method that the accessor\n // delegates to.\n if (!IV->isReferenced() || !Checker.InvokedSelfMethod) {\n // ...\n Diag(PDecl->getLocation(), diag::note_property_declare);"},{x,402,"/// Check for a mismatch in the atomicity of the given properties.\nstatic void checkAtomicPropertyMismatch(Sema &S, ObjCPropertyDecl *OldProperty, ObjCPropertyDecl *NewProperty, bool PropagateAtomicity) {\n // ...\n S.Diag(OldProperty->getLocation(), diag::note_property_declare);"},{x,445,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // If we found a property in an extension, complain.\n if (PIDecl && isa<ObjCCategoryDecl>(PIDecl->getDeclContext())) {\n // ...\n Diag(PIDecl->getLocation(), diag::note_property_declare);"},{x,467,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // A readonly property declared in the primary class can be refined\n // by adding a readwrite property within an extension.\n // Anything else is an error.\n if (!(PIDecl->isReadOnly() && isReadWrite)) {\n // ...\n Diag(PIDecl->getLocation(), diag::note_property_declare);"},{x,477,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n // Check for consistency of getters.\n if (PIDecl->getGetterName() != GetterSel) {\n // If the getter was written explicitly, complain.\n if (AttributesAsWritten & ObjCPropertyAttribute::kind_getter) {\n // ...\n Diag(PIDecl->getLocation(), diag::note_property_declare);"},{x,493,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n if (ExistingOwnership && NewOwnership != ExistingOwnership) {\n // If the ownership was written explicitly, complain.\n if (getOwnershipRule(AttributesAsWritten)) {\n // ...\n Diag(PIDecl->getLocation(), diag::note_property_declare);"},{x,507,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n // Check for consistency with the previous declaration, if there is one.\n if (PIDecl) {\n // ...\n // If the redeclaration is \'weak\' but the original property is not,\n if ((Attributes & ObjCPropertyAttribute::kind_weak) && !(PIDecl->getPropertyAttributesAsWritten() & ObjCPropertyAttribute::kind_weak) && PIDecl->getType()->getAs<ObjCObjectPointerType>() && PIDecl->getType().getObjCLifetime() == Qualifiers::OCL_None) {\n // ...\n Diag(PIDecl->getLocation(), diag::note_property_declare);"},{x,545,"ObjCPropertyDecl *Sema::HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind) {\n // ...\n if (!Context.hasSameType(PIDecl->getType(), PDecl->getType())) {\n // ...\n if (!isa<ObjCObjectPointerType>(PrimaryClassPropertyT) || !isa<ObjCObjectPointerType>(ClassExtPropertyT) || (!isObjCPointerConversion(ClassExtPropertyT, PrimaryClassPropertyT, ConvertedType, IncompatibleObjC)) || IncompatibleObjC) {\n // ...\n Diag(PIDecl->getLocation(), diag::note_property_declare);"},{x,628,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n // Class property and instance property can have the same name.\n if (ObjCPropertyDecl *prevDecl = ObjCPropertyDecl::findPropertyDecl(DC, PropertyId, ObjCPropertyDecl::getQueryKind(isClassProperty))) {\n // ...\n Diag(prevDecl->getLocation(), diag::note_property_declare);"},{x,791,"static void checkARCPropertyImpl(Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {\n // ...\n S.Diag(property->getLocation(), diag::note_property_declare);"},{x,1128,"/// 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 ((PIkind & (ObjCPropertyAttribute::kind_atomic | ObjCPropertyAttribute::kind_nonatomic)) == 0) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1135,"/// 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 (const ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(property->getDeclContext())) {\n if (!CD->IsClassExtension()) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1219,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (RequireCompleteType(PropertyDiagLoc, PropertyIvarType, diag::err_incomplete_synthesized_property, property->getDeclName())) {\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1239,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n // ...\n if (PropertyIvarType.isObjCGCStrong()) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1255,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (kind & ObjCPropertyAttribute::kind_weak) {\n // Add GC __weak to the ivar type if the property is weak.\n if (getLangOpts().getGC() != LangOptions::NonGC) {\n // ...\n } else {\n if (!getLangOpts().ObjCWeak) {\n // Only complain here when synthesizing an ivar.\n if (!Ivar) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1289,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (AtLoc.isInvalid()) {\n // ...\n if (originalIvar) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1307,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (!Ivar) {\n // In ARC, give the ivar a lifetime qualifier based on the\n // property attributes.\n if ((getLangOpts().ObjCAutoRefCount || isARCWeak) && !PropertyIvarType.getObjCLifetime() && PropertyIvarType->isObjCRetainableType()) {\n // It\'s an error if we have to do this and the user didn\'t\n // explicitly write an ownership attribute on the property.\n if (!hasWrittenStorageAttribute(property, QueryKind) && !(kind & ObjCPropertyAttribute::kind_strong)) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1328,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (!Ivar) {\n // ...\n if (RequireNonAbstractType(PropertyIvarLoc, PropertyIvarType, diag::err_abstract_type_in_decl, AbstractSynthesizedIvarType)) {\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1483,"/// 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 *getterMethod = property->getGetterMethodDecl()) {\n // ...\n if (property->hasAttr<NSReturnsNotRetainedAttr>() && !getterMethod->hasAttr<NSReturnsNotRetainedAttr>()) {\n // ...\n Diag(property->getLocation(), diag::note_property_declare);"},{x,1681,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n // Readonly properties from protocols can be implemented as \"readwrite\"\n // with a custom setter name.\n if (Property->getSetterName() != SuperProperty->getSetterName() && !(SuperProperty->isReadOnly() && isa<ObjCProtocolDecl>(SuperProperty->getDeclContext()))) {\n // ...\n Diag(SuperProperty->getLocation(), diag::note_property_declare);"},{x,1686,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n if (Property->getGetterName() != SuperProperty->getGetterName()) {\n // ...\n Diag(SuperProperty->getLocation(), diag::note_property_declare);"},{x,1704,"/// DiagnosePropertyMismatch - Compares two properties for their\n/// attributes and types and warns on a variety of inconsistencies.\n///\nvoid Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *inheritedName, bool OverridingProtocolProperty) {\n // ...\n if (!Context.propertyTypesAreCompatible(LHSType, RHSType)) {\n // ...\n if (!isObjCPointerConversion(RHSType, LHSType, ConvertedType, IncompatibleObjC) || IncompatibleObjC) {\n // ...\n Diag(SuperProperty->getLocation(), diag::note_property_declare);"},{x,1937,"/// 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(Prop->getLocation(), diag::note_property_declare);"},{x,1955,"/// 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 property to be implemented in the super class, ignore.\n if (PropInSuperClass) {\n if ((Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readwrite) && (PropInSuperClass->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly) && !IMPDecl->getInstanceMethod(Prop->getSetterName()) && !IDecl->HasUserDeclaredSetterMethod(Prop)) {\n // ...\n Diag(PropInSuperClass->getLocation(), diag::note_property_declare);"},{x,1959,"/// 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 property to be implemented in the super class, ignore.\n if (PropInSuperClass) {\n if ((Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readwrite) && (PropInSuperClass->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly) && !IMPDecl->getInstanceMethod(Prop->getSetterName()) && !IDecl->HasUserDeclaredSetterMethod(Prop)) {\n // ...\n } else {\n // ...\n Diag(PropInSuperClass->getLocation(), diag::note_property_declare);"},{x,2021,"static void DiagnoseUnimplementedAccessor(Sema &S, ObjCInterfaceDecl *PrimaryClass, Selector Method, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, ObjCCategoryDecl *C, ObjCPropertyDecl *Prop, llvm::SmallPtrSet<const ObjCMethodDecl *, 8> &SMap) {\n // ...\n // When reporting on missing property setter/getter implementation in\n // categories, do not report when they are declared in primary class,\n // class\'s protocol, or one of it super classes. This is because,\n // the class is going to implement them.\n if (I == SMap.end() && (PrimaryClass == nullptr || !PrimaryClass->lookupPropertyAccessor(Method, C, Prop->isClassProperty()))) {\n // ...\n S.Diag(Prop->getLocation(), diag::note_property_declare);"},{x,2200,"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 (!(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic) && !(AttributesAsWritten & ObjCPropertyAttribute::kind_nonatomic)) {\n // ...\n if (GetterMethod) {\n // ...\n Diag(Property->getLocation(), diag::note_property_declare);"},{x,2206,"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 (!(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic) && !(AttributesAsWritten & ObjCPropertyAttribute::kind_nonatomic)) {\n // ...\n if (SetterMethod) {\n // ...\n Diag(Property->getLocation(), diag::note_property_declare);"},{x,2251,"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 Diag(Property->getLocation(), diag::note_property_declare);"},{Hb,677,"/// Try to find the most accurate setter declaration for the property\n/// reference.\n///\n/// \\return true if a setter was found, in which case Setter\nbool ObjCPropertyOpBuilder::findSetter(bool warn) {\n // ...\n // Do a normal method lookup first.\n if (ObjCMethodDecl *setter = LookupMethodInReceiverType(S, SetterSelector, RefExpr)) {\n if (setter->isPropertyAccessor() && warn)\n if (const ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) {\n // ...\n if (ObjCPropertyDecl *prop1 = IFace->FindPropertyDeclaration(AltMember, prop->getQueryKind()))\n if (prop != prop1 && (prop1->getSetterMethodDecl() == setter)) {\n // ...\n S.Diag(prop->getLocation(), diag::note_property_declare);"},{Hb,678,"/// Try to find the most accurate setter declaration for the property\n/// reference.\n///\n/// \\return true if a setter was found, in which case Setter\nbool ObjCPropertyOpBuilder::findSetter(bool warn) {\n // ...\n // Do a normal method lookup first.\n if (ObjCMethodDecl *setter = LookupMethodInReceiverType(S, SetterSelector, RefExpr)) {\n if (setter->isPropertyAccessor() && warn)\n if (const ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) {\n // ...\n if (ObjCPropertyDecl *prop1 = IFace->FindPropertyDeclaration(AltMember, prop->getQueryKind()))\n if (prop != prop1 && (prop1->getSetterMethodDecl() == setter)) {\n // ...\n S.Diag(prop1->getLocation(), diag::note_property_declare);"},{Hb,700,"void ObjCPropertyOpBuilder::DiagnoseUnsupportedPropertyUse() {\n if (S.getCurLexicalContext()->isObjCContainer() && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCCategoryImpl && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation) {\n if (ObjCPropertyDecl *prop = RefExpr->getExplicitProperty()) {\n // ...\n S.Diag(prop->getLocation(), diag::note_property_declare);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:60:15: note: property declared here"} | ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:60:15: note: property declared here"} | ||
} | } | ||
}, | }, | ||
["note_property_synthesize"]={ | ["note_property_synthesize"]={ | ||
[e]="property synthesized here", | [e]="property synthesized here", | ||
[ | [a]=k, | ||
[b]="property synthesized here", | [b]="property synthesized here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f5b993f7b149",1355352505,"[objc] For the ARC error that is emitted when a synthesized property implementation\nhas inconsistent...","[objc] For the ARC error that is emitted when a synthesized property implementation\nhas inconsistent ownership with the backing ivar, point the error location to the\nivar.\n\nPointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed.\nAlso provide the location of @synthesize via a note.\n\nThis also fixes the problem where an auto-synthesized property would emit an error without\nany location.\n\nllvm-svn: 170039"}, | ||
[ | [g]={{x,793,"static void checkARCPropertyImpl(Sema &S, SourceLocation propertyImplLoc, ObjCPropertyDecl *property, ObjCIvarDecl *ivar) {\n // ...\n if (propertyImplLoc.isValid())\n S.Diag(propertyImplLoc, diag::note_property_synthesize);"},{x,1009,"/// SelectPropertyForSynthesisFromProtocols - Finds the most appropriate\n/// property declaration that should be synthesised in all of the inherited\n/// protocols. It also diagnoses properties declared in inherited protocols with\n/// mismatched types or attributes, since any of them can be candidate for\n/// synthesis.\nstatic ObjCPropertyDecl *SelectPropertyForSynthesisFromProtocols(Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property) {\n // ...\n if (AtLoc.isValid())\n S.Diag(AtLoc, diag::note_property_synthesize);"},{x,1921,"/// 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 (ObjCPropertyImplDecl *PID = IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) {\n // ...\n if (PID->getLocation().isValid())\n Diag(PID->getLocation(), diag::note_property_synthesize);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:30:13: note: property synthesized here","clang/test/SemaObjC/mrc-weak.m:32:13: note: property synthesized here","clang/test/SemaObjC/mrc-weak.m:35:13: note: property synthesized here","clang/test/SemaObjC/mrc-weak.m:39:13: note: property synthesized here"} | ["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:30:13: note: property synthesized here","clang/test/SemaObjC/mrc-weak.m:32:13: note: property synthesized here","clang/test/SemaObjC/mrc-weak.m:35:13: note: property synthesized here","clang/test/SemaObjC/mrc-weak.m:39:13: note: property synthesized here"} | ||
} | } | ||
}, | }, | ||
["note_protected_by___block"]={ | ["note_protected_by___block"]={ | ||
[e]="jump bypasses setup of __block variable", | [e]="jump bypasses setup of __block variable", | ||
[ | [a]=k, | ||
[b]="jump bypasses setup of __block variable", | [b]="jump bypasses setup of __block variable", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"9662cd322760",1248034631,"enhance the goto checker to reject jumps across __block variable definitions.\n\nllvm-svn: 76376","enhance the goto checker to reject jumps across __block variable definitions.\n\nllvm-svn: 76376"}, | ||
[ | [g]={{I,152,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (VD->hasAttr<BlocksAttr>())\n return ScopePair(diag::note_protected_by___block, diag::note_exits___block);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:195:15: note: jump bypasses setup of __block variable"} | ["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:195:15: note: jump bypasses setup of __block variable"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_cleanup"]={ | ["note_protected_by_cleanup"]={ | ||
[e]="jump bypasses initialization of variable with __attribute__((cleanup))", | [e]="jump bypasses initialization of variable with __attribute__((cleanup))", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of variable with __attribute__\\(\\(cleanup\\)\\)", | [b]="jump bypasses initialization of variable with __attribute__\\(\\(cleanup\\)\\)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"960cc525ec72",1240047387,"rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and ...","rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and be more correct in ObjC cases (fixing\nrdar://6803963).\n\nAn example is that we now diagnose:\n\nint test1(int x) {\n goto L;\n int a[x];\n int b[x];\n L:\n return sizeof a;\n}\n\nwith:\n\nscope-check.c:15:3: error: illegal goto into protected scope\n goto L;\n ^\nscope-check.c:17:7: note: scope created by variable length array\n int b[x];\n ^\nscope-check.c:16:7: note: scope created by variable length array\n int a[x];\n ^\n\ninstead of just saying \"invalid jump\". An ObjC example is:\n\nvoid test1() {\n goto L;\n @try {\nL: ;\n } @finally {\n }\n}\n\nt.m:6:3: error: illegal goto into protected scope\n goto L;\n ^\nt.m:7:3: note: scope created by @try block\n @try {\n ^\n\nThere are a whole ton of fixme\'s for stuff to do, but I believe that this\nis a monotonic improvement over what we had.\n\nllvm-svn: 69437"}, | ||
[ | [g]={{I,156,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (VD->hasAttr<CleanupAttr>())\n return ScopePair(diag::note_protected_by_cleanup, diag::note_exits_cleanup);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/scope-check.c"]={"clang/test/Sema/scope-check.c:22:5: note: jump bypasses initialization of variable with __attribute__((cleanup))"} | ["clang/test/Sema/scope-check.c"]={"clang/test/Sema/scope-check.c:22:5: note: jump bypasses initialization of variable with __attribute__((cleanup))"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_consteval_if"]={ | ["note_protected_by_consteval_if"]={ | ||
[e]="jump enters controlled statement of consteval if", | [e]="jump enters controlled statement of consteval if", | ||
[ | [a]=k, | ||
[b]="jump enters controlled statement of consteval if", | [b]="jump enters controlled statement of consteval if", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{I,378,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::IfStmtClass: {\n // ...\n if (IS->isConstexpr())\n // ...\n else if (IS->isConsteval())\n Diag = diag::note_protected_by_consteval_if;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:75:5: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:75:5: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:68:5: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:68:5: note: jump enters controlled statement of consteval if"} | ["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:52:3: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:75:5: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:75:5: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:68:5: note: jump enters controlled statement of consteval if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:68:5: note: jump enters controlled statement of consteval if"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_constexpr_if"]={ | ["note_protected_by_constexpr_if"]={ | ||
[e]="jump enters controlled statement of constexpr if", | [e]="jump enters controlled statement of constexpr if", | ||
[ | [a]=k, | ||
[b]="jump enters controlled statement of constexpr if", | [b]="jump enters controlled statement of constexpr if", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b130fe7d316e",1466709409,"Implement p0292r2 (constexpr if), a likely C++1z feature.\n\nllvm-svn: 273602","Implement p0292r2 (constexpr if), a likely C++1z feature.\n\nllvm-svn: 273602"}, | ||
[ | [g]={{I,376,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::IfStmtClass: {\n // ...\n if (IS->isConstexpr())\n Diag = diag::note_protected_by_constexpr_if;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:111:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:111:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:121:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:121:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:130:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:140:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:148:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:159:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:156:5: note: jump enters controlled statement of constexpr if"} | ["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:111:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:111:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:121:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:121:7: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:130:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:140:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:148:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:159:5: note: jump enters controlled statement of constexpr if","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp:156:5: note: jump enters controlled statement of constexpr if"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_cxx_catch"]={ | ["note_protected_by_cxx_catch"]={ | ||
[e]="jump bypasses initialization of catch block", | [e]="jump bypasses initialization of catch block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of catch block", | [b]="jump bypasses initialization of catch block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4de47b445b96",1240864051,"Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into prot...","Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.\n\nllvm-svn: 70242"}, | ||
[ | [g]={{I,419,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::CXXTryStmtClass: {\n // ...\n // Jump from the catch into the try is not allowed either.\n for (unsigned I = 0, E = TS->getNumHandlers(); I != E; ++I) {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_cxx_catch, diag::note_exits_cxx_catch, CS->getSourceRange().getBegin()));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block"} | ["clang/test/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:55:5: note: jump bypasses initialization of catch block","clang/test/SemaCXX/exceptions.cpp:62:5: note: jump bypasses initialization of catch block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_cxx_try"]={ | ["note_protected_by_cxx_try"]={ | ||
[e]="jump bypasses initialization of try block", | [e]="jump bypasses initialization of try block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of try block", | [b]="jump bypasses initialization of try block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4de47b445b96",1240864051,"Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into prot...","Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.\n\nllvm-svn: 70242"}, | ||
[ | [g]={{I,407,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::CXXTryStmtClass: {\n // ...\n {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_cxx_try, diag::note_exits_cxx_try, TS->getSourceRange().getBegin()));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block","clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block","clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block","clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block"} | ["clang/test/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block","clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block","clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block","clang/test/SemaCXX/exceptions.cpp:48:3: note: jump bypasses initialization of try block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_if_available"]={ | ["note_protected_by_if_available"]={ | ||
[e]="jump enters controlled statement of if available", | [e]="jump enters controlled statement of if available", | ||
[ | [a]=k, | ||
[b]="jump enters controlled statement of if available", | [b]="jump enters controlled statement of if available", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5cd57177a51a",1471369451,"[ObjC] Warn on unguarded use of partial declaration\n\nThis commit adds a traversal of the AST after S...","[ObjC] Warn on unguarded use of partial declaration\n\nThis commit adds a traversal of the AST after Sema of a function that diagnoses\nunguarded references to declarations that are partially available (based on\navailability attributes). This traversal is only done when we would otherwise\nemit -Wpartial-availability.\n\nThis commit is part of a feature I proposed here:\nhttp://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html\n\nDifferential revision: https://reviews.llvm.org/D23003\n\nllvm-svn: 278826"}, | ||
[ | [g]={{I,374,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::IfStmtClass: {\n // ...\n unsigned Diag = diag::note_protected_by_if_available;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/unguarded-availability.m"]={"clang/test/SemaObjC/unguarded-availability.m:96:3: note: jump enters controlled statement of if available","clang/test/SemaObjC/unguarded-availability.m:96:3: note: jump enters controlled statement of if available"} | ["clang/test/SemaObjC/unguarded-availability.m"]={"clang/test/SemaObjC/unguarded-availability.m:96:3: note: jump enters controlled statement of if available","clang/test/SemaObjC/unguarded-availability.m:96:3: note: jump enters controlled statement of if available"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_non_trivial_c_struct_init"]={ | ["note_protected_by_non_trivial_c_struct_init"]={ | ||
[e]="jump bypasses initialization of variable of non-trivial C struct type", | [e]="jump bypasses initialization of variable of non-trivial C struct type", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of variable of non\\-trivial C struct type", | [b]="jump bypasses initialization of variable of non\\-trivial C struct type", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C\nARC mode.\n\nDeclaring __stro...","[ObjC] Allow declaring __strong pointer fields in structs in Objective-C\nARC mode.\n\nDeclaring __strong pointer fields in structs was not allowed in\nObjective-C ARC until now because that would make the struct non-trivial\nto default-initialize, copy/move, and destroy, which is not something C\nwas designed to do. This patch lifts that restriction.\n\nSpecial functions for non-trivial C structs are synthesized that are\nneeded to default-initialize, copy/move, and destroy the structs and\nmanage the ownership of the objects the __strong pointer fields point\nto. Non-trivial structs passed to functions are destructed in the callee\nfunction.\n\nrdar://problem/33599681\n\nDifferential Revision: https://reviews.llvm.org/D41228\n\nllvm-svn: 326307"}, | ||
[ | [g]={{I,170,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (VD->hasLocalStorage()) {\n // ...\n case QualType::DK_nontrivial_c_struct:\n return ScopePair(diag::note_protected_by_non_trivial_c_struct_init, diag::note_exits_dtor);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/strong-in-c-struct.m"]={"clang/test/SemaObjC/strong-in-c-struct.m:18:12: note: jump bypasses initialization of variable of non-trivial C struct type"} | ["clang/test/SemaObjC/strong-in-c-struct.m"]={"clang/test/SemaObjC/strong-in-c-struct.m:18:12: note: jump bypasses initialization of variable of non-trivial C struct type"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_autoreleasepool"]={ | ["note_protected_by_objc_autoreleasepool"]={ | ||
[e]="jump bypasses auto release push of @autoreleasepool block", | [e]="jump bypasses auto release push of @autoreleasepool block", | ||
[ | [a]=k, | ||
[b]="jump bypasses auto release push of @autoreleasepool block", | [b]="jump bypasses auto release push of @autoreleasepool block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={Cc,1308178962,Dc,Ec}, | ||
[ | [g]={{I,550,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::ObjCAutoreleasePoolStmtClass: {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_objc_autoreleasepool, diag::note_exits_objc_autoreleasepool, AS->getAtLoc()));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/autoreleasepool.m"]={"clang/test/SemaObjC/autoreleasepool.m:12:3: note: jump bypasses auto release push of @autoreleasepool block"} | ["clang/test/SemaObjC/autoreleasepool.m"]={"clang/test/SemaObjC/autoreleasepool.m:12:3: note: jump bypasses auto release push of @autoreleasepool block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_catch"]={ | ["note_protected_by_objc_catch"]={ | ||
[e]="jump bypasses initialization of @catch block", | [e]="jump bypasses initialization of @catch block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of @catch block", | [b]="jump bypasses initialization of @catch block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5c926f366019",1240090132,"reject invalid jumps among pieces of @try blocks. This seems to work\nreasonably well except for the...","reject invalid jumps among pieces of @try blocks. This seems to work\nreasonably well except for the problem that @catches are nested within\neach other in the AST, giving the ugly diagnostics in L8.\n\nllvm-svn: 69477"}, | ||
[ | [g]={{I,504,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::ObjCAtTryStmtClass: {\n // ...\n // Jump from the catch to the finally or try is not valid.\n for (ObjCAtCatchStmt *AC : AT->catch_stmts()) {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_objc_catch, diag::note_exits_objc_catch, AC->getAtCatchLoc()));"}}, | ||
[ | [h]={ | ||
[ | [xc]={"clang/test/SemaObjC/scope-check.m:44:5: note: jump bypasses initialization of @catch block","clang/test/SemaObjC/scope-check.m:25:5: note: jump bypasses initialization of @catch block","clang/test/SemaObjC/scope-check.m:22:5: note: jump bypasses initialization of @catch block","clang/test/SemaObjC/scope-check.m:11:5: note: jump bypasses initialization of @catch block","clang/test/SemaObjC/scope-check.m:80:5: note: jump bypasses initialization of @catch block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_fast_enumeration"]={ | ["note_protected_by_objc_fast_enumeration"]={ | ||
[e]="jump enters Objective-C fast enumeration loop", | [e]="jump enters Objective-C fast enumeration loop", | ||
[ | [a]=k, | ||
[b]="jump enters Objective\\-C fast enumeration loop", | [b]="jump enters Objective\\-C fast enumeration loop", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3901377c2297",1492624448,"[Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.\n\nrdar://problem/31635406\n\nDifferenti...","[Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.\n\nrdar://problem/31635406\n\nDifferential Revision: https://reviews.llvm.org/D32187\n\nllvm-svn: 300722"}, | ||
[ | [g]={{I,322,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::ObjCForCollectionStmtClass: {\n // ...\n unsigned Diag = diag::note_protected_by_objc_fast_enumeration;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/foreach.m"]={"clang/test/SemaObjC/foreach.m:62:3: note: jump enters Objective-C fast enumeration loop","clang/test/SemaObjC/foreach.m:63:5: note: jump enters Objective-C fast enumeration loop","clang/test/SemaObjC/foreach.m:62:3: note: jump enters Objective-C fast enumeration loop","clang/test/SemaObjC/foreach.m:63:5: note: jump enters Objective-C fast enumeration loop"} | ["clang/test/SemaObjC/foreach.m"]={"clang/test/SemaObjC/foreach.m:62:3: note: jump enters Objective-C fast enumeration loop","clang/test/SemaObjC/foreach.m:63:5: note: jump enters Objective-C fast enumeration loop","clang/test/SemaObjC/foreach.m:62:3: note: jump enters Objective-C fast enumeration loop","clang/test/SemaObjC/foreach.m:63:5: note: jump enters Objective-C fast enumeration loop"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_finally"]={ | ["note_protected_by_objc_finally"]={ | ||
[e]="jump bypasses initialization of @finally block", | [e]="jump bypasses initialization of @finally block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of @finally block", | [b]="jump bypasses initialization of @finally block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5c926f366019",1240090132,"reject invalid jumps among pieces of @try blocks. This seems to work\nreasonably well except for the...","reject invalid jumps among pieces of @try blocks. This seems to work\nreasonably well except for the problem that @catches are nested within\neach other in the AST, giving the ugly diagnostics in L8.\n\nllvm-svn: 69477"}, | ||
[ | [g]={{I,515,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::ObjCAtTryStmtClass: {\n // ...\n // Jump from the finally to the try or catch is not valid.\n if (ObjCAtFinallyStmt *AF = AT->getFinallyStmt()) {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_objc_finally, diag::note_exits_objc_finally, AF->getAtFinallyLoc()));"}}, | ||
[ | [h]={ | ||
[ | [xc]={"clang/test/SemaObjC/scope-check.m:27:5: note: jump bypasses initialization of @finally block","clang/test/SemaObjC/scope-check.m:15:5: note: jump bypasses initialization of @finally block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_strong_init"]={ | ["note_protected_by_objc_strong_init"]={ | ||
[e]="jump bypasses initialization of __strong variable", | [e]="jump bypasses initialization of __strong variable", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of __strong variable", | [b]="jump bypasses initialization of __strong variable", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"}, | ||
[ | [g]={{I,162,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (VD->hasLocalStorage()) {\n // ...\n case QualType::DK_objc_strong_lifetime:\n return ScopePair(diag::note_protected_by_objc_strong_init, diag::note_exits_objc_strong);"}}, | ||
[ | [h]={ | ||
["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:183:8: note: jump bypasses initialization of __strong variable"} | ["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:183:8: note: jump bypasses initialization of __strong variable"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_synchronized"]={ | ["note_protected_by_objc_synchronized"]={ | ||
[e]="jump bypasses initialization of @synchronized block", | [e]="jump bypasses initialization of @synchronized block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of @synchronized block", | [b]="jump bypasses initialization of @synchronized block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c70dd5647701",1240293660,"add support for goto checking and @synchronized blocks,\nrdar://6810106\n\nllvm-svn: 69667","add support for goto checking and @synchronized blocks,\nrdar://6810106\n\nllvm-svn: 69667"}, | ||
[ | [g]={{I,536,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::ObjCAtSynchronizedStmtClass: {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_objc_synchronized, diag::note_exits_objc_synchronized, AS->getAtSynchronizedLoc()));"}}, | ||
[ | [h]={ | ||
[ | [xc]={"clang/test/SemaObjC/scope-check.m:49:3: note: jump bypasses initialization of @synchronized block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_try"]={ | ["note_protected_by_objc_try"]={ | ||
[e]="jump bypasses initialization of @try block", | [e]="jump bypasses initialization of @try block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of @try block", | [b]="jump bypasses initialization of @try block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"960cc525ec72",1240047387,"rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and ...","rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and be more correct in ObjC cases (fixing\nrdar://6803963).\n\nAn example is that we now diagnose:\n\nint test1(int x) {\n goto L;\n int a[x];\n int b[x];\n L:\n return sizeof a;\n}\n\nwith:\n\nscope-check.c:15:3: error: illegal goto into protected scope\n goto L;\n ^\nscope-check.c:17:7: note: scope created by variable length array\n int b[x];\n ^\nscope-check.c:16:7: note: scope created by variable length array\n int a[x];\n ^\n\ninstead of just saying \"invalid jump\". An ObjC example is:\n\nvoid test1() {\n goto L;\n @try {\nL: ;\n } @finally {\n }\n}\n\nt.m:6:3: error: illegal goto into protected scope\n goto L;\n ^\nt.m:7:3: note: scope created by @try block\n @try {\n ^\n\nThere are a whole ton of fixme\'s for stuff to do, but I believe that this\nis a monotonic improvement over what we had.\n\nllvm-svn: 69437"}, | ||
[ | [g]={{I,493,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::ObjCAtTryStmtClass: {\n // ...\n // Recursively walk the AST for the @try part.\n {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_objc_try, diag::note_exits_objc_try, AT->getAtTryLoc()));"}}, | ||
[ | [h]={ | ||
[ | [xc]={"clang/test/SemaObjC/scope-check.m:32:3: note: jump bypasses initialization of @try block","clang/test/SemaObjC/scope-check.m:32:3: note: jump bypasses initialization of @try block","clang/test/SemaObjC/scope-check.m:9:3: note: jump bypasses initialization of @try block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_objc_weak_init"]={ | ["note_protected_by_objc_weak_init"]={ | ||
[e]="jump bypasses initialization of __weak variable", | [e]="jump bypasses initialization of __weak variable", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of __weak variable", | [b]="jump bypasses initialization of __weak variable", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"}, | ||
[ | [g]={{I,166,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (VD->hasLocalStorage()) {\n // ...\n case QualType::DK_objc_weak_lifetime:\n return ScopePair(diag::note_protected_by_objc_weak_init, diag::note_exits_objc_weak);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:46:13: note: jump bypasses initialization of __weak variable"} | ["clang/test/SemaObjC/mrc-weak.m"]={"clang/test/SemaObjC/mrc-weak.m:46:13: note: jump bypasses initialization of __weak variable"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_seh_except"]={ | ["note_protected_by_seh_except"]={ | ||
[e]="jump bypasses initialization of __except block", | [e]="jump bypasses initialization of __except block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of __except block", | [b]="jump bypasses initialization of __except block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.\n\nThou shall not jump into SEH blocks. Jumping out of SEH __...","Implement jump scope SEHmantic analysis.\n\nThou shall not jump into SEH blocks. Jumping out of SEH __try and __excepts\nis A-ok. Jumping out of __finally blocks is B-ok (msvc doesn\'t error about it,\nbut warns that it has undefined behavior).\n\nI\'ve checked that clang\'s behavior with this patch matches msvc\'s behavior.\nWe don\'t have the warning on jumping out of a __finally yet, see the FIXME\nin the test. clang also currently crashes on codegen for a jump out of a\n__finally block, see PR22414 comment 7.\n\nI also added a few tests for the interaction of indirect jumps and SEH blocks.\nMSVC doesn\'t support indirect jumps, so there\'s no way to know if clang behave\nthe same way as msvc here. clang\'s behavior with this patch does make sense\nto me, but maybe it could be argued that it should be more permissive (see\nFIXME in the indirect jump tests -- shout if you have an opinion on this).\n\nllvm-svn: 227982"}, | ||
[ | [g]={{I,443,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::SEHTryStmtClass: {\n // ...\n // Jump from __except or __finally into the __try are not allowed either.\n if (SEHExceptStmt *Except = TS->getExceptHandler()) {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_seh_except, diag::note_exits_seh_except, Except->getSourceRange().getBegin()));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:460:5: note: jump bypasses initialization of __except block","clang/test/SemaCXX/scope-check.cpp:527:5: note: jump bypasses initialization of __except block","clang/test/SemaCXX/scope-check.cpp:563:5: note: jump bypasses initialization of __except block"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:460:5: note: jump bypasses initialization of __except block","clang/test/SemaCXX/scope-check.cpp:527:5: note: jump bypasses initialization of __except block","clang/test/SemaCXX/scope-check.cpp:563:5: note: jump bypasses initialization of __except block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_seh_finally"]={ | ["note_protected_by_seh_finally"]={ | ||
[e]="jump bypasses initialization of __finally block", | [e]="jump bypasses initialization of __finally block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of __finally block", | [b]="jump bypasses initialization of __finally block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.\n\nThou shall not jump into SEH blocks. Jumping out of SEH __...","Implement jump scope SEHmantic analysis.\n\nThou shall not jump into SEH blocks. Jumping out of SEH __try and __excepts\nis A-ok. Jumping out of __finally blocks is B-ok (msvc doesn\'t error about it,\nbut warns that it has undefined behavior).\n\nI\'ve checked that clang\'s behavior with this patch matches msvc\'s behavior.\nWe don\'t have the warning on jumping out of a __finally yet, see the FIXME\nin the test. clang also currently crashes on codegen for a jump out of a\n__finally block, see PR22414 comment 7.\n\nI also added a few tests for the interaction of indirect jumps and SEH blocks.\nMSVC doesn\'t support indirect jumps, so there\'s no way to know if clang behave\nthe same way as msvc here. clang\'s behavior with this patch does make sense\nto me, but maybe it could be argued that it should be more permissive (see\nFIXME in the indirect jump tests -- shout if you have an opinion on this).\n\nllvm-svn: 227982"}, | ||
[ | [g]={{I,450,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::SEHTryStmtClass: {\n // ...\n // Jump from __except or __finally into the __try are not allowed either.\n if (SEHExceptStmt *Except = TS->getExceptHandler()) {\n // ...\n } else if (SEHFinallyStmt *Finally = TS->getFinallyHandler()) {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_seh_finally, diag::note_exits_seh_finally, Finally->getSourceRange().getBegin()));"},{I,940,"/// CheckJump - Validate that the specified jump statement is valid: that it is\n/// jumping within or out of its current scope, not into a deeper one.\nvoid JumpScopeChecker::CheckJump(Stmt *From, Stmt *To, SourceLocation DiagLoc, unsigned JumpDiagError, unsigned JumpDiagWarning, unsigned JumpDiagCXX98Compat) {\n // ...\n // Warn on gotos out of __finally blocks.\n if (isa<GotoStmt>(From) || isa<IndirectGotoStmt>(From)) {\n // If FromScope > ToScope, FromScope is more nested and the jump goes to a\n // less nested scope. Check if it crosses a __finally along the way.\n for (unsigned I = FromScope; I > ToScope; I = Scopes[I].ParentScope) {\n if (Scopes[I].InDiag == diag::note_protected_by_seh_finally) {"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:476:5: note: jump bypasses initialization of __finally block","clang/test/SemaCXX/scope-check.cpp:543:5: note: jump bypasses initialization of __finally block","clang/test/SemaCXX/scope-check.cpp:573:5: note: jump bypasses initialization of __finally block"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:476:5: note: jump bypasses initialization of __finally block","clang/test/SemaCXX/scope-check.cpp:543:5: note: jump bypasses initialization of __finally block","clang/test/SemaCXX/scope-check.cpp:573:5: note: jump bypasses initialization of __finally block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_seh_try"]={ | ["note_protected_by_seh_try"]={ | ||
[e]="jump bypasses initialization of __try block", | [e]="jump bypasses initialization of __try block", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of __try block", | [b]="jump bypasses initialization of __try block", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.\n\nThou shall not jump into SEH blocks. Jumping out of SEH __...","Implement jump scope SEHmantic analysis.\n\nThou shall not jump into SEH blocks. Jumping out of SEH __try and __excepts\nis A-ok. Jumping out of __finally blocks is B-ok (msvc doesn\'t error about it,\nbut warns that it has undefined behavior).\n\nI\'ve checked that clang\'s behavior with this patch matches msvc\'s behavior.\nWe don\'t have the warning on jumping out of a __finally yet, see the FIXME\nin the test. clang also currently crashes on codegen for a jump out of a\n__finally block, see PR22414 comment 7.\n\nI also added a few tests for the interaction of indirect jumps and SEH blocks.\nMSVC doesn\'t support indirect jumps, so there\'s no way to know if clang behave\nthe same way as msvc here. clang\'s behavior with this patch does make sense\nto me, but maybe it could be argued that it should be more permissive (see\nFIXME in the indirect jump tests -- shout if you have an opinion on this).\n\nllvm-svn: 227982"}, | ||
[ | [g]={{I,432,"/// BuildScopeInformation - The statements from CI to CE are known to form a\n/// coherent VLA scope with a specified parent node. Walk through the\n/// statements, adding any labels or gotos to LabelAndGotoScopes and recursively\n/// walking the AST as needed.\nvoid JumpScopeChecker::BuildScopeInformation(Stmt *S, unsigned &origParentScope) {\n // ...\n case Stmt::SEHTryStmtClass: {\n // ...\n {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_protected_by_seh_try, diag::note_exits_seh_try, TS->getSourceRange().getBegin()));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:452:3: note: jump bypasses initialization of __try block","clang/test/SemaCXX/scope-check.cpp:468:3: note: jump bypasses initialization of __try block","clang/test/SemaCXX/scope-check.cpp:532:3: note: jump bypasses initialization of __try block","clang/test/SemaCXX/scope-check.cpp:548:3: note: jump bypasses initialization of __try block"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:452:3: note: jump bypasses initialization of __try block","clang/test/SemaCXX/scope-check.cpp:468:3: note: jump bypasses initialization of __try block","clang/test/SemaCXX/scope-check.cpp:532:3: note: jump bypasses initialization of __try block","clang/test/SemaCXX/scope-check.cpp:548:3: note: jump bypasses initialization of __try block"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_variable_init"]={ | ["note_protected_by_variable_init"]={ | ||
[e]="jump bypasses variable initialization", | [e]="jump bypasses variable initialization", | ||
[ | [a]=k, | ||
[b]="jump bypasses variable initialization", | [b]="jump bypasses variable initialization", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"30d0cfda354e",1267477193,"Implement jump checking for initialized c++ variables, implementing\na fixme and PR6451.\n\nOnly perfor...","Implement jump checking for initialized c++ variables, implementing\na fixme and PR6451.\n\nOnly perform jump checking if the containing function has no errors,\nand add the infrastructure needed to do this.\n\nOn the testcase in the PR, we produce:\n\nt.cc:6:3: error: illegal goto into protected scope\n goto later;\n ^\nt.cc:7:5: note: jump bypasses variable initialization\n X x;\n ^\n\nllvm-svn: 97497"}, | ||
[ | [g]={{I,198,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (S.Context.getLangOpts().CPlusPlus && VD->hasLocalStorage() && Init) {\n // ...\n InDiag = diag::note_protected_by_variable_init;"},{I,846,"static bool IsMicrosoftJumpWarning(unsigned JumpDiag, unsigned InDiagNote) { return (JumpDiag == diag::err_goto_into_protected_scope && (InDiagNote == diag::note_protected_by_variable_init || InDiagNote == diag::note_protected_by_variable_nontriv_destructor)); }"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/goto.cpp"]={"clang/test/SemaCXX/goto.cpp:113:13: note: jump bypasses variable initialization"} | ["clang/test/SemaCXX/goto.cpp"]={"clang/test/SemaCXX/goto.cpp:113:13: note: jump bypasses variable initialization"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_variable_non_pod"]={ | ["note_protected_by_variable_non_pod"]={ | ||
[e]="jump bypasses initialization of non-POD variable", | [e]="jump bypasses initialization of non-POD variable", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of non\\-POD variable", | [b]="jump bypasses initialization of non\\-POD variable", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"fe2750db42c0",1319146932,"Add -Wc++98-compat diagnostics for jumps which bypass initialization of non-POD\nbut trivially constr...","Add -Wc++98-compat diagnostics for jumps which bypass initialization of non-POD\nbut trivially constructible and destructible variables in C++11 mode. Also\nincidentally improve the precision of the wording for jump diagnostics in C++98\nmode.\n\nllvm-svn: 142619"}, | ||
[ | [g]={{I,210,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (S.Context.getLangOpts().CPlusPlus && VD->hasLocalStorage() && Init) {\n // ...\n // For a variable of (array of) class type declared without an\n // initializer, we will have call-style initialization and the initializer\n // will be the CXXConstructExpr with no intervening nodes.\n if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init)) {\n // ...\n if (Ctor->isTrivial() && Ctor->isDefaultConstructor() && VD->getInitStyle() == VarDecl::CallInit) {\n if (OutDiag)\n // ...\n else if (!Ctor->getParent()->isPOD())\n InDiag = diag::note_protected_by_variable_non_pod;"},{I,854,"static bool IsCXX98CompatWarning(Sema &S, unsigned InDiagNote) { return S.getLangOpts().CPlusPlus11 && InDiagNote == diag::note_protected_by_variable_non_pod; }"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/stmt.stmt/stmt.dcl/p3.cpp"]={"clang/test/CXX/stmt.stmt/stmt.dcl/p3.cpp:50:5: note: jump bypasses initialization of non-POD variable"} | ["clang/test/CXX/stmt.stmt/stmt.dcl/p3.cpp"]={"clang/test/CXX/stmt.stmt/stmt.dcl/p3.cpp:50:5: note: jump bypasses initialization of non-POD variable"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_variable_nontriv_destructor"]={ | ["note_protected_by_variable_nontriv_destructor"]={ | ||
[e]="jump bypasses variable with a non-trivial destructor", | [e]="jump bypasses variable with a non-trivial destructor", | ||
[ | [a]=k, | ||
[b]="jump bypasses variable with a non\\-trivial destructor", | [b]="jump bypasses variable with a non\\-trivial destructor", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1778b030c0dc",1308108214,"Properly implement C++0x [stmt.dcl]p3, which requires a scope to be\nprotected in the case where a va...","Properly implement C++0x [stmt.dcl]p3, which requires a scope to be\nprotected in the case where a variable is being initialized by a\ntrivial default constructor but has a non-trivial destructor.\n\nllvm-svn: 133037"}, | ||
[ | [g]={{I,208,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (S.Context.getLangOpts().CPlusPlus && VD->hasLocalStorage() && Init) {\n // ...\n // For a variable of (array of) class type declared without an\n // initializer, we will have call-style initialization and the initializer\n // will be the CXXConstructExpr with no intervening nodes.\n if (const CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init)) {\n // ...\n if (Ctor->isTrivial() && Ctor->isDefaultConstructor() && VD->getInitStyle() == VarDecl::CallInit) {\n if (OutDiag)\n InDiag = diag::note_protected_by_variable_nontriv_destructor;"},{I,847,"static bool IsMicrosoftJumpWarning(unsigned JumpDiag, unsigned InDiagNote) { return (JumpDiag == diag::err_goto_into_protected_scope && (InDiagNote == diag::note_protected_by_variable_init || InDiagNote == diag::note_protected_by_variable_nontriv_destructor)); }"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp"]={"clang/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp:39:7: note: jump bypasses variable with a non-trivial destructor","clang/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp:34:5: note: jump bypasses variable with a non-trivial destructor"} | ["clang/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp"]={"clang/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp:39:7: note: jump bypasses variable with a non-trivial destructor","clang/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp:34:5: note: jump bypasses variable with a non-trivial destructor"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_vla"]={ | ["note_protected_by_vla"]={ | ||
[e]="jump bypasses initialization of variable length array", | [e]="jump bypasses initialization of variable length array", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of variable length array", | [b]="jump bypasses initialization of variable length array", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"960cc525ec72",1240047387,"rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and ...","rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and be more correct in ObjC cases (fixing\nrdar://6803963).\n\nAn example is that we now diagnose:\n\nint test1(int x) {\n goto L;\n int a[x];\n int b[x];\n L:\n return sizeof a;\n}\n\nwith:\n\nscope-check.c:15:3: error: illegal goto into protected scope\n goto L;\n ^\nscope-check.c:17:7: note: scope created by variable length array\n int b[x];\n ^\nscope-check.c:16:7: note: scope created by variable length array\n int a[x];\n ^\n\ninstead of just saying \"invalid jump\". An ObjC example is:\n\nvoid test1() {\n goto L;\n @try {\nL: ;\n } @finally {\n }\n}\n\nt.m:6:3: error: illegal goto into protected scope\n goto L;\n ^\nt.m:7:3: note: scope created by @try block\n @try {\n ^\n\nThere are a whole ton of fixme\'s for stuff to do, but I believe that this\nis a monotonic improvement over what we had.\n\nllvm-svn: 69437"}, | ||
[ | [g]={{I,149,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n if (VD->getType()->isVariablyModifiedType())\n InDiag = diag::note_protected_by_vla;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/vla.c"]={"clang/test/Sema/vla.c:95:7: note: jump bypasses initialization of variable length array","clang/test/Sema/vla.c:120:8: note: jump bypasses initialization of variable length array","clang/test/Sema/vla.c:108:8: note: jump bypasses initialization of variable length array"} | ["clang/test/Sema/vla.c"]={"clang/test/Sema/vla.c:95:7: note: jump bypasses initialization of variable length array","clang/test/Sema/vla.c:120:8: note: jump bypasses initialization of variable length array","clang/test/Sema/vla.c:108:8: note: jump bypasses initialization of variable length array"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_vla_type_alias"]={ | ["note_protected_by_vla_type_alias"]={ | ||
[e]="jump bypasses initialization of VLA type alias", | [e]="jump bypasses initialization of VLA type alias", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of VLA type alias", | [b]="jump bypasses initialization of VLA type alias", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"dda56e4b4a9c",1302877477,"Support for C++11 (non-template) alias declarations.\n\nllvm-svn: 129567","Support for C++11 (non-template) alias declarations.\n\nllvm-svn: 129567"}, | ||
[ | [g]={{I,224,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n // ...\n if (const TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) {\n if (TD->getUnderlyingType()->isVariablyModifiedType())\n return ScopePair(isa<TypedefDecl>(TD) ? diag::note_protected_by_vla_typedef : diag::note_protected_by_vla_type_alias, 0);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:48:11: note: jump bypasses initialization of VLA type alias"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:48:11: note: jump bypasses initialization of VLA type alias"} | ||
} | } | ||
}, | }, | ||
["note_protected_by_vla_typedef"]={ | ["note_protected_by_vla_typedef"]={ | ||
[e]="jump bypasses initialization of VLA typedef", | [e]="jump bypasses initialization of VLA typedef", | ||
[ | [a]=k, | ||
[b]="jump bypasses initialization of VLA typedef", | [b]="jump bypasses initialization of VLA typedef", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"960cc525ec72",1240047387,"rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and ...","rewrite the goto scope checking code to be more efficient, simpler,\nproduce better diagnostics, and be more correct in ObjC cases (fixing\nrdar://6803963).\n\nAn example is that we now diagnose:\n\nint test1(int x) {\n goto L;\n int a[x];\n int b[x];\n L:\n return sizeof a;\n}\n\nwith:\n\nscope-check.c:15:3: error: illegal goto into protected scope\n goto L;\n ^\nscope-check.c:17:7: note: scope created by variable length array\n int b[x];\n ^\nscope-check.c:16:7: note: scope created by variable length array\n int a[x];\n ^\n\ninstead of just saying \"invalid jump\". An ObjC example is:\n\nvoid test1() {\n goto L;\n @try {\nL: ;\n } @finally {\n }\n}\n\nt.m:6:3: error: illegal goto into protected scope\n goto L;\n ^\nt.m:7:3: note: scope created by @try block\n @try {\n ^\n\nThere are a whole ton of fixme\'s for stuff to do, but I believe that this\nis a monotonic improvement over what we had.\n\nllvm-svn: 69437"}, | ||
[ | [g]={{I,223,"/// GetDiagForGotoScopeDecl - If this decl induces a new goto scope, return a\n/// diagnostic that should be emitted if control goes over it. If not, return 0.\nstatic ScopePair GetDiagForGotoScopeDecl(Sema &S, const Decl *D) {\n // ...\n if (const TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) {\n if (TD->getUnderlyingType()->isVariablyModifiedType())\n return ScopePair(isa<TypedefDecl>(TD) ? diag::note_protected_by_vla_typedef : diag::note_protected_by_vla_type_alias, 0);"}}, | ||
[ | [h]={ | ||
[ | [xc]={"clang/test/SemaObjC/scope-check.m:88:17: note: jump bypasses initialization of VLA typedef"} | ||
} | } | ||
}, | }, | ||
["note_protocol_decl"]={ | ["note_protocol_decl"]={ | ||
[e]="protocol is declared here", | [e]="protocol is declared here", | ||
[ | [a]=k, | ||
[b]="protocol is declared here", | [b]="protocol is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"566fff0dac54",1347061583,"objective-C: introduce __attribute((objc_requires_super)) on method\nin classes. Use it to flag those...","objective-C: introduce __attribute((objc_requires_super)) on method\nin classes. Use it to flag those method implementations which don\'t\ncontain call to \'super\' if they have \'super\' class and it has the method\nwith this attribute set. This is wip. // rdar://6386358\n\nllvm-svn: 163434"}, | ||
[ | [g]={{o,6133,"static void handleObjCRequiresSuperAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (const auto *PDecl = dyn_cast_or_null<ObjCProtocolDecl>(DC)) {\n // ...\n S.Diag(PDecl->getLocation(), diag::note_protocol_decl);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/super-dealloc-attribute.m"]={"clang/test/SemaObjC/super-dealloc-attribute.m:11:11: note: protocol is declared here"} | ["clang/test/SemaObjC/super-dealloc-attribute.m"]={"clang/test/SemaObjC/super-dealloc-attribute.m:11:11: note: protocol is declared here"} | ||
} | } | ||
}, | }, | ||
["note_protocol_decl_undefined"]={ | ["note_protocol_decl_undefined"]={ | ||
[e]="protocol %0 has no definition", | [e]="protocol %0 has no definition", | ||
[ | [a]=k, | ||
[b]="protocol (.*?) has no definition", | [b]="protocol (.*?) has no definition", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"bf678e82e12d",1394557851,"Objective-C. Diagose use of undefined protocols\nwhen a class adopts a protocol that inherits from \nu...","Objective-C. Diagose use of undefined protocols\nwhen a class adopts a protocol that inherits from \nundefined protocols. // rdar://16111182\n\nllvm-svn: 203586"}, | ||
[ | [g]={{u,1352,"/// FindProtocolDeclaration - This routine looks up protocols and\n/// issues an error if they are not declared. It returns list of\n/// protocol declarations in its \'Protocols\' argument.\nvoid Sema::FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef<IdentifierLocPair> ProtocolId, SmallVectorImpl<Decl *> &Protocols) {\n for (const IdentifierLocPair &Pair : ProtocolId) {\n // ...\n if (WarnOnDeclarations && NestedProtocolHasNoDefinition(PDecl, UndefinedProtocol)) {\n // ...\n Diag(UndefinedProtocol->getLocation(), diag::note_protocol_decl_undefined) << UndefinedProtocol;"},{u,1489,"void Sema::actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef<IdentifierInfo *> identifiers, ArrayRef<SourceLocation> identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl<ParsedType> &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl<Decl *> &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols) {\n // ...\n auto resolvedAsProtocols = [&] {\n // ...\n for (unsigned i = 0, n = protocols.size(); i != n; ++i) {\n // ...\n if (warnOnIncompleteProtocols && NestedProtocolHasNoDefinition(proto, forwardDecl)) {\n // ...\n Diag(forwardDecl->getLocation(), diag::note_protocol_decl_undefined) << forwardDecl;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/class-def-test-1.m"]={"clang/test/SemaObjC/class-def-test-1.m:3:11: note: protocol \'SUPER\' has no definition"} | ["clang/test/SemaObjC/class-def-test-1.m"]={"clang/test/SemaObjC/class-def-test-1.m:3:11: note: protocol \'SUPER\' has no definition"} | ||
} | } | ||
}, | }, | ||
["note_protocol_method"]={ | ["note_protocol_method"]={ | ||
[e]="protocol method is here", | [e]="protocol method is here", | ||
[ | [a]=k, | ||
[b]="protocol method is here", | [b]="protocol method is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d2a713e41bd3",1443648462,"Don\'t inherit availability information when implementing a protocol requirement.\n\nWhen an Objective-...","Don\'t inherit availability information when implementing a protocol requirement.\n\nWhen an Objective-C method implements a protocol requirement, do not\ninherit any availability information from the protocol\nrequirement. Rather, check that the implementation is not less\navailable than the protocol requirement, as we do when overriding a\nmethod that has availability. Fixes rdar://problem/22734745.\n\nllvm-svn: 248949"}, | ||
[ | [g]={{o,2548,"AvailabilityAttr *Sema::mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority) {\n // ...\n if (D->hasAttrs()) {\n // ...\n for (unsigned i = 0, e = Attrs.size(); i != e;) {\n // ...\n if (!versionsMatch(OldIntroduced, Introduced, OverrideOrImpl) || !versionsMatch(Deprecated, OldDeprecated, OverrideOrImpl) || !versionsMatch(Obsoleted, OldObsoleted, OverrideOrImpl) || !(OldIsUnavailable == IsUnavailable || (OverrideOrImpl && !OldIsUnavailable && IsUnavailable))) {\n if (OverrideOrImpl) {\n // ...\n if (AMK == AMK_Override)\n // ...\n else\n Diag(CI.getLoc(), diag::note_protocol_method);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/override-opt-prop-availability.m"]={"clang/test/SemaObjC/override-opt-prop-availability.m:19:42: note: protocol method is here","clang/test/SemaObjC/override-opt-prop-availability.m:5:50: note: protocol method is here","clang/test/SemaObjC/override-opt-prop-availability.m:5:50: note: protocol method is here","clang/test/SemaObjC/override-opt-prop-availability.m:13:60: note: protocol method is here"} | ["clang/test/SemaObjC/override-opt-prop-availability.m"]={"clang/test/SemaObjC/override-opt-prop-availability.m:19:42: note: protocol method is here","clang/test/SemaObjC/override-opt-prop-availability.m:5:50: note: protocol method is here","clang/test/SemaObjC/override-opt-prop-availability.m:5:50: note: protocol method is here","clang/test/SemaObjC/override-opt-prop-availability.m:13:60: note: protocol method is here"} | ||
} | } | ||
}, | }, | ||
["note_protocol_property_declare"]={ | ["note_protocol_property_declare"]={ | ||
[e]="it could also be property %select{of type %1|without attribute \'%1\'|with attribute \'%1\'|with getter %1|with setter %1}0 declared here", | [e]="it could also be property %select{of type %1|without attribute \'%1\'|with attribute \'%1\'|with getter %1|with setter %1}0 declared here", | ||
[ | [a]=k, | ||
[b]="it could also be property (?:of type (.*?)|without attribute \'(.*?)\'|with attribute \'(.*?)\'|with getter (.*?)|with setter (.*?)) declared here", | [b]="it could also be property (?:of type (.*?)|without attribute \'(.*?)\'|with attribute \'(.*?)\'|with getter (.*?)|with setter (.*?)) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0ebf87959fff",1369084824,"Objective-C [qoi]: When an class conforms to multiple\nprotocols that declare the same property of in...","Objective-C [qoi]: When an class conforms to multiple\nprotocols that declare the same property of incompatible\ntypes, issue a warning when class implementation synthesizes \nthe property. // rdar://13075400\n\nllvm-svn: 182316"}, | ||
[ | [g]={{x,990,"/// SelectPropertyForSynthesisFromProtocols - Finds the most appropriate\n/// property declaration that should be synthesised in all of the inherited\n/// protocols. It also diagnoses properties declared in inherited protocols with\n/// mismatched types or attributes, since any of them can be candidate for\n/// synthesis.\nstatic ObjCPropertyDecl *SelectPropertyForSynthesisFromProtocols(Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property) {\n // ...\n for (const auto &Note : Mismatches) {\n auto Diag = S.Diag(Note.Prop->getLocation(), diag::note_protocol_property_declare) << Note.Kind;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/property-ambiguous-synthesis.m"]={"clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: note: it could also be property of type \'id\' declared here","clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: note: it could also be property of type \'id\' declared here","clang/test/SemaObjC/property-ambiguous-synthesis.m:15:17: note: it could also be property of type \'short\' declared here","clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: note: it could also be property of type \'double\' declared here"} | ["clang/test/SemaObjC/property-ambiguous-synthesis.m"]={"clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: note: it could also be property of type \'id\' declared here","clang/test/SemaObjC/property-ambiguous-synthesis.m:5:23: note: it could also be property of type \'id\' declared here","clang/test/SemaObjC/property-ambiguous-synthesis.m:15:17: note: it could also be property of type \'short\' declared here","clang/test/SemaObjC/property-ambiguous-synthesis.m:10:18: note: it could also be property of type \'double\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_pure_qualified_call_kext"]={ | ["note_pure_qualified_call_kext"]={ | ||
[e]="qualified call to %0::%1 is treated as a virtual call to %1 due to -fapple-kext", | [e]="qualified call to %0::%1 is treated as a virtual call to %1 due to -fapple-kext", | ||
[ | [a]=k, | ||
[b]="qualified call to (.*?)\\:\\:(.*?) is treated as a virtual call to (.*?) due to \\-fapple\\-kext", | [b]="qualified call to (.*?)\\:\\:(.*?) is treated as a virtual call to (.*?) due to \\-fapple\\-kext", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ccb373852758",1436916970,"[Sema] Don\'t emit \"pure virtual\" warning for fully qualified calls.\n\n-fapple-kext is an exception be...","[Sema] Don\'t emit \"pure virtual\" warning for fully qualified calls.\n\n-fapple-kext is an exception because calls will still go through\nthe vtable in that mode. Add a note to make the user aware of that.\n\nPR: 23215\nDifferential Revision: http://reviews.llvm.org/D10935\n\nllvm-svn: 242246"}, | ||
[ | [g]={{w,14926,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if ((isa<CXXConstructorDecl>(CurContext) || isa<CXXDestructorDecl>(CurContext)) && TheCall->getMethodDecl()->isPure()) {\n // ...\n if (isa<CXXThisExpr>(MemExpr->getBase()->IgnoreParenCasts()) && MemExpr->performsVirtualDispatch(getLangOpts())) {\n // ...\n if (getLangOpts().AppleKext)\n Diag(MemExpr->getBeginLoc(), diag::note_pure_qualified_call_kext) << MD->getParent() << MD->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-pure-virtual-kext.cpp"]={"clang/test/SemaCXX/warn-pure-virtual-kext.cpp:6:9: note: qualified call to \'A\'::\'f\' is treated as a virtual call to \'f\' due to -fapple-kext","clang/test/SemaCXX/warn-pure-virtual-kext.cpp:13:10: note: qualified call to \'TA<int>\'::\'f\' is treated as a virtual call to \'f\' due to -fapple-kext"} | ["clang/test/SemaCXX/warn-pure-virtual-kext.cpp"]={"clang/test/SemaCXX/warn-pure-virtual-kext.cpp:6:9: note: qualified call to \'A\'::\'f\' is treated as a virtual call to \'f\' due to -fapple-kext","clang/test/SemaCXX/warn-pure-virtual-kext.cpp:13:10: note: qualified call to \'TA<int>\'::\'f\' is treated as a virtual call to \'f\' due to -fapple-kext"} | ||
} | } | ||
}, | }, | ||
["note_pure_virtual_function"]={ | ["note_pure_virtual_function"]={ | ||
[e]="unimplemented pure virtual method %0 in %1", | [e]="unimplemented pure virtual method %0 in %1", | ||
[ | [a]=k, | ||
[b]="unimplemented pure virtual method (.*?) in (.*?)", | [b]="unimplemented pure virtual method (.*?) in (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"576cc6f725a8",1237753097,"Disallow abstract types where appropriate.\n\nllvm-svn: 67476","Disallow abstract types where appropriate.\n\nllvm-svn: 67476"}, | ||
[ | [g]={{s,5985,"void Sema::DiagnoseAbstractType(const CXXRecordDecl *RD) {\n // ...\n for (CXXFinalOverriderMap::iterator M = FinalOverriders.begin(), MEnd = FinalOverriders.end(); M != MEnd; ++M) {\n for (OverridingMethods::iterator SO = M->second.begin(), SOEnd = M->second.end(); SO != SOEnd; ++SO) {\n // ...\n Diag(SO->second.front().Method->getLocation(), diag::note_pure_virtual_function) << SO->second.front().Method->getDeclName() << RD->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class.derived/class.abstract/p2.cpp"]={"clang/test/CXX/class.derived/class.abstract/p2.cpp:10:16: note: unimplemented pure virtual method \'f\' in \'A\'"} | ["clang/test/CXX/class.derived/class.abstract/p2.cpp"]={"clang/test/CXX/class.derived/class.abstract/p2.cpp:10:16: note: unimplemented pure virtual method \'f\' in \'A\'"} | ||
} | } | ||
}, | }, | ||
["note_raii_guard_add_name"]={ | ["note_raii_guard_add_name"]={ | ||
[e]="add a variable name to declare a %0 initialized with %1", | [e]="add a variable name to declare a %0 initialized with %1", | ||
[ | [a]=k, | ||
[b]="add a variable name to declare a (.*?) initialized with (.*?)", | [b]="add a variable name to declare a (.*?) initialized with (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast....","Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast.\n\nThis fires for cases such as\n\n T(x);\n\n... where \'x\' was previously declared and T is a type. This construct declares\na variable named \'x\' rather than the (probably expected) interpretation of a\nfunction-style cast of \'x\' to T.\n\nllvm-svn: 314570"}, | ||
[ | [g]={{W,4026,"/// Produce an appropriate diagnostic for a declarator with top-level\n/// parentheses.\nstatic void warnAboutRedundantParens(Sema &S, Declarator &D, QualType T) {\n // ...\n if (!RD || !RD->hasDefinition() || RD->hasNonTrivialDestructor())\n S.Diag(Paren.Loc, diag::note_raii_guard_add_name) << FixItHint::CreateInsertion(Paren.Loc, \" varname\") << T << D.getIdentifier();"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/cxx1z-class-template-argument-deduction.cpp"]={"clang/test/Parser/cxx1z-class-template-argument-deduction.cpp:204:20: note: add a variable name to declare a \'typename T::A\' initialized with \'parens\'"} | ["clang/test/Parser/cxx1z-class-template-argument-deduction.cpp"]={"clang/test/Parser/cxx1z-class-template-argument-deduction.cpp:204:20: note: add a variable name to declare a \'typename T::A\' initialized with \'parens\'"} | ||
} | } | ||
}, | }, | ||
["note_receiver_class_declared"]={ | ["note_receiver_class_declared"]={ | ||
[e]="receiver is instance of class declared here", | [e]="receiver is instance of class declared here", | ||
[ | [a]=k, | ||
[b]="receiver is instance of class declared here", | [b]="receiver is instance of class declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"773df4a11fab",1368573857,"Objective-C [diagnostics] [QOI], when method is not\nfound for a receiver, note where receiver class\n...","Objective-C [diagnostics] [QOI], when method is not\nfound for a receiver, note where receiver class\nis declaraed (this is most common when receiver is a forward\nclass). // rdar://3258331\n\nllvm-svn: 181847"}, | ||
[ | [g]={{fb,1771,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n // ...\n if (!Method) {\n // ...\n if (!getLangOpts().DebuggerSupport) {\n // ...\n // Find the class to which we are sending this message.\n if (auto *ObjPT = ReceiverType->getAs<ObjCObjectPointerType>()) {\n if (ObjCInterfaceDecl *ThisClass = ObjPT->getInterfaceDecl()) {\n Diag(ThisClass->getLocation(), diag::note_receiver_class_declared);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/missing-atend-metadata.m"]={"clang/test/SemaObjC/missing-atend-metadata.m:3:12: note: receiver is instance of class declared here"} | ["clang/test/SemaObjC/missing-atend-metadata.m"]={"clang/test/SemaObjC/missing-atend-metadata.m:3:12: note: receiver is instance of class declared here"} | ||
} | } | ||
}, | }, | ||
["note_receiver_expr_here"]={ | ["note_receiver_expr_here"]={ | ||
[e]="receiver expression is here", | [e]="receiver expression is here", | ||
[ | [a]=k, | ||
[b]="receiver expression is here", | [b]="receiver expression is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"19c2e2fab2e9",1408491557,"Objective-C [qoi]. Provide fix-it hint when sending\nclass method to an object receiver. rdar://16263...","Objective-C [qoi]. Provide fix-it hint when sending\nclass method to an object receiver. rdar://16263395\n\nllvm-svn: 216038"}, | ||
[ | [g]={{fb,1774,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n // ...\n if (!Method) {\n // ...\n if (!getLangOpts().DebuggerSupport) {\n // ...\n // Find the class to which we are sending this message.\n if (auto *ObjPT = ReceiverType->getAs<ObjCObjectPointerType>()) {\n if (ObjCInterfaceDecl *ThisClass = ObjPT->getInterfaceDecl()) {\n // ...\n if (!RecRange.isInvalid())\n if (ThisClass->lookupClassMethod(Sel))\n Diag(RecRange.getBegin(), diag::note_receiver_expr_here) << FixItHint::CreateReplacement(RecRange, ThisClass->getNameAsString());"}}, | ||
[ | [h]={ | ||
["clang/test/FixIt/fixit-class-method-messaging.m"]={"clang/test/FixIt/fixit-class-method-messaging.m:18:5: note: receiver expression is here","clang/test/FixIt/fixit-class-method-messaging.m:21:4: note: receiver expression is here","clang/test/FixIt/fixit-class-method-messaging.m:24:11: note: receiver expression is here"} | ["clang/test/FixIt/fixit-class-method-messaging.m"]={"clang/test/FixIt/fixit-class-method-messaging.m:18:5: note: receiver expression is here","clang/test/FixIt/fixit-class-method-messaging.m:21:4: note: receiver expression is here","clang/test/FixIt/fixit-class-method-messaging.m:24:11: note: receiver expression is here"} | ||
} | } | ||
}, | }, | ||
["note_receiver_is_id"]={ | ["note_receiver_is_id"]={ | ||
[e]="receiver is treated with \'id\' type for purpose of method lookup", | [e]="receiver is treated with \'id\' type for purpose of method lookup", | ||
[ | [a]=k, | ||
[b]="receiver is treated with \'id\' type for purpose of method lookup", | [b]="receiver is treated with \'id\' type for purpose of method lookup", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c934de67e0c6",1328230964,"objc: Issue diagnostic when receiver type is a forward class declaration and\nit is treated as of \'id...","objc: Issue diagnostic when receiver type is a forward class declaration and\nit is treated as of \'id\' type resulting in multiple method lookup.\n// rdar://10686120\n\nllvm-svn: 149653"}, | ||
[ | [g]={{fb,3074,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (!Method) {\n // ...\n if (receiverIsIdLike || ReceiverType->isBlockPointerType() || (Receiver && Context.isObjCNSObjectType(Receiver->getType()))) {\n // ...\n } else if (ReceiverType->isObjCClassOrClassKindOfType() || ReceiverType->isObjCQualifiedClassType()) {\n // ...\n } else {\n // ...\n // We allow sending a message to a qualified ID (\"id<foo>\"), which is ok as\n // long as one of the protocols implements the selector (if not, warn).\n // And as long as message is not deprecated/unavailable (warn if it is).\n if (const ObjCObjectPointerType *QIdTy = ReceiverType->getAsObjCQualifiedIdType()) {\n // ...\n } else if (const ObjCObjectPointerType *OCIType = ReceiverType->getAsObjCInterfacePointerType()) {\n // ...\n if (RequireCompleteType(Loc, OCIType->getPointeeType(), getLangOpts().ObjCAutoRefCount ? diag::err_arc_receiver_forward_instance : diag::warn_receiver_forward_instance, RecRange)) {\n // ...\n Diag(Receiver ? Receiver->getBeginLoc() : SuperLoc, diag::note_receiver_is_id);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/receiver-forward-class.m"]={"clang/test/SemaObjC/receiver-forward-class.m:15:11: note: receiver is treated with \'id\' type for purpose of method lookup"} | ["clang/test/SemaObjC/receiver-forward-class.m"]={"clang/test/SemaObjC/receiver-forward-class.m:15:11: note: receiver is treated with \'id\' type for purpose of method lookup"} | ||
} | } | ||
}, | }, | ||
["note_recursive_default_argument_used_here"]={ | ["note_recursive_default_argument_used_here"]={ | ||
[e]="default argument used here", | [e]="default argument used here", | ||
[ | [a]=k, | ||
[b]="default argument used here", | [b]="default argument used here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{v,6032,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n // If we\'ve already cleared out the location for the default argument,\n // that means we\'re parsing it right now.\n if (!UnparsedDefaultArgLocs.count(Param)) {\n // ...\n Diag(CallLoc, diag::note_recursive_default_argument_used_here);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:46:29: note: default argument used here"} | ["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:46:29: note: default argument used here"} | ||
} | } | ||
}, | }, | ||
["note_redefinition_include_same_file"]={ | ["note_redefinition_include_same_file"]={ | ||
[e]="\'%0\' included multiple times, additional include site here", | [e]="\'%0\' included multiple times, additional include site here", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' included multiple times, additional include site here", | [b]="\'(.*?)\' included multiple times, additional include site here", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={"0ad318217917",1494483607,"[Sema] Improve redefinition errors pointing to the same header\n\nDiagnostics related to redefinition ...","[Sema] Improve redefinition errors pointing to the same header\n\nDiagnostics related to redefinition errors that point to the same header\nfile do not provide much information that helps users fixing the issue.\n\n- In the modules context, it usually happens because of non modular\nincludes.\n- When modules aren\'t involved it might happen because of the lack of\nheader guards.\n\nEnhance diagnostics in these scenarios.\n\nDifferential Revision: https://reviews.llvm.org/D28832\n\nrdar://problem/31669175\n\nllvm-svn: 302765"}, | ||
[ | [g]={{p,4786,"void Sema::notePreviousDefinition(const NamedDecl *Old, SourceLocation New) {\n // ...\n auto noteFromModuleOrInclude = [&](Module *Mod, SourceLocation IncLoc) -> bool {\n // Redefinition errors with modules are common with non modular mapped\n // headers, example: a non-modular header H in module A that also gets\n // included directly in a TU. Pointing twice to the same header/definition\n // is confusing, try to get better diagnostics when modules is on.\n if (IncLoc.isValid()) {\n if (Mod) {\n // ...\n } else {\n Diag(IncLoc, diag::note_redefinition_include_same_file) << HdrFilename.str();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/redefinition-same-header.c"]={"clang/test/Sema/redefinition-same-header.c:11:10: note: \'build/tools/clang/test/Sema/Output/redefinition-same-header.c.tmp/a.h\' included multiple times, additional include site here","clang/test/Sema/redefinition-same-header.c:12:10: note: \'build/tools/clang/test/Sema/Output/redefinition-same-header.c.tmp/a.h\' included multiple times, additional include site here"} | ["clang/test/Sema/redefinition-same-header.c"]={"clang/test/Sema/redefinition-same-header.c:11:10: note: \'build/tools/clang/test/Sema/Output/redefinition-same-header.c.tmp/a.h\' included multiple times, additional include site here","clang/test/Sema/redefinition-same-header.c:12:10: note: \'build/tools/clang/test/Sema/Output/redefinition-same-header.c.tmp/a.h\' included multiple times, additional include site here"} | ||
} | } | ||
}, | }, | ||
["note_redefinition_modules_same_file"]={ | ["note_redefinition_modules_same_file"]={ | ||
[e]="\'%0\' included multiple times, additional include site in header from module \'%1\'", | [e]="\'%0\' included multiple times, additional include site in header from module \'%1\'", | ||
[ | [a]=k, | ||
[b]="\'(.*?)\' included multiple times, additional include site in header from module \'(.*?)\'", | [b]="\'(.*?)\' included multiple times, additional include site in header from module \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={"0ad318217917",1494483607,"[Sema] Improve redefinition errors pointing to the same header\n\nDiagnostics related to redefinition ...","[Sema] Improve redefinition errors pointing to the same header\n\nDiagnostics related to redefinition errors that point to the same header\nfile do not provide much information that helps users fixing the issue.\n\n- In the modules context, it usually happens because of non modular\nincludes.\n- When modules aren\'t involved it might happen because of the lack of\nheader guards.\n\nEnhance diagnostics in these scenarios.\n\nDifferential Revision: https://reviews.llvm.org/D28832\n\nrdar://problem/31669175\n\nllvm-svn: 302765"}, | ||
[ | [g]={{p,4780,"void Sema::notePreviousDefinition(const NamedDecl *Old, SourceLocation New) {\n // ...\n auto noteFromModuleOrInclude = [&](Module *Mod, SourceLocation IncLoc) -> bool {\n // Redefinition errors with modules are common with non modular mapped\n // headers, example: a non-modular header H in module A that also gets\n // included directly in a TU. Pointing twice to the same header/definition\n // is confusing, try to get better diagnostics when modules is on.\n if (IncLoc.isValid()) {\n if (Mod) {\n Diag(IncLoc, diag::note_redefinition_modules_same_file) << HdrFilename.str() << Mod->getFullModuleName();"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/redefinition-same-header.m"]={"clang/test/Modules/Inputs/SameHeader/B.h:3:10: note: \'clang/test/Modules/Inputs/SameHeader/C.h\' included multiple times, additional include site in header from module \'X.B\'"} | ["clang/test/Modules/redefinition-same-header.m"]={"clang/test/Modules/Inputs/SameHeader/B.h:3:10: note: \'clang/test/Modules/Inputs/SameHeader/C.h\' included multiple times, additional include site in header from module \'X.B\'"} | ||
} | } | ||
}, | }, | ||
["note_ref_or_ptr_member_declared_here"]={ | ["note_ref_or_ptr_member_declared_here"]={ | ||
[e]="%select{reference|pointer}0 member declared here", | [e]="%select{reference|pointer}0 member declared here", | ||
[ | [a]=k, | ||
[b]="(?:reference|pointer) member declared here", | [b]="(?:reference|pointer) member declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"599deef37946",1315012455,"Add a simple new warning to catch blatantly dangling pointer and\nreference members of classes. We\'ve...","Add a simple new warning to catch blatantly dangling pointer and\nreference members of classes. We\'ve had several bugs reported because of\nthis, and there\'s no reason not to flag it right away in the compiler.\n\nComments especially welcome on the strategy for implementing this\nwarning (IE, what should trigger this?) and on the text of the warning\nitself.\n\nI\'m going to extend this to cover obvious cases with temporaries and\nbeef up the test cases some in subsequent patches. I\'ll then run it over\na large codebase and make sure its not misbehaving before I add it to\n-Wall or turn it on by default. I think this one might be a good\ncandidate for on by default.\n\nllvm-svn: 139075"}, | ||
[ | [g]={{Q,8174,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_MemInitializer: {\n if (isa<MaterializeTemporaryExpr>(L)) {\n // Under C++ DR1696, if a mem-initializer (or a default member\n // initializer used by the absence of one) would lifetime-extend a\n // temporary, the program is ill-formed.\n if (auto *ExtendingDecl = ExtendingEntity ? ExtendingEntity->getDecl() : nullptr) {\n if (IsGslPtrInitWithGslTempOwner) {\n // ...\n Diag(ExtendingDecl->getLocation(), diag::note_ref_or_ptr_member_declared_here) << true;"},{Q,8229,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_MemInitializer: {\n if (isa<MaterializeTemporaryExpr>(L)) {\n // ...\n } else {\n // ...\n if (auto *Member = ExtendingEntity ? ExtendingEntity->getDecl() : nullptr) {\n // ...\n Diag(Member->getLocation(), diag::note_ref_or_ptr_member_declared_here) << (unsigned)IsPointer;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-dangling-field.cpp"]={"clang/test/SemaCXX/warn-dangling-field.cpp:12:12: note: pointer member declared here"} | ["clang/test/SemaCXX/warn-dangling-field.cpp"]={"clang/test/SemaCXX/warn-dangling-field.cpp:12:12: note: pointer member declared here"} | ||
} | } | ||
}, | }, | ||
["note_refconst_member_not_initialized"]={ | ["note_refconst_member_not_initialized"]={ | ||
[e]="%select{const|reference}0 member %1 will never be initialized", | [e]="%select{const|reference}0 member %1 will never be initialized", | ||
[ | [a]=k, | ||
[b]="(?:const|reference) member (.*?) will never be initialized", | [b]="(?:const|reference) member (.*?) will never be initialized", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"454a5b65d402",1271289653,"Warn about non-aggregate classes with no user-declared constructors\nthat have reference or const sca...","Warn about non-aggregate classes with no user-declared constructors\nthat have reference or const scalar members, since those members can\nnever be initializer or modified. Fixes <rdar://problem/7804350>.\n\nllvm-svn: 101316"}, | ||
[ | [g]={{s,6933,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // ...\n // If this is not an aggregate type and has no user-declared constructor,\n // complain about any non-static data members of reference or const scalar\n // type, since they will never get initializers.\n if (!Record->isInvalidDecl() && !Record->isDependentType() && !Record->isAggregate() && !Record->hasUserDeclaredConstructor() && !Record->isLambda()) {\n // ...\n for (const auto *F : Record->fields()) {\n // ...\n if (F->getType()->isReferenceType() || (F->getType().isConstQualified() && F->getType()->isScalarType())) {\n // ...\n Diag(F->getLocation(), diag::note_refconst_member_not_initialized) << F->getType()->isReferenceType() << F->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiation-backtrace.cpp"]={"clang/test/SemaTemplate/instantiation-backtrace.cpp:36:7: note: reference member \'t\' will never be initialized"} | ["clang/test/SemaTemplate/instantiation-backtrace.cpp"]={"clang/test/SemaTemplate/instantiation-backtrace.cpp:36:7: note: reference member \'t\' will never be initialized"} | ||
} | } | ||
}, | }, | ||
["note_reference_is_return_value"]={ | ["note_reference_is_return_value"]={ | ||
[e]="%0 returns a reference", | [e]="%0 returns a reference", | ||
[ | [a]=k, | ||
[b]="(.*?) returns a reference", | [b]="(.*?) returns a reference", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c1888e0c6e62",1403997937,"Extend -Wtautological-undefined-compare and -Wundefined-bool-conversion to\ntrigger on taking the add...","Extend -Wtautological-undefined-compare and -Wundefined-bool-conversion to\ntrigger on taking the address of a reference that is returned from a function\ncall.\n\nllvm-svn: 211989"}, | ||
[ | [g]={{y,15412,"// Helper function for Sema::DiagnoseAlwaysNonNullPointer.\n// Returns true when emitting a warning about taking the address of a reference.\nstatic bool CheckForReference(Sema &SemaRef, const Expr *E, const PartialDiagnostic &PD) {\n // ...\n // If possible, point to location of function.\n if (FD) {\n SemaRef.Diag(FD->getLocation(), diag::note_reference_is_return_value) << FD;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-undefined-bool-conversion.cpp"]={"clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:40:8: note: \'get_int\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:40:8: note: \'get_int\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:40:8: note: \'get_int\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:44:17: note: \'stat\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:44:17: note: \'stat\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:44:17: note: \'stat\' returns a reference", | ["clang/test/SemaCXX/warn-undefined-bool-conversion.cpp"]={"clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:40:8: note: \'get_int\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:40:8: note: \'get_int\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:40:8: note: \'get_int\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:44:17: note: \'stat\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:44:17: note: \'stat\' returns a reference","clang/test/SemaCXX/warn-undefined-bool-conversion.cpp:44:17: note: \'stat\' returns a reference",ic,ic,ic,ic,ic,ic} | ||
} | } | ||
}, | }, | ||
["note_referenced_type_template"]={ | ["note_referenced_type_template"]={ | ||
[e]="%select{class|type alias}0 template declared here", | [e]="%select{class|type alias}0 template declared here", | ||
[ | [a]=k, | ||
[b]="(?:class|type alias) template declared here", | [b]="(?:class|type alias) template declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{r,5045,"// We actually only call this from template instantiation.\nExprResult Sema::BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) {\n // ...\n auto DiagnoseTypeTemplateDecl = [&](TemplateDecl *Temp, bool isTypeAliasTemplateDecl) {\n // ...\n Diag(Temp->getLocation(), diag::note_referenced_type_template) << 0;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:57:25: note: class template declared here"} | ["clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp"]={"clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp:57:25: note: class template declared here"} | ||
} | } | ||
}, | }, | ||
["note_reinterpret_updowncast_use_static"]={ | ["note_reinterpret_updowncast_use_static"]={ | ||
[e]="use \'static_cast\' to adjust the pointer correctly while %select{upcasting|downcasting}0", | [e]="use \'static_cast\' to adjust the pointer correctly while %select{upcasting|downcasting}0", | ||
[ | [a]=k, | ||
[b]="use \'static_cast\' to adjust the pointer correctly while (?:upcasting|downcasting)", | [b]="use \'static_cast\' to adjust the pointer correctly while (?:upcasting|downcasting)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"cda80833090b",1363921094,"Warn about attempts to reinterpret_cast between two types that are\nhierarchy-related at a possibly n...","Warn about attempts to reinterpret_cast between two types that are\nhierarchy-related at a possibly nonzero offset.\n\nPatch by Alexander Zinenko!\n\nllvm-svn: 177698"}, | ||
[ | [g]={{db,1076,"/// Check that a reinterpret_cast\\<DestType\\>(SrcExpr) is not used as upcast\n/// or downcast between respective pointers or references.\nstatic void DiagnoseReinterpretUpDownCast(Sema &Self, const Expr *SrcExpr, QualType DestType, SourceRange OpRange) {\n // ...\n Self.Diag(BeginLoc, diag::note_reinterpret_updowncast_use_static) << int(ReinterpretKind) << FixItHint::CreateReplacement(BeginLoc, \"static_cast\");"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-reinterpret-base-class.cpp"]={"clang/test/SemaCXX/warn-reinterpret-base-class.cpp:123:10: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:128:10: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:133:10: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:156:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:161:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:166:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:186:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:191:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:196:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:201:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:206:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:226:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:231:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:236:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:241:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:246:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:273:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:278:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:284:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:291:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:299:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:303:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:310:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:316:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:326:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:330:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:335:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting"} | ["clang/test/SemaCXX/warn-reinterpret-base-class.cpp"]={"clang/test/SemaCXX/warn-reinterpret-base-class.cpp:123:10: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:128:10: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:133:10: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:156:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:161:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:166:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:186:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:191:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:196:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:201:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:206:10: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:226:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:231:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:236:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:241:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:246:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:273:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:278:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:284:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:291:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:299:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:303:9: note: use \'static_cast\' to adjust the pointer correctly while downcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:310:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:316:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:326:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:330:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting","clang/test/SemaCXX/warn-reinterpret-base-class.cpp:335:9: note: use \'static_cast\' to adjust the pointer correctly while upcasting"} | ||
} | } | ||
}, | }, | ||
["note_related_result_type_explicit"]={ | ["note_related_result_type_explicit"]={ | ||
[e]="%select{overridden|current}0 method is explicitly declared \'instancetype\'%select{| and is expected to return an instance of its class type}0", | [e]="%select{overridden|current}0 method is explicitly declared \'instancetype\'%select{| and is expected to return an instance of its class type}0", | ||
[ | [a]=k, | ||
[b]="(?:overridden|current) method is explicitly declared \'instancetype\'(?:| and is expected to return an instance of its class type)", | [b]="(?:overridden|current) method is explicitly declared \'instancetype\'(?:| and is expected to return an instance of its class type)", | ||
[ | [c]=j, | ||
[ | [d]="Related Result Type Issue", | ||
[ | [f]={"5ec7e7def3a1",1363676665,"Add a clarifying note when a return statement is rejected because\nwe expect a related result type.\n\n...","Add a clarifying note when a return statement is rejected because\nwe expect a related result type.\n\nrdar://12493140\n\nllvm-svn: 177378"}, | ||
[ | [g]={{fb,1672,"void Sema::EmitRelatedResultTypeNoteForReturn(QualType destType) {\n // ...\n // Look for a method overridden by this method which explicitly uses\n // \'instancetype\'.\n if (const ObjCMethodDecl *overridden = findExplicitInstancetypeDeclarer(MD, Context.getObjCInstanceType())) {\n // ...\n Diag(loc, diag::note_related_result_type_explicit) << /*current method*/ 1 << range;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/instancetype.mm"]={"clang/test/SemaObjCXX/instancetype.mm:8:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:167:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:10:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:193:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:196:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type"} | ["clang/test/SemaObjCXX/instancetype.mm"]={"clang/test/SemaObjCXX/instancetype.mm:8:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:167:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:10:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:193:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:196:4: note: current method is explicitly declared \'instancetype\' and is expected to return an instance of its class type"} | ||
} | } | ||
}, | }, | ||
["note_related_result_type_family"]={ | ["note_related_result_type_family"]={ | ||
[e]="%select{overridden|current}0 method is part of the \'%select{|alloc|copy|init|mutableCopy|new|autorelease|dealloc|finalize|release|retain|retainCount|self}1\' method family%select{| and is expected to return an instance of its class type}0", | [e]="%select{overridden|current}0 method is part of the \'%select{|alloc|copy|init|mutableCopy|new|autorelease|dealloc|finalize|release|retain|retainCount|self}1\' method family%select{| and is expected to return an instance of its class type}0", | ||
[ | [a]=k, | ||
[b]="(?:overridden|current) method is part of the \'(?:|alloc|copy|init|mutableCopy|new|autorelease|dealloc|finalize|release|retain|retainCount|self)\' method family(?:| and is expected to return an instance of its class type)", | [b]="(?:overridden|current) method is part of the \'(?:|alloc|copy|init|mutableCopy|new|autorelease|dealloc|finalize|release|retain|retainCount|self)\' method family(?:| and is expected to return an instance of its class type)", | ||
[ | [c]=j, | ||
[ | [d]="Related Result Type Issue", | ||
[ | [f]={"5ec7e7def3a1",1363676665,"Add a clarifying note when a return statement is rejected because\nwe expect a related result type.\n\n...","Add a clarifying note when a return statement is rejected because\nwe expect a related result type.\n\nrdar://12493140\n\nllvm-svn: 177378"}, | ||
[ | [g]={{u,177,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n if (Overridden->hasRelatedResultType() && !NewMethod->hasRelatedResultType()) {\n // ...\n if (ObjCMethodFamily Family = Overridden->getMethodFamily())\n Diag(Overridden->getLocation(), diag::note_related_result_type_family) << /*overridden method*/ 0 << Family;"},{fb,1680,"void Sema::EmitRelatedResultTypeNoteForReturn(QualType destType) {\n // ...\n // Otherwise, if we have an interesting method family, note that.\n // This should always trigger if the above didn\'t.\n if (ObjCMethodFamily family = MD->getMethodFamily())\n Diag(MD->getLocation(), diag::note_related_result_type_family) << /*current method*/ 1 << family;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:85:1: note: overridden method is part of the \'init\' method family","clang/test/SemaObjC/related-result-type-inference.m:85:1: note: overridden method is part of the \'init\' method family","clang/test/SemaObjC/related-result-type-inference.m:102:1: note: overridden method is part of the \'new\' method family","clang/test/SemaObjC/related-result-type-inference.m:106:1: note: overridden method is part of the \'alloc\' method family","clang/test/SemaObjC/related-result-type-inference.m:120:1: note: overridden method is part of the \'init\' method family"} | ["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:85:1: note: overridden method is part of the \'init\' method family","clang/test/SemaObjC/related-result-type-inference.m:85:1: note: overridden method is part of the \'init\' method family","clang/test/SemaObjC/related-result-type-inference.m:102:1: note: overridden method is part of the \'new\' method family","clang/test/SemaObjC/related-result-type-inference.m:106:1: note: overridden method is part of the \'alloc\' method family","clang/test/SemaObjC/related-result-type-inference.m:120:1: note: overridden method is part of the \'init\' method family"} | ||
} | } | ||
}, | }, | ||
["note_related_result_type_inferred"]={ | ["note_related_result_type_inferred"]={ | ||
[e]="%select{class|instance}0 method %1 is assumed to return an instance of its receiver type (%2)", | [e]="%select{class|instance}0 method %1 is assumed to return an instance of its receiver type (%2)", | ||
[ | [a]=k, | ||
[b]="(?:class|instance) method (.*?) is assumed to return an instance of its receiver type \\((.*?)\\)", | [b]="(?:class|instance) method (.*?) is assumed to return an instance of its receiver type \\((.*?)\\)", | ||
[ | [c]=j, | ||
[ | [d]="Related Result Type Issue", | ||
[ | [f]={"33823727c80a",1307754570,"Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions t...","Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions to the type of message\nsends and property accesses to Objective-C methods that are known to\nalways return objects whose type is the same as the type of the\nreceiving class (or a subclass thereof), such as +alloc and\n-init. This tightens up static type safety for Objective-C, so that we\nnow diagnose mistakes like this:\n\nt.m:4:10: warning: incompatible pointer types initializing \'NSSet *\'\nwith an\n expression of type \'NSArray *\' [-Wincompatible-pointer-types]\n NSSet *array = [[NSArray alloc] init];\n ^ ~~~~~~~~~~~~~~~~~~~~~~\n/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:\nnote: \n instance method \'init\' is assumed to return an instance of its\n receiver\n type (\'NSArray *\')\n- (id)init;\n^\n\nIt also means that we get decent type inference when writing code in\nObjective-C++0x:\n\n auto array = [[NSMutableArray alloc] initWithObjects:@\"one\", @\"two\",nil];\n // ^ now infers NSMutableArray* rather than id\n\nllvm-svn: 132868"}, | ||
[ | [g]={{fb,1706,"void Sema::EmitRelatedResultTypeNote(const Expr *E) {\n // ...\n Diag(Method->getLocation(), diag::note_related_result_type_inferred) << Method->isInstanceMethod() << Method->getSelector() << MsgSend->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:11:1: note: instance method \'retain\' is assumed to return an instance of its receiver type (\'NSArray *\')"} | ["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:11:1: note: instance method \'retain\' is assumed to return an instance of its receiver type (\'NSArray *\')"} | ||
} | } | ||
}, | }, | ||
["note_related_result_type_overridden"]={ | ["note_related_result_type_overridden"]={ | ||
[e]="overridden method returns an instance of its class type", | [e]="overridden method returns an instance of its class type", | ||
[ | [a]=k, | ||
[b]="overridden method returns an instance of its class type", | [b]="overridden method returns an instance of its class type", | ||
[ | [c]=j, | ||
[ | [d]="Related Result Type Issue", | ||
[ | [f]={"33823727c80a",1307754570,"Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions t...","Implement Objective-C Related Result Type semantics.\n\nRelated result types apply Cocoa conventions to the type of message\nsends and property accesses to Objective-C methods that are known to\nalways return objects whose type is the same as the type of the\nreceiving class (or a subclass thereof), such as +alloc and\n-init. This tightens up static type safety for Objective-C, so that we\nnow diagnose mistakes like this:\n\nt.m:4:10: warning: incompatible pointer types initializing \'NSSet *\'\nwith an\n expression of type \'NSArray *\' [-Wincompatible-pointer-types]\n NSSet *array = [[NSArray alloc] init];\n ^ ~~~~~~~~~~~~~~~~~~~~~~\n/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:\nnote: \n instance method \'init\' is assumed to return an instance of its\n receiver\n type (\'NSArray *\')\n- (id)init;\n^\n\nIt also means that we get decent type inference when writing code in\nObjective-C++0x:\n\n auto array = [[NSMutableArray alloc] initWithObjects:@\"one\", @\"two\",nil];\n // ^ now infers NSMutableArray* rather than id\n\nllvm-svn: 132868"}, | ||
[ | [g]={{u,182,"void Sema::CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden) {\n if (Overridden->hasRelatedResultType() && !NewMethod->hasRelatedResultType()) {\n // ...\n if (ObjCMethodFamily Family = Overridden->getMethodFamily())\n // ...\n else\n Diag(Overridden->getLocation(), diag::note_related_result_type_overridden);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/instancetype.mm"]={"clang/test/SemaObjCXX/instancetype.mm:24:1: note: overridden method returns an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:25:1: note: overridden method returns an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:197:1: note: overridden method returns an instance of its class type"} | ["clang/test/SemaObjCXX/instancetype.mm"]={"clang/test/SemaObjCXX/instancetype.mm:24:1: note: overridden method returns an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:25:1: note: overridden method returns an instance of its class type","clang/test/SemaObjCXX/instancetype.mm:197:1: note: overridden method returns an instance of its class type"} | ||
} | } | ||
}, | }, | ||
["note_remove_abs"]={ | ["note_remove_abs"]={ | ||
[e]="remove the call to \'%0\' since unsigned values cannot be negative", | [e]="remove the call to \'%0\' since unsigned values cannot be negative", | ||
[ | [a]=k, | ||
[b]="remove the call to \'(.*?)\' since unsigned values cannot be negative", | [b]="remove the call to \'(.*?)\' since unsigned values cannot be negative", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"7eb0b2c1819c",1393377448,"Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups....","Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups.\n1) Using an absolute value function of the wrong type, for instance, using the\nint absolute value function when the argument is a floating point type.\n2) Using the improper sized absolute value function, for instance, using abs\nwhen the argument is a long long. llabs should be used instead.\n\nFrom these two cases, an implicit conversion will occur which may cause\nunexpected behavior. Where possible, suggest the proper absolute value\nfunction to use, and which header to include if the function is not available.\n\n3) Taking the absolute value of an unsigned value. In addition to this warning,\nsuggest to remove the function call. This usually indicates a logic error\nsince the programmer assumed negative values would have been possible.\n\nllvm-svn: 202211"}, | ||
[ | [g]={{y,12026,"// Warn when using the wrong abs() function.\nvoid Sema::CheckAbsoluteValueFunction(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n // Unsigned types cannot be negative. Suggest removing the absolute value\n // function call.\n if (ArgType->isUnsignedIntegerType()) {\n // ...\n Diag(Call->getExprLoc(), diag::note_remove_abs) << FunctionName << FixItHint::CreateRemoval(Call->getCallee()->getSourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:15:9: note: remove the call to \'abs\' since unsigned values cannot be negative"} | ["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:15:9: note: remove the call to \'abs\' since unsigned values cannot be negative"} | ||
} | } | ||
}, | }, | ||
["note_remove_max_call"]={ | ["note_remove_max_call"]={ | ||
[e]="remove call to max function and unsigned zero argument", | [e]="remove call to max function and unsigned zero argument", | ||
[ | [a]=k, | ||
[b]="remove call to max function and unsigned zero argument", | [b]="remove call to max function and unsigned zero argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"67c0071517e5",1480981306,"Warn on unsigned zero in call to std::max\n\nNew default warning that triggers when an unsigned zero i...","Warn on unsigned zero in call to std::max\n\nNew default warning that triggers when an unsigned zero is used in a call to\nstd::max. For unsigned values, zero is the minimum value, so any call to\nstd::max is always equal to the other value. A common pattern was to take\nthe max of zero and the difference of two unsigned values, not taking into\naccount that unsigned values wrap around below zero. This warning also emits\na note with a fixit hint to remove the zero and call to std::max.\n\nllvm-svn: 288732"}, | ||
[ | [g]={{y,12144,"//===--- CHECK: Warn on use of std::max and unsigned zero. r---------------===//\nvoid Sema::CheckMaxUnsignedZero(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n Diag(Call->getExprLoc(), diag::note_remove_max_call) << FixItHint::CreateRemoval(Call->getCallee()->getSourceRange()) << FixItHint::CreateRemoval(RemovalRange);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-max-unsigned-zero.cpp"]={"clang/test/SemaCXX/warn-max-unsigned-zero.cpp:10:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:15:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:20:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:25:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:41:10: note: remove call to max function and unsigned zero argument"} | ["clang/test/SemaCXX/warn-max-unsigned-zero.cpp"]={"clang/test/SemaCXX/warn-max-unsigned-zero.cpp:10:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:15:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:20:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:25:12: note: remove call to max function and unsigned zero argument","clang/test/SemaCXX/warn-max-unsigned-zero.cpp:41:10: note: remove call to max function and unsigned zero argument"} | ||
} | } | ||
}, | }, | ||
["note_remove_move"]={ | ["note_remove_move"]={ | ||
[e]="remove std::move call here", | [e]="remove std::move call here", | ||
[ | [a]=k, | ||
[b]="remove std\\:\\:move call here", | [b]="remove std\\:\\:move call here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ac3eca536d3d",1430272337,"Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::...","Add -Wpessimizing-move and -Wredundant-move warnings.\n\n-Wpessimizing-move warns when a call to std::move would prevent copy elision\nif the argument was not wrapped in a call. This happens when moving a local\nvariable in a return statement when the variable is the same type as the\nreturn type or using a move to create a new object from a temporary object.\n\n-Wredundant-move warns when an implicit move would already be made, so the\nstd::move call is not needed, such as when moving a local variable in a return\nthat is different from the return type.\n\nDifferential Revision: http://reviews.llvm.org/D7633\n\nllvm-svn: 236075"}, | ||
[ | [g]={{Q,8439,"/// Provide warnings when std::move is used on construction.\nstatic void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, bool IsReturnStmt) {\n // ...\n S.Diag(CE->getBeginLoc(), diag::note_remove_move) << FixItHint::CreateRemoval(SourceRange(CallBegin, LParen)) << FixItHint::CreateRemoval(SourceRange(RParen, RParen));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-redundant-move.cpp"]={"clang/test/SemaCXX/warn-redundant-move.cpp:82:10: note: remove std::move call here","clang/test/SemaCXX/warn-redundant-move.cpp:96:12: note: remove std::move call here"} | ["clang/test/SemaCXX/warn-redundant-move.cpp"]={"clang/test/SemaCXX/warn-redundant-move.cpp:82:10: note: remove std::move call here","clang/test/SemaCXX/warn-redundant-move.cpp:96:12: note: remove std::move call here"} | ||
} | } | ||
}, | }, | ||
["note_remove_parens_for_variable_declaration"]={ | ["note_remove_parens_for_variable_declaration"]={ | ||
[e]="remove parentheses to silence this warning", | [e]="remove parentheses to silence this warning", | ||
[ | [a]=k, | ||
[b]="remove parentheses to silence this warning", | [b]="remove parentheses to silence this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast....","Add a \"vexing parse\" warning for ambiguity between a variable declaration and a\nfunction-style cast.\n\nThis fires for cases such as\n\n T(x);\n\n... where \'x\' was previously declared and T is a type. This construct declares\na variable named \'x\' rather than the (probably expected) interpretation of a\nfunction-style cast of \'x\' to T.\n\nllvm-svn: 314570"}, | ||
[ | [g]={{W,4034,"/// Produce an appropriate diagnostic for a declarator with top-level\n/// parentheses.\nstatic void warnAboutRedundantParens(Sema &S, Declarator &D, QualType T) {\n // ...\n S.Diag(Paren.Loc, diag::note_remove_parens_for_variable_declaration) << FixItHint::CreateRemoval(Paren.Loc) << FixItHint::CreateRemoval(Paren.EndLoc);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:8: note: remove parentheses to silence this warning","clang/test/Parser/cxx0x-condition.cpp:21:8: note: remove parentheses to silence this warning"} | ["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:8: note: remove parentheses to silence this warning","clang/test/Parser/cxx0x-condition.cpp:21:8: note: remove parentheses to silence this warning"} | ||
} | } | ||
}, | }, | ||
["note_replace_abs_function"]={ | ["note_replace_abs_function"]={ | ||
[e]="use function \'%0\' instead", | [e]="use function \'%0\' instead", | ||
[ | [a]=k, | ||
[b]="use function \'(.*?)\' instead", | [b]="use function \'(.*?)\' instead", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"7eb0b2c1819c",1393377448,"Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups....","Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups.\n1) Using an absolute value function of the wrong type, for instance, using the\nint absolute value function when the argument is a floating point type.\n2) Using the improper sized absolute value function, for instance, using abs\nwhen the argument is a long long. llabs should be used instead.\n\nFrom these two cases, an implicit conversion will occur which may cause\nunexpected behavior. Where possible, suggest the proper absolute value\nfunction to use, and which header to include if the function is not available.\n\n3) Taking the absolute value of an unsigned value. In addition to this warning,\nsuggest to remove the function call. This usually indicates a logic error\nsince the programmer assumed negative values would have been possible.\n\nllvm-svn: 202211"}, | ||
[ | [g]={{y,11980,"// If the replacement is valid, emit a note with replacement function.\n// Additionally, suggest including the proper header if not already included.\nstatic void emitReplacement(Sema &S, SourceLocation Loc, SourceRange Range, unsigned AbsKind, QualType ArgType) {\n // ...\n S.Diag(Loc, diag::note_replace_abs_function) << FunctionName << FixItHint::CreateReplacement(Range, FunctionName);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:31:9: note: use function \'fabs\' instead"} | ["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:31:9: note: use function \'fabs\' instead"} | ||
} | } | ||
}, | }, | ||
["note_replace_equals_default_to_delete"]={ | ["note_replace_equals_default_to_delete"]={ | ||
[e]="replace \'default\' with \'delete\'", | [e]="replace \'default\' with \'delete\'", | ||
[ | [a]=k, | ||
[b]="replace \'default\' with \'delete\'", | [b]="replace \'default\' with \'delete\'", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{s,7778,"bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, SourceLocation DefaultLoc) {\n // ...\n if (ShouldDeleteForTypeMismatch || ShouldDeleteSpecialMember(MD, CSM)) {\n if (First) {\n // ...\n if (!inTemplateInstantiation() && !HadError) {\n // ...\n if (ShouldDeleteForTypeMismatch) {\n // ...\n } else if (ShouldDeleteSpecialMember(MD, CSM, nullptr,\n // ...\n Diag(DefaultLoc, diag::note_replace_equals_default_to_delete) << FixItHint::CreateReplacement(DefaultLoc, \"delete\");"},{s,8919,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // ...\n // If we want to delete the function, then do so; there\'s nothing else to\n // check in that case.\n if (Info.Deleted) {\n // ...\n if (!inTemplateInstantiation() && !FD->isImplicit()) {\n // ...\n if (FD->getDefaultLoc().isValid())\n Diag(FD->getDefaultLoc(), diag::note_replace_equals_default_to_delete) << FixItHint::CreateReplacement(FD->getDefaultLoc(), \"delete\");"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class.derived/class.abstract/p16.cpp"]={"clang/test/CXX/class.derived/class.abstract/p16.cpp:46:23: note: replace \'default\' with \'delete\'"} | ["clang/test/CXX/class.derived/class.abstract/p16.cpp"]={"clang/test/CXX/class.derived/class.abstract/p16.cpp:46:23: note: replace \'default\' with \'delete\'"} | ||
} | } | ||
}, | }, | ||
["note_rewriting_operator_as_spaceship"]={ | ["note_rewriting_operator_as_spaceship"]={ | ||
[e]="while rewriting comparison as call to \'operator<=>\' declared here", | [e]="while rewriting comparison as call to \'operator<=>\' declared here", | ||
[ | [a]=k, | ||
[b]="while rewriting comparison as call to \'operator\\<\\=\\>\' declared here", | [b]="while rewriting comparison as call to \'operator\\<\\=\\>\' declared here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{bb,992,"/// 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::RewritingOperatorAsSpaceship:\n Diags.Report(Active->Entity->getLocation(), diag::note_rewriting_operator_as_spaceship);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:14:8: note: while rewriting comparison as call to \'operator<=>\' declared here"} | ["clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp:14:8: note: while rewriting comparison as call to \'operator<=>\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_riscv_repeated_interrupt_attribute"]={ | ["note_riscv_repeated_interrupt_attribute"]={ | ||
[e]="repeated RISC-V \'interrupt\' attribute is here", | [e]="repeated RISC-V \'interrupt\' attribute is here", | ||
[ | [a]=k, | ||
[b]="repeated RISC\\-V \'interrupt\' attribute is here", | [b]="repeated RISC\\-V \'interrupt\' attribute is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1eee1b771f43",1532626665," [RISCV] Add support for interrupt attribute\n\nSummary:\nClang supports the GNU style ``__attribute__(..."," [RISCV] Add support for interrupt attribute\n\nSummary:\nClang supports the GNU style ``__attribute__((interrupt))`` attribute on RISCV targets.\nPermissible values for this parameter are user, supervisor, and machine.\nIf there is no parameter, then it defaults to machine.\nReference: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Function-Attributes.html\nBased on initial patch by Zhaoshi Zheng.\n\nReviewers: asb, aaron.ballman\n\nReviewed By: asb, aaron.ballman\n\nSubscribers: rkruppe, the_o, aaron.ballman, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D48412\n\nllvm-svn: 338045"}, | ||
[ | [g]={{o,7754,"static void handleRISCVInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Warn about repeated attributes.\n if (const auto *A = D->getAttr<RISCVInterruptAttr>()) {\n // ...\n S.Diag(A->getLocation(), diag::note_riscv_repeated_interrupt_attribute);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/riscv-interrupt-attr.c"]={"clang/test/Sema/riscv-interrupt-attr.c:41:16: note: repeated RISC-V \'interrupt\' attribute is here","clang/test/Sema/riscv-interrupt-attr.c:44:16: note: repeated RISC-V \'interrupt\' attribute is here"} | ["clang/test/Sema/riscv-interrupt-attr.c"]={"clang/test/Sema/riscv-interrupt-attr.c:41:16: note: repeated RISC-V \'interrupt\' attribute is here","clang/test/Sema/riscv-interrupt-attr.c:44:16: note: repeated RISC-V \'interrupt\' attribute is here"} | ||
} | } | ||
}, | }, | ||
["note_safe_buffer_usage_suggestions_disabled"]={ | ["note_safe_buffer_usage_suggestions_disabled"]={ | ||
[e]="pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions", | [e]="pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions", | ||
[ | [a]=k, | ||
[b]="pass \\-fsafe\\-buffer\\-usage\\-suggestions to receive code hardening suggestions", | [b]="pass \\-fsafe\\-buffer\\-usage\\-suggestions to receive code hardening suggestions", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{D,2217,"class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {\n // ...\n void handleUnsafeOperation(const Stmt *Operation, bool IsRelatedToDecl) override {\n // ...\n if (IsRelatedToDecl) {\n // ...\n } else {\n // ...\n if (SuggestSuggestions) {\n S.Diag(Loc, diag::note_safe_buffer_usage_suggestions_disabled);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp:52:3: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions","clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp:57:3: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions","clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp:62:3: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions"} | ["clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp:52:3: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions","clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp:57:3: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions","clang/test/SemaCXX/warn-unsafe-buffer-usage-suggestions-flag.cpp:62:3: note: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions"} | ||
} | } | ||
}, | }, | ||
["note_second_module_difference"]={ | ["note_second_module_difference"]={ | ||
[e]="in second definition, possible difference is here", | [e]="in second definition, possible difference is here", | ||
[ | [a]=k, | ||
[b]="in second definition, possible difference is here", | [b]="in second definition, possible difference is here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"ca48d369bac3",1498009393,"[ODRHash] Supply more information when generic error message is emitted.\n\nllvm-svn: 305872","[ODRHash] Supply more information when generic error message is emitted.\n\nllvm-svn: 305872"}, | ||
[ | [g]={{"clang/lib/AST/ODRDiagsEmitter.cpp",666,"void ODRDiagsEmitter::diagnoseSubMismatchUnexpected(DiffResult &DR, const NamedDecl *FirstRecord, StringRef FirstModule, const NamedDecl *SecondRecord, StringRef SecondModule) const {\n // ...\n if (DR.SecondDecl) {\n Diag(DR.SecondDecl->getLocation(), diag::note_second_module_difference) << DR.SecondDecl->getSourceRange();"}} | ||
}, | }, | ||
["note_sentinel_here"]={ | ["note_sentinel_here"]={ | ||
[e]="%select{function|method|block}0 has been explicitly marked sentinel here", | [e]="%select{function|method|block}0 has been explicitly marked sentinel here", | ||
[ | [a]=k, | ||
[b]="(?:function|method|block) has been explicitly marked sentinel here", | [b]="(?:function|method|block) has been explicitly marked sentinel here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"9e87721d47fd",1242256850,"Look for and diagnose missing sentinel argument on message\ndispatch arguments which have sentinel at...","Look for and diagnose missing sentinel argument on message\ndispatch arguments which have sentinel attribute.\n\nllvm-svn: 71737"}, | ||
[ | [g]={{v,474,"/// DiagnoseSentinelCalls - This routine checks whether a call or\n/// message-send is to a declaration with the sentinel attribute, and\n/// if so, it checks that the requirements of the sentinel are\n/// satisfied.\nvoid Sema::DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef<Expr *> Args) {\n // ...\n // If there aren\'t enough arguments for all the formal parameters,\n // the sentinel, and the args after the sentinel, complain.\n if (Args.size() < numFormalParams + numArgsAfterSentinel + 1) {\n // ...\n Diag(D->getLocation(), diag::note_sentinel_here) << int(calleeType);"},{v,505,"/// DiagnoseSentinelCalls - This routine checks whether a call or\n/// message-send is to a declaration with the sentinel attribute, and\n/// if so, it checks that the requirements of the sentinel are\n/// satisfied.\nvoid Sema::DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef<Expr *> Args) {\n // ...\n Diag(D->getLocation(), diag::note_sentinel_here) << int(calleeType);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:8:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:10:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:11:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:12:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:17:1: note: method has been explicitly marked sentinel here"} | ["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:8:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:10:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:11:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:12:1: note: method has been explicitly marked sentinel here","clang/test/SemaObjC/method-sentinel-attr.m:17:1: note: method has been explicitly marked sentinel here"} | ||
} | } | ||
}, | }, | ||
["note_shadow_field"]={ | ["note_shadow_field"]={ | ||
[e]="declared here", | [e]="declared here", | ||
[ | [a]=k, | ||
[b]="declared here", | [b]="declared here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"a6ae060db4fd",1486524613,"Sema: add warning for c++ member variable shadowing\n\nAdd a warning for shadowed variables across rec...","Sema: add warning for c++ member variable shadowing\n\nAdd a warning for shadowed variables across records. Referencing a\nshadow\'ed variable may not give the desired variable. Add an optional\nwarning for the shadowing.\n\nPatch by James Sun!\n\nllvm-svn: 294401"}, | ||
[ | [g]={{s,3393,"// Check if there is a field shadowing.\nvoid Sema::CheckShadowInheritedFields(const SourceLocation &Loc, DeclarationName FieldName, const CXXRecordDecl *RD, bool DeclIsField) {\n // ...\n for (const auto &P : Paths) {\n // ...\n if (AS_none != CXXRecordDecl::MergeAccess(P.Access, BaseField->getAccess())) {\n // ...\n Diag(BaseField->getLocation(), diag::note_shadow_field);"}} | ||
}, | }, | ||
["note_silence_aligned_allocation_unavailable"]={ | ["note_silence_aligned_allocation_unavailable"]={ | ||
[e]="if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic", | [e]="if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic", | ||
[ | [a]=k, | ||
[b]="if you supply your own aligned allocation functions, use \\-faligned\\-allocation to silence this diagnostic", | [b]="if you supply your own aligned allocation functions, use \\-faligned\\-allocation to silence this diagnostic", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"751381db5a39",1534866864,"[clang][NFC] Fix typo in the name of a note\n\nSummary:\nr306722 introduced a new note called note_sile...","[clang][NFC] Fix typo in the name of a note\n\nSummary:\nr306722 introduced a new note called note_silence_unligned_allocation_unavailable\nwhere I believe what was meant is note_silence_aligned_allocation_unavailable.\n\nReviewers: ahatanak\n\nSubscribers: dexonsmith, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51043\n\nllvm-svn: 340288"}, | ||
[ | [g]={{Zb,1971,"// Emit a diagnostic if an aligned allocation/deallocation function that is not\n// implemented in the standard library is selected.\nvoid Sema::diagnoseUnavailableAlignedAllocation(const FunctionDecl &FD, SourceLocation Loc) {\n if (isUnavailableAlignedAllocationFunction(FD)) {\n // ...\n Diag(Loc, diag::note_silence_aligned_allocation_unavailable);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/unavailable_aligned_allocation.cpp"]={"clang/test/SemaCXX/unavailable_aligned_allocation.cpp:52:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:52:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:53:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:53:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:54:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:55:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:55:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:57:14: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:57:14: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:58:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:58:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:59:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:60:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:60:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:107:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:107:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:140:16: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:173:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:174:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:175:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:176:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:177:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:178:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic"} | ["clang/test/SemaCXX/unavailable_aligned_allocation.cpp"]={"clang/test/SemaCXX/unavailable_aligned_allocation.cpp:52:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:52:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:53:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:53:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:54:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:55:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:55:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:57:14: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:57:14: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:58:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:58:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:59:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:60:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:60:8: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:107:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:107:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:140:16: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:173:13: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:174:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:175:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:176:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:177:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic","clang/test/SemaCXX/unavailable_aligned_allocation.cpp:178:3: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic"} | ||
} | } | ||
}, | }, | ||
["note_single_arg_concept_specialization_constraint_evaluated_to_false"]={ | ["note_single_arg_concept_specialization_constraint_evaluated_to_false"]={ | ||
[e]="%select{and|because}0 %1 does not satisfy %2", | [e]="%select{and|because}0 %1 does not satisfy %2", | ||
[ | [a]=k, | ||
[b]="(?:and|because) (.*?) does not satisfy (.*?)", | [b]="(?:and|because) (.*?) does not satisfy (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nTh...","[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"}, | ||
[ | [g]={{"clang/lib/Sema/SemaConcept.cpp",1102,"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 S.Diag(CSE->getSourceRange().getBegin(), diag::note_single_arg_concept_specialization_constraint_evaluated_to_false) << (int)First << CSE->getTemplateArgsAsWritten()->arguments()[0].getArgument() << CSE->getNamedConcept();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp:24:10: note: because \'int\' does not satisfy \'False\'"} | ["clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.decl/p3.cpp:24:10: note: because \'int\' does not satisfy \'False\'"} | ||
} | } | ||
}, | }, | ||
["note_specialized_decl"]={ | ["note_specialized_decl"]={ | ||
[e]="attempt to specialize declaration here", | [e]="attempt to specialize declaration here", | ||
[ | [a]=k, | ||
[b]="attempt to specialize declaration here", | [b]="attempt to specialize declaration here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5c0405d48454",1254954940,"Type checking for specializations of member functions of class\ntemplates. Previously, these weren\'t ...","Type checking for specializations of member functions of class\ntemplates. Previously, these weren\'t handled as specializations at\nall. The AST for representing these as specializations is still a work\nin progress.\n\nllvm-svn: 83498"}, | ||
[ | [g]={{r,9717,"/// Perform semantic analysis for the given non-template member\n/// specialization.\n///\n/// This routine performs all of the semantic analysis required for an\n/// explicit member function specialization. On successful completion,\n/// the function declaration \\p FD will become a member function\n/// specialization.\n///\n/// \\param Member the member declaration, which will be updated to become a\n/// specialization.\n///\n/// \\param Previous the set of declarations, one of which may be specialized\n/// by this function specialization; the set will be modified to contain the\n/// redeclared member.\nbool Sema::CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous) {\n // ...\n // Make sure that this is a specialization of a member.\n if (!InstantiatedFrom) {\n // ...\n Diag(Instantiation->getLocation(), diag::note_specialized_decl);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp:10:8: note: attempt to specialize declaration here"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p4.cpp:10:8: note: attempt to specialize declaration here"} | ||
} | } | ||
}, | }, | ||
["note_specialized_entity"]={ | ["note_specialized_entity"]={ | ||
[e]="explicitly specialized declaration is here", | [e]="explicitly specialized declaration is here", | ||
[ | [a]=k, | ||
[b]="explicitly specialized declaration is here", | [b]="explicitly specialized declaration is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"548886518d08",1254874412,"Refactor checking of the scope of explicit template specialization\ndeclarations and explicit templat...","Refactor checking of the scope of explicit template specialization\ndeclarations and explicit template instantiations, improving\ndiagnostics and making the code usable for function template\nspecializations (as well as class template specializations and partial\nspecializations). \n\nllvm-svn: 83436"}, | ||
[ | [g]={{r,8420,"/// Check whether a specialization is well-formed in the current\n/// context.\n///\n/// This routine determines whether a template specialization can be declared\n/// in the current context (C++ [temp.expl.spec]p2).\n///\n/// \\param S the semantic analysis object for which this check is being\n/// performed.\n///\n/// \\param Specialized the entity being specialized or instantiated, which\n/// may be a kind of template (class template, function template, etc.) or\n/// a member of a class template (member function, static data member,\n/// member class).\n///\n/// \\param PrevDecl the previous declaration of this entity, if any.\n///\n/// \\param Loc the location of the explicit specialization or instantiation of\n/// this entity.\n///\n/// \\param IsPartialSpecialization whether this is a partial specialization of\n/// a class template.\n///\n/// \\returns true if there was an error that we cannot recover from, false\n/// otherwise.\nstatic bool CheckTemplateSpecializationScope(Sema &S, NamedDecl *Specialized, NamedDecl *PrevDecl, SourceLocation Loc, bool IsPartialSpecialization) {\n // ...\n if (isa<ClassTemplateDecl>(Specialized))\n // ...\n else if (isa<VarTemplateDecl>(Specialized))\n // ...\n else if (isa<FunctionTemplateDecl>(Specialized))\n // ...\n else if (isa<CXXMethodDecl>(Specialized))\n // ...\n else if (isa<VarDecl>(Specialized))\n // ...\n else if (isa<RecordDecl>(Specialized))\n // ...\n else if (isa<EnumDecl>(Specialized) && S.getLangOpts().CPlusPlus11)\n // ...\n else {\n // ...\n S.Diag(Specialized->getLocation(), diag::note_specialized_entity);"},{r,8456,"/// 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 // ...\n S.Diag(Specialized->getLocation(), diag::note_specialized_entity);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/ext_ms_template_spec.cpp"]={"clang/test/SemaTemplate/ext_ms_template_spec.cpp:6:7: note: explicitly specialized declaration is here","clang/test/SemaTemplate/ext_ms_template_spec.cpp:9:7: note: explicitly specialized declaration is here","clang/test/SemaTemplate/ext_ms_template_spec.cpp:12:10: note: explicitly specialized declaration is here","clang/test/SemaTemplate/ext_ms_template_spec.cpp:13:8: note: explicitly specialized declaration is here"} | ["clang/test/SemaTemplate/ext_ms_template_spec.cpp"]={"clang/test/SemaTemplate/ext_ms_template_spec.cpp:6:7: note: explicitly specialized declaration is here","clang/test/SemaTemplate/ext_ms_template_spec.cpp:9:7: note: explicitly specialized declaration is here","clang/test/SemaTemplate/ext_ms_template_spec.cpp:12:10: note: explicitly specialized declaration is here","clang/test/SemaTemplate/ext_ms_template_spec.cpp:13:8: note: explicitly specialized declaration is here"} | ||
} | } | ||
}, | }, | ||
["note_static_for_internal_linkage"]={ | ["note_static_for_internal_linkage"]={ | ||
[e]="declare \'static\' if the %select{variable|function}0 is not intended to be used outside of this translation unit", | [e]="declare \'static\' if the %select{variable|function}0 is not intended to be used outside of this translation unit", | ||
[ | [a]=k, | ||
[b]="declare \'static\' if the (?:variable|function) is not intended to be used outside of this translation unit", | [b]="declare \'static\' if the (?:variable|function) is not intended to be used outside of this translation unit", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"df195d8aedff",1560898628,"Suggestions to fix -Wmissing-{prototypes,variable-declarations}\n\nSummary:\nI\'ve found that most often...","Suggestions to fix -Wmissing-{prototypes,variable-declarations}\n\nSummary:\nI\'ve found that most often the proper way to fix this warning is to add\n`static`, because if the code otherwise compiles and links, the function\nor variable is apparently not needed outside of the TU.\n\nWe can\'t provide a fix-it hint for variable declarations, because\nmultiple VarDecls can share the same type, and if we put static in front\nof that, we affect all declared variables, some of which might have\nprevious declarations.\n\nWe also provide no fix-it hint for the rare case of an `extern` function\ndefinition, because that would require removing `extern` and I have no\nidea how to get the source location of the storage class specifier from\na FunctionDecl. I believe this information is only available earlier in\nthe AST construction from DeclSpec::getStorageClassSpecLoc(), but we\ndon\'t have that here.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D59402\n\nllvm-svn: 363749"}, | ||
[ | [g]={{p,14079,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n // Warn about externally-visible variables being defined without a\n // prior declaration. We only want to do this for global\n // declarations, but we also specifically need to avoid doing it for\n // class members because the linkage of an anonymous class can\n // change if it\'s later given a typedef name.\n if (var->isThisDeclarationADefinition() && var->getDeclContext()->getRedeclContext()->isFileContext() && var->isExternallyVisible() && var->hasLinkage() && !var->isInline() && !var->getDescribedVarTemplate() && !isa<VarTemplatePartialSpecializationDecl>(var) && !isTemplateInstantiation(var->getTemplateSpecializationKind()) && !getDiagnostics().isIgnored(diag::warn_missing_variable_declarations, var->getLocation())) {\n // ...\n if (!prev) {\n // ...\n Diag(var->getTypeSpecStartLoc(), diag::note_static_for_internal_linkage) << /* variable */ 0;"},{p,15717,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n if (ShouldWarnAboutMissingPrototype(FD, PossiblePrototype)) {\n // ...\n if (PossiblePrototype) {\n // ...\n } else {\n // ...\n Diag(FD->getTypeSpecStartLoc(), diag::note_static_for_internal_linkage) << /* function */ 1 << (FD->getStorageClass() == SC_None ? FixItHint::CreateInsertion(findBeginLoc(), \"static \") : FixItHint{});"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-everthing.cpp"]={"clang/test/SemaCXX/warn-everthing.cpp:11:1: note: declare \'static\' if the function is not intended to be used outside of this translation unit"} | ["clang/test/SemaCXX/warn-everthing.cpp"]={"clang/test/SemaCXX/warn-everthing.cpp:11:1: note: declare \'static\' if the function is not intended to be used outside of this translation unit"} | ||
} | } | ||
}, | }, | ||
["note_string_plus_scalar_silence"]={ | ["note_string_plus_scalar_silence"]={ | ||
[e]="use array indexing to silence this warning", | [e]="use array indexing to silence this warning", | ||
[ | [a]=k, | ||
[b]="use array indexing to silence this warning", | [b]="use array indexing to silence this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5565941effbe",1382719920,"Add -Wstring-plus-char, which warns when adding char literals to C strings.\n\nSpecifically, this warn...","Add -Wstring-plus-char, which warns when adding char literals to C strings.\n\nSpecifically, this warns when a character literal is added (using \'+\') to a\nvariable with type \'char *\' (or any other pointer to character type). Like\n-Wstring-plus-int, there is a fix-it to change \"foo + \'a\'\" to \"&foo[\'a\']\"\niff the character literal is on the right side of the string.\n\nPatch by Anders Rönnholm!\n\nllvm-svn: 193418"}, | ||
[ | [g]={{v,11642,"/// diagnoseStringPlusInt - Emit a warning when adding an integer to a string\n/// literal.\nstatic void diagnoseStringPlusInt(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // Only print a fixit for \"str\" + int, not for int + \"str\".\n if (IndexExpr == RHSExpr) {\n // ...\n Self.Diag(OpLoc, diag::note_string_plus_scalar_silence) << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), \"&\") << FixItHint::CreateReplacement(SourceRange(OpLoc), \"[\") << FixItHint::CreateInsertion(EndLoc, \"]\");"},{v,11677,"/// diagnoseStringPlusInt - Emit a warning when adding an integer to a string\n/// literal.\nstatic void diagnoseStringPlusInt(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // Only print a fixit for \"str\" + int, not for int + \"str\".\n if (IndexExpr == RHSExpr) {\n // ...\n } else\n Self.Diag(OpLoc, diag::note_string_plus_scalar_silence);"},{v,11692,"/// Emit a warning when adding a char literal to a string.\nstatic void diagnoseStringPlusChar(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // Only print a fixit for str + char, not for char + str.\n if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) {\n // ...\n Self.Diag(OpLoc, diag::note_string_plus_scalar_silence) << FixItHint::CreateInsertion(LHSExpr->getBeginLoc(), \"&\") << FixItHint::CreateReplacement(SourceRange(OpLoc), \"[\") << FixItHint::CreateInsertion(EndLoc, \"]\");"},{v,11701,"/// Emit a warning when adding a char literal to a string.\nstatic void diagnoseStringPlusChar(Sema &Self, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n // Only print a fixit for str + char, not for char + str.\n if (isa<CharacterLiteral>(RHSExpr->IgnoreImpCasts())) {\n // ...\n } else {\n Self.Diag(OpLoc, diag::note_string_plus_scalar_silence);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/string-plus-char.c"]={"clang/test/Sema/string-plus-char.c:6:16: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:11:20: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:13:28: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:15:13: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:18:16: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:20:20: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:24:23: note: use array indexing to silence this warning"} | ["clang/test/Sema/string-plus-char.c"]={"clang/test/Sema/string-plus-char.c:6:16: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:11:20: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:13:28: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:15:13: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:18:16: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:20:20: note: use array indexing to silence this warning","clang/test/Sema/string-plus-char.c:24:23: note: use array indexing to silence this warning"} | ||
} | } | ||
}, | }, | ||
["note_strlcpycat_wrong_size"]={ | ["note_strlcpycat_wrong_size"]={ | ||
[e]="change size argument to be the size of the destination", | [e]="change size argument to be the size of the destination", | ||
[ | [a]=k, | ||
[b]="change size argument to be the size of the destination", | [b]="change size argument to be the size of the destination", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d5fe9e4d9741",1313624436,"Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat i...","Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now).\n\nWarning logic provided by Geoff Keating.\n\nllvm-svn: 137903"}, | ||
[ | [g]={{y,12712,"// Warn if the user has made the \'size\' argument to strlcpy or strlcat\n// be the size of the source, instead of the destination.\nvoid Sema::CheckStrlcpycatArguments(const CallExpr *Call, IdentifierInfo *FnName) {\n // ...\n Diag(OriginalSizeArg->getBeginLoc(), diag::note_strlcpycat_wrong_size) << FixItHint::CreateReplacement(OriginalSizeArg->getSourceRange(), OS.str());"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-strlcpycat-size.c"]={"clang/test/Sema/warn-strlcpycat-size.c:22:19: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:23:19: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:24:19: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:25:22: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:26:29: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:54:19: note: change size argument to be the size of the destination"} | ["clang/test/Sema/warn-strlcpycat-size.c"]={"clang/test/Sema/warn-strlcpycat-size.c:22:19: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:23:19: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:24:19: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:25:22: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:26:29: note: change size argument to be the size of the destination","clang/test/Sema/warn-strlcpycat-size.c:54:19: note: change size argument to be the size of the destination"} | ||
} | } | ||
}, | }, | ||
["note_strncat_wrong_size"]={ | ["note_strncat_wrong_size"]={ | ||
[e]="change the argument to be the free space in the destination buffer minus the terminating null byte", | [e]="change the argument to be the free space in the destination buffer minus the terminating null byte", | ||
[ | [a]=k, | ||
[b]="change the argument to be the free space in the destination buffer minus the terminating null byte", | [b]="change the argument to be the free space in the destination buffer minus the terminating null byte", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"314cd09b5c79",1328123337,"Add a new compiler warning, which flags anti-patterns used as the size\nargument in strncat.\n\nThe war...","Add a new compiler warning, which flags anti-patterns used as the size\nargument in strncat.\n\nThe warning is ignored by default since it needs more qualification. \n\nTODO: The warning message and the note are messy when\nstrncat is a builtin due to the macro expansion.\n\nllvm-svn: 149524"}, | ||
[ | [g]={{y,12816,"// Warn on anti-patterns as the \'size\' argument to strncat.\n// The correct size argument should look like following:\n// strncat(dst, src, sizeof(dst) - strlen(dest) - 1);\nvoid Sema::CheckStrncatArguments(const CallExpr *CE, IdentifierInfo *FnName) {\n // ...\n Diag(SL, diag::note_strncat_wrong_size) << FixItHint::CreateReplacement(SR, OS.str());"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:33:22: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:35:22: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:37:48: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:39:52: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:41:29: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:43:22: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:70:19: note: change the argument to be the free space in the destination buffer minus the terminating null byte"} | ["clang/test/Sema/warn-strncat-size.c"]={"clang/test/Sema/warn-strncat-size.c:33:22: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:35:22: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:37:48: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:39:52: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:41:29: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:43:22: note: change the argument to be the free space in the destination buffer minus the terminating null byte","clang/test/Sema/warn-strncat-size.c:70:19: note: change the argument to be the free space in the destination buffer minus the terminating null byte"} | ||
} | } | ||
}, | }, | ||
["note_struct_class_suggestion"]={ | ["note_struct_class_suggestion"]={ | ||
[e]="did you mean %select{struct|interface|class}0 here?", | [e]="did you mean %select{struct|interface|class}0 here?", | ||
[ | [a]=k, | ||
[b]="did you mean (?:struct|interface|class) here\\?", | [b]="did you mean (?:struct|interface|class) here\\?", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"caa33d36fb3f",1307675486,"Made changes to how \'struct\'/\'class\' mismatches are handled in -Wmismatched-tags.\n- Removed fix-it h...","Made changes to how \'struct\'/\'class\' mismatches are handled in -Wmismatched-tags.\n- Removed fix-it hints from template instaniations since changes to the\ntemplates are rarely helpful.\n- Changed the caret in template instaniations from the class/struct name to the\nclass/struct keyword, matching the other warnings.\n- Do not offer fix-it hints when multiple declarations disagree. Warnings are\nstill given.\n- Once a definition is found, offer a fix-it hint to all previous declarations\nwith wrong tag.\n- Declarations that disagree with a previous definition will get a fix-it hint\nto change the declaration.\n\nllvm-svn: 132831"}, | ||
[ | [g]={{p,16656,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n if (isDefinition) {\n // ...\n for (const TagDecl *I : Previous->redecls()) {\n if (I->getTagKind() != NewTag) {\n // ...\n Diag(I->getInnerLocStart(), diag::note_struct_class_suggestion) << getRedeclDiagFromTagKind(NewTag) << FixItHint::CreateReplacement(I->getInnerLocStart(), TypeWithKeyword::getTagTypeKindName(NewTag));"},{p,16680,"/// Determine whether a tag with a given kind is acceptable\n/// as a redeclaration of the given tag declaration.\n///\n/// \\returns true if the new tag kind is acceptable, false otherwise.\nbool Sema::isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name) {\n // ...\n if (Redecl->getTagKind() != NewTag) {\n // ...\n // If there is a previous definition, suggest a fix-it.\n if (PrevDef) {\n Diag(NewTagLoc, diag::note_struct_class_suggestion) << getRedeclDiagFromTagKind(Redecl->getTagKind()) << FixItHint::CreateReplacement(SourceRange(NewTagLoc), TypeWithKeyword::getTagTypeKindName(Redecl->getTagKind()));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/struct-class-redecl.cpp"]={"clang/test/SemaCXX/struct-class-redecl.cpp:7:22: note: did you mean class here?","clang/test/SemaCXX/struct-class-redecl.cpp:21:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:20:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:32:1: note: did you mean class here?","clang/test/SemaCXX/struct-class-redecl.cpp:27:1: note: did you mean class here?","clang/test/SemaCXX/struct-class-redecl.cpp:40:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:52:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:54:19: note: did you mean struct here?"} | ["clang/test/SemaCXX/struct-class-redecl.cpp"]={"clang/test/SemaCXX/struct-class-redecl.cpp:7:22: note: did you mean class here?","clang/test/SemaCXX/struct-class-redecl.cpp:21:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:20:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:32:1: note: did you mean class here?","clang/test/SemaCXX/struct-class-redecl.cpp:27:1: note: did you mean class here?","clang/test/SemaCXX/struct-class-redecl.cpp:40:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:52:1: note: did you mean struct here?","clang/test/SemaCXX/struct-class-redecl.cpp:54:19: note: did you mean struct here?"} | ||
} | } | ||
}, | }, | ||
["note_substituted_constraint_expr_is_ill_formed"]={ | ["note_substituted_constraint_expr_is_ill_formed"]={ | ||
[e]="because substituted constraint expression is ill-formed%0", | [e]="because substituted constraint expression is ill-formed%0", | ||
[ | [a]=k, | ||
[b]="because substituted constraint expression is ill\\-formed(.*?)", | [b]="because substituted constraint expression is ill\\-formed(.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nTh...","[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"}, | ||
[ | [g]={{"clang/lib/Sema/SemaConcept.cpp",1576,"template <typename SubstitutionDiagnostic> static void diagnoseUnsatisfiedConstraintExpr(Sema &S, const Expr *E, const llvm::PointerUnion<Expr *, SubstitutionDiagnostic *> &Record, bool First = true) {\n if (auto *Diag = Record.template dyn_cast<SubstitutionDiagnostic *>()) {\n S.Diag(Diag->first, diag::note_substituted_constraint_expr_is_ill_formed) << Diag->second;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp:26:36: note: because substituted constraint expression is ill-formed: invalid operands to binary expression (\'A\' and \'A\')","clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp:32:39: note: because substituted constraint expression is ill-formed: invalid operands to binary expression (\'A\' and \'A\')"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp:26:36: note: because substituted constraint expression is ill-formed: invalid operands to binary expression (\'A\' and \'A\')","clang/test/CXX/temp/temp.constr/temp.constr.constr/function-templates.cpp:32:39: note: because substituted constraint expression is ill-formed: invalid operands to binary expression (\'A\' and \'A\')"} | ||
} | } | ||
}, | }, | ||
["note_suggest_disabling_all_checkers"]={ | ["note_suggest_disabling_all_checkers"]={ | ||
[e]="use -analyzer-disable-all-checks to disable all static analyzer checkers", | [e]="use -analyzer-disable-all-checks to disable all static analyzer checkers", | ||
[ | [a]=k, | ||
[b]="use \\-analyzer\\-disable\\-all\\-checks to disable all static analyzer checkers", | [b]="use \\-analyzer\\-disable\\-all\\-checks to disable all static analyzer checkers", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"d5478fdd8f05",1409342498,"Add an option to silence all analyzer warnings.\n\nPeople have been incorrectly using \"-analyzer-disab...","Add an option to silence all analyzer warnings.\n\nPeople have been incorrectly using \"-analyzer-disable-checker\" to\nsilence analyzer warnings on a file, when analyzing a project. Add\nthe \"-analyzer-disable-all-checks\" option, which would allow the\nsuppression and suggest it as part of the error message for\n\"-analyzer-disable-checker\". The idea here is to compose this with\n\"--analyze\" so that users can selectively opt out specific files from\nstatic analysis.\n\nllvm-svn: 216763"}, | ||
[ | [g]={{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",179,"#endif\n // ...\n // Parse \'-analyzer-checker\' and \'-analyzer-disable-checker\' options from the\n // command line.\n for (const std::pair<std::string, bool> &Opt : AnOpts.CheckersAndPackages) {\n // ...\n if (CheckerForCmdLineArg.begin() == CheckerForCmdLineArg.end()) {\n // ...\n Diags.Report(diag::note_suggest_disabling_all_checkers);"}} | ||
}, | }, | ||
["note_suggest_parens_for_macro"]={ | ["note_suggest_parens_for_macro"]={ | ||
[e]="parentheses are required around macro argument containing braced initializer list", | [e]="parentheses are required around macro argument containing braced initializer list", | ||
[ | [a]=k, | ||
[b]="parentheses are required around macro argument containing braced initializer list", | [b]="parentheses are required around macro argument containing braced initializer list", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"79b45389c3cd",1374602509,"Add new diagnostic messages when too many arguments are presented to a\nfunction-like macro. Clang w...","Add new diagnostic messages when too many arguments are presented to a\nfunction-like macro. Clang will attempt to correct the arguments by detecting\nbraced initializer lists:\n\n1) If possible, suggest parentheses around arguments\ncontaining braced lists which will give the proper number of arguments.\n2) If a braced list is detected at the start of a macro argument, it cannot be\ncorrected by parentheses. Instead, just point out the location of these\nbraced lists.\n\nllvm-svn: 186971"}, | ||
[ | [g]={{Pc,955,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n // If this is not a variadic macro, and too many args were specified, emit\n // an error.\n if (!isVariadic && NumActuals > MinArgsExpected && !ContainsCodeCompletionTok) {\n // ...\n DiagnosticBuilder DB = Diag(MacroName, diag::note_suggest_parens_for_macro);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/update_consecutive_macro_crash.cpp"]={"clang/test/Lexer/update_consecutive_macro_crash.cpp:14:3: note: parentheses are required around macro argument containing braced initializer list"} | ["clang/test/Lexer/update_consecutive_macro_crash.cpp"]={"clang/test/Lexer/update_consecutive_macro_crash.cpp:14:3: note: parentheses are required around macro argument containing braced initializer list"} | ||
} | } | ||
}, | }, | ||
["note_suppress_ctad_maybe_unsupported"]={ | ["note_suppress_ctad_maybe_unsupported"]={ | ||
[e]="add a deduction guide to suppress this warning", | [e]="add a deduction guide to suppress this warning", | ||
[ | [a]=k, | ||
[b]="add a deduction guide to suppress this warning", | [b]="add a deduction guide to suppress this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"73b51ae160af",1547761464,"Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides.\n\nSumma...","Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides.\n\nSummary:\nSome style guides want to allow using CTAD only on types that \"opt-in\"; i.e. on types that are designed to support it and not just types that *happen* to work with it.\n\nThis patch implements the `-Wctad-maybe-unsupported` warning, which is off by default, which warns when CTAD is used on a type that does not define any deduction guides.\n\nThe following pattern can be used to suppress the warning in cases where the type intentionally doesn\'t define any deduction guides:\n\n```\nstruct allow_ctad_t;\n\ntemplate <class T>\nstruct TestSuppression {\n TestSuppression(T) {}\n};\nTestSuppression(allow_ctad_t)->TestSuppression<void>; // guides with incomplete parameter types are never considered.\n```\n\nReviewers: rsmith, james.dennett, gromer\n\nReviewed By: rsmith\n\nSubscribers: jdennett, Quuxplusone, lebedev.ri, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D56731\n\nllvm-svn: 351484"}, | ||
[ | [g]={{Q,10919,"QualType Sema::DeduceTemplateSpecializationFromInitializer(TypeSourceInfo *TSInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Inits, ParenListExpr *PL) {\n // ...\n // Warn if CTAD was used on a type that does not have any user-defined\n // deduction guides.\n if (!FoundDeductionGuide) {\n // ...\n Diag(Template->getLocation(), diag::note_suppress_ctad_maybe_unsupported);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp"]={"clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:452:8: note: add a deduction guide to suppress this warning","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:471:8: note: add a deduction guide to suppress this warning","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:480:8: note: add a deduction guide to suppress this warning"} | ["clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp"]={"clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:452:8: note: add a deduction guide to suppress this warning","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:471:8: note: add a deduction guide to suppress this warning","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:480:8: note: add a deduction guide to suppress this warning"} | ||
} | } | ||
}, | }, | ||
["note_suppressed_class_declare"]={ | ["note_suppressed_class_declare"]={ | ||
[e]="class with specified objc_requires_property_definitions attribute is declared here", | [e]="class with specified objc_requires_property_definitions attribute is declared here", | ||
[ | [a]=k, | ||
[b]="class with specified objc_requires_property_definitions attribute is declared here", | [b]="class with specified objc_requires_property_definitions attribute is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"783ffde6d3f0",1325718973,"objc: When issuing warning for missing synthesis for\nproperties in classes declared with objc_suppre...","objc: When issuing warning for missing synthesis for\nproperties in classes declared with objc_suppress_autosynthesis\nattribute, pinpoint location of the said class in a note.\n\nllvm-svn: 147562"}, | ||
[ | [g]={{x,2026,"static void DiagnoseUnimplementedAccessor(Sema &S, ObjCInterfaceDecl *PrimaryClass, Selector Method, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, ObjCCategoryDecl *C, ObjCPropertyDecl *Prop, llvm::SmallPtrSet<const ObjCMethodDecl *, 8> &SMap) {\n // ...\n // When reporting on missing property setter/getter implementation in\n // categories, do not report when they are declared in primary class,\n // class\'s protocol, or one of it super classes. This is because,\n // the class is going to implement them.\n if (I == SMap.end() && (PrimaryClass == nullptr || !PrimaryClass->lookupPropertyAccessor(Method, C, Prop->isClassProperty()))) {\n // ...\n if (S.LangOpts.ObjCDefaultSynthProperties && S.LangOpts.ObjCRuntime.isNonFragile())\n if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CDecl))\n if (const ObjCInterfaceDecl *RID = ID->isObjCRequiresPropertyDefs())\n S.Diag(RID->getLocation(), diag::note_suppressed_class_declare);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:7:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:7:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:16:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:16:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:16:12: note: class with specified objc_requires_property_definitions attribute is declared here"} | ["clang/test/SemaObjC/default-synthesize-3.m"]={"clang/test/SemaObjC/default-synthesize-3.m:7:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:7:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:16:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:16:12: note: class with specified objc_requires_property_definitions attribute is declared here","clang/test/SemaObjC/default-synthesize-3.m:16:12: note: class with specified objc_requires_property_definitions attribute is declared here"} | ||
} | } | ||
}, | }, | ||
["note_surrounding_namespace_ends_here"]={ | ["note_surrounding_namespace_ends_here"]={ | ||
[e]="surrounding namespace with visibility attribute ends here", | [e]="surrounding namespace with visibility attribute ends here", | ||
[ | [a]=k, | ||
[b]="surrounding namespace with visibility attribute ends here", | [b]="surrounding namespace with visibility attribute ends here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d65d7b63d1c",1328138699,"Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559","Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559"}, | ||
[ | [g]={{nb,1380,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n // ...\n Diag(EndLoc, diag::note_surrounding_namespace_ends_here);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/pragma-visibility.cpp"]={"clang/test/SemaCXX/pragma-visibility.cpp:10:1: note: surrounding namespace with visibility attribute ends here"} | ["clang/test/SemaCXX/pragma-visibility.cpp"]={"clang/test/SemaCXX/pragma-visibility.cpp:10:1: note: surrounding namespace with visibility attribute ends here"} | ||
} | } | ||
}, | }, | ||
["note_surrounding_namespace_starts_here"]={ | ["note_surrounding_namespace_starts_here"]={ | ||
[e]="surrounding namespace with visibility attribute starts here", | [e]="surrounding namespace with visibility attribute starts here", | ||
[ | [a]=k, | ||
[b]="surrounding namespace with visibility attribute starts here", | [b]="surrounding namespace with visibility attribute starts here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d65d7b63d1c",1328138699,"Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559","Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559"}, | ||
[ | [g]={{nb,1,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n // ...\n } else if (!StartsWithPragma && !IsNamespaceEnd) {\n // ...\n Diag(Back->second, diag::note_surrounding_namespace_starts_here);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/pragma-visibility.cpp"]={"clang/test/SemaCXX/pragma-visibility.cpp:3:11: note: surrounding namespace with visibility attribute starts here"} | ["clang/test/SemaCXX/pragma-visibility.cpp"]={"clang/test/SemaCXX/pragma-visibility.cpp:3:11: note: surrounding namespace with visibility attribute starts here"} | ||
} | } | ||
}, | }, | ||
["note_suspicious_bzero_size_silence"]={ | ["note_suspicious_bzero_size_silence"]={ | ||
[e]="parenthesize the second argument to silence", | [e]="parenthesize the second argument to silence", | ||
[ | [a]=k, | ||
[b]="parenthesize the second argument to silence", | [b]="parenthesize the second argument to silence", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d1cf276621a7",1532018775,"[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the sec...","[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the second and third arguments\ntransposed, for example:\n\n memset(buf, sizeof(buf), 0);\n\nThis is done by checking if the third argument is a literal 0, or if the second\nis a sizeof expression (and the third isn\'t). The first check is also done for\ncalls to bzero.\n\nDifferential revision: https://reviews.llvm.org/D49112\n\nllvm-svn: 337470"}, | ||
[ | [g]={{y,12394,"/// Diagnose cases like \'memset(buf, sizeof(buf), 0)\', which should have the\n/// last two arguments transposed.\nstatic void CheckMemaccessSize(Sema &S, unsigned BId, const CallExpr *Call) {\n // ...\n if (isLiteralZero(SizeArg) && !isArgumentExpandedFromMacro(SM, CallLoc, SizeArg->getExprLoc())) {\n // ...\n // Some platforms #define bzero to __builtin_memset. See if this is the\n // case, and if so, emit a better diagnostic.\n if (BId == Builtin::BIbzero || (CallLoc.isMacroID() && Lexer::getImmediateMacroName(CallLoc, SM, S.getLangOpts()) == \"bzero\")) {\n // ...\n S.Diag(DiagLoc, diag::note_suspicious_bzero_size_silence);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:29:14: note: parenthesize the second argument to silence","clang/test/Sema/transpose-memset.c:30:19: note: parenthesize the second argument to silence","clang/test/Sema/transpose-memset.c:51:3: note: parenthesize the second argument to silence","clang/test/Sema/transpose-memset.c:62:26: note: parenthesize the second argument to silence"} | ["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:29:14: note: parenthesize the second argument to silence","clang/test/Sema/transpose-memset.c:30:19: note: parenthesize the second argument to silence","clang/test/Sema/transpose-memset.c:51:3: note: parenthesize the second argument to silence","clang/test/Sema/transpose-memset.c:62:26: note: parenthesize the second argument to silence"} | ||
} | } | ||
}, | }, | ||
["note_suspicious_sizeof_memset_silence"]={ | ["note_suspicious_sizeof_memset_silence"]={ | ||
[e]="%select{parenthesize the third argument|cast the second argument to \'int\'}0 to silence", | [e]="%select{parenthesize the third argument|cast the second argument to \'int\'}0 to silence", | ||
[ | [a]=k, | ||
[b]="(?:parenthesize the third argument|cast the second argument to \'int\') to silence", | [b]="(?:parenthesize the third argument|cast the second argument to \'int\') to silence", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d1cf276621a7",1532018775,"[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the sec...","[Sema] Add a new warning, -Wmemset-transposed-args\n\nThis diagnoses calls to memset that have the second and third arguments\ntransposed, for example:\n\n memset(buf, sizeof(buf), 0);\n\nThis is done by checking if the third argument is a literal 0, or if the second\nis a sizeof expression (and the third isn\'t). The first check is also done for\ncalls to bzero.\n\nDifferential revision: https://reviews.llvm.org/D49112\n\nllvm-svn: 337470"}, | ||
[ | [g]={{y,12397,"/// Diagnose cases like \'memset(buf, sizeof(buf), 0)\', which should have the\n/// last two arguments transposed.\nstatic void CheckMemaccessSize(Sema &S, unsigned BId, const CallExpr *Call) {\n // ...\n if (isLiteralZero(SizeArg) && !isArgumentExpandedFromMacro(SM, CallLoc, SizeArg->getExprLoc())) {\n // ...\n // Some platforms #define bzero to __builtin_memset. See if this is the\n // case, and if so, emit a better diagnostic.\n if (BId == Builtin::BIbzero || (CallLoc.isMacroID() && Lexer::getImmediateMacroName(CallLoc, SM, S.getLangOpts()) == \"bzero\")) {\n // ...\n } else if (!isLiteralZero(Call->getArg(1)->IgnoreImpCasts())) {\n // ...\n S.Diag(DiagLoc, diag::note_suspicious_sizeof_memset_silence) << 0;"},{y,12410,"/// Diagnose cases like \'memset(buf, sizeof(buf), 0)\', which should have the\n/// last two arguments transposed.\nstatic void CheckMemaccessSize(Sema &S, unsigned BId, const CallExpr *Call) {\n // ...\n // If the second argument to a memset is a sizeof expression and the third\n // isn\'t, this is also likely an error. This should catch\n // \'memset(buf, sizeof(buf), 0xff)\'.\n if (BId == Builtin::BImemset && doesExprLikelyComputeSize(Call->getArg(1)) && !doesExprLikelyComputeSize(Call->getArg(2))) {\n // ...\n S.Diag(DiagLoc, diag::note_suspicious_sizeof_memset_silence) << 1;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:12:32: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:13:17: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:14:32: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:15:28: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:16:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:17:28: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:18:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:19:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:20:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:38:17: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:51:3: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:61:30: note: parenthesize the third argument to silence"} | ["clang/test/Sema/transpose-memset.c"]={"clang/test/Sema/transpose-memset.c:12:32: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:13:17: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:14:32: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:15:28: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:16:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:17:28: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:18:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:19:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:20:15: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:38:17: note: cast the second argument to \'int\' to silence","clang/test/Sema/transpose-memset.c:51:3: note: parenthesize the third argument to silence","clang/test/Sema/transpose-memset.c:61:30: note: parenthesize the third argument to silence"} | ||
} | } | ||
}, | }, | ||
["note_switch_conversion"]={ | ["note_switch_conversion"]={ | ||
[e]="conversion to %select{integral|enumeration}0 type %1", | [e]="conversion to %select{integral|enumeration}0 type %1", | ||
[ | [a]=k, | ||
[b]="conversion to (?:integral|enumeration) type (.*?)", | [b]="conversion to (?:integral|enumeration) type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d0c22e0d10fc",1258983968,"Implement conversion from a switch condition with class type to an\nintegral or enumeration type (vi ...","Implement conversion from a switch condition with class type to an\nintegral or enumeration type (vi user-defined conversions). Fixes PR5518.\n\nllvm-svn: 89655"}, | ||
[ | [g]={{J,1056,"ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {\n class SwitchConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_switch_conversion) << ConvTy->isEnumeralType() << ConvTy; }"},{J,1067,"ExprResult Sema::CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond) {\n class SwitchConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_switch_conversion) << ConvTy->isEnumeralType() << ConvTy; }"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/switch-0x.cpp"]={"clang/test/SemaCXX/switch-0x.cpp:5:12: note: conversion to integral type \'int\'"} | ["clang/test/SemaCXX/switch-0x.cpp"]={"clang/test/SemaCXX/switch-0x.cpp:5:12: note: conversion to integral type \'int\'"} | ||
} | } | ||
}, | }, | ||
["note_tail_call_required"]={ | ["note_tail_call_required"]={ | ||
[e]="tail call required by %0 attribute here", | [e]="tail call required by %0 attribute here", | ||
[ | [a]=k, | ||
[b]="tail call required by (.*?) attribute here", | [b]="tail call required by (.*?) attribute here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the re...","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | ||
[ | [g]={{J,687,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n auto GetMethodType = [this, St, MTA](const CXXMethodDecl *CMD, FuncType &Type, bool IsCallee) -> bool {\n if (isa<CXXConstructorDecl, CXXDestructorDecl>(CMD)) {\n // ...\n Diag(MTA.getLocation(), diag::note_tail_call_required) << &MTA;"},{J,745,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n // Find callee function signature.\n if (const CXXMethodDecl *CMD = dyn_cast_or_null<CXXMethodDecl>(CE->getCalleeDecl())) {\n // ...\n } else if (CalleeBinOp && CalleeBinOp->isPtrMemOp()) {\n // ...\n } else if (isa<CXXPseudoDestructorExpr>(CalleeExpr)) {\n // ...\n Diag(MTA.getLocation(), diag::note_tail_call_required) << &MTA;"},{J,781,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n // Caller and callee must have matching calling conventions.\n //\n // Some calling conventions are physically capable of supporting tail calls\n // even if the function types don\'t perfectly match. LLVM is currently too\n // strict to allow this, but if LLVM added support for this in the future, we\n // could exit early here and skip the remaining checks if the functions are\n // using such a calling convention.\n if (CallerType.Func->getCallConv() != CalleeType.Func->getCallConv()) {\n // ...\n Diag(MTA.getLocation(), diag::note_tail_call_required) << &MTA;"},{J,801,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n // Caller and callee must match in whether they have a \"this\" parameter.\n if (CallerType.This.isNull() != CalleeType.This.isNull()) {\n // ...\n Diag(MTA.getLocation(), diag::note_tail_call_required) << &MTA;"},{J,859,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n if (!CheckTypesMatch(CallerType, CalleeType, PD)) {\n // ...\n Diag(MTA.getLocation(), diag::note_tail_call_required) << &MTA;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:19:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:25:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:31:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:40:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:47:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:86:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:135:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:139:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:149:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:156:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:162:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:174:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:185:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:192:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:211:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:233:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:240:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:252:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:110:5: note: tail call required by \'musttail\' attribute here"} | ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:19:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:25:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:31:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:40:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:47:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:86:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:135:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:139:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:149:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:156:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:162:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:174:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:185:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:192:7: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:211:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:233:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:240:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:252:5: note: tail call required by \'musttail\' attribute here","clang/test/SemaCXX/attr-musttail.cpp:110:5: note: tail call required by \'musttail\' attribute here"} | ||
} | } | ||
}, | }, | ||
["note_template_arg_internal_object"]={ | ["note_template_arg_internal_object"]={ | ||
[e]="non-type template argument refers to %select{function|object}0 here", | [e]="non-type template argument refers to %select{function|object}0 here", | ||
[ | [a]=k, | ||
[b]="non\\-type template argument refers to (?:function|object) here", | [b]="non\\-type template argument refers to (?:function|object) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,6875,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n // Address / reference template args must have external linkage in C++98.\n if (Entity->getFormalLinkage() == InternalLinkage) {\n // ...\n S.Diag(Entity->getLocation(), diag::note_template_arg_internal_object) << !Func;"},{r,6880,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n // Address / reference template args must have external linkage in C++98.\n if (Entity->getFormalLinkage() == InternalLinkage) {\n // ...\n } else if (!Entity->hasLinkage()) {\n // ...\n S.Diag(Entity->getLocation(), diag::note_template_arg_internal_object) << !Func;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:167:31: note: non-type template argument refers to function here"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp:167:31: note: non-type template argument refers to function here"} | ||
} | } | ||
}, | }, | ||
["note_template_arg_refers_here"]={ | ["note_template_arg_refers_here"]={ | ||
[e]="non-type template argument refers here", | [e]="non-type template argument refers here", | ||
[ | [a]=k, | ||
[b]="non\\-type template argument refers here", | [b]="non\\-type template argument refers here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,6864,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n // A non-type template argument must refer to an object or function.\n if (!Func && !Var && !Guid) {\n // ...\n S.Diag(Entity->getLocation(), diag::note_template_arg_refers_here);"},{r,6898,"/// Checks whether the given template argument is the address\n/// of an object or function according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentAddressOfObjectOrFunction(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *ArgIn, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n if (Var) {\n // ...\n // A template argument must have static storage duration.\n if (Var->getTLSKind()) {\n // ...\n S.Diag(Var->getLocation(), diag::note_template_arg_refers_here);"},{r,7099,"/// Checks whether the given template argument is a pointer to\n/// member constant according to C++ [temp.arg.nontype]p1.\nstatic bool CheckTemplateArgumentPointerToMember(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *&ResultArg, TemplateArgument &SugaredConverted, TemplateArgument &CanonicalConverted) {\n // ...\n S.Diag(DRE->getDecl()->getLocation(), diag::note_template_arg_refers_here);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:19:18: note: non-type template argument refers here"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:19:18: note: non-type template argument refers here"} | ||
} | } | ||
}, | }, | ||
["note_template_arg_refers_here_func"]={ | ["note_template_arg_refers_here_func"]={ | ||
[e]="template argument refers to function template %0, here", | [e]="template argument refers to function template %0, here", | ||
[ | [a]=k, | ||
[b]="template argument refers to function template (.*?), here", | [b]="template argument refers to function template (.*?), here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,7774,"/// Check a template argument against its corresponding\n/// template template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.template].\n/// It returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg) {\n // ...\n // C++0x [temp.arg.template]p1:\n // A template-argument for a template template-parameter shall be\n // the name of a class template or an alias template, expressed as an\n // id-expression. When the template-argument names a class template, only\n // primary class templates are considered when matching the\n // template template argument with the corresponding parameter;\n // partial specializations are not considered even if their\n // parameter lists match that of the template template parameter.\n //\n // Note that we also allow template template parameters here, which\n // will happen when we are dealing with, e.g., class template\n // partial specializations.\n if (!isa<ClassTemplateDecl>(Template) && !isa<TemplateTemplateParmDecl>(Template) && !isa<TypeAliasTemplateDecl>(Template) && !isa<BuiltinTemplateDecl>(Template)) {\n // ...\n Diag(Template->getLocation(), diag::note_template_arg_refers_here_func) << Template;"}} | ||
}, | }, | ||
["note_template_class_explicit_specialization_was_here"]={ | ["note_template_class_explicit_specialization_was_here"]={ | ||
[e]="class template %0 was explicitly specialized here", | [e]="class template %0 was explicitly specialized here", | ||
[ | [a]=k, | ||
[b]="class template (.*?) was explicitly specialized here", | [b]="class template (.*?) was explicitly specialized here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"9bea9cc73bd0",1403720757,"MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)\n\nConsi...","MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)\n\nConsider the following code:\n\n template <typename T> class Base {};\n class __declspec(dllexport) class Derived : public Base<int> {}\n\nWhen the base of an exported or imported class is a class template\nspecialization, MSVC will propagate the dll attribute to the base.\nIn the example code, Base<int> becomes a dllexported class.\n\nThis commit makes Clang do the proopagation when the base hasn\'t been\ninstantiated yet, and warns about it being unsupported otherwise.\nThis is different from MSVC, which allows changing a specialization\nback and forth between dllimport and dllexport and seems to let the\nlast one win. Changing the dll attribute after instantiation would be\nhard for us, and doesn\'t seem to come up in practice, so I think this\nis a reasonable limitation to have.\n\nMinGW doesn\'t do this kind of propagation.\n\nDifferential Revision: http://reviews.llvm.org/D4264\n\nllvm-svn: 211725"}, | ||
[ | [g]={{s,6661,"/// 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 if (BaseTemplateSpec->isExplicitSpecialization()) {\n Diag(BaseTemplateSpec->getLocation(), diag::note_template_class_explicit_specialization_was_here) << BaseTemplateSpec;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:451:20: note: class template \'ExplicitlySpecializedTemplate<int>\' was explicitly specialized here"} | ["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:451:20: note: class template \'ExplicitlySpecializedTemplate<int>\' was explicitly specialized here"} | ||
} | } | ||
}, | }, | ||
["note_template_class_instantiation_here"]={ | ["note_template_class_instantiation_here"]={ | ||
[e]="in instantiation of template class %q0 requested here", | [e]="in instantiation of template class %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of template class (.*?) requested here", | [b]="in instantiation of template class (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{bb,766,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n if (isa<ClassTemplateSpecializationDecl>(Record))\n DiagID = diag::note_template_class_instantiation_here;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-typedef.cpp"]={"clang/test/SemaTemplate/instantiate-typedef.cpp:14:1: note: in instantiation of template class \'add_pointer<int &>\' requested here"} | ["clang/test/SemaTemplate/instantiate-typedef.cpp"]={"clang/test/SemaTemplate/instantiate-typedef.cpp:14:1: note: in instantiation of template class \'add_pointer<int &>\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_class_instantiation_was_here"]={ | ["note_template_class_instantiation_was_here"]={ | ||
[e]="class template %0 was instantiated here", | [e]="class template %0 was instantiated here", | ||
[ | [a]=k, | ||
[b]="class template (.*?) was instantiated here", | [b]="class template (.*?) was instantiated here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"9bea9cc73bd0",1403720757,"MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)\n\nConsi...","MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)\n\nConsider the following code:\n\n template <typename T> class Base {};\n class __declspec(dllexport) class Derived : public Base<int> {}\n\nWhen the base of an exported or imported class is a class template\nspecialization, MSVC will propagate the dll attribute to the base.\nIn the example code, Base<int> becomes a dllexported class.\n\nThis commit makes Clang do the proopagation when the base hasn\'t been\ninstantiated yet, and warns about it being unsupported otherwise.\nThis is different from MSVC, which allows changing a specialization\nback and forth between dllimport and dllexport and seems to let the\nlast one win. Changing the dll attribute after instantiation would be\nhard for us, and doesn\'t seem to come up in practice, so I think this\nis a reasonable limitation to have.\n\nMinGW doesn\'t do this kind of propagation.\n\nDifferential Revision: http://reviews.llvm.org/D4264\n\nllvm-svn: 211725"}, | ||
[ | [g]={{s,6665,"/// 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 if (BaseTemplateSpec->isExplicitSpecialization()) {\n // ...\n } else {\n Diag(BaseTemplateSpec->getPointOfInstantiation(), diag::note_template_class_instantiation_was_here) << BaseTemplateSpec;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:461:17: note: class template \'ExplicitlyInstantiatedTemplate<int>\' was instantiated here"} | ["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:461:17: note: class template \'ExplicitlyInstantiatedTemplate<int>\' was instantiated here"} | ||
} | } | ||
}, | }, | ||
["note_template_decl_here"]={ | ["note_template_decl_here"]={ | ||
[e]="template is declared here", | [e]="template is declared here", | ||
[ | [a]=k, | ||
[b]="template is declared here", | [b]="template is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{p,5863,"/// Retrieves the declaration name from a parsed unqualified-id.\nDeclarationNameInfo Sema::GetNameFromUnqualifiedId(const UnqualifiedId &Name) {\n // ...\n case UnqualifiedIdKind::IK_DeductionGuideName: {\n // ...\n if (!Template || !isa<ClassTemplateDecl>(Template)) {\n // ...\n if (Template)\n Diag(Template->getLocation(), diag::note_template_decl_here);"},{s,11238,"/// Check the validity of a declarator that we parsed for a deduction-guide.\n/// These aren\'t actually declarators in the grammar, so we need to check that\n/// the user didn\'t specify any pieces that are not part of the deduction-guide\n/// grammar. Return true on invalid deduction-guide.\nbool Sema::CheckDeductionGuideDeclarator(Declarator &D, QualType &R, StorageClass &SC) {\n // ...\n // C++ [temp.deduct.guide]p3:\n // A deduction-gide shall be declared in the same scope as the\n // corresponding class template.\n if (!CurContext->getRedeclContext()->Equals(GuidedTemplateDecl->getDeclContext()->getRedeclContext())) {\n // ...\n Diag(GuidedTemplateDecl->getLocation(), diag::note_template_decl_here);"},{Q,10578,"QualType Sema::DeduceTemplateSpecializationFromInitializer(TypeSourceInfo *TSInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Inits, ParenListExpr *PL) {\n // ...\n if (!Template) {\n // ...\n if (auto *TD = TemplateName.getAsTemplateDecl())\n Diag(TD->getLocation(), diag::note_template_decl_here);"},{r,857,"/// Determine whether we would be unable to instantiate this template (because\n/// it either has no definition, or is in the process of being instantiated).\nbool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain /*= true*/) {\n // ...\n if (PatternDef) {\n // ...\n } else if (InstantiatedFromMember) {\n // ...\n } else {\n if (isa<FunctionDecl>(Instantiation)) {\n // ...\n } else if (isa<TagDecl>(Instantiation)) {\n // ...\n Note = diag::note_template_decl_here;"},{r,4426,"template <typename PartialSpecDecl> static void checkMoreSpecializedThanPrimary(Sema &S, PartialSpecDecl *Partial) {\n // ...\n S.Diag(Template->getLocation(), diag::note_template_decl_here);"},{r,4902,"void Sema::diagnoseMissingTemplateArguments(TemplateName Name, SourceLocation Loc) {\n // ...\n if (TemplateDecl *TD = Name.getAsTemplateDecl()) {\n Diag(TD->getLocation(), diag::note_template_decl_here) << TD->getTemplateParameters()->getSourceRange();"},{r,5874,"/// Diagnose a missing template argument.\ntemplate <typename TemplateParmDecl> static bool diagnoseMissingArgument(Sema &S, SourceLocation Loc, TemplateDecl *TD, const TemplateParmDecl *D, TemplateArgumentListInfo &Args) {\n // ...\n S.Diag(TD->getLocation(), diag::note_template_decl_here) << Params->getSourceRange();"},{r,5941,"/// Check that the given template argument list is well-formed\n/// for specializing the given template.\nbool Sema::CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, bool UpdateArgsWithConversions, bool *ConstraintsNotSatisfied) {\n // ...\n for (TemplateParameterList::iterator Param = Params->begin(), ParamEnd = Params->end(); Param != ParamEnd; /* increment in loop */) {\n // If we have an expanded parameter pack, make sure we don\'t have too\n // many arguments.\n if (std::optional<unsigned> Expansions = getExpandedPackSize(*Param)) {\n if (*Expansions == SugaredArgumentPack.size()) {\n // ...\n } else if (ArgIdx == NumArgs && !PartialTemplateArgs) {\n // ...\n Diag(Template->getLocation(), diag::note_template_decl_here) << Params->getSourceRange();"},{r,6170,"/// Check that the given template argument list is well-formed\n/// for specializing the given template.\nbool Sema::CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl<TemplateArgument> &SugaredConverted, SmallVectorImpl<TemplateArgument> &CanonicalConverted, bool UpdateArgsWithConversions, bool *ConstraintsNotSatisfied) {\n // ...\n // If we have any leftover arguments, then there were too many arguments.\n // Complain and fail.\n if (ArgIdx < NumArgs) {\n // ...\n Diag(Template->getLocation(), diag::note_template_decl_here) << Params->getSourceRange();"},{r,11135,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::Found:\n // ...\n // C++ [dcl.type.simple]p2:\n // A type-specifier of the form\n // typename[opt] nested-name-specifier[opt] template-name\n // is a placeholder for a deduced class type [...].\n if (getLangOpts().CPlusPlus17) {\n if (auto *TD = getAsTypeTemplateDecl(Result.getFoundDecl())) {\n if (!DeducedTSTContext) {\n // ...\n Diag(TD->getLocation(), diag::note_template_decl_here);"},{W,3739,"static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, TypeSourceInfo *&ReturnTypeInfo) {\n // ...\n // C++11 [dcl.spec.auto]p5: reject \'auto\' if it is not in an allowed context.\n if (Deduced) {\n // ...\n if (Error != -1) {\n // ...\n if (auto *TD = TN.getAsTemplateDecl())\n SemaRef.Diag(TD->getLocation(), diag::note_template_decl_here);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/dependent-class-member-operator.cpp"]={"clang/test/SemaTemplate/dependent-class-member-operator.cpp:5:26: note: template is declared here"} | ["clang/test/SemaTemplate/dependent-class-member-operator.cpp"]={"clang/test/SemaTemplate/dependent-class-member-operator.cpp:5:26: note: template is declared here"} | ||
} | } | ||
}, | }, | ||
["note_template_declared_here"]={ | ["note_template_declared_here"]={ | ||
[e]="%select{function template|class template|variable template|type alias template|template template parameter}0 %1 declared here", | [e]="%select{function template|class template|variable template|type alias template|template template parameter}0 %1 declared here", | ||
[ | [a]=k, | ||
[b]="(?:function template|class template|variable template|type alias template|template template parameter) (.*?) declared here", | [b]="(?:function template|class template|variable template|type alias template|template template parameter) (.*?) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"8b6070bb9df4",1299274634,"Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType\nto cope with non-type template...","Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType\nto cope with non-type templates by providing appropriate\nerrors. Previously, we would either assert, crash, or silently build a\ndependent type when we shouldn\'t. Fixes PR9226.\n\nllvm-svn: 127037"}, | ||
[ | [g]={{r,3620,"void Sema::NoteAllFoundTemplates(TemplateName Name) {\n if (TemplateDecl *Template = Name.getAsTemplateDecl()) {\n Diag(Template->getLocation(), diag::note_template_declared_here) << (isa<FunctionTemplateDecl>(Template) ? 0 : isa<ClassTemplateDecl>(Template) ? 1 : isa<VarTemplateDecl>(Template) ? 2 : isa<TypeAliasTemplateDecl>(Template) ? 3 : 4) << Template->getDeclName();"},{r,3636,"void Sema::NoteAllFoundTemplates(TemplateName Name) {\n // ...\n if (OverloadedTemplateStorage *OST = Name.getAsOverloadedTemplate()) {\n for (OverloadedTemplateStorage::iterator I = OST->begin(), IEnd = OST->end(); I != IEnd; ++I)\n Diag((*I)->getLocation(), diag::note_template_declared_here) << 0 << (*I)->getDeclName();"},{r,10559,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n // Check the new variable specialization against the parsed input.\n if (PrevTemplate && !Context.hasSameType(Prev->getType(), R)) {\n // ...\n Diag(PrevTemplate->getLocation(), diag::note_template_declared_here) << 2 << PrevTemplate->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/alias-nested-nontag.cpp"]={"clang/test/SemaTemplate/alias-nested-nontag.cpp:3:22: note: type alias template \'Id\' declared here"} | ["clang/test/SemaTemplate/alias-nested-nontag.cpp"]={"clang/test/SemaTemplate/alias-nested-nontag.cpp:3:22: note: type alias template \'Id\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_template_default_arg_checking"]={ | ["note_template_default_arg_checking"]={ | ||
[e]="while checking a default template argument used here", | [e]="while checking a default template argument used here", | ||
[ | [a]=k, | ||
[b]="while checking a default template argument used here", | [b]="while checking a default template argument used here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"84d49a2085bb",1257976463,"Improve diagnostics when a default template argument does not match\nwith its corresponding template ...","Improve diagnostics when a default template argument does not match\nwith its corresponding template parameter. This can happen when we\nperformed some substitution into the default template argument and\nwhat we had doesn\'t match any more, e.g.,\n\n template<int> struct A;\n template<typename T, template<T> class X = A> class B;\n\n B<long> b;\n\nPreviously, we\'d emit a pretty but disembodied diagnostic showing how\nthe default argument didn\'t match the template parameter. The\ndiagnostic was good, but nothing tied it to the *use* of the default\nargument in \"B<long>\". This commit fixes that.\n\nAlso, tweak the counting of active template instantiations to avoid\ncounting non-instantiation records, such as those we create for\n(surprise!) checking default arguments, instantiating default\narguments, and performing substitutions as part of template argument\ndeduction.\n\nllvm-svn: 86884"}, | ||
[ | [g]={{bb,917,"/// 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::DefaultTemplateArgumentChecking: {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_template_default_arg_checking) << getTemplateArgumentBindingsText(TemplateParams, Active->TemplateArgs, Active->NumTemplateArgs) << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:39:4: note: while checking a default template argument used here"} | ["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:39:4: note: while checking a default template argument used here"} | ||
} | } | ||
}, | }, | ||
["note_template_enum_def_here"]={ | ["note_template_enum_def_here"]={ | ||
[e]="in instantiation of enumeration %q0 requested here", | [e]="in instantiation of enumeration %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of enumeration (.*?) requested here", | [b]="in instantiation of enumeration (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"4b38ded66a55",1331766790,"Instantiating a class template should not instantiate the definition of any\nscoped enumeration membe...","Instantiating a class template should not instantiate the definition of any\nscoped enumeration members. Later uses of an enumeration temploid as a nested\nname specifier should cause its instantiation. Plus some groundwork for\nexplicit specialization of member enumerations of class templates.\n\nllvm-svn: 152750"}, | ||
[ | [g]={{bb,787,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n } else if (EnumDecl *ED = dyn_cast<EnumDecl>(D)) {\n Diags.Report(Active->PointOfInstantiation, diag::note_template_enum_def_here) << ED << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.spec/temp.explicit/p8.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p8.cpp:36:17: note: in instantiation of enumeration \'X1<int>::E\' requested here","clang/test/CXX/temp/temp.spec/temp.explicit/p8.cpp:40:17: note: in instantiation of enumeration \'X1<char>::E\' requested here"} | ["clang/test/CXX/temp/temp.spec/temp.explicit/p8.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p8.cpp:36:17: note: in instantiation of enumeration \'X1<int>::E\' requested here","clang/test/CXX/temp/temp.spec/temp.explicit/p8.cpp:40:17: note: in instantiation of enumeration \'X1<char>::E\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_exception_spec_instantiation_here"]={ | ["note_template_exception_spec_instantiation_here"]={ | ||
[e]="in instantiation of exception specification for %0 requested here", | [e]="in instantiation of exception specification for %0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of exception specification for (.*?) requested here", | [b]="in instantiation of exception specification for (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f623c962600b",1334624280,"Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it.\n\nWe have a new flavor of exce...","Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it.\n\nWe have a new flavor of exception specification, EST_Uninstantiated. A function\ntype with this exception specification carries a pointer to a FunctionDecl, and\nthe exception specification for that FunctionDecl is instantiated (if needed)\nand used in the place of the function type\'s exception specification.\n\nWhen a function template declaration with a non-trivial exception specification\nis instantiated, the specialization\'s exception specification is set to this\nnew \'uninstantiated\' kind rather than being instantiated immediately.\n\nExpr::CanThrow has migrated onto Sema, so it can instantiate exception specs\non-demand. Also, any odr-use of a function triggers the instantiation of its\nexception specification (the exception specification could be needed by IRGen).\nIn passing, fix two places where a DeclRefExpr was created but the corresponding\nfunction was not actually marked odr-used. We used to get away with this, but\ndon\'t any more.\n\nAlso fix a bug where instantiating an exception specification which refers to\nfunction parameters resulted in a crash. We still have the same bug in default\narguments, which I\'ll be looking into next.\n\nThis, plus a tiny patch to fix libstdc++\'s common_type, is enough for clang to\nparse (and, in very limited testing, support) all of libstdc++4.7\'s standard\nheaders.\n\nllvm-svn: 154886"}, | ||
[ | [g]={{bb,933,"/// 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::ExceptionSpecInstantiation:\n Diags.Report(Active->PointOfInstantiation, diag::note_template_exception_spec_instantiation_here) << cast<FunctionDecl>(Active->Entity) << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp"]={ | ["clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp"]={Cb,Cb,Cb,Cb,Cb,Cb,Cb,Cb,Cb,"clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp:12:17: note: in instantiation of exception specification for \'go\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_kw_refers_to_non_template"]={ | ["note_template_kw_refers_to_non_template"]={ | ||
[e]="declared as a non-template here", | [e]="declared as a non-template here", | ||
[ | [a]=k, | ||
[b]="declared as a non\\-template here", | [b]="declared as a non\\-template here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"7981004eb7bd",1526006588,"Improve diagnostics and error recovery for template name lookup.\n\nFor \'x::template y\', consistently ...","Improve diagnostics and error recovery for template name lookup.\n\nFor \'x::template y\', consistently give a \"no member named \'y\' in \'x\'\"\ndiagnostic if there is no such member, and give a \'template keyword not\nfollowed by a template\' name error if there is such a member but it\'s not a\ntemplate. In the latter case, add a note pointing at the non-template.\n\nDon\'t suggest inserting a \'template\' keyword in \'X::Y<\' if X is dependent\nif the lookup of X::Y was actually not a dependent lookup and found only\nnon-templates.\n\nllvm-svn: 332076"}, | ||
[ | [g]={{r,562,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (Found.empty()) {\n // ...\n // If a \'template\' keyword was used, a lookup that finds only non-template\n // names is an error.\n if (ExampleLookupResult && RequiredTemplate) {\n // ...\n Diag(ExampleLookupResult->getUnderlyingDecl()->getLocation(), diag::note_template_kw_refers_to_non_template) << Found.getLookupName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:18:10: note: declared as a non-template here"} | ["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:18:10: note: declared as a non-template here"} | ||
} | } | ||
}, | }, | ||
["note_template_member_class_here"]={ | ["note_template_member_class_here"]={ | ||
[e]="in instantiation of member class %q0 requested here", | [e]="in instantiation of member class %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of member class (.*?) requested here", | [b]="in instantiation of member class (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"8ea8fd48f2c7",1238015823,"Instantiation for member classes of class templates. Note that only\nthe declarations of member class...","Instantiation for member classes of class templates. Note that only\nthe declarations of member classes are instantiated when the owning\nclass template is instantiated. The definitions of such member classes\nare instantiated when a complete type is required.\n\nThis change also introduces the injected-class-name into a class\ntemplate specialization.\n\nllvm-svn: 67707"}, | ||
[ | [g]={{bb,764,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n unsigned DiagID = diag::note_template_member_class_here;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/base-class-ambiguity-check.cpp"]={"clang/test/SemaCXX/base-class-ambiguity-check.cpp:19:20: note: in instantiation of member class \'Foo2<int>::Derived\' requested here"} | ["clang/test/SemaCXX/base-class-ambiguity-check.cpp"]={"clang/test/SemaCXX/base-class-ambiguity-check.cpp:19:20: note: in instantiation of member class \'Foo2<int>::Derived\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_member_function_here"]={ | ["note_template_member_function_here"]={ | ||
[e]="in instantiation of member function %q0 requested here", | [e]="in instantiation of member function %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of member function (.*?) requested here", | [b]="in instantiation of member function (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"8567358cc9e0",1242666117,"When instantiating the definition of a member function of a class\ntemplate, introduce that member fu...","When instantiating the definition of a member function of a class\ntemplate, introduce that member function into the template\ninstantiation stack. Also, add diagnostics showing the member function\nwithin the instantiation stack and clean up the qualified-name\nprinting so that we get something like:\n\n note: in instantiation of member function \'Switch1<int, 2, 2>::f\'\n requested here\n\nin the template instantiation backtrace.\n\nllvm-svn: 72015"}, | ||
[ | [g]={{bb,774,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {\n // ...\n if (Function->getPrimaryTemplate())\n // ...\n else\n DiagID = diag::note_template_member_function_here;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:39:42: note: in instantiation of member function \'bogus_override_if_virtual<(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12)>::bogus_override_if_virtual\' requested here"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:39:42: note: in instantiation of member function \'bogus_override_if_virtual<(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12)>::bogus_override_if_virtual\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_nontype_parm_different_type"]={ | ["note_template_nontype_parm_different_type"]={ | ||
[e]="template non-type parameter has a different type %0 in template argument", | [e]="template non-type parameter has a different type %0 in template argument", | ||
[ | [a]=k, | ||
[b]="template non\\-type parameter has a different type (.*?) in template argument", | [b]="template non\\-type parameter has a different type (.*?) in template argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,8081,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // For non-type template parameters, check the type of the parameter.\n if (NonTypeTemplateParmDecl *OldNTTP = dyn_cast<NonTypeTemplateParmDecl>(Old)) {\n // ...\n // If we are matching a template template argument to a template\n // template parameter and one of the non-type template parameter types\n // is dependent, then we must wait until template instantiation time\n // to actually compare the arguments.\n if (Kind != Sema::TPL_TemplateTemplateArgumentMatch || (!OldNTTP->getType()->isDependentType() && !NewNTTP->getType()->isDependentType())) {\n // ...\n if (!S.Context.hasSameType(OldType, NewType)) {\n if (Complain) {\n // ...\n if (TemplateArgLoc.isValid()) {\n // ...\n NextDiag = diag::note_template_nontype_parm_different_type;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-template-template-parm.cpp"]={"clang/test/SemaTemplate/instantiate-template-template-parm.cpp:23:13: note: template non-type parameter has a different type \'int\' in template argument","clang/test/SemaTemplate/instantiate-template-template-parm.cpp:43:15: note: template non-type parameter has a different type \'long\' in template argument"} | ["clang/test/SemaTemplate/instantiate-template-template-parm.cpp"]={"clang/test/SemaTemplate/instantiate-template-template-parm.cpp:23:13: note: template non-type parameter has a different type \'int\' in template argument","clang/test/SemaTemplate/instantiate-template-template-parm.cpp:43:15: note: template non-type parameter has a different type \'long\' in template argument"} | ||
} | } | ||
}, | }, | ||
["note_template_nontype_parm_prev_declaration"]={ | ["note_template_nontype_parm_prev_declaration"]={ | ||
[e]="previous non-type template parameter with type %0 is here", | [e]="previous non-type template parameter with type %0 is here", | ||
[ | [a]=k, | ||
[b]="previous non\\-type template parameter with type (.*?) is here", | [b]="previous non\\-type template parameter with type (.*?) is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,8087,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // For non-type template parameters, check the type of the parameter.\n if (NonTypeTemplateParmDecl *OldNTTP = dyn_cast<NonTypeTemplateParmDecl>(Old)) {\n // ...\n // If we are matching a template template argument to a template\n // template parameter and one of the non-type template parameter types\n // is dependent, then we must wait until template instantiation time\n // to actually compare the arguments.\n if (Kind != Sema::TPL_TemplateTemplateArgumentMatch || (!OldNTTP->getType()->isDependentType() && !NewNTTP->getType()->isDependentType())) {\n // ...\n if (!S.Context.hasSameType(OldType, NewType)) {\n if (Complain) {\n // ...\n S.Diag(OldNTTP->getLocation(), diag::note_template_nontype_parm_prev_declaration) << OldNTTP->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-template-template-parm.cpp"]={"clang/test/SemaTemplate/instantiate-template-template-parm.cpp:26:21: note: previous non-type template parameter with type \'long\' is here","clang/test/SemaTemplate/instantiate-template-template-parm.cpp:34:23: note: previous non-type template parameter with type \'int\' is here"} | ["clang/test/SemaTemplate/instantiate-template-template-parm.cpp"]={"clang/test/SemaTemplate/instantiate-template-template-parm.cpp:26:21: note: previous non-type template parameter with type \'long\' is here","clang/test/SemaTemplate/instantiate-template-template-parm.cpp:34:23: note: previous non-type template parameter with type \'int\' is here"} | ||
} | } | ||
}, | }, | ||
["note_template_nsdmi_here"]={ | ["note_template_nsdmi_here"]={ | ||
[e]="in instantiation of default member initializer %q0 requested here", | [e]="in instantiation of default member initializer %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of default member initializer (.*?) requested here", | [b]="in instantiation of default member initializer (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d60b82f93eee",1416267405,"Handle use of default member initializers before end of outermost class\n\nSpecifically, when we have ...","Handle use of default member initializers before end of outermost class\n\nSpecifically, when we have this situation:\n struct A {\n template <typename T> struct B {\n int m1 = sizeof(A);\n };\n B<int> m2;\n };\n\nWe can\'t parse m1\'s initializer eagerly because we need A to be\ncomplete. Therefore we wait until the end of A\'s class scope to parse\nit. However, we can trigger instantiation of B before the end of A,\nwhich will attempt to instantiate the field decls eagerly, and it would\nbuild a bad field decl instantiation that said it had an initializer but\nactually lacked one.\n\nFixed by deferring instantiation of default member initializers until\nthey are needed during constructor analysis. This addresses a long\nstanding FIXME in the code.\n\nFixes PR19195.\n\nReviewed By: rsmith\n\nDifferential Revision: http://reviews.llvm.org/D5690\n\nllvm-svn: 222192"}, | ||
[ | [g]={{bb,792,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n } else if (EnumDecl *ED = dyn_cast<EnumDecl>(D)) {\n // ...\n } else if (FieldDecl *FD = dyn_cast<FieldDecl>(D)) {\n Diags.Report(Active->PointOfInstantiation, diag::note_template_nsdmi_here) << FD << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-sizeof.cpp"]={"clang/test/SemaTemplate/instantiate-sizeof.cpp:19:3: note: in instantiation of default member initializer \'M<S>::m\' requested here"} | ["clang/test/SemaTemplate/instantiate-sizeof.cpp"]={"clang/test/SemaTemplate/instantiate-sizeof.cpp:19:3: note: in instantiation of default member initializer \'M<S>::m\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_param_different_kind"]={ | ["note_template_param_different_kind"]={ | ||
[e]="template parameter has a different kind in template argument", | [e]="template parameter has a different kind in template argument", | ||
[ | [a]=k, | ||
[b]="template parameter has a different kind in template argument", | [b]="template parameter has a different kind in template argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,8019,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // Check the actual kind (type, non-type, template).\n if (Old->getKind() != New->getKind()) {\n if (Complain) {\n // ...\n if (TemplateArgLoc.isValid()) {\n // ...\n NextDiag = diag::note_template_param_different_kind;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp"]={"clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:25:19: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:25:19: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:22:24: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:23:23: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:25:19: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:23:13: note: template parameter has a different kind in template argument"} | ["clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp"]={"clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:25:19: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:25:19: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:22:24: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:23:23: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:25:19: note: template parameter has a different kind in template argument","clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp:23:13: note: template parameter has a different kind in template argument"} | ||
} | } | ||
}, | }, | ||
["note_template_param_here"]={ | ["note_template_param_here"]={ | ||
[e]="template parameter is declared here", | [e]="template parameter is declared here", | ||
[ | [a]=k, | ||
[b]="template parameter is declared here", | [b]="template parameter is declared here", | ||
[c]= | |||
["clang/test/SemaTemplate/missing-class-keyword-crash.cpp"]={"clang/test/SemaTemplate/missing-class-keyword-crash.cpp:3:14: note: template parameter is declared here"} | ["clang/test/SemaTemplate/missing-class-keyword-crash.cpp"]={"clang/test/SemaTemplate/missing-class-keyword-crash.cpp:3:14: note: template parameter is declared here"} | ||
} | } | ||
}, | }, | ||
["note_template_param_list_different_arity"]={ | ["note_template_param_list_different_arity"]={ | ||
[e]="%select{too few|too many}0 template parameters in template template argument", | [e]="%select{too few|too many}0 template parameters in template template argument", | ||
[ | [a]=k, | ||
[b]="(?:too few|too many) template parameters in template template argument", | [b]="(?:too few|too many) template parameters in template template argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,8168,"/// Diagnose a known arity mismatch when comparing template argument\n/// lists.\nstatic void DiagnoseTemplateParameterListArityMismatch(Sema &S, TemplateParameterList *New, TemplateParameterList *Old, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n if (TemplateArgLoc.isValid()) {\n // ...\n NextDiag = diag::note_template_param_list_different_arity;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:2:1: note: too few template parameters in template template argument"} | ["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:2:1: note: too few template parameters in template template argument"} | ||
} | } | ||
}, | }, | ||
["note_template_param_prev_default_arg"]={ | ["note_template_param_prev_default_arg"]={ | ||
[e]="previous default template argument defined here", | [e]="previous default template argument defined here", | ||
[ | [a]=k, | ||
[b]="previous default template argument defined here", | [b]="previous default template argument defined here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,3042,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // [basic.def.odr]/13:\n // There can be more than one definition of a\n // ...\n // default template argument\n // ...\n // in a program provided that each definition appears in a different\n // translation unit and the definitions satisfy the [same-meaning\n // criteria of the ODR].\n //\n // Simply, the design of modules allows the definition of template default\n // argument to be repeated across translation unit. Note that the ODR is\n // checked elsewhere. But it is still not allowed to repeat template default\n // argument in the same translation unit.\n if (RedundantDefaultArg) {\n // ...\n Diag(OldDefaultLoc, diag::note_template_param_prev_default_arg);"},{r,3061,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // [basic.def.odr]/13:\n // There can be more than one definition of a\n // ...\n // default template argument\n // ...\n // in a program provided that each definition appears in a different\n // translation unit and the definitions satisfy the [same-meaning\n // criteria of the ODR].\n //\n // Simply, the design of modules allows the definition of template default\n // argument to be repeated across translation unit. Note that the ODR is\n // checked elsewhere. But it is still not allowed to repeat template default\n // argument in the same translation unit.\n if (RedundantDefaultArg) {\n // ...\n } else if (InconsistentDefaultArg) {\n // ...\n } else if (MissingDefaultArg && TPC != TPC_FunctionTemplate) {\n // ...\n Diag(PreviousDefaultArgLoc, diag::note_template_param_prev_default_arg);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:7:21: note: previous default template argument defined here","clang/test/CXX/temp/temp.param/p12.cpp:15:34: note: previous default template argument defined here","clang/test/CXX/temp/temp.param/p12.cpp:25:18: note: previous default template argument defined here"} | ["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:7:21: note: previous default template argument defined here","clang/test/CXX/temp/temp.param/p12.cpp:15:34: note: previous default template argument defined here","clang/test/CXX/temp/temp.param/p12.cpp:25:18: note: previous default template argument defined here"} | ||
} | } | ||
}, | }, | ||
["note_template_param_prev_default_arg_in_other_module"]={ | ["note_template_param_prev_default_arg_in_other_module"]={ | ||
[e]="previous default template argument defined in module %0", | [e]="previous default template argument defined in module %0", | ||
[ | [a]=k, | ||
[b]="previous default template argument defined in module (.*?)", | [b]="previous default template argument defined in module (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{r,3050,"/// Checks the validity of a template parameter list, possibly\n/// considering the template parameter list from a previous\n/// declaration.\n///\n/// If an \"old\" template parameter list is provided, it must be\n/// equivalent (per TemplateParameterListsAreEqual) to the \"new\"\n/// template parameter list.\n///\n/// \\param NewParams Template parameter list for a new template\n/// declaration. This template parameter list will be updated with any\n/// default arguments that are carried through from the previous\n/// template parameter list.\n///\n/// \\param OldParams If provided, template parameter list from a\n/// previous declaration of the same template. Default template\n/// arguments will be merged from the old template parameter list to\n/// the new template parameter list.\n///\n/// \\param TPC Describes the context in which we are checking the given\n/// template parameter list.\n///\n/// \\param SkipBody If we might have already made a prior merged definition\n/// of this template visible, the corresponding body-skipping information.\n/// Default argument redefinition is not an error when skipping such a body,\n/// because (under the ODR) we can assume the default arguments are the same\n/// as the prior merged definition.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody) {\n // ...\n for (TemplateParameterList::iterator NewParam = NewParams->begin(), NewParamEnd = NewParams->end(); NewParam != NewParamEnd; ++NewParam) {\n // ...\n // [basic.def.odr]/13:\n // There can be more than one definition of a\n // ...\n // default template argument\n // ...\n // in a program provided that each definition appears in a different\n // translation unit and the definitions satisfy the [same-meaning\n // criteria of the ODR].\n //\n // Simply, the design of modules allows the definition of template default\n // argument to be repeated across translation unit. Note that the ODR is\n // checked elsewhere. But it is still not allowed to repeat template default\n // argument in the same translation unit.\n if (RedundantDefaultArg) {\n // ...\n } else if (InconsistentDefaultArg) {\n // ...\n Diag(OldDefaultLoc, diag::note_template_param_prev_default_arg_in_other_module) << PrevModuleName;"}} | ||
}, | }, | ||
["note_template_parameter_pack_here"]={ | ["note_template_parameter_pack_here"]={ | ||
[e]="previous %select{template type|non-type template|template template}0 parameter%select{| pack}1 declared here", | [e]="previous %select{template type|non-type template|template template}0 parameter%select{| pack}1 declared here", | ||
[ | [a]=k, | ||
[b]="previous (?:template type|non\\-type template|template template) parameter(?:| pack) declared here", | [b]="previous (?:template type|non\\-type template|template template) parameter(?:| pack) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"2e87ca218f5d",1275640472,"When checking for equality of template parameter lists, a template\ntype parameter pack is distinct f...","When checking for equality of template parameter lists, a template\ntype parameter pack is distinct from a template type parameter.\n\nllvm-svn: 105464"}, | ||
[ | [g]={{r,8050,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // Check that both are parameter packs or neither are parameter packs.\n // However, if we are matching a template template argument to a\n // template template parameter, the template template parameter can have\n // a parameter pack where the template template argument does not.\n if (Old->isTemplateParameterPack() != New->isTemplateParameterPack() && !(Kind == Sema::TPL_TemplateTemplateArgumentMatch && Old->isTemplateParameterPack())) {\n if (Complain) {\n // ...\n S.Diag(Old->getLocation(), diag::note_template_parameter_pack_here) << ParamKind << Old->isParameterPack();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:8:22: note: previous template type parameter pack declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:11:19: note: previous template type parameter declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:17:31: note: previous template type parameter pack declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:20:28: note: previous template type parameter declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:23:17: note: previous non-type template parameter pack declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:26:33: note: previous template template parameter declared here"} | ["clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:8:22: note: previous template type parameter pack declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:11:19: note: previous template type parameter declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:17:31: note: previous template type parameter pack declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:20:28: note: previous template type parameter declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:23:17: note: previous non-type template parameter pack declared here","clang/test/CXX/temp/temp.decls/temp.variadic/parameter-matching.cpp:26:33: note: previous template template parameter declared here"} | ||
} | } | ||
}, | }, | ||
["note_template_parameter_pack_non_pack"]={ | ["note_template_parameter_pack_non_pack"]={ | ||
[e]="%select{template type|non-type template|template template}0 parameter%select{| pack}1 does not match %select{template type|non-type template|template template}0 parameter%select{ pack|}1 in template argument", | [e]="%select{template type|non-type template|template template}0 parameter%select{| pack}1 does not match %select{template type|non-type template|template template}0 parameter%select{ pack|}1 in template argument", | ||
[ | [a]=k, | ||
[b]="(?:template type|non\\-type template|template template) parameter(?:| pack) does not match (?:template type|non\\-type template|template template) parameter(?: pack|) in template argument", | [b]="(?:template type|non\\-type template|template template) parameter(?:| pack) does not match (?:template type|non\\-type template|template template) parameter(?: pack|) in template argument", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"2e87ca218f5d",1275640472,"When checking for equality of template parameter lists, a template\ntype parameter pack is distinct f...","When checking for equality of template parameter lists, a template\ntype parameter pack is distinct from a template type parameter.\n\nllvm-svn: 105464"}, | ||
[ | [g]={{r,8042,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n // Check that both are parameter packs or neither are parameter packs.\n // However, if we are matching a template template argument to a\n // template template parameter, the template template parameter can have\n // a parameter pack where the template template argument does not.\n if (Old->isTemplateParameterPack() != New->isTemplateParameterPack() && !(Kind == Sema::TPL_TemplateTemplateArgumentMatch && Old->isTemplateParameterPack())) {\n if (Complain) {\n // ...\n if (TemplateArgLoc.isValid()) {\n // ...\n NextDiag = diag::note_template_parameter_pack_non_pack;"}} | ||
}, | }, | ||
["note_template_prev_declaration"]={ | ["note_template_prev_declaration"]={ | ||
[e]="previous template %select{declaration|template parameter}0 is here", | [e]="previous template %select{declaration|template parameter}0 is here", | ||
[ | [a]=k, | ||
[b]="previous template (?:declaration|template parameter) is here", | [b]="previous template (?:declaration|template parameter) is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{s,604,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n } else if (OldParamHasDfl) {\n // ...\n } else if (NewParamHasDfl) {\n if (New->getDescribedFunctionTemplate()) {\n // ...\n Diag(PrevForDefaultArgs->getLocation(), diag::note_template_prev_declaration) << false;"},{r,8023,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // Check the actual kind (type, non-type, template).\n if (Old->getKind() != New->getKind()) {\n if (Complain) {\n // ...\n S.Diag(Old->getLocation(), diag::note_template_prev_declaration) << (Kind != Sema::TPL_TemplateMatch);"},{r,8135,"/// Match two template parameters within template parameter lists.\nstatic bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, const NamedDecl *NewInstFrom, NamedDecl *Old, const NamedDecl *OldInstFrom, bool Complain, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n if (Kind != Sema::TPL_TemplateParamsEquivalent && Kind != Sema::TPL_TemplateTemplateArgumentMatch && !isa<TemplateTemplateParmDecl>(Old)) {\n // ...\n auto Diagnose = [&] {\n // ...\n S.Diag(OldC ? OldC->getBeginLoc() : Old->getBeginLoc(), diag::note_template_prev_declaration) << /*declaration*/ 0;"},{r,8174,"/// Diagnose a known arity mismatch when comparing template argument\n/// lists.\nstatic void DiagnoseTemplateParameterListArityMismatch(Sema &S, TemplateParameterList *New, TemplateParameterList *Old, Sema::TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n S.Diag(Old->getTemplateLoc(), diag::note_template_prev_declaration) << (Kind != Sema::TPL_TemplateMatch) << SourceRange(Old->getTemplateLoc(), Old->getRAngleLoc());"},{r,8277,"/// Determine whether the given template parameter lists are\n/// equivalent.\n///\n/// \\param New The new template parameter list, typically written in the\n/// source code as part of a new template declaration.\n///\n/// \\param Old The old template parameter list, typically found via\n/// name lookup of the template declared with this template parameter\n/// list.\n///\n/// \\param Complain If true, this routine will produce a diagnostic if\n/// the template parameter lists are not equivalent.\n///\n/// \\param Kind describes how we are to match the template parameter lists.\n///\n/// \\param TemplateArgLoc If this source location is valid, then we\n/// are actually checking the template parameter list of a template\n/// argument (New) against the template parameter list of its\n/// corresponding template template parameter (Old). We produce\n/// slightly different diagnostics in this scenario.\n///\n/// \\returns True if the template parameter lists are equal, false\n/// otherwise.\nbool Sema::TemplateParameterListsAreEqual(const NamedDecl *NewInstFrom, TemplateParameterList *New, const NamedDecl *OldInstFrom, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc) {\n // ...\n if (Kind != TPL_TemplateTemplateArgumentMatch && Kind != TPL_TemplateParamsEquivalent) {\n // ...\n auto Diagnose = [&] {\n // ...\n Diag(OldRC ? OldRC->getBeginLoc() : Old->getTemplateLoc(), diag::note_template_prev_declaration) << /*declaration*/ 0;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:35:10: note: previous template template parameter is here"} | ["clang/test/CXX/temp/temp.param/p12.cpp"]={"clang/test/CXX/temp/temp.param/p12.cpp:35:10: note: previous template template parameter is here"} | ||
} | } | ||
}, | }, | ||
["note_template_recursion_depth"]={ | ["note_template_recursion_depth"]={ | ||
[e]="use -ftemplate-depth=N to increase recursive template instantiation depth", | [e]="use -ftemplate-depth=N to increase recursive template instantiation depth", | ||
[ | [a]=k, | ||
[b]="use \\-ftemplate\\-depth\\=N to increase recursive template instantiation depth", | [b]="use \\-ftemplate\\-depth\\=N to increase recursive template instantiation depth", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{bb,726,"bool Sema::InstantiatingTemplate::CheckInstantiationDepth(SourceLocation PointOfInstantiation, SourceRange InstantiationRange) {\n // ...\n SemaRef.Diag(PointOfInstantiation, diag::note_template_recursion_depth) << SemaRef.getLangOpts().InstantiationDepth;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/invalid-requirement-requires-expr.cpp"]={"clang/test/SemaCXX/invalid-requirement-requires-expr.cpp:18:16: note: use -ftemplate-depth=N to increase recursive template instantiation depth"} | ["clang/test/SemaCXX/invalid-requirement-requires-expr.cpp"]={"clang/test/SemaCXX/invalid-requirement-requires-expr.cpp:18:16: note: use -ftemplate-depth=N to increase recursive template instantiation depth"} | ||
} | } | ||
}, | }, | ||
["note_template_requirement_instantiation_here"]={ | ["note_template_requirement_instantiation_here"]={ | ||
[e]="in instantiation of requirement here", | [e]="in instantiation of requirement here", | ||
[ | [a]=k, | ||
[b]="in instantiation of requirement here", | [b]="in instantiation of requirement here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of ...","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, | ||
[ | [g]={{bb,940,"/// 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::RequirementInstantiation:\n Diags.Report(Active->PointOfInstantiation, diag::note_template_requirement_instantiation_here) << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:47:42: note: in instantiation of requirement here"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:47:42: note: in instantiation of requirement here"} | ||
} | } | ||
}, | }, | ||
["note_template_requirement_params_instantiation_here"]={ | ["note_template_requirement_params_instantiation_here"]={ | ||
[e]="in instantiation of requirement parameters here", | [e]="in instantiation of requirement parameters here", | ||
[ | [a]=k, | ||
[b]="in instantiation of requirement parameters here", | [b]="in instantiation of requirement parameters here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{bb,945,"/// 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::RequirementParameterInstantiation:\n Diags.Report(Active->PointOfInstantiation, diag::note_template_requirement_params_instantiation_here) << Active->InstantiationRange;"}} | ||
}, | }, | ||
["note_template_static_data_member_def_here"]={ | ["note_template_static_data_member_def_here"]={ | ||
[e]="in instantiation of static data member %q0 requested here", | [e]="in instantiation of static data member %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of static data member (.*?) requested here", | [b]="in instantiation of static data member (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"a6ef8f0813d5",1248467683,"Template instantiation for static data members that are defined out-of-line.\n\nNote that this also fi...","Template instantiation for static data members that are defined out-of-line.\n\nNote that this also fixes a bug that affects non-template code, where we \nwere not treating out-of-line static data members are \"file-scope\" variables,\nand therefore not checking their initializers.\n\nllvm-svn: 77002"}, | ||
[ | [g]={{bb,781,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {\n Diags.Report(Active->PointOfInstantiation, VD->isStaticDataMember() ? diag::note_template_static_data_member_def_here : diag::note_template_variable_def_here) << VD << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/instantiate-scope.cpp"]={"clang/test/SemaTemplate/instantiate-scope.cpp:29:12: note: in instantiation of static data member \'X<void>::n\' requested here"} | ["clang/test/SemaTemplate/instantiate-scope.cpp"]={"clang/test/SemaTemplate/instantiate-scope.cpp:29:12: note: in instantiation of static data member \'X<void>::n\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_type_alias_instantiation_here"]={ | ["note_template_type_alias_instantiation_here"]={ | ||
[e]="in instantiation of template type alias %0 requested here", | [e]="in instantiation of template type alias %0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of template type alias (.*?) requested here", | [b]="in instantiation of template type alias (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3f1b5d077b7e",1304632627,"Implement support for C++0x alias templates.\n\nllvm-svn: 130953","Implement support for C++0x alias templates.\n\nllvm-svn: 130953"}, | ||
[ | [g]={{bb,796,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {\n // ...\n } else if (EnumDecl *ED = dyn_cast<EnumDecl>(D)) {\n // ...\n } else if (FieldDecl *FD = dyn_cast<FieldDecl>(D)) {\n // ...\n } else {\n Diags.Report(Active->PointOfInstantiation, diag::note_template_type_alias_instantiation_here) << cast<TypeAliasTemplateDecl>(D) << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.decls/temp.alias/p3.cpp"]={"clang/test/CXX/temp/temp.decls/temp.alias/p3.cpp:7:11: note: in instantiation of template type alias \'B\' requested here"} | ["clang/test/CXX/temp/temp.decls/temp.alias/p3.cpp"]={"clang/test/CXX/temp/temp.decls/temp.alias/p3.cpp:7:11: note: in instantiation of template type alias \'B\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_template_unnamed_type_here"]={ | ["note_template_unnamed_type_here"]={ | ||
[e]="unnamed type used in template argument was declared here", | [e]="unnamed type used in template argument was declared here", | ||
[ | [a]=k, | ||
[b]="unnamed type used in template argument was declared here", | [b]="unnamed type used in template argument was declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{r,6469,"bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const TagDecl *Tag) {\n // ...\n if (!Tag->hasNameForLinkage()) {\n // ...\n S.Diag(Tag->getLocation(), diag::note_template_unnamed_type_here);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx98-compat-flags.cpp"]={"clang/test/SemaCXX/cxx98-compat-flags.cpp:9:1: note: unnamed type used in template argument was declared here"} | ["clang/test/SemaCXX/cxx98-compat-flags.cpp"]={"clang/test/SemaCXX/cxx98-compat-flags.cpp:9:1: note: unnamed type used in template argument was declared here"} | ||
} | } | ||
}, | }, | ||
["note_template_variable_def_here"]={ | ["note_template_variable_def_here"]={ | ||
[e]="in instantiation of variable template specialization %q0 requested here", | [e]="in instantiation of variable template specialization %q0 requested here", | ||
[ | [a]=k, | ||
[b]="in instantiation of variable template specialization (.*?) requested here", | [b]="in instantiation of variable template specialization (.*?) requested here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"dbd65779649e",1376511302,"Bug fix: note diagnosis on expression narrowing should say \"variable template\" instead of \"static da...","Bug fix: note diagnosis on expression narrowing should say \"variable template\" instead of \"static data member\" when appropriate\n\nllvm-svn: 188409"}, | ||
[ | [g]={{bb,782,"/// 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::TemplateInstantiation: {\n // ...\n if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(D)) {\n // ...\n } else if (FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {\n Diags.Report(Active->PointOfInstantiation, VD->isStaticDataMember() ? diag::note_template_static_data_member_def_here : diag::note_template_variable_def_here) << VD << Active->InstantiationRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp"]={"clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp:6:10: note: in instantiation of variable template specialization \'b<>\' requested here"} | ["clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp"]={"clang/test/SemaCXX/type-trait-eval-crash-issue-57008.cpp:6:10: note: in instantiation of variable template specialization \'b<>\' requested here"} | ||
} | } | ||
}, | }, | ||
["note_thread_warning_in_fun"]={ | ["note_thread_warning_in_fun"]={ | ||
[e]="thread warning in function %0", | [e]="thread warning in function %0", | ||
[ | [a]=k, | ||
[b]="thread warning in function (.*?)", | [b]="thread warning in function (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"eb0ea5f40a48",1408052415,"Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpf...","Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.\n\nllvm-svn: 215677"}, | ||
[ | [g]={{D,1796,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n OptionalNotes getNotes() const {\n if (Verbose && CurrentFunction) {\n PartialDiagnosticAt FNote(CurrentFunction->getBody()->getBeginLoc(), S.PDiag(diag::note_thread_warning_in_fun) << CurrentFunction);"},{D,1807,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n OptionalNotes getNotes(const PartialDiagnosticAt &Note) const {\n // ...\n if (Verbose && CurrentFunction) {\n PartialDiagnosticAt FNote(CurrentFunction->getBody()->getBeginLoc(), S.PDiag(diag::note_thread_warning_in_fun) << CurrentFunction);"},{D,1821,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n OptionalNotes getNotes(const PartialDiagnosticAt &Note1, const PartialDiagnosticAt &Note2) const {\n // ...\n if (Verbose && CurrentFunction) {\n PartialDiagnosticAt FNote(CurrentFunction->getBody()->getBeginLoc(), S.PDiag(diag::note_thread_warning_in_fun) << CurrentFunction);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-thread-safety-verbose.cpp"]={"clang/test/SemaCXX/warn-thread-safety-verbose.cpp:30:16: note: thread warning in function \'test1\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:34:16: note: thread warning in function \'test2\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:38:16: note: thread warning in function \'test3\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:42:16: note: thread warning in function \'test4\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:46:16: note: thread warning in function \'test5\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:52:16: note: thread warning in function \'test6\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:58:16: note: thread warning in function \'test7\'"} | ["clang/test/SemaCXX/warn-thread-safety-verbose.cpp"]={"clang/test/SemaCXX/warn-thread-safety-verbose.cpp:30:16: note: thread warning in function \'test1\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:34:16: note: thread warning in function \'test2\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:38:16: note: thread warning in function \'test3\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:42:16: note: thread warning in function \'test4\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:46:16: note: thread warning in function \'test5\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:52:16: note: thread warning in function \'test6\'","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:58:16: note: thread warning in function \'test7\'"} | ||
} | } | ||
}, | }, | ||
["note_throw_in_dtor"]={ | ["note_throw_in_dtor"]={ | ||
[e]="%select{destructor|deallocator}0 has a %select{non-throwing|implicit non-throwing}1 exception specification", | [e]="%select{destructor|deallocator}0 has a %select{non-throwing|implicit non-throwing}1 exception specification", | ||
[ | [a]=k, | ||
[b]="(?:destructor|deallocator) has a (?:non\\-throwing|implicit non\\-throwing) exception specification", | [b]="(?:destructor|deallocator) has a (?:non\\-throwing|implicit non\\-throwing) exception specification", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"89fe9c269a22",1498249339,"Emit warning when throw exception in destruct or dealloc functions which has a \n(possible implicit) ...","Emit warning when throw exception in destruct or dealloc functions which has a \n(possible implicit) noexcept specifier\n\nThrowing in the destructor is not good (C++11 change try to not allow see below).\n But in reality, those codes are exist.\nC++11 [class.dtor]p3:\n\nA declaration of a destructor that does not have an exception-specification is \nimplicitly considered to have the same exception specification as an implicit \ndeclaration.\n\nWith this change, the application worked before may now run into runtime \ntermination. My goal here is to emit a warning to provide only possible info to \nwhere the code may need to be changed.\n\nFirst there is no way, in compile time to identify the “throw” really throw out \nof the function. Things like the call which throw out… To keep this simple, \nwhen “throw” is seen, checking its enclosing function(only destructor and \ndealloc functions) with noexcept(true) specifier emit warning.\n\nHere is implementation detail:\nA new member function CheckCXXThrowInNonThrowingFunc is added for class Sema \nin Sema.h. It is used in the call to both BuildCXXThrow and \nTransformCXXThrowExpr.\n\nThe function basic check if the enclosing function with non-throwing noexcept \nspecifer, if so emit warning for it.\n\nThe example of warning message like:\nk1.cpp:18:3: warning: \'\'~dependent_warn\'\' has a (possible implicit) non-throwing\n\n noexcept specifier. Throwing exception may cause termination.\n [-Wthrow-in-dtor]\n throw 1;\n ^\n\n k1.cpp:43:30: note: in instantiation of member function\n\n \'dependent_warn<noexcept_fun>::~dependent_warn\' requested here\n\n dependent_warn<noexcept_fun> f; // cause warning\n\nDifferential Revision: https://reviews.llvm.org/D33333\n\nllvm-svn: 306149"}, | ||
[ | [g]={{D,365,"static void EmitDiagForCXXThrowInNonThrowingFunc(Sema &S, SourceLocation OpLoc, const FunctionDecl *FD) {\n if (!S.getSourceManager().isInSystemHeader(OpLoc) && FD->getTypeSourceInfo()) {\n // ...\n if (S.getLangOpts().CPlusPlus11 && (isa<CXXDestructorDecl>(FD) || FD->getDeclName().getCXXOverloadedOperator() == OO_Delete || FD->getDeclName().getCXXOverloadedOperator() == OO_Array_Delete)) {\n if (const auto *Ty = FD->getTypeSourceInfo()->getType()->getAs<FunctionProtoType>())\n S.Diag(FD->getLocation(), diag::note_throw_in_dtor) << !isa<CXXDestructorDecl>(FD) << !Ty->hasExceptionSpec() << FD->getExceptionSpecSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp"]={"clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:5:15: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:14:3: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:42:15: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:47:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:52:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:104:6: note: deallocator has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:140:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:80:3: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:93:3: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:100:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:121:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:127:3: note: destructor has a non-throwing exception specification"} | ["clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp"]={"clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:5:15: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:14:3: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:42:15: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:47:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:52:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:104:6: note: deallocator has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:140:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:80:3: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:93:3: note: destructor has a implicit non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:100:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:121:3: note: destructor has a non-throwing exception specification","clang/test/SemaCXX/warn-throw-out-noexcept-func.cpp:127:3: note: destructor has a non-throwing exception specification"} | ||
} | } | ||
}, | }, | ||
["note_throw_in_function"]={ | ["note_throw_in_function"]={ | ||
[e]="function declared non-throwing here", | [e]="function declared non-throwing here", | ||
[ | [a]=k, | ||
[b]="function declared non\\-throwing here", | [b]="function declared non\\-throwing here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"89fe9c269a22",1498249339,"Emit warning when throw exception in destruct or dealloc functions which has a \n(possible implicit) ...","Emit warning when throw exception in destruct or dealloc functions which has a \n(possible implicit) noexcept specifier\n\nThrowing in the destructor is not good (C++11 change try to not allow see below).\n But in reality, those codes are exist.\nC++11 [class.dtor]p3:\n\nA declaration of a destructor that does not have an exception-specification is \nimplicitly considered to have the same exception specification as an implicit \ndeclaration.\n\nWith this change, the application worked before may now run into runtime \ntermination. My goal here is to emit a warning to provide only possible info to \nwhere the code may need to be changed.\n\nFirst there is no way, in compile time to identify the “throw” really throw out \nof the function. Things like the call which throw out… To keep this simple, \nwhen “throw” is seen, checking its enclosing function(only destructor and \ndealloc functions) with noexcept(true) specifier emit warning.\n\nHere is implementation detail:\nA new member function CheckCXXThrowInNonThrowingFunc is added for class Sema \nin Sema.h. It is used in the call to both BuildCXXThrow and \nTransformCXXThrowExpr.\n\nThe function basic check if the enclosing function with non-throwing noexcept \nspecifer, if so emit warning for it.\n\nThe example of warning message like:\nk1.cpp:18:3: warning: \'\'~dependent_warn\'\' has a (possible implicit) non-throwing\n\n noexcept specifier. Throwing exception may cause termination.\n [-Wthrow-in-dtor]\n throw 1;\n ^\n\n k1.cpp:43:30: note: in instantiation of member function\n\n \'dependent_warn<noexcept_fun>::~dependent_warn\' requested here\n\n dependent_warn<noexcept_fun> f; // cause warning\n\nDifferential Revision: https://reviews.llvm.org/D33333\n\nllvm-svn: 306149"}, | ||
[ | [g]={{D,369,"static void EmitDiagForCXXThrowInNonThrowingFunc(Sema &S, SourceLocation OpLoc, const FunctionDecl *FD) {\n if (!S.getSourceManager().isInSystemHeader(OpLoc) && FD->getTypeSourceInfo()) {\n // ...\n if (S.getLangOpts().CPlusPlus11 && (isa<CXXDestructorDecl>(FD) || FD->getDeclName().getCXXOverloadedOperator() == OO_Delete || FD->getDeclName().getCXXOverloadedOperator() == OO_Array_Delete)) {\n // ...\n } else\n S.Diag(FD->getLocation(), diag::note_throw_in_function) << FD->getExceptionSpecSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/except/except.spec/p11.cpp"]={"clang/test/CXX/except/except.spec/p11.cpp:4:6: note: function declared non-throwing here","clang/test/CXX/except/except.spec/p11.cpp:7:6: note: function declared non-throwing here"} | ["clang/test/CXX/except/except.spec/p11.cpp"]={"clang/test/CXX/except/except.spec/p11.cpp:4:6: note: function declared non-throwing here","clang/test/CXX/except/except.spec/p11.cpp:7:6: note: function declared non-throwing here"} | ||
} | } | ||
}, | }, | ||
["note_throw_underaligned_obj"]={ | ["note_throw_underaligned_obj"]={ | ||
[e]="required alignment of type %0 (%1 bytes) is larger than the supported alignment of C++ exception objects on this target (%2 bytes)", | [e]="required alignment of type %0 (%1 bytes) is larger than the supported alignment of C++ exception objects on this target (%2 bytes)", | ||
[ | [a]=k, | ||
[b]="required alignment of type (.*?) \\((.*?) bytes\\) is larger than the supported alignment of C\\+\\+ exception objects on this target \\((.*?) bytes\\)", | [b]="required alignment of type (.*?) \\((.*?) bytes\\) is larger than the supported alignment of C\\+\\+ exception objects on this target \\((.*?) bytes\\)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"c39a243da651",1557454597,"Assume `__cxa_allocate_exception` returns an under-aligned memory on\nDarwin if the version of libc++...","Assume `__cxa_allocate_exception` returns an under-aligned memory on\nDarwin if the version of libc++abi isn\'t new enough to include the fix\nin r319123\n\nThis patch resurrects r264998, which was committed to work around a bug\nin libc++abi that was causing _cxa_allocate_exception to return a memory\nthat wasn\'t double-word aligned.\n\nhttp://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160328/154332.html\n\nIn addition, this patch makes clang issue a warning if the type of the\nthrown object requires an alignment that is larger than the minimum\nguaranteed by the target C++ runtime.\n\nrdar://problem/49864414\n\nDifferential Revision: https://reviews.llvm.org/D61667\n\nllvm-svn: 360404"}, | ||
[ | [g]={{Zb,1092,"/// CheckCXXThrowOperand - Validate the operand of a throw.\nbool Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ExceptionObjectTy, Expr *E) {\n // ...\n // Under the Itanium C++ ABI, memory for the exception object is allocated by\n // the runtime with no ability for the compiler to request additional\n // alignment. Warn if the exception type requires alignment beyond the minimum\n // guaranteed by the target C++ runtime.\n if (Context.getTargetInfo().getCXXABI().isItaniumFamily()) {\n // ...\n if (ExnObjAlign < TypeAlign) {\n // ...\n Diag(ThrowLoc, diag::note_throw_underaligned_obj) << Ty << (unsigned)TypeAlign.getQuantity() << (unsigned)ExnObjAlign.getQuantity();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-overaligned-type-thrown.cpp"]={"clang/test/SemaCXX/warn-overaligned-type-thrown.cpp:53:3: note: required alignment of type \'Overaligned3\' (64 bytes) is larger than the supported alignment of C++ exception objects on this target (16 bytes)"} | ["clang/test/SemaCXX/warn-overaligned-type-thrown.cpp"]={"clang/test/SemaCXX/warn-overaligned-type-thrown.cpp:53:3: note: required alignment of type \'Overaligned3\' (64 bytes) is larger than the supported alignment of C++ exception objects on this target (16 bytes)"} | ||
} | } | ||
}, | }, | ||
["note_total_sloc_usage"]={ | ["note_total_sloc_usage"]={ | ||
[e]="%0B in local locations, %1B in locations loaded from AST files, for a total of %2B (%3%% of available space)", | [e]="%0B in local locations, %1B in locations loaded from AST files, for a total of %2B (%3%% of available space)", | ||
[ | [a]=k, | ||
[b]="(.*?)B in local locations, (.*?)B in locations loaded from AST files, for a total of (.*?)B \\((.*?)% of available space\\)", | [b]="(.*?)B in local locations, (.*?)B in locations loaded from AST files, for a total of (.*?)B \\((.*?)% of available space\\)", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"9e52db182794",1668037554,"When we run out of source locations, try to produce useful information\nindicating why we ran out.","When we run out of source locations, try to produce useful information\nindicating why we ran out."}, | ||
[ | [g]={{"clang/lib/Basic/SourceManager.cpp",2305,"void SourceManager::noteSLocAddressSpaceUsage(DiagnosticsEngine &Diag, std::optional<unsigned> MaxNotes) const {\n // ...\n Diag.Report(SourceLocation(), diag::note_total_sloc_usage) << LocalUsage << LoadedUsage << (LocalUsage + LoadedUsage) << UsagePercent;"}}, | ||
[ | [h]={ | ||
["clang/test/Misc/sloc-usage.cpp"]={"note: 15501B in local locations, 0B in locations loaded from AST files, for a total of 15501B (0% of available space)"} | ["clang/test/Misc/sloc-usage.cpp"]={"note: 15501B in local locations, 0B in locations loaded from AST files, for a total of 15501B (0% of available space)"} | ||
} | } | ||
}, | }, | ||
["note_transparent_union_first_field_size_align"]={ | ["note_transparent_union_first_field_size_align"]={ | ||
[e]="%select{alignment|size}0 of first field is %1 bits", | [e]="%select{alignment|size}0 of first field is %1 bits", | ||
[ | [a]=k, | ||
[b]="(?:alignment|size) of first field is (.*?) bits", | [b]="(?:alignment|size) of first field is (.*?) bits", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0cfbdab0cf8a",1241043376,"Implement semantic analysis for transparent unions. This is largely\nbased on a patch from Anders Joh...","Implement semantic analysis for transparent unions. This is largely\nbased on a patch from Anders Johnsen. CodeGen support is incomplete,\nin that we do not properly coerce to the first field\'s type.\n\nllvm-svn: 70419"}, | ||
[ | [g]={{o,4270,"static void handleTransparentUnionAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (; Field != FieldEnd; ++Field) {\n // ...\n // FIXME: this isn\'t fully correct; we also need to test whether the\n // members of the union would all have the same calling convention as the\n // first member of the union. Checking just the size and alignment isn\'t\n // sufficient (consider structs passed on the stack instead of in registers\n // as an example).\n if (S.Context.getTypeSize(FieldType) != FirstSize || S.Context.getTypeAlign(FieldType) > FirstAlign) {\n // ...\n S.Diag(FirstField->getLocation(), diag::note_transparent_union_first_field_size_align) << isSize << FirstBits;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:82:19: note: alignment of first field is 32 bits","clang/test/Sema/transparent-union.c:87:19: note: alignment of first field is 32 bits","clang/test/Sema/transparent-union.c:92:8: note: size of first field is 8 bits","clang/test/Sema/transparent-union.c:97:8: note: size of first field is 8 bits","clang/test/Sema/transparent-union.c:123:3: note: alignment of first field is 32 bits"} | ["clang/test/Sema/transparent-union.c"]={"clang/test/Sema/transparent-union.c:82:19: note: alignment of first field is 32 bits","clang/test/Sema/transparent-union.c:87:19: note: alignment of first field is 32 bits","clang/test/Sema/transparent-union.c:92:8: note: size of first field is 8 bits","clang/test/Sema/transparent-union.c:97:8: note: size of first field is 8 bits","clang/test/Sema/transparent-union.c:123:3: note: alignment of first field is 32 bits"} | ||
} | } | ||
}, | }, | ||
["note_type_being_defined"]={ | ["note_type_being_defined"]={ | ||
[e]="definition of %0 is not complete until the closing \'}\'", | [e]="definition of %0 is not complete until the closing \'}\'", | ||
[ | [a]=k, | ||
[b]="definition of (.*?) is not complete until the closing \'\\}\'", | [b]="definition of (.*?) is not complete until the closing \'\\}\'", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{W,9247,"/// The implementation of RequireCompleteType\nbool Sema::RequireCompleteTypeImpl(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser *Diagnoser) {\n // ...\n // If the type was a forward declaration of a class/struct/union\n // type, produce a note.\n if (Tag && !Tag->isInvalidDecl() && !Tag->getLocation().isInvalid())\n Diag(Tag->getLocation(), Tag->isBeingDefined() ? diag::note_type_being_defined : diag::note_forward_declaration) << Context.getTagDeclType(Tag);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/class.mem/p2.cpp"]={"clang/test/CXX/class/class.mem/p2.cpp:14:10: note: definition of \'test0::A\' is not complete until the closing \'}\'"} | ["clang/test/CXX/class/class.mem/p2.cpp"]={"clang/test/CXX/class/class.mem/p2.cpp:14:10: note: definition of \'test0::A\' is not complete until the closing \'}\'"} | ||
} | } | ||
}, | }, | ||
["note_type_incomplete"]={ | ["note_type_incomplete"]={ | ||
[e]="%0 is incomplete", | [e]="%0 is incomplete", | ||
[ | [a]=k, | ||
[b]="(.*?) is incomplete", | [b]="(.*?) is incomplete", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ffa7dc379f2e",1422480686,"PR 17456\nMore helpful diagnostic on casts between unrelated class hierarchies.\n\nllvm-svn: 227371","PR 17456\nMore helpful diagnostic on casts between unrelated class hierarchies.\n\nllvm-svn: 227371"}, | ||
[ | [g]={{db,547,"/// Diagnose a failed cast.\nstatic void diagnoseBadCast(Sema &S, unsigned msg, CastType castType, SourceRange opRange, Expr *src, QualType destType, bool listInitialization) {\n // ...\n if (!DifferentPtrness) {\n // ...\n if (RecFrom && RecTo) {\n // ...\n if (!DeclFrom->isCompleteDefinition())\n S.Diag(DeclFrom->getLocation(), diag::note_type_incomplete) << DeclFrom;"},{db,550,"/// Diagnose a failed cast.\nstatic void diagnoseBadCast(Sema &S, unsigned msg, CastType castType, SourceRange opRange, Expr *src, QualType destType, bool listInitialization) {\n // ...\n if (!DifferentPtrness) {\n // ...\n if (RecFrom && RecTo) {\n // ...\n if (!DeclTo->isCompleteDefinition())\n S.Diag(DeclTo->getLocation(), diag::note_type_incomplete) << DeclTo;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.param/p15-cxx0x.cpp"]={"clang/test/CXX/temp/temp.param/p15-cxx0x.cpp:2:30: note: \'X<X<X<int>>>\' is incomplete"} | ["clang/test/CXX/temp/temp.param/p15-cxx0x.cpp"]={"clang/test/CXX/temp/temp.param/p15-cxx0x.cpp:2:30: note: \'X<X<X<int>>>\' is incomplete"} | ||
} | } | ||
}, | }, | ||
["note_type_requirement_substitution_error"]={ | ["note_type_requirement_substitution_error"]={ | ||
[e]="%select{and|because}0 \'%1\' would be invalid: %2", | [e]="%select{and|because}0 \'%1\' would be invalid: %2", | ||
[ | [a]=k, | ||
[b]="(?:and|because) \'(.*?)\' would be invalid\\: (.*?)", | [b]="(?:and|because) \'(.*?)\' would be invalid\\: (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of ...","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, | ||
[ | [g]={{"clang/lib/Sema/SemaConcept.cpp",994,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::TypeRequirement *Req, bool First) {\n // ...\n case concepts::TypeRequirement::SS_SubstitutionFailure: {\n // ...\n if (!SubstDiag->DiagMessage.empty())\n S.Diag(SubstDiag->DiagLoc, diag::note_type_requirement_substitution_error) << (int)First << SubstDiag->SubstitutedEntity << SubstDiag->DiagMessage;"}} | ||
}, | }, | ||
["note_type_requirement_unknown_substitution_error"]={ | ["note_type_requirement_unknown_substitution_error"]={ | ||
[e]="%select{and|because}0 \'%1\' would be invalid", | [e]="%select{and|because}0 \'%1\' would be invalid", | ||
[ | [a]=k, | ||
[b]="(?:and|because) \'(.*?)\' would be invalid", | [b]="(?:and|because) \'(.*?)\' would be invalid", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of ...","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, | ||
[ | [g]={{"clang/lib/Sema/SemaConcept.cpp",998,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::TypeRequirement *Req, bool First) {\n // ...\n case concepts::TypeRequirement::SS_SubstitutionFailure: {\n // ...\n if (!SubstDiag->DiagMessage.empty())\n // ...\n else\n S.Diag(SubstDiag->DiagLoc, diag::note_type_requirement_unknown_substitution_error) << (int)First << SubstDiag->SubstitutedEntity;"}} | ||
}, | }, | ||
["note_typecheck_assign_const"]={ | ["note_typecheck_assign_const"]={ | ||
[e]="%select{function %1 which returns const-qualified type %2 declared here|variable %1 declared const here|%select{non-|}1static data member %2 declared const here|member function %q1 is declared const here|%select{|nested }1data member %2 declared const here}0", | [e]="%select{function %1 which returns const-qualified type %2 declared here|variable %1 declared const here|%select{non-|}1static data member %2 declared const here|member function %q1 is declared const here|%select{|nested }1data member %2 declared const here}0", | ||
[ | [a]=k, | ||
[b]="(?:function (.*?) which returns const\\-qualified type (.*?) declared here|variable (.*?) declared const here|(?:non\\-|)static data member (.*?) declared const here|member function (.*?) is declared const here|(?:|nested )data member (.*?) declared const here)", | [b]="(?:function (.*?) which returns const\\-qualified type (.*?) declared here|variable (.*?) declared const here|(?:non\\-|)static data member (.*?) declared const here|member function (.*?) is declared const here|(?:|nested )data member (.*?) declared const here)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"af7d76c7204c",1428717193,"Improve the error message for assigning to read-only variables.\n\nPreviously, many error messages wou...","Improve the error message for assigning to read-only variables.\n\nPreviously, many error messages would simply be \"read-only variable is not\nassignable\" This change provides more information about why the variable is\nnot assignable, as well as note to where the const is located.\n\nDifferential Revision: http://reviews.llvm.org/D4479\n\nllvm-svn: 234677"}, | ||
[g]={{v,14114,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n // Loop to process MemberExpr chains.\n while (true) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {\n // ...\n if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {\n // ...\n if (!IsTypeModifiable(Field->getType(), IsDereference)) {\n // ...\n S.Diag(VD->getLocation(), diag::note_typecheck_assign_const) << ConstMember << false /*static*/ << Field << Field->getType() << Field->getSourceRange();"},{v,14144,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n // Loop to process MemberExpr chains.\n while (true) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) {\n // ...\n if (const FieldDecl *Field = dyn_cast<FieldDecl>(VD)) {\n // ...\n } else if (const VarDecl *VDecl = dyn_cast<VarDecl>(VD)) {\n if (VDecl->getType().isConstQualified()) {\n // ...\n S.Diag(VD->getLocation(), diag::note_typecheck_assign_const) << ConstMember << true /*static*/ << VDecl << VDecl->getType() << VDecl->getSourceRange();"},{v,14158,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n if (FD && !IsTypeModifiable(FD->getReturnType(), IsDereference)) {\n // ...\n S.Diag(FD->getReturnTypeSourceRange().getBegin(), diag::note_typecheck_assign_const) << ConstFunction << FD << FD->getReturnType() << FD->getReturnTypeSourceRange();"},{v,14171,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n // Point to variable declaration.\n if (const ValueDecl *VD = DRE->getDecl()) {\n if (!IsTypeModifiable(VD->getType(), IsDereference)) {\n // ...\n S.Diag(VD->getLocation(), diag::note_typecheck_assign_const) << ConstVariable << VD << VD->getType() << VD->getSourceRange();"},{v,14186,"/// Emit the \"read-only variable not assignable\" error and print notes to give\n/// more information about why the variable is not assignable, such as pointing\n/// to the declaration of a const variable, showing that a method is const, or\n/// that the function is returning a const reference.\nstatic void DiagnoseConstAssignment(Sema &S, const Expr *E, SourceLocation Loc) {\n // ...\n if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {\n // ...\n } else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (isa<CXXThisExpr>(E)) {\n if (const DeclContext *DC = S.getFunctionLevelDeclContext()) {\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC)) {\n if (MD->isConst()) {\n // ...\n S.Diag(MD->getLocation(), diag::note_typecheck_assign_const) << ConstMethod << MD << MD->getSourceRange();"},{v,14280,"static void DiagnoseRecursiveConstFields(Sema &S, const ValueDecl *VD, const RecordType *Ty, SourceLocation Loc, SourceRange Range, OriginalExprKind OEK, bool &DiagnosticEmitted) {\n // ...\n // We walk the record hierarchy breadth-first to ensure that we print\n // diagnostics in field nesting order.\n while (RecordTypeList.size() > NextToCheckIndex) {\n // ...\n for (const FieldDecl *Field : RecordTypeList[NextToCheckIndex]->getDecl()->fields()) {\n // ...\n if (FieldTy.isConstQualified()) {\n // ...\n S.Diag(Field->getLocation(), diag::note_typecheck_assign_const) << NestedConstMember << IsNested << Field << FieldTy << Field->getSourceRange();"}}, | |||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx0x-constexpr-const.cpp"]={"clang/test/SemaCXX/cxx0x-constexpr-const.cpp:3:15: note: variable \'x\' declared const here"} | ["clang/test/SemaCXX/cxx0x-constexpr-const.cpp"]={"clang/test/SemaCXX/cxx0x-constexpr-const.cpp:3:15: note: variable \'x\' declared const here"} | ||
} | } | ||
}, | }, | ||
["note_typecheck_invalid_operands_converted"]={ | ["note_typecheck_invalid_operands_converted"]={ | ||
[e]="%select{first|second}0 operand was implicitly converted to type %1", | [e]="%select{first|second}0 operand was implicitly converted to type %1", | ||
[ | [a]=k, | ||
[b]="(?:first|second) operand was implicitly converted to type (.*?)", | [b]="(?:first|second) operand was implicitly converted to type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1ef7554efd1a",1530131434,"DR1687: When overload resolution selects a built-in operator, implicit\nconversions are only applied ...","DR1687: When overload resolution selects a built-in operator, implicit\nconversions are only applied to operands of class type, and the second\nstandard conversion sequence is not applied.\n\nWhen diagnosing an invalid builtin binary operator, talk about the\noriginal types rather than the converted types. If these differ by a\nuser-defined conversion, tell the user what happened.\n\nllvm-svn: 335781"}, | ||
[ | [g]={{v,10637,"QualType Sema::InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n // If a user-defined conversion was applied to either of the operands prior\n // to applying the built-in operator rules, tell the user about it.\n if (OrigLHS.Conversion) {\n Diag(OrigLHS.Conversion->getLocation(), diag::note_typecheck_invalid_operands_converted) << 0 << LHS.get()->getType();"},{v,10658,"QualType Sema::InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS) {\n // ...\n if (OrigRHS.Conversion) {\n Diag(OrigRHS.Conversion->getLocation(), diag::note_typecheck_invalid_operands_converted) << 1 << RHS.get()->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/over/over.built/p16.cpp"]={ | ["clang/test/CXX/over/over.built/p16.cpp"]={Vb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: second operand was implicitly converted to type \'const int *\'",Vb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: second operand was implicitly converted to type \'const int *\'",Vb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: second operand was implicitly converted to type \'const int *\'",Vb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: second operand was implicitly converted to type \'const int *\'","clang/test/CXX/over/over.built/p16.cpp:4:12: note: first operand was implicitly converted to type \'const int *\'",Mb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: first operand was implicitly converted to type \'const int *\'",Mb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: first operand was implicitly converted to type \'const int *\'",Mb,"clang/test/CXX/over/over.built/p16.cpp:4:12: note: first operand was implicitly converted to type \'const int *\'",Mb,Vb,Vb,Vb,Vb,Mb,Mb,Mb,Mb} | ||
} | } | ||
}, | }, | ||
["note_typecheck_member_reference_suggestion"]={ | ["note_typecheck_member_reference_suggestion"]={ | ||
[e]="did you mean to use \'.\' instead?", | [e]="did you mean to use \'.\' instead?", | ||
[ | [a]=k, | ||
[b]="did you mean to use \'\\.\' instead\\?", | [b]="did you mean to use \'\\.\' instead\\?", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"bad7fb09b2d1",1373918094,"Move the \"->\" to \".\" fixit from r186128 into a separate note since\nrecovery is not attempted with th...","Move the \"->\" to \".\" fixit from r186128 into a separate note since\nrecovery is not attempted with the fixit. Also move the associated test\ncase from FixIt/fixit.cpp to SemaCXX/member-expr.cpp since the fixit is\nno longer automatically applied.\n\nllvm-svn: 186342"}, | ||
[ | [g]={{w,15278,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (CandidateSet.empty()) {\n // ...\n if (BaseType->isRecordType() && !BaseType->isPointerType()) {\n Diag(OpLoc, diag::note_typecheck_member_reference_suggestion) << FixItHint::CreateReplacement(OpLoc, \".\");"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:200:6: note: did you mean to use \'.\' instead?"} | ["clang/test/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:200:6: note: did you mean to use \'.\' instead?"} | ||
} | } | ||
}, | }, | ||
["note_typedef_for_linkage_here"]={ | ["note_typedef_for_linkage_here"]={ | ||
[e]="type is given name %0 for linkage purposes by this %select{typedef|alias}1 declaration", | [e]="type is given name %0 for linkage purposes by this %select{typedef|alias}1 declaration", | ||
[ | [a]=k, | ||
[b]="type is given name (.*?) for linkage purposes by this (?:typedef|alias) declaration", | [b]="type is given name (.*?) for linkage purposes by this (?:typedef|alias) declaration", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{p,5033,"void Sema::setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) {\n // ...\n if (NonCLike || ChangesLinkage) {\n // ...\n Diag(NewTD->getLocation(), diag::note_typedef_for_linkage_here) << NewTD << isa<TypeAliasDecl>(NewTD);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:113:5: note: type is given name \'A\' for linkage purposes by this typedef declaration","clang/test/SemaCXX/warn-unused-local-typedef.cpp:116:9: note: type is given name \'A2\' for linkage purposes by this alias declaration"} | ["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:113:5: note: type is given name \'A\' for linkage purposes by this typedef declaration","clang/test/SemaCXX/warn-unused-local-typedef.cpp:116:9: note: type is given name \'A2\' for linkage purposes by this alias declaration"} | ||
} | } | ||
}, | }, | ||
["note_typename_member_refers_here"]={ | ["note_typename_member_refers_here"]={ | ||
[e]="referenced member %0 is declared here", | [e]="referenced member %0 is declared here", | ||
[ | [a]=k, | ||
[b]="referenced member (.*?) is declared here", | [b]="referenced member (.*?) is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of ...","Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"}, | ||
[ | [g]={{r,11170,"/// 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 if (Referenced)\n Diag(Referenced->getLocation(), Ctx ? diag::note_typename_member_refers_here : diag::note_typename_refers_here) << Name;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:12:23: note: referenced member \'type\' is declared here"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:12:23: note: referenced member \'type\' is declared here"} | ||
} | } | ||
}, | }, | ||
["note_typename_refers_here"]={ | ["note_typename_refers_here"]={ | ||
[e]="referenced %0 is declared here", | [e]="referenced %0 is declared here", | ||
[ | [a]=k, | ||
[b]="referenced (.*?) is declared here", | [b]="referenced (.*?) is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"333489bba35d",1238195448,"Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-sp...","Initial implementation of parsing, semantic analysis, and template\ninstantiation for C++ typename-specifiers such as\n\n typename T::type\n\nThe parsing of typename-specifiers is relatively easy thanks to\nannotation tokens. When we see the \"typename\", we parse the\ntypename-specifier and produce a typename annotation token. There are\nonly a few places where we need to handle this. We currently parse the\ntypename-specifier form that terminates in an identifier, but not the\nsimple-template-id form, e.g.,\n\n typename T::template apply<U, V>\n\nParsing of nested-name-specifiers has a similar problem, since at this\npoint we don\'t have any representation of a class template\nspecialization whose template-name is unknown.\n\nSemantic analysis is only partially complete, with some support for\ntemplate instantiation that works for simple examples. \n\nllvm-svn: 67875"}, | ||
[ | [g]={{r,11171,"/// 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 if (Referenced)\n Diag(Referenced->getLocation(), Ctx ? diag::note_typename_member_refers_here : diag::note_typename_refers_here) << Name;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:32:7: note: referenced \'C\' is declared here"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:32:7: note: referenced \'C\' is declared here"} | ||
} | } | ||
}, | }, | ||
["note_ucn_four_not_eight"]={ | ["note_ucn_four_not_eight"]={ | ||
[e]="did you mean to use \'\\u\'?", | [e]="did you mean to use \'\\u\'?", | ||
[ | [a]=k, | ||
[b]="did you mean to use \'\\\\u\'\\?", | [b]="did you mean to use \'\\\\u\'\\?", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"62db5066e91e",1359060652,"Add a fixit for \\U1234 -> \\u1234.\n\nllvm-svn: 173371","Add a fixit for \\U1234 -> \\u1234.\n\nllvm-svn: 173371"}, | ||
[ | [g]={{cb,3344,"std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (!Delimited && Count != NumHexDigits) {\n if (Diagnose) {\n // ...\n // If the user wrote \\U1234, suggest a fixit to \\u.\n if (Count == 4 && NumHexDigits == 8) {\n // ...\n Diag(KindLoc, diag::note_ucn_four_not_eight) << FixItHint::CreateReplacement(URange, \"u\");"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:114:20: note: did you mean to use \'\\u\'?"} | ["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:114:20: note: did you mean to use \'\\u\'?"} | ||
} | } | ||
}, | }, | ||
["note_unguarded_available_silence"]={ | ["note_unguarded_available_silence"]={ | ||
[e]="enclose %0 in %select{an @available|a __builtin_available}1 check to silence this warning", | [e]="enclose %0 in %select{an @available|a __builtin_available}1 check to silence this warning", | ||
[ | [a]=k, | ||
[b]="enclose (.*?) in (?:an @available|a __builtin_available) check to silence this warning", | [b]="enclose (.*?) in (?:an @available|a __builtin_available) check to silence this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"5cd57177a51a",1471369451,"[ObjC] Warn on unguarded use of partial declaration\n\nThis commit adds a traversal of the AST after S...","[ObjC] Warn on unguarded use of partial declaration\n\nThis commit adds a traversal of the AST after Sema of a function that diagnoses\nunguarded references to declarations that are partially available (based on\navailability attributes). This traversal is only done when we would otherwise\nemit -Wpartial-availability.\n\nThis commit is part of a feature I proposed here:\nhttp://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html\n\nDifferential revision: https://reviews.llvm.org/D23003\n\nllvm-svn: 278826"}, | ||
[ | [g]={{Nb,788,"void DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(NamedDecl *D, SourceRange Range, ObjCInterfaceDecl *ReceiverClass) {\n // ...\n if (Result != AR_Available) {\n // ...\n auto FixitDiag = SemaRef.Diag(Range.getBegin(), diag::note_unguarded_available_silence) << Range << D << (SemaRef.getLangOpts().ObjC ? /*@available*/ 0 : /*__builtin_available*/ 1);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/availability-guard-format.mm"]={"clang/test/Sema/availability-guard-format.mm:10:10: note: enclose \'method_bar\' in an @available check to silence this warning"} | ["clang/test/Sema/availability-guard-format.mm"]={"clang/test/Sema/availability-guard-format.mm:10:10: note: enclose \'method_bar\' in an @available check to silence this warning"} | ||
} | } | ||
}, | }, | ||
["note_unimplemented_constexpr_lambda_feature_ast"]={ | ["note_unimplemented_constexpr_lambda_feature_ast"]={ | ||
[e]="unimplemented constexpr lambda feature: %0 (coming soon!)", | [e]="unimplemented constexpr lambda feature: %0 (coming soon!)", | ||
[ | [a]=k, | ||
[b]="unimplemented constexpr lambda feature\\: (.*?) \\(coming soon\\!\\)", | [b]="unimplemented constexpr lambda feature\\: (.*?) \\(coming soon\\!\\)", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"a734ab980865",1459008697,"[Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lamb...","[Cxx1z-constexpr-lambda-P0170R1] Support parsing of constexpr specifier (and its inference) on lambda expressions\n\nSupport the constexpr specifier on lambda expressions - and support its inference from the lambda call operator\'s body.\n\ni.e.\n auto L = [] () constexpr { return 5; };\n static_assert(L() == 5); // OK\n auto Implicit = [] (auto a) { return a; };\n static_assert(Implicit(5) == 5); \n\nWe do not support evaluation of lambda\'s within constant expressions just yet.\n\nImplementation Strategy:\n - teach ParseLambdaExpressionAfterIntroducer to expect a constexpr specifier and mark the invented function call operator\'s declarator\'s decl-specifier with it; Have it emit fixits for multiple decl-specifiers (mutable or constexpr) in this location.\n - for cases where constexpr is not explicitly specified, have buildLambdaExpr check whether the invented function call operator satisfies the requirements of a constexpr function, by calling CheckConstexprFunctionDecl/Body.\n\nMuch obliged to Richard Smith for his patience and his care, in ensuring the code is clang-worthy.\n\nllvm-svn: 264513"}, | ||
[ | [g]={{"clang/lib/AST/ExprConstant.cpp",3303,"/// 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 this is a local variable, dig out its value.\n if (Frame) {\n // ...\n if (!isa<ParmVarDecl>(VD)) {\n // ...\n Info.FFDiag(E->getBeginLoc(), diag::note_unimplemented_constexpr_lambda_feature_ast) << \"captures not currently allowed\";"}} | ||
}, | }, | ||
["note_uninit_fixit_remove_cond"]={ | ["note_uninit_fixit_remove_cond"]={ | ||
[e]="remove the %select{\'%1\' if its condition|condition if it}0 is always %select{false|true}2", | [e]="remove the %select{\'%1\' if its condition|condition if it}0 is always %select{false|true}2", | ||
[ | [a]=k, | ||
[b]="remove the (?:\'(.*?)\' if its condition|condition if it) is always (?:false|true)", | [b]="remove the (?:\'(.*?)\' if its condition|condition if it) is always (?:false|true)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1bb8edb8acc0",1338013246,"In response to some discussions on IRC, tweak the wording of the new\n-Wsometimes-uninitialized diagn...","In response to some discussions on IRC, tweak the wording of the new\n-Wsometimes-uninitialized diagnostics to make it clearer that the cause\nof the issue may be a condition which must always evaluate to true or\nfalse, rather than an uninitialized variable.\n\nTo emphasize this, add a new note with a fixit which removes the\nimpossible condition or replaces it with a constant.\n\nAlso, downgrade the diagnostic from -Wsometimes-uninitialized to\n-Wconditional-uninitialized when it applies to a range-based for loop,\nsince the condition is not written explicitly in the code in that case.\n\nllvm-svn: 157511"}, | ||
[ | [g]={{D,983,"/// DiagUninitUse -- Helper function to produce a diagnostic for an\n/// uninitialized use of a variable.\nstatic void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool IsCapturedByBlock) {\n // ...\n // Diagnose each branch which leads to a sometimes-uninitialized use.\n for (UninitUse::branch_iterator I = Use.branch_begin(), E = Use.branch_end(); I != E; ++I) {\n // ...\n if (RemoveDiagKind != -1)\n S.Diag(Fixit1.RemoveRange.getBegin(), diag::note_uninit_fixit_remove_cond) << RemoveDiagKind << Str << I->Output << Fixit1 << Fixit2;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/uninit-variables.c"]={"clang/test/Sema/uninit-variables.c:43:3: note: remove the \'if\' if its condition is always true","clang/test/Sema/uninit-variables.c:156:7: note: remove the \'||\' if its condition is always false","clang/test/Sema/uninit-variables.c:163:7: note: remove the \'||\' if its condition is always false","clang/test/Sema/uninit-variables.c:299:3: note: remove the \'if\' if its condition is always true"} | ["clang/test/Sema/uninit-variables.c"]={"clang/test/Sema/uninit-variables.c:43:3: note: remove the \'if\' if its condition is always true","clang/test/Sema/uninit-variables.c:156:7: note: remove the \'||\' if its condition is always false","clang/test/Sema/uninit-variables.c:163:7: note: remove the \'||\' if its condition is always false","clang/test/Sema/uninit-variables.c:299:3: note: remove the \'if\' if its condition is always true"} | ||
} | } | ||
}, | }, | ||
["note_uninit_in_this_constructor"]={ | ["note_uninit_in_this_constructor"]={ | ||
[e]="during field initialization in %select{this|the implicit default}0 constructor", | [e]="during field initialization in %select{this|the implicit default}0 constructor", | ||
[ | [a]=k, | ||
[b]="during field initialization in (?:this|the implicit default) constructor", | [b]="during field initialization in (?:this|the implicit default) constructor", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"406e65c8d175",1379646186,"Modify the uninitialized field visitor to detect uninitialized use across the\nfields in the class. ...","Modify the uninitialized field visitor to detect uninitialized use across the\nfields in the class. This allows a better checking of member intiailizers and\nin class initializers in regards to initialization ordering.\n\nFor instance, this code will now produce warnings:\n\nclass A {\n int x;\n int y;\n A() : x(y) {} // y is initialized after x, warn here\n A(int): y(x) {} // default initialization of leaves x uninitialized, warn here\n};\n\nSeveral test cases were updated with -Wno-uninitialized to silence this warning.\n\nllvm-svn: 191068"}, | ||
[ | [g]={{s,3864,"class UninitializedFieldVisitor : public EvaluatedExprVisitor<UninitializedFieldVisitor> {\n // ...\n void HandleMemberExpr(MemberExpr *ME, bool CheckReferenceOnly, bool AddressOf) {\n // ...\n if (Constructor)\n S.Diag(Constructor->getLocation(), diag::note_uninit_in_this_constructor) << (Constructor->isDefaultConstructor() && Constructor->isImplicit());"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/uninitialized.cpp"]={"clang/test/SemaCXX/uninitialized.cpp:852:5: note: during field initialization in this constructor",Lb,Lb,Lb,Lb,Lb,Lb,Lb,Lb,Lb, | ["clang/test/SemaCXX/uninitialized.cpp"]={"clang/test/SemaCXX/uninitialized.cpp:852:5: note: during field initialization in this constructor",Lb,Lb,Lb,Lb,Lb,Lb,Lb,Lb,Lb,Fb,Fb,Fb,Fb,Fb,Fb,Fb,Fb,Fb,"clang/test/SemaCXX/uninitialized.cpp:990:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:997:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1059:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1205:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1205:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1205:5: note: during field initialization in this constructor",ib,ib,ib,ib,ib,ib,ib,ib,ib,ib,ib,ib,ib,"clang/test/SemaCXX/uninitialized.cpp:1283:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1283:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1283:5: note: during field initialization in this constructor","clang/test/SemaCXX/uninitialized.cpp:1299:5: note: during field initialization in this constructor"} | ||
} | } | ||
}, | }, | ||
["note_uninit_reference_member"]={ | ["note_uninit_reference_member"]={ | ||
[e]="uninitialized reference member is here", | [e]="uninitialized reference member is here", | ||
[ | [a]=k, | ||
[b]="uninitialized reference member is here", | [b]="uninitialized reference member is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Q,739,"void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, const InitializedEntity &ParentEntity, InitListExpr *ILE, bool &RequiresSecondPass, bool FillWithNoInit) {\n // ...\n if (Init >= NumInits || !ILE->getInit(Init)) {\n // ...\n if (Field->getType()->isReferenceType()) {\n if (!VerifyOnly) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_uninit_reference_member);"},{Q,5614,"static void TryOrBuildParenListInitialization(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args, InitializationSequence &Sequence, bool VerifyOnly, ExprResult *Result = nullptr) {\n // ...\n if (const ArrayType *AT = S.getASTContext().getAsArrayType(Entity.getType())) {\n // ...\n } else if (auto *RT = Entity.getType()->getAs<RecordType>()) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n // ...\n if (EntityIndexToProcess < Args.size()) {\n // ...\n } else {\n // We\'ve processed all of the args, but there are still members that\n // have to be initialized.\n if (FD->hasInClassInitializer()) {\n // ...\n } else {\n // C++ [dcl.init]p17.6.2.2\n // The remaining elements...otherwise are value initialzed\n if (FD->getType()->isReferenceType()) {\n // ...\n if (!VerifyOnly) {\n // ...\n S.Diag(FD->getLocation(), diag::note_uninit_reference_member);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/designated-initializers.cpp"]={"clang/test/SemaCXX/designated-initializers.cpp:83:13: note: uninitialized reference member is here","clang/test/SemaCXX/designated-initializers.cpp:83:17: note: uninitialized reference member is here"} | ["clang/test/SemaCXX/designated-initializers.cpp"]={"clang/test/SemaCXX/designated-initializers.cpp:83:13: note: uninitialized reference member is here","clang/test/SemaCXX/designated-initializers.cpp:83:17: note: uninitialized reference member is here"} | ||
} | } | ||
}, | }, | ||
["note_uninit_var_use"]={ | ["note_uninit_var_use"]={ | ||
[e]="%select{uninitialized use occurs|variable is captured by block}0 here", | [e]="%select{uninitialized use occurs|variable is captured by block}0 here", | ||
[ | [a]=k, | ||
[b]="(?:uninitialized use occurs|variable is captured by block) here", | [b]="(?:uninitialized use occurs|variable is captured by block) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"1bb8edb8acc0",1338013246,"In response to some discussions on IRC, tweak the wording of the new\n-Wsometimes-uninitialized diagn...","In response to some discussions on IRC, tweak the wording of the new\n-Wsometimes-uninitialized diagnostics to make it clearer that the cause\nof the issue may be a condition which must always evaluate to true or\nfalse, rather than an uninitialized variable.\n\nTo emphasize this, add a new note with a fixit which removes the\nimpossible condition or replaces it with a constant.\n\nAlso, downgrade the diagnostic from -Wsometimes-uninitialized to\n-Wconditional-uninitialized when it applies to a range-based for loop,\nsince the condition is not written explicitly in the code in that case.\n\nllvm-svn: 157511"}, | ||
[ | [g]={{D,846,"/// DiagUninitUse -- Helper function to produce a diagnostic for an\n/// uninitialized use of a variable.\nstatic void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool IsCapturedByBlock) {\n // ...\n case UninitUse::AfterDecl:\n case UninitUse::AfterCall:\n // ...\n S.Diag(Use.getUser()->getBeginLoc(), diag::note_uninit_var_use) << IsCapturedByBlock << Use.getUser()->getSourceRange();"},{D,980,"/// DiagUninitUse -- Helper function to produce a diagnostic for an\n/// uninitialized use of a variable.\nstatic void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool IsCapturedByBlock) {\n // ...\n // Diagnose each branch which leads to a sometimes-uninitialized use.\n for (UninitUse::branch_iterator I = Use.branch_begin(), E = Use.branch_end(); I != E; ++I) {\n // ...\n S.Diag(User->getBeginLoc(), diag::note_uninit_var_use) << IsCapturedByBlock << User->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/uninit-variables.c"]={"clang/test/Sema/uninit-variables.c:46:10: note: uninitialized use occurs here","clang/test/Sema/uninit-variables.c:157:12: note: uninitialized use occurs here","clang/test/Sema/uninit-variables.c:164:12: note: uninitialized use occurs here","clang/test/Sema/uninit-variables.c:301:10: note: uninitialized use occurs here"} | ["clang/test/Sema/uninit-variables.c"]={"clang/test/Sema/uninit-variables.c:46:10: note: uninitialized use occurs here","clang/test/Sema/uninit-variables.c:157:12: note: uninitialized use occurs here","clang/test/Sema/uninit-variables.c:164:12: note: uninitialized use occurs here","clang/test/Sema/uninit-variables.c:301:10: note: uninitialized use occurs here"} | ||
} | } | ||
}, | }, | ||
["note_unlocked_here"]={ | ["note_unlocked_here"]={ | ||
[e]="%0 released here", | [e]="%0 released here", | ||
[ | [a]=k, | ||
[b]="(.*?) released here", | [b]="(.*?) released here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{D,1839,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n OptionalNotes makeUnlockedHereNote(SourceLocation LocUnlocked, StringRef Kind) { return LocUnlocked.isValid() ? getNotes(PartialDiagnosticAt(LocUnlocked, S.PDiag(diag::note_unlocked_here) << Kind)) : getNotes(); }"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:121:3: note: mutex released here","clang/test/Sema/warn-thread-safety-analysis.c:126:3: note: mutex released here"} | ["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:121:3: note: mutex released here","clang/test/Sema/warn-thread-safety-analysis.c:126:3: note: mutex released here"} | ||
} | } | ||
}, | }, | ||
["note_unofficial_macro_backtrace_limit"]={ | ["note_unofficial_macro_backtrace_limit"]={ | ||
[e]="(skipping %0 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)", | [e]="(skipping %0 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)", | ||
[ | [a]=k, | ||
[b]="\\(skipping (.*?) expansions in backtrace; use \\-fmacro\\-backtrace\\-limit\\=0 to see all\\)", | [b]="\\(skipping (.*?) expansions in backtrace; use \\-fmacro\\-backtrace\\-limit\\=0 to see all\\)", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [h]={ | ||
["clang/test/Misc/macro-backtrace.c"]={"note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)"} | ["clang/test/Misc/macro-backtrace.c"]={"note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)"} | ||
} | } | ||
}, | }, | ||
["note_unofficial_marco_expansion"]={ | ["note_unofficial_marco_expansion"]={ | ||
[e]="expanded from here", | [e]="expanded from here", | ||
[ | [a]=k, | ||
[b]="expanded from here", | [b]="expanded from here", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/_Pragma-dependency.c"]={"<scratch space>:2:17: note: expanded from here"} | ["clang/test/Preprocessor/_Pragma-dependency.c"]={"<scratch space>:2:17: note: expanded from here"} | ||
} | } | ||
}, | }, | ||
["note_unofficial_marco_expansion_from"]={ | ["note_unofficial_marco_expansion_from"]={ | ||
[e]="expanded from macro \'%0\'", | [e]="expanded from macro \'%0\'", | ||
[ | [a]=k, | ||
[b]="expanded from macro \'(.*?)\'", | [b]="expanded from macro \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [h]={ | ||
[ | [Fc]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:6:49: note: expanded from macro \'RETURN_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:5:49: note: expanded from macro \'SET_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:7:49: note: expanded from macro \'TEST_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:3:49: note: expanded from macro \'CALLABLE_WHEN\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:4:49: note: expanded from macro \'CONSUMABLE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:6:49: note: expanded from macro \'RETURN_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:5:49: note: expanded from macro \'SET_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:7:49: note: expanded from macro \'TEST_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:3:49: note: expanded from macro \'CALLABLE_WHEN\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:4:49: note: expanded from macro \'CONSUMABLE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:6:49: note: expanded from macro \'RETURN_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:3:49: note: expanded from macro \'CALLABLE_WHEN\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:5:49: note: expanded from macro \'SET_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:7:49: note: expanded from macro \'TEST_TYPESTATE\'","clang/test/SemaCXX/warn-consumed-parsing.cpp:4:49: note: expanded from macro \'CONSUMABLE\'"} | ||
} | } | ||
}, | }, | ||
["note_unparenthesized_non_primary_expr_in_requires_clause"]={ | ["note_unparenthesized_non_primary_expr_in_requires_clause"]={ | ||
[e]="parentheses are required around this expression in a requires clause", | [e]="parentheses are required around this expression in a requires clause", | ||
[ | [a]=k, | ||
[b]="parentheses are required around this expression in a requires clause", | [b]="parentheses are required around this expression in a requires clause", | ||
[ | [c]=j, | ||
[ | [d]=K, | ||
[ | [f]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\n...","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, | ||
[ | [g]={{Bc,280,"/// \\brief Parse a constraint-logical-and-expression.\n///\n/// \\verbatim\n/// C++2a[temp.constr.decl]p1\n/// constraint-logical-and-expression:\n/// primary-expression\n/// constraint-logical-and-expression \'&&\' primary-expression\n///\n/// \\endverbatim\nExprResult Parser::ParseConstraintLogicalAndExpression(bool IsTrailingRequiresClause) {\n // ...\n auto ParsePrimary = [&]() {\n // ...\n auto RecoverFromNonPrimary = [&](ExprResult E, bool Note) {\n // ...\n if (!E.isInvalid())\n Diag(E.get()->getExprLoc(), Note ? diag::note_unparenthesized_non_primary_expr_in_requires_clause : diag::err_unparenthesized_non_primary_expr_in_requires_clause) << FixItHint::CreateInsertion(E.get()->getBeginLoc(), \"(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(E.get()->getEndLoc()), \")\") << E.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:96:31: note: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:132:21: note: parentheses are required around this expression in a requires clause"} | ["clang/test/Parser/cxx-concepts-requires-clause.cpp"]={"clang/test/Parser/cxx-concepts-requires-clause.cpp:96:31: note: parentheses are required around this expression in a requires clause","clang/test/Parser/cxx-concepts-requires-clause.cpp:132:21: note: parentheses are required around this expression in a requires clause"} | ||
} | } | ||
}, | }, | ||
["note_unreachable_entity"]={ | ["note_unreachable_entity"]={ | ||
[e]="%select{declaration|definition|default argument declared|explicit specialization declared|partial specialization declared}0 here is not %select{visible|reachable|reachable|reachable|reachable|reachable}0", | [e]="%select{declaration|definition|default argument declared|explicit specialization declared|partial specialization declared}0 here is not %select{visible|reachable|reachable|reachable|reachable|reachable}0", | ||
[ | [a]=k, | ||
[b]="(?:declaration|definition|default argument declared|explicit specialization declared|partial specialization declared) here is not (?:visible|reachable|reachable|reachable|reachable|reachable)", | [b]="(?:declaration|definition|default argument declared|explicit specialization declared|partial specialization declared) here is not (?:visible|reachable|reachable|reachable|reachable|reachable)", | ||
[ | [c]=j, | ||
[ | [d]=dc, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{"clang/lib/Sema/SemaLookup.cpp",5698,"void Sema::diagnoseMissingImport(SourceLocation UseLoc, const NamedDecl *Decl, SourceLocation DeclLoc, ArrayRef<Module *> Modules, MissingImportKind MIK, bool Recover) {\n // ...\n auto NotePrevious = [&] {\n // ...\n Diag(DeclLoc, diag::note_unreachable_entity) << (int)MIK;"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/submodule-visibility-cycles.cpp"]={"clang/test/Modules/Inputs/submodule-visibility/cycle2.h:6:8: note: declaration here is not visible"} | ["clang/test/Modules/submodule-visibility-cycles.cpp"]={"clang/test/Modules/Inputs/submodule-visibility/cycle2.h:6:8: note: declaration here is not visible"} | ||
} | } | ||
}, | }, | ||
["note_unreachable_silence"]={ | ["note_unreachable_silence"]={ | ||
[e]="silence by adding parentheses to mark code as explicitly dead", | [e]="silence by adding parentheses to mark code as explicitly dead", | ||
[ | [a]=k, | ||
[b]="silence by adding parentheses to mark code as explicitly dead", | [b]="silence by adding parentheses to mark code as explicitly dead", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"ec3bbf4933d7",1396053320,"Improve -Wunreachable-code to provide a means to indicate code is intentionally marked dead via if((...","Improve -Wunreachable-code to provide a means to indicate code is intentionally marked dead via if((0)).\n\nTaking a hint from -Wparentheses, use an extra \'()\' as a sigil that\na dead condition is intentionally dead. For example:\n\n if ((0)) { dead }\n\nWhen this sigil is found, do not emit a dead code warning. When the\nanalysis sees:\n\n if (0)\n\nit suggests inserting \'()\' as a Fix-It.\n\nllvm-svn: 205069"}, | ||
[ | [g]={{D,116,"class UnreachableCodeHandler : public reachable_code::Callback {\n // ...\n void HandleUnreachable(reachable_code::UnreachableKind UK, SourceLocation L, SourceRange SilenceableCondVal, SourceRange R1, SourceRange R2, bool HasFallThroughAttr) override {\n // ...\n if (Open.isValid()) {\n // ...\n if (Close.isValid()) {\n S.Diag(Open, diag::note_unreachable_silence) << FixItHint::CreateInsertion(Open, \"/* DISABLES CODE */ (\") << FixItHint::CreateInsertion(Close, \")\");"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/warn-unreachable.m"]={"clang/test/SemaObjC/warn-unreachable.m:69:7: note: silence by adding parentheses to mark code as explicitly dead","clang/test/SemaObjC/warn-unreachable.m:59:7: note: silence by adding parentheses to mark code as explicitly dead","clang/test/SemaObjC/warn-unreachable.m:56:7: note: silence by adding parentheses to mark code as explicitly dead"} | ["clang/test/SemaObjC/warn-unreachable.m"]={"clang/test/SemaObjC/warn-unreachable.m:69:7: note: silence by adding parentheses to mark code as explicitly dead","clang/test/SemaObjC/warn-unreachable.m:59:7: note: silence by adding parentheses to mark code as explicitly dead","clang/test/SemaObjC/warn-unreachable.m:56:7: note: silence by adding parentheses to mark code as explicitly dead"} | ||
} | } | ||
}, | }, | ||
["note_unsafe_buffer_operation"]={ | ["note_unsafe_buffer_operation"]={ | ||
[e]="used%select{| in pointer arithmetic| in buffer access}0 here", | [e]="used%select{| in pointer arithmetic| in buffer access}0 here", | ||
[ | [a]=k, | ||
[b]="used(?:| in pointer arithmetic| in buffer access) here", | [b]="used(?:| in pointer arithmetic| in buffer access) here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{D,2213,"class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {\n // ...\n void handleUnsafeOperation(const Stmt *Operation, bool IsRelatedToDecl) override {\n // ...\n if (IsRelatedToDecl) {\n // ...\n S.Diag(Loc, diag::note_unsafe_buffer_operation) << MsgParam << Range;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp"]={"clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:7:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:8:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:13:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:20:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:21:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:26:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:34:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:33:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:40:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:92:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:91:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:100:3: note: used in buffer access here"} | ["clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp"]={"clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:7:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:8:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:13:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:20:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:21:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:26:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:34:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:33:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:40:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:92:3: note: used in buffer access here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:91:3: note: used in pointer arithmetic here","clang/test/SemaCXX/unsafe-buffer-usage-diag-type.cpp:100:3: note: used in buffer access here"} | ||
} | } | ||
}, | }, | ||
["note_unsafe_buffer_variable_fixit_group"]={ | ["note_unsafe_buffer_variable_fixit_group"]={ | ||
[e]="change type of %0 to \'%select{std::span|std::array|std::span::iterator}1\' to preserve bounds information%select{|, and change %2 to \'%select{std::span|std::array|std::span::iterator}1\' to propagate bounds information between them}3", | [e]="change type of %0 to \'%select{std::span|std::array|std::span::iterator}1\' to preserve bounds information%select{|, and change %2 to \'%select{std::span|std::array|std::span::iterator}1\' to propagate bounds information between them}3", | ||
[ | [a]=k, | ||
[b]="change type of (.*?) to \'(?:std\\:\\:span|std\\:\\:array|std\\:\\:span\\:\\:iterator)\' to preserve bounds information(?:|, and change (.*?) to \'(?:std\\:\\:span|std\\:\\:array|std\\:\\:span\\:\\:iterator)\' to propagate bounds information between them)", | [b]="change type of (.*?) to \'(?:std\\:\\:span|std\\:\\:array|std\\:\\:span\\:\\:iterator)\' to preserve bounds information(?:|, and change (.*?) to \'(?:std\\:\\:span|std\\:\\:array|std\\:\\:span\\:\\:iterator)\' to propagate bounds information between them)", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{D,2234,"class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {\n // ...\n void handleUnsafeVariableGroup(const VarDecl *Variable, const DefMapTy &VarGrpMap, FixItList &&Fixes) override {\n // ...\n if (!Fixes.empty()) {\n // ...\n const auto &FD = S.Diag(Variable->getLocation(), diag::note_unsafe_buffer_variable_fixit_group);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-assign-to-array-subscr-on-ptr.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-assign-to-array-subscr-on-ptr.cpp:12:8: note: change type of \'p\' to \'std::span\' to preserve bounds information"} | ["clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-assign-to-array-subscr-on-ptr.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-assign-to-array-subscr-on-ptr.cpp:12:8: note: change type of \'p\' to \'std::span\' to preserve bounds information"} | ||
} | } | ||
}, | }, | ||
["note_use_dashdash"]={ | ["note_use_dashdash"]={ | ||
[e]="use \'--\' to treat subsequent arguments as filenames", | [e]="use \'--\' to treat subsequent arguments as filenames", | ||
[ | [a]=k, | ||
[b]="use \'\\-\\-\' to treat subsequent arguments as filenames", | [b]="use \'\\-\\-\' to treat subsequent arguments as filenames", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"091f1b6ef314",1485536981,"clang-cl: Warn about /U flags that look like filenames (PR31662)\n\nBoth on Mac and Windows, it\'s comm...","clang-cl: Warn about /U flags that look like filenames (PR31662)\n\nBoth on Mac and Windows, it\'s common to have a \'Users\' directory in the\nroot of the filesystem, so one might specify a filename as\n\'/Users/me/myfile.c\'. clang-cl (as well as MSVC\'s cl.exe) will interpret\nthat as invoking the \'/U\' option, which is probably not what the user\nwanted. Add a warning about this.\n\nDifferential Revision: https://reviews.llvm.org/D29198\n\nllvm-svn: 293305"}, | ||
[ | [g]={{"clang/lib/Driver/Driver.cpp",2794,"// Construct a the list of inputs and their types.\nvoid Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args, InputList &Inputs) const {\n // ...\n for (Arg *A : Args) {\n if (A->getOption().getKind() == Option::InputClass) {\n // ...\n } else if (A->getOption().matches(options::OPT__SLASH_Tc)) {\n // ...\n } else if (A->getOption().matches(options::OPT__SLASH_Tp)) {\n // ...\n } else if (A->getOption().hasFlag(options::LinkerInput)) {\n // ...\n } else if (A->getOption().matches(options::OPT_x)) {\n // ...\n } else if (A->getOption().getID() == options::OPT_U) {\n // ...\n if (Val.find_first_of(\"/\\\\\") != StringRef::npos) {\n // ...\n Diag(diag::note_use_dashdash);"}} | ||
}, | }, | ||
["note_use_ifdef_guards"]={ | ["note_use_ifdef_guards"]={ | ||
[e]="unguarded header; consider using #ifdef guards or #pragma once", | [e]="unguarded header; consider using #ifdef guards or #pragma once", | ||
[ | [a]=k, | ||
[b]="unguarded header; consider using \\#ifdef guards or \\#pragma once", | [b]="unguarded header; consider using \\#ifdef guards or \\#pragma once", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"0ad318217917",1494483607,"[Sema] Improve redefinition errors pointing to the same header\n\nDiagnostics related to redefinition ...","[Sema] Improve redefinition errors pointing to the same header\n\nDiagnostics related to redefinition errors that point to the same header\nfile do not provide much information that helps users fixing the issue.\n\n- In the modules context, it usually happens because of non modular\nincludes.\n- When modules aren\'t involved it might happen because of the lack of\nheader guards.\n\nEnhance diagnostics in these scenarios.\n\nDifferential Revision: https://reviews.llvm.org/D28832\n\nrdar://problem/31669175\n\nllvm-svn: 302765"}, | ||
[ | [g]={{p,4806,"void Sema::notePreviousDefinition(const NamedDecl *Old, SourceLocation New) {\n // ...\n // Is it the same file and same offset? Provide more information on why\n // this leads to a redefinition error.\n if (FNew == FOld && FNewDecLoc.second == FOldDecLoc.second) {\n // ...\n // If the header has no guards, emit a note suggesting one.\n if (FOld && !HSI.isFileMultipleIncludeGuarded(FOld))\n Diag(Old->getLocation(), diag::note_use_ifdef_guards);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/redefinition-same-header.c"]={"build/tools/clang/test/Sema/Output/redefinition-same-header.c.tmp/a.h:1:5: note: unguarded header; consider using #ifdef guards or #pragma once"} | ["clang/test/Sema/redefinition-same-header.c"]={"build/tools/clang/test/Sema/Output/redefinition-same-header.c.tmp/a.h:1:5: note: unguarded header; consider using #ifdef guards or #pragma once"} | ||
} | } | ||
}, | }, | ||
["note_use_non_reference_type"]={ | ["note_use_non_reference_type"]={ | ||
[e]="use non-reference type %0", | [e]="use non-reference type %0", | ||
[ | [a]=k, | ||
[b]="use non\\-reference type (.*?)", | [b]="use non\\-reference type (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3e1d483e0efb",1428962935,"Add new warning -Wrange-loop-analysis to warn on copies during loops.\n\n-Wrange-loop-analysis is a su...","Add new warning -Wrange-loop-analysis to warn on copies during loops.\n\n-Wrange-loop-analysis is a subgroup of -Wloop-analysis and will warn when\na range-based for-loop makes copies of the elements in the range. If possible,\nsuggest the proper type to prevent copies, or the non-reference to help\ndistinguish copy versus non-copy forms. Existing warnings in -Wloop-analysis\nare moved to -Wfor-loop-analysis, also a subgroup of -Wloop-analysis.\n\nDifferential Revision: http://reviews.llvm.org/D4169\n\nllvm-svn: 234804"}, | ||
[ | [g]={{J,3159,"// Warn when the loop variable is a const reference that creates a copy.\n// Suggest using the non-reference type for copies. If a copy can be prevented\n// suggest the const reference type that would do so.\n// For instance, given \"for (const &Foo : Range)\", suggest\n// \"for (const Foo : Range)\" to denote a copy is made for the loop. If\n// possible, also suggest \"for (const &Bar : Range)\" if this type prevents\n// the copy altogether.\nstatic void DiagnoseForRangeReferenceVariableCopies(Sema &SemaRef, const VarDecl *VD, QualType RangeInitType) {\n // ...\n if (!ReferenceReturnType.isNull()) {\n // ...\n } else if (!VariableType->isRValueReferenceType()) {\n // ...\n SemaRef.Diag(VD->getBeginLoc(), diag::note_use_non_reference_type) << NonReferenceType << VD->getSourceRange() << FixItHint::CreateRemoval(VD->getTypeSpecEndLoc());"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:563:8: note: use non-reference type \'svint8_t\' (aka \'__SVInt8_t\')"} | ["clang/test/SemaCXX/sizeless-1.cpp"]={"clang/test/SemaCXX/sizeless-1.cpp:563:8: note: use non-reference type \'svint8_t\' (aka \'__SVInt8_t\')"} | ||
} | } | ||
}, | }, | ||
["note_use_reference_type"]={ | ["note_use_reference_type"]={ | ||
[e]="use reference type %0 to prevent copying", | [e]="use reference type %0 to prevent copying", | ||
[ | [a]=k, | ||
[b]="use reference type (.*?) to prevent copying", | [b]="use reference type (.*?) to prevent copying", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3e1d483e0efb",1428962935,"Add new warning -Wrange-loop-analysis to warn on copies during loops.\n\n-Wrange-loop-analysis is a su...","Add new warning -Wrange-loop-analysis to warn on copies during loops.\n\n-Wrange-loop-analysis is a subgroup of -Wloop-analysis and will warn when\na range-based for-loop makes copies of the elements in the range. If possible,\nsuggest the proper type to prevent copies, or the non-reference to help\ndistinguish copy versus non-copy forms. Existing warnings in -Wloop-analysis\nare moved to -Wfor-loop-analysis, also a subgroup of -Wloop-analysis.\n\nDifferential Revision: http://reviews.llvm.org/D4169\n\nllvm-svn: 234804"}, | ||
[ | [g]={{J,3208,"// Warns when the loop variable can be changed to a reference type to\n// prevent a copy. For instance, if given \"for (const Foo x : Range)\" suggest\n// \"for (const Foo &x : Range)\" if this form does not make a copy.\nstatic void DiagnoseForRangeConstVariableCopies(Sema &SemaRef, const VarDecl *VD) {\n // ...\n SemaRef.Diag(VD->getBeginLoc(), diag::note_use_reference_type) << SemaRef.Context.getLValueReferenceType(VariableType) << VD->getSourceRange() << FixItHint::CreateInsertion(VD->getLocation(), \"&\");"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp"]={"clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:22:8: note: use reference type \'const Record &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:46:8: note: use reference type \'const Record &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:61:8: note: use reference type \'const Record &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:87:8: note: use reference type \'const Record &\' to prevent copying"} | ["clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp"]={"clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:22:8: note: use reference type \'const Record &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:46:8: note: use reference type \'const Record &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:61:8: note: use reference type \'const Record &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis-trivially-copyable.cpp:87:8: note: use reference type \'const Record &\' to prevent copying"} | ||
} | } | ||
}, | }, | ||
["note_use_thread_local"]={ | ["note_use_thread_local"]={ | ||
[e]="use \'thread_local\' to allow this", | [e]="use \'thread_local\' to allow this", | ||
[ | [a]=k, | ||
[b]="use \'thread_local\' to allow this", | [b]="use \'thread_local\' to allow this", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6ea1a4d1dcd6",1365970291,"Diagnose if a __thread or _Thread_local variable has a non-constant initializer\nor non-trivial destr...","Diagnose if a __thread or _Thread_local variable has a non-constant initializer\nor non-trivial destructor.\n\nllvm-svn: 179491"}, | ||
[ | [g]={{p,14101,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (var->getTLSKind() == VarDecl::TLS_Static) {\n if (var->getType().isDestructedType()) {\n // ...\n if (getLangOpts().CPlusPlus11)\n Diag(var->getLocation(), diag::note_use_thread_local);"},{p,14111,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (var->getTLSKind() == VarDecl::TLS_Static) {\n if (var->getType().isDestructedType()) {\n // ...\n } else if (getLangOpts().CPlusPlus && var->hasInit()) {\n if (!checkConstInit()) {\n // ...\n if (getLangOpts().CPlusPlus11)\n Diag(var->getLocation(), diag::note_use_thread_local);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/declspec-thread.cpp"]={"clang/test/SemaCXX/declspec-thread.cpp:12:24: note: use \'thread_local\' to allow this","clang/test/SemaCXX/declspec-thread.cpp:19:28: note: use \'thread_local\' to allow this","clang/test/SemaCXX/declspec-thread.cpp:26:28: note: use \'thread_local\' to allow this"} | ["clang/test/SemaCXX/declspec-thread.cpp"]={"clang/test/SemaCXX/declspec-thread.cpp:12:24: note: use \'thread_local\' to allow this","clang/test/SemaCXX/declspec-thread.cpp:19:28: note: use \'thread_local\' to allow this","clang/test/SemaCXX/declspec-thread.cpp:26:28: note: use \'thread_local\' to allow this"} | ||
} | } | ||
}, | }, | ||
["note_use_type_or_non_reference"]={ | ["note_use_type_or_non_reference"]={ | ||
[e]="use non-reference type %0 to make construction explicit or type %1 to prevent copying", | [e]="use non-reference type %0 to make construction explicit or type %1 to prevent copying", | ||
[ | [a]=k, | ||
[b]="use non\\-reference type (.*?) to make construction explicit or type (.*?) to prevent copying", | [b]="use non\\-reference type (.*?) to make construction explicit or type (.*?) to prevent copying", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"3e1d483e0efb",1428962935,"Add new warning -Wrange-loop-analysis to warn on copies during loops.\n\n-Wrange-loop-analysis is a su...","Add new warning -Wrange-loop-analysis to warn on copies during loops.\n\n-Wrange-loop-analysis is a subgroup of -Wloop-analysis and will warn when\na range-based for-loop makes copies of the elements in the range. If possible,\nsuggest the proper type to prevent copies, or the non-reference to help\ndistinguish copy versus non-copy forms. Existing warnings in -Wloop-analysis\nare moved to -Wfor-loop-analysis, also a subgroup of -Wloop-analysis.\n\nDifferential Revision: http://reviews.llvm.org/D4169\n\nllvm-svn: 234804"}, | ||
[ | [g]={{J,3147,"// Warn when the loop variable is a const reference that creates a copy.\n// Suggest using the non-reference type for copies. If a copy can be prevented\n// suggest the const reference type that would do so.\n// For instance, given \"for (const &Foo : Range)\", suggest\n// \"for (const Foo : Range)\" to denote a copy is made for the loop. If\n// possible, also suggest \"for (const &Bar : Range)\" if this type prevents\n// the copy altogether.\nstatic void DiagnoseForRangeReferenceVariableCopies(Sema &SemaRef, const VarDecl *VD, QualType RangeInitType) {\n // ...\n if (!ReferenceReturnType.isNull()) {\n // ...\n SemaRef.Diag(VD->getBeginLoc(), diag::note_use_type_or_non_reference) << NonReferenceType << NewReferenceType << VD->getSourceRange() << FixItHint::CreateRemoval(VD->getTypeSpecEndLoc());"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-range-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-range-loop-analysis.cpp:78:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:154:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:158:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:163:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:172:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:176:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:181:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:243:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:247:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:253:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:285:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:289:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:295:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:321:8: note: use non-reference type \'int\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:325:8: note: use non-reference type \'int\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:331:8: note: use non-reference type \'int\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:340:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:344:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:350:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:376:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:380:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:386:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:414:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:418:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:424:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying"} | ["clang/test/SemaCXX/warn-range-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-range-loop-analysis.cpp:78:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:154:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:158:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:163:8: note: use non-reference type \'double\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:172:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:176:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:181:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const int &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:243:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:247:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:253:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:285:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:289:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:295:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:321:8: note: use non-reference type \'int\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:325:8: note: use non-reference type \'int\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:331:8: note: use non-reference type \'int\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:340:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:344:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:350:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const double &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:376:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:380:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:386:8: note: use non-reference type \'Bar\' to make construction explicit or type \'const Foo &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:414:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:418:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying","clang/test/SemaCXX/warn-range-loop-analysis.cpp:424:8: note: use non-reference type \'int\' to make construction explicit or type \'const Bar &\' to prevent copying"} | ||
} | } | ||
}, | }, | ||
["note_used_here"]={ | ["note_used_here"]={ | ||
[e]="used here", | [e]="used here", | ||
[ | [a]=k, | ||
[b]="used here", | [b]="used here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"837796754391",1298084021,"Warn about code that uses variables and functions with internal linkage\nwithout defining them. This...","Warn about code that uses variables and functions with internal linkage\nwithout defining them. This should be an error, but I\'m paranoid about\n\"uses\" that end up not actually requiring a definition. I\'ll revisit later.\n\nAlso, teach IR generation to not set internal linkage on variable\ndeclarations, just for safety\'s sake. Doing so produces an invalid module\nif the variable is not ultimately defined.\n\nAlso, fix several places in the test suite where we were using internal\nfunctions without definitions.\n\nllvm-svn: 126016"}, | ||
[g]={{Nc,918,"/// 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 (UseLoc.isValid())\n S.Diag(UseLoc, diag::note_used_here);"},{fb,3317,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // In ARC, forbid the user from sending messages to\n // retain/release/autorelease/dealloc/retainCount explicitly.\n if (getLangOpts().ObjCAutoRefCount) {\n // ...\n case OMF_performSelector:\n if (Method && NumArgs >= 1) {\n if (const auto *SelExp = dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens())) {\n // ...\n } else {\n // ...\n Diag(Args[0]->getExprLoc(), diag::note_used_here);"},{q,2962,"void Sema::EndOpenMPDSABlock(Stmt *CurDirective) {\n // OpenMP [2.14.3.5, Restrictions, C/C++, p.1]\n // A variable of class type (or array thereof) that appears in a lastprivate\n // clause requires an accessible, unambiguous default constructor for the\n // class type, unless the list item is also specified in a firstprivate\n // clause.\n if (const auto *D = dyn_cast_or_null<OMPExecutableDirective>(CurDirective)) {\n for (OMPClause *C : D->clauses()) {\n // ...\n if (auto *Clause = dyn_cast<OMPUsesAllocatorsClause>(C)) {\n for (unsigned I = 0, E = Clause->getNumberOfAllocators(); I < E; ++I) {\n // ...\n if (DVar.RefExpr || DSAStack->checkMappableExprComponentListsForDecl(VD, /*CurrentRegionOnly=*/true, [VD, &MapExpr](OMPClauseMappableExprCommon::MappableExprComponentListRef MapExprComponents, OpenMPClauseKind C) {\n // ...\n if (DVar.RefExpr)\n // ...\n else\n Diag(MapExpr->getExprLoc(), diag::note_used_here) << MapExpr->getSourceRange();"},{q,21511,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n for (; CI != CE && SI != SE; ++CI, ++SI) {\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.3]\n // At most one list item can be an array item derived from a given\n // variable in map clauses of the same construct.\n if (CurrentRegionOnly && (isa<ArraySubscriptExpr>(CI->getAssociatedExpression()) || isa<OMPArraySectionExpr>(CI->getAssociatedExpression()) || isa<OMPArrayShapingExpr>(CI->getAssociatedExpression())) && (isa<ArraySubscriptExpr>(SI->getAssociatedExpression()) || isa<OMPArraySectionExpr>(SI->getAssociatedExpression()) || isa<OMPArrayShapingExpr>(SI->getAssociatedExpression()))) {\n // ...\n SemaRef.Diag(SI->getAssociatedExpression()->getExprLoc(), diag::note_used_here) << SI->getAssociatedExpression()->getSourceRange();"},{q,21563,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.4]\n // List items of map clauses in the same construct must not share\n // original storage.\n //\n // If the expressions are exactly the same or one is a subset of the\n // other, it means they are sharing storage.\n if (CI == CE && SI == SE) {\n if (CurrentRegionOnly) {\n // ...\n SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) << RE->getSourceRange();"},{q,21600,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.1]\n // A variable for which the type is pointer and an array section\n // derived from that variable must not appear as list items of map\n // clauses of the same construct.\n //\n // Also, cover one of the cases in:\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]\n // If any part of the original storage of a list item has corresponding\n // storage in the device data environment, all of the original storage\n // must have corresponding storage in the device data environment.\n //\n if (DerivedType->isAnyPointerType()) {\n if (CI == CE || SI == SE) {\n // ...\n SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) << RE->getSourceRange();"},{q,21611,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, C/C++, p.1]\n // A variable for which the type is pointer and an array section\n // derived from that variable must not appear as list items of map\n // clauses of the same construct.\n //\n // Also, cover one of the cases in:\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]\n // If any part of the original storage of a list item has corresponding\n // storage in the device data environment, all of the original storage\n // must have corresponding storage in the device data environment.\n //\n if (DerivedType->isAnyPointerType()) {\n // ...\n if (CI->getAssociatedExpression()->getStmtClass() != SI->getAssociatedExpression()->getStmtClass() || CI->getAssociatedDeclaration()->getCanonicalDecl() == SI->getAssociatedDeclaration()->getCanonicalDecl()) {\n // ...\n SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) << RE->getSourceRange();"},{q,21650,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n bool FoundError = DSAS->checkMappableExprComponentListsForDecl(VD, CurrentRegionOnly, [&IsEnclosedByDataEnvironmentExpr, &SemaRef, VD, CurrentRegionOnly, ELoc, ERange, CKind, &EnclosingExpr, CurComponents](OMPClauseMappableExprCommon::MappableExprComponentListRef StackComponents, OpenMPClauseKind Kind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.4]\n // List items of map clauses in the same construct must not share\n // original storage.\n //\n // An expression is a subset of the other.\n if (CurrentRegionOnly && (CI == CE || SI == SE)) {\n // ...\n SemaRef.Diag(RE->getExprLoc(), diag::note_used_here) << RE->getSourceRange();"},{q,21686,"// Return true if expression E associated with value VD has conflicts with other\n// map information.\nstatic bool checkMapConflicts(Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) {\n // ...\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.5]\n // If any part of the original storage of a list item has corresponding\n // storage in the device data environment, all of the original storage must\n // have corresponding storage in the device data environment.\n // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.6]\n // If a list item is an element of a structure, and a different element of\n // the structure has a corresponding list item in the device data environment\n // prior to a task encountering the construct associated with the map clause,\n // then the list item must also have a corresponding list item in the device\n // data environment prior to the task encountering the construct.\n //\n if (EnclosingExpr && !IsEnclosedByDataEnvironmentExpr) {\n // ...\n SemaRef.Diag(EnclosingExpr->getExprLoc(), diag::note_used_here) << EnclosingExpr->getSourceRange();"},{q,23134,"static void checkDeclInTargetContext(SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D) {\n // ...\n SemaRef.Diag(SL, diag::note_used_here) << SR;"},{q,23524,"OMPClause *Sema::ActOnOpenMPIsDevicePtrClause(ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (DSAStack->checkMappableExprComponentListsForDecl(D, /*CurrentRegionOnly=*/true, [&ConflictExpr](OMPClauseMappableExprCommon::MappableExprComponentListRef R, OpenMPClauseKind) -> bool {\n // ...\n Diag(ConflictExpr->getExprLoc(), diag::note_used_here) << ConflictExpr->getSourceRange();"},{q,23599,"OMPClause *Sema::ActOnOpenMPHasDeviceAddrClause(ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if (DSAStack->checkMappableExprComponentListsForDecl(D, /*CurrentRegionOnly=*/true, [&ConflictExpr](OMPClauseMappableExprCommon::MappableExprComponentListRef R, OpenMPClauseKind) -> bool {\n // ...\n Diag(ConflictExpr->getExprLoc(), diag::note_used_here) << ConflictExpr->getSourceRange();"}}, | |||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-peformselector.m"]={"clang/test/SemaObjC/arc-peformselector.m:32:34: note: used here"} | ["clang/test/SemaObjC/arc-peformselector.m"]={"clang/test/SemaObjC/arc-peformselector.m:32:34: note: used here"} | ||
} | } | ||
}, | }, | ||
["note_used_in_initialization_here"]={ | ["note_used_in_initialization_here"]={ | ||
[e]="used in initialization here", | [e]="used in initialization here", | ||
[ | [a]=k, | ||
[b]="used in initialization here", | [b]="used in initialization here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"bcb70eee1a38",1404345069,"Enable clang to continue to parse libstdc++4.6 and stlport after r210091.\n\nr210091 made initializati...","Enable clang to continue to parse libstdc++4.6 and stlport after r210091.\n\nr210091 made initialization checking more strict in c++11 mode. LWG2193 is\nabout changing standard libraries to still be valid under these new rules,\nbut older libstdc++ (e.g. libstdc++4.6 in -D_GLIBCXX_DEBUG=1 mode, or stlport)\ndo not implement that yet. So fall back to the C++03 semantics for container\nclasses in system headers below the std namespace.\n\nllvm-svn: 212238"}, | ||
[ | [g]={{Q,608,"ExprResult InitListChecker::PerformEmptyInit(SourceLocation Loc, const InitializedEntity &Entity) {\n // ...\n // libstdc++4.6 marks the vector default constructor as explicit in\n // _GLIBCXX_DEBUG mode, so recover using the C++03 logic in that case.\n // stlport does so too. Look for std::__debug for libstdc++, and for\n // std:: for stlport. This is effectively a compiler-side implementation of\n // LWG2193.\n if (!InitSeq && EmptyInitList && InitSeq.getFailureKind() == InitializationSequence::FK_ExplicitConstructor) {\n // ...\n if (CtorDecl->getMinRequiredArguments() == 0 && CtorDecl->isExplicit() && R->getDeclName() && SemaRef.SourceMgr.isInSystemHeader(CtorDecl->getLocation())) {\n // ...\n if (IsInStd && llvm::StringSwitch<bool>(R->getName()).Cases(\"basic_string\", \"deque\", \"forward_list\", true).Cases(\"list\", \"map\", \"multimap\", \"multiset\", true).Cases(\"priority_queue\", \"queue\", \"set\", \"stack\", true).Cases(\"unordered_map\", \"unordered_set\", \"vector\", true).Default(false)) {\n // ...\n // Emit a warning for this. System header warnings aren\'t shown\n // by default, but people working on system headers should see it.\n if (!VerifyOnly) {\n // ...\n if (Entity.getKind() == InitializedEntity::EK_Member)\n SemaRef.Diag(Entity.getDecl()->getLocation(), diag::note_used_in_initialization_here);"},{Q,610,"ExprResult InitListChecker::PerformEmptyInit(SourceLocation Loc, const InitializedEntity &Entity) {\n // ...\n // libstdc++4.6 marks the vector default constructor as explicit in\n // _GLIBCXX_DEBUG mode, so recover using the C++03 logic in that case.\n // stlport does so too. Look for std::__debug for libstdc++, and for\n // std:: for stlport. This is effectively a compiler-side implementation of\n // LWG2193.\n if (!InitSeq && EmptyInitList && InitSeq.getFailureKind() == InitializationSequence::FK_ExplicitConstructor) {\n // ...\n if (CtorDecl->getMinRequiredArguments() == 0 && CtorDecl->isExplicit() && R->getDeclName() && SemaRef.SourceMgr.isInSystemHeader(CtorDecl->getLocation())) {\n // ...\n if (IsInStd && llvm::StringSwitch<bool>(R->getName()).Cases(\"basic_string\", \"deque\", \"forward_list\", true).Cases(\"list\", \"map\", \"multimap\", \"multiset\", true).Cases(\"priority_queue\", \"queue\", \"set\", \"stack\", true).Cases(\"unordered_map\", \"unordered_set\", \"vector\", true).Default(false)) {\n // ...\n // Emit a warning for this. System header warnings aren\'t shown\n // by default, but people working on system headers should see it.\n if (!VerifyOnly) {\n // ...\n if (Entity.getKind() == InitializedEntity::EK_Member)\n // ...\n else if (Entity.getKind() == InitializedEntity::EK_ArrayElement)\n SemaRef.Diag(Loc, diag::note_used_in_initialization_here);"}} | ||
}, | }, | ||
["note_user_declared_ctor"]={ | ["note_user_declared_ctor"]={ | ||
[e]="implicit default constructor suppressed by user-declared constructor", | [e]="implicit default constructor suppressed by user-declared constructor", | ||
[ | [a]=k, | ||
[b]="implicit default constructor suppressed by user\\-declared constructor", | [b]="implicit default constructor suppressed by user\\-declared constructor", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"92f241f18812",1354935182,"Properly compute triviality for explicitly-defaulted or deleted special members.\nRemove pre-standard...","Properly compute triviality for explicitly-defaulted or deleted special members.\nRemove pre-standard restriction on explicitly-defaulted copy constructors with\n\'incorrect\' parameter types, and instead just make those special members\nnon-trivial as the standard requires.\n\nThis required making CXXRecordDecl correctly handle classes which have both a\ntrivial and a non-trivial special member of the same kind.\n\nThis also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the\nnew triviality computation technology.\n\nllvm-svn: 169667"}, | ||
[ | [g]={{s,9916,"/// Check whether the special member selected for a given type would be trivial.\nstatic bool checkTrivialSubobjectCall(Sema &S, SourceLocation SubobjLoc, QualType SubType, bool ConstRHS, Sema::CXXSpecialMember CSM, TrivialSubobjectKind Kind, Sema::TrivialABIHandling TAH, bool Diagnose) {\n // ...\n if (Diagnose) {\n // ...\n if (!Selected && CSM == Sema::CXXDefaultConstructor) {\n // ...\n if (CXXConstructorDecl *CD = findUserDeclaredCtor(SubRD))\n S.Diag(CD->getLocation(), diag::note_user_declared_ctor);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:23:24: note: implicit default constructor suppressed by user-declared constructor"} | ["clang/test/CXX/class/class.union/p1.cpp"]={"clang/test/CXX/class/class.union/p1.cpp:23:24: note: implicit default constructor suppressed by user-declared constructor"} | ||
} | } | ||
}, | }, | ||
["note_using"]={ | ["note_using"]={ | ||
[e]="using", | [e]="using", | ||
[ | [a]=k, | ||
[b]="using", | [b]="using", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename not...","Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename note_using_decl to note_using, which is possibly less confusing.\nAdd a test for non-class-scope using decl collisions and be sure to note the case\nwe can\'t diagnose yet.\n\nllvm-svn: 91057"}, | ||
[ | [g]={{u,3642,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n if (issueDiagnostic) {\n // ...\n Diag(Methods[0]->getBeginLoc(), issueError ? diag::note_possibility : diag::note_using) << Methods[0]->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:15:1: note: using"} | ["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:15:1: note: using"} | ||
} | } | ||
}, | }, | ||
["note_using_decl"]={ | ["note_using_decl"]={ | ||
[e]="%select{|previous }0using declaration", | [e]="%select{|previous }0using declaration", | ||
[ | [a]=k, | ||
[b]="(?:|previous )using declaration", | [b]="(?:|previous )using declaration", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,3556,"/// Check whether a redeclaration of an entity introduced by a\n/// using-declaration is valid, given that we know it\'s not an overload\n/// (nor a hidden tag declaration).\ntemplate <typename ExpectedDecl> static bool checkUsingShadowRedecl(Sema &S, UsingShadowDecl *OldS, ExpectedDecl *New) {\n // ...\n if (!Old) {\n // ...\n S.Diag(OldS->getIntroducer()->getLocation(), diag::note_using_decl) << 0;"},{p,3641,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (!Old) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(OldD)) {\n if (New->getFriendObjectKind()) {\n // ...\n Diag(Shadow->getIntroducer()->getLocation(), diag::note_using_decl) << 0;"},{p,17217,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n // If this is a redeclaration of a using shadow declaration, it must\n // declare a tag in the same context. In MSVC mode, we allow a\n // redefinition if either context is within the other.\n if (auto *Shadow = dyn_cast<UsingShadowDecl>(DirectPrevDecl)) {\n // ...\n if (SS.isEmpty() && TUK != TUK_Reference && TUK != TUK_Friend && isDeclInScope(Shadow, SearchDC, S, isMemberSpecialization) && !(OldTag && isAcceptableTagRedeclContext(*this, OldTag->getDeclContext(), SearchDC))) {\n // ...\n Diag(Shadow->getIntroducer()->getLocation(), diag::note_using_decl) << 0;"},{s,12989,"/// Checks that the given using declaration is not an invalid\n/// redeclaration. Note that this is checking only for the using decl\n/// itself, not for any ill-formedness among the UsingShadowDecls.\nbool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Prev) {\n // ...\n for (LookupResult::iterator I = Prev.begin(), E = Prev.end(); I != E; ++I) {\n // ...\n Diag(D->getLocation(), diag::note_using_decl) << 1;"},{r,1981,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (auto *Shadow = dyn_cast_or_null<UsingShadowDecl>(PrevDecl ? Previous.getRepresentativeDecl() : nullptr)) {\n if (SS.isEmpty() && !(PrevClassTemplate && PrevClassTemplate->getDeclContext()->getRedeclContext()->Equals(SemanticContext->getRedeclContext()))) {\n // ...\n Diag(Shadow->getIntroducer()->getLocation(), diag::note_using_decl) << 0;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:7:10: note: using declaration"} | ["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:7:10: note: using declaration"} | ||
} | } | ||
}, | }, | ||
["note_using_decl_class_member_workaround"]={ | ["note_using_decl_class_member_workaround"]={ | ||
[e]="use %select{an alias declaration|a typedef declaration|a reference|a const variable|a constexpr variable}0 instead", | [e]="use %select{an alias declaration|a typedef declaration|a reference|a const variable|a constexpr variable}0 instead", | ||
[ | [a]=k, | ||
[b]="use (?:an alias declaration|a typedef declaration|a reference|a const variable|a constexpr variable) instead", | [b]="use (?:an alias declaration|a typedef declaration|a reference|a const variable|a constexpr variable) instead", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"7ad0b8839652",1396475075,"If a using-declaration names a class member, but appears outside a class, try\nto suggest a different...","If a using-declaration names a class member, but appears outside a class, try\nto suggest a different syntax to get the same effect.\n\nllvm-svn: 205467"}, | ||
[ | [g]={{s,13075,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (!CurContext->isRecord()) {\n // ...\n if (RD && !RequireCompleteDeclContext(const_cast<CXXScopeSpec &>(SS), RD)) {\n // ...\n if (!R) {\n // ...\n } else if (R->getAsSingle<TypeDecl>()) {\n if (getLangOpts().CPlusPlus11) {\n // ...\n Diag(SS.getBeginLoc(), diag::note_using_decl_class_member_workaround) << 0 // alias declaration"},{s,13083,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (!CurContext->isRecord()) {\n // ...\n if (RD && !RequireCompleteDeclContext(const_cast<CXXScopeSpec &>(SS), RD)) {\n // ...\n if (!R) {\n // ...\n } else if (R->getAsSingle<TypeDecl>()) {\n if (getLangOpts().CPlusPlus11) {\n // ...\n } else {\n // ...\n Diag(InsertLoc, diag::note_using_decl_class_member_workaround) << 1 // typedef declaration"},{s,13099,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (!CurContext->isRecord()) {\n // ...\n if (RD && !RequireCompleteDeclContext(const_cast<CXXScopeSpec &>(SS), RD)) {\n // ...\n if (!R) {\n // ...\n } else if (R->getAsSingle<TypeDecl>()) {\n // ...\n } else if (R->getAsSingle<VarDecl>()) {\n // ...\n Diag(UsingLoc, diag::note_using_decl_class_member_workaround) << 2 // reference declaration"},{s,13114,"/// Checks that the given nested-name qualifier used in a using decl\n/// in the current context is appropriately related to the current\n/// scope. If an error is found, diagnoses it and returns true.\n/// R is nullptr, if the caller has not (yet) done a lookup, otherwise it\'s the\n/// result of that lookup. UD is likewise nullptr, except when we have an\n/// already-populated UsingDecl whose shadow decls contain the same information\n/// (i.e. we\'re instantiating a UsingDecl with non-dependent scope).\nbool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R, const UsingDecl *UD) {\n // ...\n if (!CurContext->isRecord()) {\n // ...\n if (RD && !RequireCompleteDeclContext(const_cast<CXXScopeSpec &>(SS), RD)) {\n // ...\n if (!R) {\n // ...\n } else if (R->getAsSingle<TypeDecl>()) {\n // ...\n } else if (R->getAsSingle<VarDecl>()) {\n // ...\n } else if (R->getAsSingle<EnumConstantDecl>()) {\n // ...\n Diag(UsingLoc, diag::note_using_decl_class_member_workaround) << (getLangOpts().CPlusPlus11 ? 4 : 3) // const[expr] variable"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/cxx1z-using-declaration.cpp"]={"clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:3: note: use a reference instead","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:9: note: use an alias declaration instead"} | ["clang/test/SemaTemplate/cxx1z-using-declaration.cpp"]={"clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:3: note: use a reference instead","clang/test/SemaTemplate/cxx1z-using-declaration.cpp:130:9: note: use an alias declaration instead"} | ||
} | } | ||
}, | }, | ||
["note_using_decl_conflict"]={ | ["note_using_decl_conflict"]={ | ||
[e]="conflicting declaration", | [e]="conflicting declaration", | ||
[ | [a]=k, | ||
[b]="conflicting declaration", | [b]="conflicting declaration", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"84d8767c1582",1260438112,"Implement redeclaration checking and hiding semantics for using declarations. There\nare a couple of...","Implement redeclaration checking and hiding semantics for using declarations. There\nare a couple of O(n^2) operations in this, some analogous to the usual O(n^2)\nredeclaration problem and some not. In particular, retroactively removing\nshadow declarations when they\'re hidden by later decls is pretty unfortunate.\nI\'m not yet convinced it\'s worse than the alternative, though.\n\nllvm-svn: 91045"}, | ||
[ | [g]={{s,12279,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n // Always emit a diagnostic for a mismatch between an unresolved\n // using_if_exists and a resolved using declaration in either direction.\n if (isa<UnresolvedUsingIfExistsDecl>(Target) != (isa_and_nonnull<UnresolvedUsingIfExistsDecl>(NonTag))) {\n // ...\n Diag((NonTag ? NonTag : Tag)->getLocation(), diag::note_using_decl_conflict);"},{s,12309,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (FunctionDecl *FD = Target->getAsFunction()) {\n // ...\n Diag(OldDecl->getLocation(), diag::note_using_decl_conflict);"},{s,12322,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (isa<TagDecl>(Target)) {\n // ...\n Diag(Tag->getLocation(), diag::note_using_decl_conflict);"},{s,12332,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n Diag(NonTag->getLocation(), diag::note_using_decl_conflict);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/cxx1z-using-declaration.cpp"]={"clang/test/Parser/cxx1z-using-declaration.cpp:13:18: note: conflicting declaration","clang/test/Parser/cxx1z-using-declaration.cpp:13:18: note: conflicting declaration"} | ["clang/test/Parser/cxx1z-using-declaration.cpp"]={"clang/test/Parser/cxx1z-using-declaration.cpp:13:18: note: conflicting declaration","clang/test/Parser/cxx1z-using-declaration.cpp:13:18: note: conflicting declaration"} | ||
} | } | ||
}, | }, | ||
["note_using_decl_target"]={ | ["note_using_decl_target"]={ | ||
[e]="target of using declaration", | [e]="target of using declaration", | ||
[ | [a]=k, | ||
[b]="target of using declaration", | [b]="target of using declaration", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"e61f2ba7e44a",1258511779,"Incremental progress on using declarations. Split UnresolvedUsingDecl into\ntwo classes, one for typ...","Incremental progress on using declarations. Split UnresolvedUsingDecl into\ntwo classes, one for typenames and one for values; this seems to have some\nsupport from Doug if not necessarily from the extremely-vague-on-this-point\nstandard. Track the location of the \'typename\' keyword in a using-typename\ndecl. Make a new lookup result for unresolved values and deal with it in\nmost places.\n\nllvm-svn: 89184"}, | ||
[g]={{p,3555,"/// Check whether a redeclaration of an entity introduced by a\n/// using-declaration is valid, given that we know it\'s not an overload\n/// (nor a hidden tag declaration).\ntemplate <typename ExpectedDecl> static bool checkUsingShadowRedecl(Sema &S, UsingShadowDecl *OldS, ExpectedDecl *New) {\n // ...\n if (!Old) {\n // ...\n S.Diag(OldS->getTargetDecl()->getLocation(), diag::note_using_decl_target);"},{p,3640,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (!Old) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(OldD)) {\n if (New->getFriendObjectKind()) {\n // ...\n Diag(Shadow->getTargetDecl()->getLocation(), diag::note_using_decl_target);"},{p,17216,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n // If this is a redeclaration of a using shadow declaration, it must\n // declare a tag in the same context. In MSVC mode, we allow a\n // redefinition if either context is within the other.\n if (auto *Shadow = dyn_cast<UsingShadowDecl>(DirectPrevDecl)) {\n // ...\n if (SS.isEmpty() && TUK != TUK_Reference && TUK != TUK_Friend && isDeclInScope(Shadow, SearchDC, S, isMemberSpecialization) && !(OldTag && isAcceptableTagRedeclContext(*this, OldTag->getDeclContext(), SearchDC))) {\n // ...\n Diag(Shadow->getTargetDecl()->getLocation(), diag::note_using_decl_target);"},{s,12203,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Diagnose finding a decl which is not from a base class of the\n // current class. We do this now because there are cases where this\n // function will silently decide not to build a shadow decl, which\n // will pre-empt further diagnostics.\n //\n // We don\'t need to do this in C++11 because we do the check once on\n // the qualifier.\n //\n // FIXME: diagnose the following if we care enough:\n // struct A { int foo; };\n // struct B : A { using A::foo; };\n // template <class T> struct C : A {};\n // template <class T> struct D : C<T> { using B::foo; } // <---\n // This is invalid (during instantiation) in C++03 because B::foo\n // resolves to the using decl in B, which is not a base class of D<T>.\n // We can\'t diagnose it immediately because C<T> is an unknown\n // specialization. The UsingShadowDecl in D<T> then points directly\n // to A::foo, which will look well-formed when we instantiate.\n // The right solution is to not collapse the shadow-decl chain.\n if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())\n if (auto *Using = dyn_cast<UsingDecl>(BUD)) {\n // ...\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {\n if (OrigDC == CurContext) {\n // ...\n Diag(Orig->getLocation(), diag::note_using_decl_target);"},{s,12212,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // Diagnose finding a decl which is not from a base class of the\n // current class. We do this now because there are cases where this\n // function will silently decide not to build a shadow decl, which\n // will pre-empt further diagnostics.\n //\n // We don\'t need to do this in C++11 because we do the check once on\n // the qualifier.\n //\n // FIXME: diagnose the following if we care enough:\n // struct A { int foo; };\n // struct B : A { using A::foo; };\n // template <class T> struct C : A {};\n // template <class T> struct D : C<T> { using B::foo; } // <---\n // This is invalid (during instantiation) in C++03 because B::foo\n // resolves to the using decl in B, which is not a base class of D<T>.\n // We can\'t diagnose it immediately because C<T> is an unknown\n // specialization. The UsingShadowDecl in D<T> then points directly\n // to A::foo, which will look well-formed when we instantiate.\n // The right solution is to not collapse the shadow-decl chain.\n if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())\n if (auto *Using = dyn_cast<UsingDecl>(BUD)) {\n // ...\n if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {\n // ...\n Diag(Orig->getLocation(), diag::note_using_decl_target);"},{s,12277,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n // Always emit a diagnostic for a mismatch between an unresolved\n // using_if_exists and a resolved using declaration in either direction.\n if (isa<UnresolvedUsingIfExistsDecl>(Target) != (isa_and_nonnull<UnresolvedUsingIfExistsDecl>(NonTag))) {\n // ...\n Diag(Target->getLocation(), diag::note_using_decl_target);"},{s,12308,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (FunctionDecl *FD = Target->getAsFunction()) {\n // ...\n Diag(Target->getLocation(), diag::note_using_decl_target);"},{s,12321,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n if (isa<TagDecl>(Target)) {\n // ...\n Diag(Target->getLocation(), diag::note_using_decl_target);"},{s,12331,"/// Determines whether to create a using shadow decl for a particular\n/// decl, given the set of decls existing prior to this using lookup.\nbool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig, const LookupResult &Previous, UsingShadowDecl *&PrevShadow) {\n // ...\n Diag(Target->getLocation(), diag::note_using_decl_target);"},{s,12778,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // ...\n if (HasTypenameKeyword) {\n // If we asked for a typename and got a non-type decl, error out.\n if (!R.getAsSingle<TypeDecl>() && !R.getAsSingle<UnresolvedUsingIfExistsDecl>()) {\n // ...\n for (LookupResult::iterator I = R.begin(), E = R.end(); I != E; ++I)\n Diag((*I)->getUnderlyingDecl()->getLocation(), diag::note_using_decl_target);"},{s,12787,"/// Builds a using declaration.\n///\n/// \\param IsInstantiation - Whether this call arises from an\n/// instantiation of an unresolved using declaration. We treat\n/// the lookup differently for these declarations.\nNamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists) {\n // ...\n if (HasTypenameKeyword) {\n // ...\n } else {\n // If we asked for a non-typename and we got a type, error out,\n // but only if this is an instantiation of an unresolved using\n // decl. Otherwise just silently find the type name.\n if (IsInstantiation && R.getAsSingle<TypeDecl>()) {\n // ...\n Diag(R.getFoundDecl()->getLocation(), diag::note_using_decl_target);"},{nc,858,"/// Check that it\'s valid to export \\p D.\nstatic bool checkExportedDecl(Sema &S, Decl *D, SourceLocation BlockStart) {\n // ...\n // C++2a [module.interface]p5:\n // all entities to which all of the using-declarators ultimately refer\n // shall have been introduced with a name having external linkage\n if (auto *USD = dyn_cast<UsingShadowDecl>(D)) {\n // ...\n if (Lk == InternalLinkage || Lk == ModuleLinkage) {\n // ...\n S.Diag(Target->getLocation(), diag::note_using_decl_target);"},{r,1980,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (auto *Shadow = dyn_cast_or_null<UsingShadowDecl>(PrevDecl ? Previous.getRepresentativeDecl() : nullptr)) {\n if (SS.isEmpty() && !(PrevClassTemplate && PrevClassTemplate->getDeclContext()->getRedeclContext()->Equals(SemanticContext->getRedeclContext()))) {\n // ...\n Diag(Shadow->getTargetDecl()->getLocation(), diag::note_using_decl_target);"}}, | |||
[ | [h]={ | ||
["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:4:9: note: target of using declaration"} | ["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:4:9: note: target of using declaration"} | ||
} | } | ||
}, | }, | ||
["note_using_enum_decl"]={ | ["note_using_enum_decl"]={ | ||
[e]="%select{|previous }0using-enum declaration", | [e]="%select{|previous }0using-enum declaration", | ||
[ | [a]=k, | ||
[b]="(?:|previous )using\\-enum declaration", | [b]="(?:|previous )using\\-enum declaration", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{s,12842,"NamedDecl *Sema::BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, TypeSourceInfo *EnumType, EnumDecl *ED) {\n // ...\n if (CurContext->getRedeclContext()->isRecord()) {\n // ...\n for (NamedDecl *D : Previous)\n if (UsingEnumDecl *UED = dyn_cast<UsingEnumDecl>(D))\n if (UED->getEnumDecl() == ED) {\n // ...\n Diag(D->getLocation(), diag::note_using_enum_decl) << 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:229:14: note: previous using-enum declaration","clang/test/SemaCXX/cxx20-using-enum.cpp:235:14: note: previous using-enum declaration"} | ["clang/test/SemaCXX/cxx20-using-enum.cpp"]={"clang/test/SemaCXX/cxx20-using-enum.cpp:229:14: note: previous using-enum declaration","clang/test/SemaCXX/cxx20-using-enum.cpp:235:14: note: previous using-enum declaration"} | ||
} | } | ||
}, | }, | ||
["note_using_value_decl_missing_typename"]={ | ["note_using_value_decl_missing_typename"]={ | ||
[e]="add \'typename\' to treat this using declaration as a type", | [e]="add \'typename\' to treat this using declaration as a type", | ||
[ | [a]=k, | ||
[b]="add \'typename\' to treat this using declaration as a type", | [b]="add \'typename\' to treat this using declaration as a type", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"aed2efbbb54f",1291853187,"A typename specifier can end up referring to a unresolved using\ndeclaration that is a value in ill-f...","A typename specifier can end up referring to a unresolved using\ndeclaration that is a value in ill-formed code. Instead of crashing,\ntreat this as a dependent typename specifier and suggest that the\nusing add \"typename\" into the using declaration. Fixes <rdar://problem/8740998>.\n\nllvm-svn: 121322"}, | ||
[ | [g]={{r,11073,"/// Build the type that describes a C++ typename specifier,\n/// e.g., \"typename T::type\".\nQualType Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, bool DeducedTSTContext) {\n // ...\n case LookupResult::FoundUnresolvedValue: {\n // ...\n if (UnresolvedUsingValueDecl *Using = dyn_cast<UnresolvedUsingValueDecl>(Result.getRepresentativeDecl())) {\n // ...\n Diag(Loc, diag::note_using_value_decl_missing_typename) << FixItHint::CreateInsertion(Loc, \"typename \");"}}, | ||
[ | [h]={ | ||
["clang/test/SemaTemplate/typename-specifier-4.cpp"]={"clang/test/SemaTemplate/typename-specifier-4.cpp:146:11: note: add \'typename\' to treat this using declaration as a type"} | ["clang/test/SemaTemplate/typename-specifier-4.cpp"]={"clang/test/SemaTemplate/typename-specifier-4.cpp:146:11: note: add \'typename\' to treat this using declaration as a type"} | ||
} | } | ||
}, | }, | ||
["note_valid_options"]={ | ["note_valid_options"]={ | ||
[e]="valid target CPU values are: %0", | [e]="valid target CPU values are: %0", | ||
[ | [a]=k, | ||
[b]="valid target CPU values are\\: (.*?)", | [b]="valid target CPU values are\\: (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"3ec1743d0d77",1518131655,"Make march/target-cpu print a note with the list of valid values for ARM\n\nWhen rejecting a march= or...","Make march/target-cpu print a note with the list of valid values for ARM\n\nWhen rejecting a march= or target-cpu command line parameter,\nthe message is quite lacking. This patch adds a note that prints\nall possible values for the current target, if the target supports it.\n\nThis adds support for the ARM/AArch64 targets (more to come!). \n\nDifferential Revision: https://reviews.llvm.org/D42978 \n\nllvm-svn: 324673"}, | ||
[ | [g]={{"clang/lib/Basic/Targets.cpp",792,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n // Set the target CPU if specified.\n if (!Opts->CPU.empty() && !Target->setCPU(Opts->CPU)) {\n // ...\n if (!ValidList.empty())\n Diags.Report(diag::note_valid_options) << llvm::join(ValidList, \", \");"},{"clang/lib/Basic/Targets.cpp",803,"/// CreateTargetInfo - Return the target info object for the specified target\n/// options.\nTargetInfo *TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr<TargetOptions> &Opts) {\n // ...\n // Check the TuneCPU name if specified.\n if (!Opts->TuneCPU.empty() && !Target->isValidTuneCPUName(Opts->TuneCPU)) {\n // ...\n if (!ValidList.empty())\n Diags.Report(diag::note_valid_options) << llvm::join(ValidList, \", \");"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/predefined-arch-macros.c"]={"note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, raptorlake, meteorlake, sierraforest, grandridge, graniterapids, graniterapids-d, emeraldrapids, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, znver4, x86-64, x86-64-v2, x86-64-v3, x86-64-v4"} | ["clang/test/Preprocessor/predefined-arch-macros.c"]={"note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, raptorlake, meteorlake, sierraforest, grandridge, graniterapids, graniterapids-d, emeraldrapids, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, znver4, x86-64, x86-64-v2, x86-64-v3, x86-64-v4"} | ||
} | } | ||
}, | }, | ||
["note_value_initialization_here"]={ | ["note_value_initialization_here"]={ | ||
[e]="in value-initialization of type %0 here", | [e]="in value-initialization of type %0 here", | ||
[ | [a]=k, | ||
[b]="in value\\-initialization of type (.*?) here", | [b]="in value\\-initialization of type (.*?) here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"593f993a6855",1354932077,"Implement C++03 [dcl.init]p5\'s checking for value-initialization of references\nproperly, rather than...","Implement C++03 [dcl.init]p5\'s checking for value-initialization of references\nproperly, rather than faking it up by pretending that a reference member makes\nthe default constructor non-trivial. That leads to rejects-valids when putting\nsuch types inside unions.\n\nllvm-svn: 169662"}, | ||
[ | [g]={{Q,9445,"/// Somewhere within T there is an uninitialized reference subobject.\n/// Dig it out and diagnose it.\nstatic bool DiagnoseUninitializedReference(Sema &S, SourceLocation Loc, QualType T) {\n // ...\n for (const auto *FI : RD->fields()) {\n // ...\n if (DiagnoseUninitializedReference(S, FI->getLocation(), FI->getType())) {\n S.Diag(Loc, diag::note_value_initialization_here) << RD;"},{Q,9452,"/// Somewhere within T there is an uninitialized reference subobject.\n/// Dig it out and diagnose it.\nstatic bool DiagnoseUninitializedReference(Sema &S, SourceLocation Loc, QualType T) {\n // ...\n for (const auto &BI : RD->bases()) {\n if (DiagnoseUninitializedReference(S, BI.getBeginLoc(), BI.getType())) {\n S.Diag(Loc, diag::note_value_initialization_here) << RD;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/p5.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p5.cpp:20:10: note: in value-initialization of type \'S\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:24:5: note: in value-initialization of type \'S\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:26:7: note: in value-initialization of type \'T\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:24:5: note: in value-initialization of type \'S\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:29:5: note: in value-initialization of type \'T\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:31:7: note: in value-initialization of type \'U\' here"} | ["clang/test/CXX/dcl.decl/dcl.init/p5.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p5.cpp:20:10: note: in value-initialization of type \'S\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:24:5: note: in value-initialization of type \'S\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:26:7: note: in value-initialization of type \'T\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:24:5: note: in value-initialization of type \'S\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:29:5: note: in value-initialization of type \'T\' here","clang/test/CXX/dcl.decl/dcl.init/p5.cpp:31:7: note: in value-initialization of type \'U\' here"} | ||
} | } | ||
}, | }, | ||
["note_var_declared_here"]={ | ["note_var_declared_here"]={ | ||
[e]="variable %0 is declared here", | [e]="variable %0 is declared here", | ||
[ | [a]=k, | ||
[b]="variable (.*?) is declared here", | [b]="variable (.*?) is declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"f463a8a424e7",1461890263,"Avoid -Wshadow warnings about constructor parameters named after fields\n\nUsually these parameters ar...","Avoid -Wshadow warnings about constructor parameters named after fields\n\nUsually these parameters are used solely to initialize the field in the\ninitializer list, and there is no real shadowing confusion.\n\nThere is a new warning under -Wshadow called\n-Wshadow-field-in-constructor-modified. It attempts to find\nmodifications of such constructor parameters that probably intended to\nmodify the field.\n\nIt has some false negatives, though, so there is another warning group,\n-Wshadow-field-in-constructor, which always warns on this special case.\nFor users who just want the old behavior and don\'t care about these fine\ngrained groups, we have a new warning group called -Wshadow-all that\nactivates everything.\n\nFixes PR16088.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D18271\n\nllvm-svn: 267957"}, | ||
[ | [g]={{D,1052,"/// DiagnoseUninitializedUse -- Helper function for diagnosing uses of an\n/// uninitialized variable. This manages the different forms of diagnostic\n/// emitted for particular types of uses. Returns true if the use was diagnosed\n/// as a warning. If a particular use is one we omit warnings for, returns\n/// false.\nstatic bool DiagnoseUninitializedUse(Sema &S, const VarDecl *VD, const UninitUse &Use, bool alwaysReportSelfInit = false) {\n // ...\n // Report where the variable was declared when the use wasn\'t within\n // the initializer of that declaration & we didn\'t already suggest\n // an initialization fixit.\n if (!SuggestInitializationFixit(S, VD))\n S.Diag(VD->getBeginLoc(), diag::note_var_declared_here) << VD->getDeclName();"},{p,8386,"/// Check if \'E\', which is an expression that is about to be modified, refers\n/// to a constructor parameter that shadows a field.\nvoid Sema::CheckShadowingDeclModification(Expr *E, SourceLocation Loc) {\n // ...\n Diag(D->getLocation(), diag::note_var_declared_here) << D;"},{s,11599,"struct InvalidSTLDiagnoser {\n // ...\n QualType operator()(UnsupportedSTLSelect Sel = USS_Other, StringRef Name = \"\", const VarDecl *VD = nullptr) {\n // ...\n if (Sel == USS_InvalidMember) {\n S.Diag(VD->getLocation(), diag::note_var_declared_here) << VD << VD->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-shadow.cpp"]={"clang/test/SemaCXX/warn-shadow.cpp:51:9: note: variable \'f1\' is declared here","clang/test/SemaCXX/warn-shadow.cpp:51:17: note: variable \'f2\' is declared here","clang/test/SemaCXX/warn-shadow.cpp:51:25: note: variable \'f3\' is declared here","clang/test/SemaCXX/warn-shadow.cpp:51:33: note: variable \'f4\' is declared here"} | ["clang/test/SemaCXX/warn-shadow.cpp"]={"clang/test/SemaCXX/warn-shadow.cpp:51:9: note: variable \'f1\' is declared here","clang/test/SemaCXX/warn-shadow.cpp:51:17: note: variable \'f2\' is declared here","clang/test/SemaCXX/warn-shadow.cpp:51:25: note: variable \'f3\' is declared here","clang/test/SemaCXX/warn-shadow.cpp:51:33: note: variable \'f4\' is declared here"} | ||
} | } | ||
}, | }, | ||
["note_var_explicitly_captured_here"]={ | ["note_var_explicitly_captured_here"]={ | ||
[e]="variable %0 is%select{| explicitly}1 captured here", | [e]="variable %0 is%select{| explicitly}1 captured here", | ||
[ | [a]=k, | ||
[b]="variable (.*?) is(?:| explicitly) captured here", | [b]="variable (.*?) is(?:| explicitly) captured here", | ||
[ | [c]=j, | ||
[ | [d]="Lambda Issue", | ||
[ | [f]={"175388c00d0a",1478687937,"[Sema] Avoid -Wshadow warnings for shadowed variables that aren\'t captured\nby lambdas with an explic...","[Sema] Avoid -Wshadow warnings for shadowed variables that aren\'t captured\nby lambdas with an explicit capture list\n\nThis commit avoids the -Wshadow warning for variables which shadow variables\nthat aren\'t captured by lambdas with an explicit capture list. It provides an\nadditional note that points to location of the explicit capture.\n\nThe old behaviour is preserved with -Wshadow-all or -Wshadow-uncaptured-local.\n\nrdar://17135966\n\nDifferential Revision: https://reviews.llvm.org/D26278\n\nllvm-svn: 286354"}, | ||
[ | [g]={{p,8332,"/// Diagnose variable or built-in function shadowing. Implements\n/// -Wshadow.\n///\n/// This method is called whenever a VarDecl is added to a \"useful\"\n/// scope.\n///\n/// \\param ShadowedDecl the declaration that is shadowed by the given variable\n/// \\param R the lookup of the name\n///\nvoid Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, const LookupResult &R) {\n // ...\n if (!CaptureLoc.isInvalid())\n Diag(CaptureLoc, diag::note_var_explicitly_captured_here) << Name << /*explicitly*/ 1;"},{p,8351,"/// Diagnose shadowing for variables shadowed in the lambda record \\p LambdaRD\n/// when these variables are captured by the lambda.\nvoid Sema::DiagnoseShadowingLambdaDecls(const LambdaScopeInfo *LSI) {\n for (const auto &Shadow : LSI->ShadowingDecls) {\n // ...\n if (!CaptureLoc.isInvalid())\n Diag(CaptureLoc, diag::note_var_explicitly_captured_here) << Shadow.VD->getDeclName() << /*explicitly*/ 0;"},{"clang/lib/Sema/SemaLambda.cpp",1352,"void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, const DeclSpec &DS) {\n // ...\n auto CheckRedefinition = [&](ParmVarDecl *Param) {\n for (const auto &Capture : Intro.Captures) {\n if (Capture.Id == Param->getIdentifier()) {\n // ...\n Diag(Capture.Loc, diag::note_var_explicitly_captured_here) << Capture.Id << true;"},{q,23126,"static void checkDeclInTargetContext(SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D) {\n // ...\n if (SemaRef.LangOpts.OpenMP >= 50 && (SemaRef.getCurLambda(/*IgnoreNonLambdaCapturingScope=*/true) || SemaRef.getCurBlock() || SemaRef.getCurCapturedRegion()) && VD->hasGlobalStorage()) {\n if (!MapTy || (*MapTy != OMPDeclareTargetDeclAttr::MT_To && *MapTy != OMPDeclareTargetDeclAttr::MT_Enter)) {\n // ...\n SemaRef.Diag(SL, diag::note_var_explicitly_captured_here) << VD << 0 << SR;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp:5:13: note: variable \'x\' is explicitly captured here"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp:5:13: note: variable \'x\' is explicitly captured here"} | ||
} | } | ||
}, | }, | ||
["note_var_fixit_add_initialization"]={ | ["note_var_fixit_add_initialization"]={ | ||
[e]="initialize the variable %0 to silence this warning", | [e]="initialize the variable %0 to silence this warning", | ||
[ | [a]=k, | ||
[b]="initialize the variable (.*?) to silence this warning", | [b]="initialize the variable (.*?) to silence this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"2959fdd087e7",1295638906,"Add basic fixits for -Wuninitialized-experimental\nto suggest initializations for pointer and\nObjC po...","Add basic fixits for -Wuninitialized-experimental\nto suggest initializations for pointer and\nObjC pointer types.\n\nllvm-svn: 123995"}, | ||
[ | [g]={{D,797,"static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) {\n // ...\n S.Diag(Loc, diag::note_var_fixit_add_initialization) << VD->getDeclName() << FixItHint::CreateInsertion(Loc, Init);"}}, | ||
[ | [h]={ | ||
["clang/test/Analysis/uninit-asm-goto.cpp"]={"clang/test/Analysis/uninit-asm-goto.cpp:104:8: note: initialize the variable \'y\' to silence this warning"} | ["clang/test/Analysis/uninit-asm-goto.cpp"]={"clang/test/Analysis/uninit-asm-goto.cpp:104:8: note: initialize the variable \'y\' to silence this warning"} | ||
} | } | ||
}, | }, | ||
["note_var_prev_partial_spec_here"]={ | ["note_var_prev_partial_spec_here"]={ | ||
[e]="previous declaration of variable template partial specialization is here", | [e]="previous declaration of variable template partial specialization is here", | ||
[ | [a]=k, | ||
[b]="previous declaration of variable template partial specialization is here", | [b]="previous declaration of variable template partial specialization is here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"39a1e507ff0b",1375750985,"Started implementing variable templates. Top level declarations should be fully supported, up to som...","Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...\n\nllvm-svn: 187762"}, | ||
[ | [g]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",4370,"/// Instantiate the declaration of a variable template partial\n/// specialization.\n///\n/// \\param VarTemplate the (instantiated) variable template that is partially\n/// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) variable template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nVarTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(VarTemplateDecl *VarTemplate, VarTemplatePartialSpecializationDecl *PartialSpec) {\n // ...\n if (PrevDecl) {\n // ...\n SemaRef.Diag(PrevDecl->getLocation(), diag::note_var_prev_partial_spec_here);"}} | ||
}, | }, | ||
["note_vbase_moved_here"]={ | ["note_vbase_moved_here"]={ | ||
[e]="%select{%1 is a virtual base class of base class %2 declared here|virtual base class %1 declared here}0", | [e]="%select{%1 is a virtual base class of base class %2 declared here|virtual base class %1 declared here}0", | ||
[ | [a]=k, | ||
[b]="(?:(.*?) is a virtual base class of base class (.*?) declared here|virtual base class (.*?) declared here)", | [b]="(?:(.*?) is a virtual base class of base class (.*?) declared here|virtual base class (.*?) declared here)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"b2504bdc0d0e",1383539174,"Issue a diagnostic if an implicitly-defined move assignment operator would move\nthe same virtual bas...","Issue a diagnostic if an implicitly-defined move assignment operator would move\nthe same virtual base class multiple times (and the move assignment is used,\nand the move assignment for the virtual base is not trivial).\n\nllvm-svn: 193977"}, | ||
[ | [g]={{s,15085,"/// Check if we\'re implicitly defining a move assignment operator for a class\n/// with virtual bases. Such a move assignment might move-assign the virtual\n/// base multiple times.\nstatic void checkMoveAssignmentForRepeatedMove(Sema &S, CXXRecordDecl *Class, SourceLocation CurrentLocation) {\n // ...\n for (auto &BI : Class->bases()) {\n // ...\n while (!Worklist.empty()) {\n // ...\n if (BaseSpec->isVirtual()) {\n // ...\n if (Existing && Existing != &BI) {\n // ...\n S.Diag(Existing->getBeginLoc(), diag::note_vbase_moved_here) << (Base->getCanonicalDecl() == Existing->getType()->getAsCXXRecordDecl()->getCanonicalDecl()) << Base << Existing->getType() << Existing->getSourceRange();"},{s,15089,"/// Check if we\'re implicitly defining a move assignment operator for a class\n/// with virtual bases. Such a move assignment might move-assign the virtual\n/// base multiple times.\nstatic void checkMoveAssignmentForRepeatedMove(Sema &S, CXXRecordDecl *Class, SourceLocation CurrentLocation) {\n // ...\n for (auto &BI : Class->bases()) {\n // ...\n while (!Worklist.empty()) {\n // ...\n if (BaseSpec->isVirtual()) {\n // ...\n if (Existing && Existing != &BI) {\n // ...\n S.Diag(BI.getBeginLoc(), diag::note_vbase_moved_here) << (Base->getCanonicalDecl() == BI.getType()->getAsCXXRecordDecl()->getCanonicalDecl()) << Base << BI.getType() << BaseSpec->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/special/class.copy/implicit-move.cpp"]={"clang/test/CXX/special/class.copy/implicit-move.cpp:261:7: note: \'B\' is a virtual base class of base class \'E<B, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:262:7: note: \'B\' is a virtual base class of base class \'E<B, 1>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:261:7: note: \'D\' is a virtual base class of base class \'E<D, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:262:7: note: \'D\' is a virtual base class of base class \'E<D, 1>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:275:7: note: \'B\' is a virtual base class of base class \'E<B, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:276:7: note: virtual base class \'B\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:275:7: note: \'D\' is a virtual base class of base class \'E<D, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:276:7: note: virtual base class \'D\' declared here"} | ["clang/test/CXX/special/class.copy/implicit-move.cpp"]={"clang/test/CXX/special/class.copy/implicit-move.cpp:261:7: note: \'B\' is a virtual base class of base class \'E<B, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:262:7: note: \'B\' is a virtual base class of base class \'E<B, 1>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:261:7: note: \'D\' is a virtual base class of base class \'E<D, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:262:7: note: \'D\' is a virtual base class of base class \'E<D, 1>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:275:7: note: \'B\' is a virtual base class of base class \'E<B, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:276:7: note: virtual base class \'B\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:275:7: note: \'D\' is a virtual base class of base class \'E<D, 0>\' declared here","clang/test/CXX/special/class.copy/implicit-move.cpp:276:7: note: virtual base class \'D\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_verify_ambiguous_marker"]={ | ["note_verify_ambiguous_marker"]={ | ||
[e]="ambiguous marker \'%0\' is defined here", | [e]="ambiguous marker \'%0\' is defined here", | ||
[ | [a]=k, | ||
[b]="ambiguous marker \'(.*?)\' is defined here", | [b]="ambiguous marker \'(.*?)\' is defined here", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"4e8144a0d140",1555130019,"[verify] Add support for location markers in directives.\n\nA marker (matching /#[A-Za-z0-9_-]/) is sp...","[verify] Add support for location markers in directives.\n\nA marker (matching /#[A-Za-z0-9_-]/) is specified by attaching a comment\ncontaining the marker to the line at which the diagnostic is expected,\nand then can be referenced from an expected-* directive after an @:\n\n foo // #1\n // expected-error@#1 {{undeclared identifier \'foo\'}}\n\nThe intent is for markers to be used in situations where relative line\nnumbers are currently used, to avoid the need to renumber when the test\ncase is rearranged.\n\nllvm-svn: 358326"}, | ||
[ | [g]={{"clang/lib/Frontend/VerifyDiagnosticConsumer.cpp",387,"// Tracker for markers in the input files. A marker is a comment of the form\n//\n// n = 123; // #123\n//\n// ... that can be referred to by a later expected-* directive:\n//\n// // expected-error@#123 {{undeclared identifier \'n\'}}\n//\n// Marker declarations must be at the start of a comment or preceded by\n// whitespace to distinguish them from uses of markers in directives.\nclass VerifyDiagnosticConsumer::MarkerTracker {\n // ...\n // Ensure we have no remaining deferred directives, and no\n // multiply-defined-and-used markers.\n void finalize() {\n for (auto &MarkerInfo : Markers) {\n // ...\n if (M.RedefLoc.isValid() && M.UseLoc.isValid()) {\n // ...\n Diags.Report(M.DefLoc, diag::note_verify_ambiguous_marker) << Name;"},{"clang/lib/Frontend/VerifyDiagnosticConsumer.cpp",388,"// Tracker for markers in the input files. A marker is a comment of the form\n//\n// n = 123; // #123\n//\n// ... that can be referred to by a later expected-* directive:\n//\n// // expected-error@#123 {{undeclared identifier \'n\'}}\n//\n// Marker declarations must be at the start of a comment or preceded by\n// whitespace to distinguish them from uses of markers in directives.\nclass VerifyDiagnosticConsumer::MarkerTracker {\n // ...\n // Ensure we have no remaining deferred directives, and no\n // multiply-defined-and-used markers.\n void finalize() {\n for (auto &MarkerInfo : Markers) {\n // ...\n if (M.RedefLoc.isValid() && M.UseLoc.isValid()) {\n // ...\n Diags.Report(M.RedefLoc, diag::note_verify_ambiguous_marker) << Name;"}} | ||
}, | }, | ||
["note_vla_unsupported"]={ | ["note_vla_unsupported"]={ | ||
[e]="variable length arrays are not supported for the current target", | [e]="variable length arrays are not supported for the current target", | ||
[ | [a]=k, | ||
[b]="variable length arrays are not supported for the current target", | [b]="variable length arrays are not supported for the current target", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"87d44269885f",1511038846,"[OpenMP] Show error if VLAs are not supported\n\nSome target devices (e.g. Nvidia GPUs) don\'t support ...","[OpenMP] Show error if VLAs are not supported\n\nSome target devices (e.g. Nvidia GPUs) don\'t support dynamic stack\nallocation and hence no VLAs. Print errors with description instead\nof failing in the backend or generating code that doesn\'t work.\n\nThis patch handles explicit uses of VLAs (local variable in target\nor declare target region) or implicitly generated (private) VLAs\nfor reductions on VLAs or on array sections with non-constant size.\n\nDifferential Revision: https://reviews.llvm.org/D39505\n\nllvm-svn: 318601"}, | ||
[ | [g]={{q,19504,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if ((OASE && !ConstantLengthOASE) || (!OASE && !ASE && D->getType().getNonReferenceType()->isVariablyModifiedType())) {\n if (!Context.getTargetInfo().isVLASupported()) {\n if (isOpenMPTargetExecutionDirective(Stack->getCurrentDirective())) {\n // ...\n S.Diag(ELoc, diag::note_vla_unsupported);"},{q,19508,"static bool actOnOMPReductionKindClause(Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef<Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef<Expr *> UnresolvedReductions, ReductionData &RD) {\n // ...\n for (Expr *RefExpr : VarList) {\n // ...\n if ((OASE && !ConstantLengthOASE) || (!OASE && !ASE && D->getType().getNonReferenceType()->isVariablyModifiedType())) {\n if (!Context.getTargetInfo().isVLASupported()) {\n if (isOpenMPTargetExecutionDirective(Stack->getCurrentDirective())) {\n // ...\n } else {\n // ...\n S.targetDiag(ELoc, diag::note_vla_unsupported);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/target_vla_messages.cpp"]={"clang/test/OpenMP/target_vla_messages.cpp:40:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:95:32: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:111:32: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:119:32: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:136:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:152:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:160:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:179:30: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:198:30: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:207:30: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:213:34: note: variable length arrays are not supported for the current target"} | ["clang/test/OpenMP/target_vla_messages.cpp"]={"clang/test/OpenMP/target_vla_messages.cpp:40:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:95:32: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:111:32: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:119:32: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:136:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:152:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:160:35: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:179:30: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:198:30: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:207:30: note: variable length arrays are not supported for the current target","clang/test/OpenMP/target_vla_messages.cpp:213:34: note: variable length arrays are not supported for the current target"} | ||
} | } | ||
}, | }, | ||
["note_which_delegates_to"]={ | ["note_which_delegates_to"]={ | ||
[e]="which delegates to", | [e]="which delegates to", | ||
[ | [a]=k, | ||
[b]="which delegates to", | [b]="which delegates to", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"6118d6642b8f",1304488644,"Implement a better version of delegating constructor cycle detection.\n\nThis is more efficient as it\'...","Implement a better version of delegating constructor cycle detection.\n\nThis is more efficient as it\'s all done at once at the end of the TU.\nThis could still get expensive, so a flag is provided to disable it. As\nan added bonus, the diagnostics will now print out a cycle.\n\nThe PCH test is XFAILed because we currently can\'t deal with a note\nemitted in the header and I, being tired, see no other way to verify the\nserialization of delegating constructors. We should probably address\nthis problem /somehow/ but no good solution comes to mind.\n\nllvm-svn: 130836"}, | ||
[ | [g]={{s,18554,"static void DelegatingCycleHelper(CXXConstructorDecl *Ctor, llvm::SmallPtrSet<CXXConstructorDecl *, 4> &Valid, llvm::SmallPtrSet<CXXConstructorDecl *, 4> &Invalid, llvm::SmallPtrSet<CXXConstructorDecl *, 4> &Current, Sema &S) {\n // ...\n // We know that beyond here, we aren\'t chaining into a cycle.\n if (!Target || !Target->isDelegatingConstructor() || Target->isInvalidDecl() || Valid.count(TCanonical)) {\n // ...\n } else if (TCanonical == Canonical || Invalid.count(TCanonical) || Current.count(TCanonical)) {\n // If we haven\'t diagnosed this cycle yet, do so now.\n if (!Invalid.count(TCanonical)) {\n // ...\n while (C->getCanonicalDecl() != Canonical) {\n // ...\n S.Diag(C->getLocation(), diag::note_which_delegates_to);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:32:6: note: which delegates to"} | ["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:32:6: note: which delegates to"} | ||
} | } | ||
}, | }, | ||
["note_while_in_implementation"]={ | ["note_while_in_implementation"]={ | ||
[e]="detected while default synthesizing properties in class implementation", | [e]="detected while default synthesizing properties in class implementation", | ||
[ | [a]=k, | ||
[b]="detected while default synthesizing properties in class implementation", | [b]="detected while default synthesizing properties in class implementation", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"d6886e7fad5e",1336500219,"Fixes a typo. note_xxx not not_xxx.\n\nllvm-svn: 156391","Fixes a typo. note_xxx not not_xxx.\n\nllvm-svn: 156391"}, | ||
[ | [g]={{x,1960,"/// 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 property to be implemented in the super class, ignore.\n if (PropInSuperClass) {\n if ((Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readwrite) && (PropInSuperClass->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly) && !IMPDecl->getInstanceMethod(Prop->getSetterName()) && !IDecl->HasUserDeclaredSetterMethod(Prop)) {\n // ...\n } else {\n // ...\n Diag(IMPDecl->getLocation(), diag::note_while_in_implementation);"},{x,1976,"/// 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 (PIDecl && !Prop->isUnavailable()) {\n // ...\n Diag(IMPDecl->getLocation(), diag::note_while_in_implementation);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:47:17: note: detected while default synthesizing properties in class implementation"} | ["clang/test/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:47:17: note: detected while default synthesizing properties in class implementation"} | ||
} | } | ||
}, | }, | ||
["note_widen_bitfield"]={ | ["note_widen_bitfield"]={ | ||
[e]="widen this field to %0 bits to store all values of %1", | [e]="widen this field to %0 bits to store all values of %1", | ||
[ | [a]=k, | ||
[b]="widen this field to (.*?) bits to store all values of (.*?)", | [b]="widen this field to (.*?) bits to store all values of (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion...","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"}, | ||
[ | [g]={{y,14111,"/// 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 // Check the bitwidth.\n if (BitsNeeded > FieldWidth) {\n // ...\n S.Diag(WidthExpr->getExprLoc(), diag::note_widen_bitfield) << BitsNeeded << ED << WidthExpr->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:23: note: widen this field to 3 bits to store all values of \'ThreeBits\'","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:23: note: widen this field to 3 bits to store all values of \'ThreeBitsSigned\'","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:25: note: widen this field to 3 bits to store all values of \'ThreeBits\'","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:25: note: widen this field to 3 bits to store all values of \'ThreeBitsSigned\'"} | ["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:23: note: widen this field to 3 bits to store all values of \'ThreeBits\'","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:23: note: widen this field to 3 bits to store all values of \'ThreeBitsSigned\'","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:25: note: widen this field to 3 bits to store all values of \'ThreeBits\'","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:25: note: widen this field to 3 bits to store all values of \'ThreeBitsSigned\'"} | ||
} | } | ||
}, | }, | ||
["note_within_field_of_type"]={ | ["note_within_field_of_type"]={ | ||
[e]="within field of type %0 declared here", | [e]="within field of type %0 declared here", | ||
[ | [a]=k, | ||
[b]="within field of type (.*?) declared here", | [b]="within field of type (.*?) declared here", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL\n\nbool, half, pointers and structs / unions co...","Error on more illegal kernel argument types for OpenCL\n\nbool, half, pointers and structs / unions containing any\nof these are not allowed. Does not yet reject size_t and\nrelated integer types that are also disallowed.\n\nllvm-svn: 186908"}, | ||
[ | [g]={{p,9585,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n // ...\n do {\n // ...\n for (const auto *FD : RD->fields()) {\n // ...\n S.Diag(OrigRecDecl->getLocation(), diag::note_within_field_of_type) << OrigRecDecl->getDeclName();"},{p,9595,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n // ...\n do {\n // ...\n for (const auto *FD : RD->fields()) {\n // ...\n // We have an error, now let\'s go back up through history and show where\n // the offending field came from\n for (ArrayRef<const FieldDecl *>::const_iterator I = HistoryStack.begin() + 1, E = HistoryStack.end(); I != E; ++I) {\n // ...\n S.Diag(OuterField->getLocation(), diag::note_within_field_of_type) << OuterField->getType();"},{"clang/lib/Sema/SemaSYCL.cpp",98,"void Sema::deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet<QualType> Visited, ValueDecl *DeclToCheck) {\n // ...\n do {\n // ...\n auto EmitHistory = [&]() {\n // The first element is always nullptr.\n for (uint64_t Index = 1; Index < History.size(); ++Index) {\n SYCLDiagIfDeviceCode(History[Index]->getLocation(), diag::note_within_field_of_type) << History[Index]->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaSYCL/zero-length-arrays.cpp"]={"clang/test/SemaSYCL/zero-length-arrays.cpp:84:11: note: within field of type \'WrapperOfWrapper\' declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:89:32: note: within field of type \'WrapperOfWrapper\' declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:101:13: note: within field of type \'Templated<1 - 1, double>\' declared here", | ["clang/test/SemaSYCL/zero-length-arrays.cpp"]={"clang/test/SemaSYCL/zero-length-arrays.cpp:84:11: note: within field of type \'WrapperOfWrapper\' declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:89:32: note: within field of type \'WrapperOfWrapper\' declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:101:13: note: within field of type \'Templated<1 - 1, double>\' declared here",Xb,"clang/test/SemaSYCL/zero-length-arrays.cpp:108:32: note: within field of type \'Templated<0, float>\' declared here",Xb,"clang/test/SemaSYCL/zero-length-arrays.cpp:53:11: note: within field of type \'Templated<0U, float>\' declared here",Xb,"clang/test/SemaSYCL/zero-length-arrays.cpp:58:31: note: within field of type \'Templated<0U, float>\' declared here",Xb,"clang/test/SemaSYCL/zero-length-arrays.cpp:20:11: note: within field of type \'Wrapper\' declared here",Xb,Xb,Xb,Xb,"clang/test/SemaSYCL/zero-length-arrays.cpp:20:11: note: within field of type \'Wrapper\' declared here"} | ||
} | } | ||
}, | }, | ||
["note_xor_used_as_pow_silence"]={ | ["note_xor_used_as_pow_silence"]={ | ||
[e]="replace expression with \'%0\' %select{|or use \'xor\' instead of \'^\' }1to silence this warning", | [e]="replace expression with \'%0\' %select{|or use \'xor\' instead of \'^\' }1to silence this warning", | ||
[ | [a]=k, | ||
[b]="replace expression with \'(.*?)\' (?:|or use \'xor\' instead of \'\\^\' )to silence this warning", | [b]="replace expression with \'(.*?)\' (?:|or use \'xor\' instead of \'\\^\' )to silence this warning", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"920890e26812",1566155654,"[Diagnostics] Diagnose misused xor as pow\n\nSummary:\nMotivation:\nhttps://twitter.com/jfbastien/status...","[Diagnostics] Diagnose misused xor as pow\n\nSummary:\nMotivation:\nhttps://twitter.com/jfbastien/status/1139298419988549632\nhttps://twitter.com/mikemx7f/status/1139335901790625793\nhttps://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=10+%5E&search=Search\n\nReviewers: jfb, rsmith, regehr, aaron.ballman\n\nReviewed By: aaron.ballman\n\nSubscribers: lebedev.ri, Quuxplusone, erik.pilkington, riccibruno, dexonsmith, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D63423\n\nllvm-svn: 369217"}, | ||
[ | [g]={{v,13691,"static void diagnoseXorMisusedAsPow(Sema &S, const ExprResult &XorLHS, const ExprResult &XorRHS, const SourceLocation Loc) {\n // ...\n if (LeftSideValue == 2 && RightSideIntValue >= 0) {\n // ...\n S.Diag(Loc, diag::note_xor_used_as_pow_silence) << (\"0x2 ^ \" + RHSStr) << SuggestXor;"},{v,13903,"static void diagnoseXorMisusedAsPow(Sema &S, const ExprResult &XorLHS, const ExprResult &XorRHS, const SourceLocation Loc) {\n // ...\n if (LeftSideValue == 2 && RightSideIntValue >= 0) {\n // ...\n } else if (LeftSideValue == 10) {\n // ...\n S.Diag(Loc, diag::note_xor_used_as_pow_silence) << (\"0xA ^ \" + RHSStr) << SuggestXor;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:36:11: note: replace expression with \'0x2 ^ 0\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:39:11: note: replace expression with \'0x2 ^ 1\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:42:11: note: replace expression with \'0x2 ^ 2\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:45:11: note: replace expression with \'0x2 ^ 8\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:48:11: note: replace expression with \'0x2 ^ +8\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:51:13: note: replace expression with \'0x2 ^ 8\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:54:11: note: replace expression with \'0x2 ^ 16\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:57:11: note: replace expression with \'0x2 ^ TEN\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:60:18: note: replace expression with \'0x2 ^ ALPHA_OFFSET\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:80:11: note: replace expression with \'0x2 ^ 32\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:83:11: note: replace expression with \'0x2 ^ 64\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:88:12: note: replace expression with \'0xA ^ 0\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:91:12: note: replace expression with \'0xA ^ 1\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:94:12: note: replace expression with \'0xA ^ 2\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:97:12: note: replace expression with \'0xA ^ 4\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:100:12: note: replace expression with \'0xA ^ +4\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:103:12: note: replace expression with \'0xA ^ 10\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:106:13: note: replace expression with \'0xA ^ 10\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:109:12: note: replace expression with \'0xA ^ TEN\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:112:12: note: replace expression with \'0xA ^ 100\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:116:12: note: replace expression with \'0xA ^ -EXP\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:119:12: note: replace expression with \'0xA ^ +EXP\' or use \'xor\' instead of \'^\' to silence this warning"} | ["clang/test/SemaCXX/warn-xor-as-pow.cpp"]={"clang/test/SemaCXX/warn-xor-as-pow.cpp:36:11: note: replace expression with \'0x2 ^ 0\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:39:11: note: replace expression with \'0x2 ^ 1\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:42:11: note: replace expression with \'0x2 ^ 2\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:45:11: note: replace expression with \'0x2 ^ 8\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:48:11: note: replace expression with \'0x2 ^ +8\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:51:13: note: replace expression with \'0x2 ^ 8\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:54:11: note: replace expression with \'0x2 ^ 16\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:57:11: note: replace expression with \'0x2 ^ TEN\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:60:18: note: replace expression with \'0x2 ^ ALPHA_OFFSET\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:80:11: note: replace expression with \'0x2 ^ 32\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:83:11: note: replace expression with \'0x2 ^ 64\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:88:12: note: replace expression with \'0xA ^ 0\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:91:12: note: replace expression with \'0xA ^ 1\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:94:12: note: replace expression with \'0xA ^ 2\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:97:12: note: replace expression with \'0xA ^ 4\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:100:12: note: replace expression with \'0xA ^ +4\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:103:12: note: replace expression with \'0xA ^ 10\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:106:13: note: replace expression with \'0xA ^ 10\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:109:12: note: replace expression with \'0xA ^ TEN\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:112:12: note: replace expression with \'0xA ^ 100\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:116:12: note: replace expression with \'0xA ^ -EXP\' or use \'xor\' instead of \'^\' to silence this warning","clang/test/SemaCXX/warn-xor-as-pow.cpp:119:12: note: replace expression with \'0xA ^ +EXP\' or use \'xor\' instead of \'^\' to silence this warning"} | ||
} | } | ||
}, | }, | ||
["null_in_char_or_string"]={ | ["null_in_char_or_string"]={ | ||
[ | [m]={"null-character"}, | ||
[l]="null-character", | |||
[ | |||
[e]="null character(s) preserved in %select{char|string}0 literal", | [e]="null character(s) preserved in %select{char|string}0 literal", | ||
[ | [a]=n, | ||
[b]="null character\\(s\\) preserved in (?:char|string) literal", | [b]="null character\\(s\\) preserved in (?:char|string) literal", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-character[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"7f5ff2175f68",1447466995,"Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119","Use %select to merge similar diagnostics. NFC\n\nllvm-svn: 253119"}, | ||
[ | [g]={{cb,2127,"/// 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 // If a nul character existed in the string, warn about it.\n if (NulCharacter && !isLexingRawMode())\n Diag(NulCharacter, diag::null_in_char_or_string) << 1;"},{cb,2251,"/// LexAngledStringLiteral - Lex the remainder of an angled string literal,\n/// after having lexed the \'<\' character. This is used for #include filenames.\nbool Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) {\n // ...\n // If a nul character existed in the string, warn about it.\n if (NulCharacter && !isLexingRawMode())\n Diag(NulCharacter, diag::null_in_char_or_string) << 1;"},{cb,2349,"/// LexCharConstant - Lex the remainder of a character constant, after having\n/// lexed either \' or L\' or u8\' or u\' or U\'.\nbool Lexer::LexCharConstant(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n // ...\n // If a nul character existed in the character, warn about it.\n if (NulCharacter && !isLexingRawMode())\n Diag(NulCharacter, diag::null_in_char_or_string) << 0;"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/null-character-in-literal.c"]={"clang/test/Lexer/null-character-in-literal.c:6:11: warning: null character(s) preserved in char literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:7:12: warning: null character(s) preserved in char literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:10:16: warning: null character(s) preserved in string literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:11:17: warning: null character(s) preserved in string literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:15:16: warning: null character(s) preserved in string literal [-Wnull-character]"} | ["clang/test/Lexer/null-character-in-literal.c"]={"clang/test/Lexer/null-character-in-literal.c:6:11: warning: null character(s) preserved in char literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:7:12: warning: null character(s) preserved in char literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:10:16: warning: null character(s) preserved in string literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:11:17: warning: null character(s) preserved in string literal [-Wnull-character]","clang/test/Lexer/null-character-in-literal.c:15:16: warning: null character(s) preserved in string literal [-Wnull-character]"} | ||
} | } | ||
}, | }, | ||
["null_in_file"]={ | ["null_in_file"]={ | ||
[ | [m]={"null-character"}, | ||
[l]="null-character", | |||
[ | |||
[e]="null character ignored", | [e]="null character ignored", | ||
[ | [a]=n, | ||
[b]="null character ignored", | [b]="null character ignored", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-character[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{cb,3641,"LexStart:\n // ...\n case 0: // Null.\n // ...\n if (!isLexingRawMode())\n Diag(CurPtr - 1, diag::null_in_file);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/newline-nul.c"]={"clang/test/Lexer/newline-nul.c:6:1: warning: null character ignored [-Wnull-character]"} | ["clang/test/Lexer/newline-nul.c"]={"clang/test/Lexer/newline-nul.c:6:1: warning: null character ignored [-Wnull-character]"} | ||
} | } | ||
}, | }, | ||
["override_keyword_hides_virtual_member_function"]={ | ["override_keyword_hides_virtual_member_function"]={ | ||
[e]="non-virtual member function marked \'%0\' hides virtual member %select{function|functions}1", | [e]="non-virtual member function marked \'%0\' hides virtual member %select{function|functions}1", | ||
[ | [a]=ec, | ||
[b]="non\\-virtual member function marked \'(.*?)\' hides virtual member (?:function|functions)", | [b]="non\\-virtual member function marked \'(.*?)\' hides virtual member (?:function|functions)", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"af65120bd382",1378425063,"Improve error for \"override\" + non-virtual func.\n\nConsider something like the following:\n\nstruct X {...","Improve error for \"override\" + non-virtual func.\n\nConsider something like the following:\n\nstruct X {\n virtual void foo(float x);\n};\nstruct Y : X {\n void foo(double x) override;\n};\n\nThe error is almost certainly that Y::foo() has the wrong signature,\nrather than incorrect usage of the override keyword. This patch\nadds an appropriate diagnostic for that case.\n\nFixes <rdar://problem/14785106>.\n\nllvm-svn: 190109"}, | ||
[ | [g]={{s,3244,"/// CheckOverrideControl - Check C++11 override control semantics.\nvoid Sema::CheckOverrideControl(NamedDecl *D) {\n // ...\n if (MD && !MD->isVirtual()) {\n // ...\n if (!OverloadedMethods.empty()) {\n if (OverrideAttr *OA = D->getAttr<OverrideAttr>()) {\n Diag(OA->getLocation(), diag::override_keyword_hides_virtual_member_function) << \"override\" << (OverloadedMethods.size() > 1);"},{s,3248,"/// CheckOverrideControl - Check C++11 override control semantics.\nvoid Sema::CheckOverrideControl(NamedDecl *D) {\n // ...\n if (MD && !MD->isVirtual()) {\n // ...\n if (!OverloadedMethods.empty()) {\n if (OverrideAttr *OA = D->getAttr<OverrideAttr>()) {\n // ...\n } else if (FinalAttr *FA = D->getAttr<FinalAttr>()) {\n Diag(FA->getLocation(), diag::override_keyword_hides_virtual_member_function) << (FA->isSpelledAsSealed() ? \"sealed\" : \"final\") << (OverloadedMethods.size() > 1);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/pass-object-size.cpp"]={"clang/test/SemaCXX/pass-object-size.cpp:89:28: error: non-virtual member function marked \'override\' hides virtual member function"} | ["clang/test/SemaCXX/pass-object-size.cpp"]={"clang/test/SemaCXX/pass-object-size.cpp:89:28: error: non-virtual member function marked \'override\' hides virtual member function"} | ||
} | } | ||
}, | }, | ||
["override_keyword_only_allowed_on_virtual_member_functions"]={ | ["override_keyword_only_allowed_on_virtual_member_functions"]={ | ||
[e]="only virtual member functions can be marked \'%0\'", | [e]="only virtual member functions can be marked \'%0\'", | ||
[ | [a]=ec, | ||
[b]="only virtual member functions can be marked \'(.*?)\'", | [b]="only virtual member functions can be marked \'(.*?)\'", | ||
[ | [c]=j, | ||
[ | [d]=i, | ||
[ | [f]={"13a69102d779",1295498062,"Only allow virtual member functions to be marked \'override\' and \'final\'.\n\nllvm-svn: 123882","Only allow virtual member functions to be marked \'override\' and \'final\'.\n\nllvm-svn: 123882"}, | ||
[ | [g]={{s,3263,"/// CheckOverrideControl - Check C++11 override control semantics.\nvoid Sema::CheckOverrideControl(NamedDecl *D) {\n // ...\n if (!MD || !MD->isVirtual()) {\n if (OverrideAttr *OA = D->getAttr<OverrideAttr>()) {\n Diag(OA->getLocation(), diag::override_keyword_only_allowed_on_virtual_member_functions) << \"override\" << FixItHint::CreateRemoval(OA->getLocation());"},{s,3269,"/// CheckOverrideControl - Check C++11 override control semantics.\nvoid Sema::CheckOverrideControl(NamedDecl *D) {\n // ...\n if (!MD || !MD->isVirtual()) {\n // ...\n if (FinalAttr *FA = D->getAttr<FinalAttr>()) {\n Diag(FA->getLocation(), diag::override_keyword_only_allowed_on_virtual_member_functions) << (FA->isSpelledAsSealed() ? \"sealed\" : \"final\") << FixItHint::CreateRemoval(FA->getLocation());"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/class.mem/p8-0x.cpp"]={"clang/test/CXX/class/class.mem/p8-0x.cpp:20:12: error: only virtual member functions can be marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:21:9: error: only virtual member functions can be marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:26:12: error: only virtual member functions can be marked \'final\'","clang/test/CXX/class/class.mem/p8-0x.cpp:27:9: error: only virtual member functions can be marked \'final\'","clang/test/CXX/class/class.mem/p8-0x.cpp:46:14: error: only virtual member functions can be marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:51:14: error: only virtual member functions can be marked \'final\'"} | ["clang/test/CXX/class/class.mem/p8-0x.cpp"]={"clang/test/CXX/class/class.mem/p8-0x.cpp:20:12: error: only virtual member functions can be marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:21:9: error: only virtual member functions can be marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:26:12: error: only virtual member functions can be marked \'final\'","clang/test/CXX/class/class.mem/p8-0x.cpp:27:9: error: only virtual member functions can be marked \'final\'","clang/test/CXX/class/class.mem/p8-0x.cpp:46:14: error: only virtual member functions can be marked \'override\'","clang/test/CXX/class/class.mem/p8-0x.cpp:51:14: error: only virtual member functions can be marked \'final\'"} | ||
} | } | ||
}, | }, | ||
["pp_disabled_macro_expansion"]={ | ["pp_disabled_macro_expansion"]={ | ||
[ | [m]={"disabled-macro-expansion"}, | ||
[l]="disabled-macro-expansion", | |||
[ | |||
[e]="disabled expansion of recursive macro", | [e]="disabled expansion of recursive macro", | ||
[ | [a]=n, | ||
[b]="disabled expansion of recursive macro", | [b]="disabled expansion of recursive macro", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdisabled\\-macro\\-expansion[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"123bec89ab8f",1325455264,"Added -Wdisabled-macro-expansion warning.\n\nllvm-svn: 147418","Added -Wdisabled-macro-expansion warning.\n\nllvm-svn: 147418"}, | ||
[ | [g]={{Pc,622,"/// HandleMacroExpandedIdentifier - If an identifier token is read that is to be\n/// expanded as a macro, handle it and return the next token as \'Identifier\'.\nbool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, const MacroDefinition &M) {\n // ...\n // If this macro expands to no tokens, don\'t bother to push it onto the\n // expansion stack, only to take it right back off.\n if (MI->getNumTokens() == 0) {\n // ...\n } else if (MI->getNumTokens() == 1 && isTrivialSingleTokenExpansion(MI, Identifier.getIdentifierInfo(), *this)) {\n // ...\n // If this is a disabled macro or #define X X, we must mark the result as\n // unexpandable.\n if (IdentifierInfo *NewII = Identifier.getIdentifierInfo()) {\n if (MacroInfo *NewMI = getMacroInfo(NewII))\n if (!NewMI->isEnabled() || NewMI == MI) {\n // ...\n // Don\'t warn for \"#define X X\" like \"#define bool bool\" from\n // stdbool.h.\n if (NewMI != MI || MI->isFunctionLike())\n Diag(Identifier, diag::pp_disabled_macro_expansion);"},{"clang/lib/Lex/Preprocessor.cpp",833,"/// 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 a macro to be expanded, do it.\n if (MacroDefinition MD = getMacroDefinition(&II)) {\n // ...\n if (!DisableMacroExpansion) {\n if (!Identifier.isExpandDisabled() && MI->isEnabled()) {\n // ...\n } else {\n // ...\n if (MI->isObjectLike() || isNextPPTokenLParen())\n Diag(Identifier, diag::pp_disabled_macro_expansion);"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/warn-disabled-macro-expansion.c"]={"clang/test/Preprocessor/warn-disabled-macro-expansion.c:22:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:26:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:28:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:30:3: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:32:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]"} | ["clang/test/Preprocessor/warn-disabled-macro-expansion.c"]={"clang/test/Preprocessor/warn-disabled-macro-expansion.c:22:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:26:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:28:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:30:3: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]","clang/test/Preprocessor/warn-disabled-macro-expansion.c:32:1: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]"} | ||
} | } | ||
}, | }, | ||
["pp_err_elif_after_else"]={ | ["pp_err_elif_after_else"]={ | ||
[e]="%select{#elif|#elifdef|#elifndef}0 after #else", | [e]="%select{#elif|#elifdef|#elifndef}0 after #else", | ||
[ | [a]=ec, | ||
[b]="(?:\\#elif|\\#elifdef|\\#elifndef) after \\#else", | [b]="(?:\\#elif|\\#elifdef|\\#elifndef) after \\#else", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,721,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n // ...\n while (true) {\n // ...\n if (Directive.startswith(\"if\")) {\n // ...\n } else if (Directive[0] == \'e\') {\n // ...\n if (Sub == \"ndif\") { // \"endif\"\n // ...\n } else if (Sub == \"lse\") { // \"else\".\n // ...\n } else if (Sub == \"lif\") { // \"elif\".\n // ...\n // If this is a #elif with a #else before it, report the error.\n if (CondInfo.FoundElse)\n Diag(Tok, diag::pp_err_elif_after_else) << PED_Elif;"},{N,777,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n // ...\n while (true) {\n // ...\n if (Directive.startswith(\"if\")) {\n // ...\n } else if (Directive[0] == \'e\') {\n // ...\n if (Sub == \"ndif\") { // \"endif\"\n // ...\n } else if (Sub == \"lse\") { // \"else\".\n // ...\n } else if (Sub == \"lif\") { // \"elif\".\n // ...\n } else if (Sub == \"lifdef\" || // \"elifdef\"\n // ...\n // If this is a #elif with a #else before it, report the error.\n if (CondInfo.FoundElse)\n Diag(Tok, diag::pp_err_elif_after_else) << (IsElifDef ? PED_Elifdef : PED_Elifndef);"},{N,3482,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n // ...\n // If this is a #elif with a #else before it, report the error.\n if (CI.FoundElse)\n Diag(ElifToken, diag::pp_err_elif_after_else) << DirKind;"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/elifdef.c"]={"clang/test/Preprocessor/elifdef.c:97:2: error: #elifdef after #else","clang/test/Preprocessor/elifdef.c:104:2: error: #elifndef after #else","clang/test/Preprocessor/elifdef.c:129:2: error: #elif after #else"} | ["clang/test/Preprocessor/elifdef.c"]={"clang/test/Preprocessor/elifdef.c:97:2: error: #elifdef after #else","clang/test/Preprocessor/elifdef.c:104:2: error: #elifndef after #else","clang/test/Preprocessor/elifdef.c:129:2: error: #elif after #else"} | ||
} | } | ||
}, | }, | ||
["pp_err_elif_without_if"]={ | ["pp_err_elif_without_if"]={ | ||
[e]="%select{#elif|#elifdef|#elifndef}0 without #if", | [e]="%select{#elif|#elifdef|#elifndef}0 without #if", | ||
[ | [a]=ec, | ||
[b]="(?:\\#elif|\\#elifdef|\\#elifndef) without \\#if", | [b]="(?:\\#elif|\\#elifdef|\\#elifndef) without \\#if", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,3472,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n // ...\n if (CurPPLexer->popConditionalLevel(CI)) {\n Diag(ElifToken, diag::pp_err_elif_without_if) << DirKind;"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/elifdef.c"]={"clang/test/Preprocessor/elifdef.c:108:2: error: #elifdef without #if","clang/test/Preprocessor/elifdef.c:112:2: error: #elifndef without #if"} | ["clang/test/Preprocessor/elifdef.c"]={"clang/test/Preprocessor/elifdef.c:108:2: error: #elifdef without #if","clang/test/Preprocessor/elifdef.c:112:2: error: #elifndef without #if"} | ||
} | } | ||
}, | }, | ||
["pp_err_else_after_else"]={ | ["pp_err_else_after_else"]={ | ||
[e]="#else after #else", | [e]="#else after #else", | ||
[ | [a]=ec, | ||
[b]="\\#else after \\#else", | [b]="\\#else after \\#else", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,693,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n // ...\n while (true) {\n // ...\n if (Directive.startswith(\"if\")) {\n // ...\n } else if (Directive[0] == \'e\') {\n // ...\n if (Sub == \"ndif\") { // \"endif\"\n // ...\n } else if (Sub == \"lse\") { // \"else\".\n // ...\n // If this is a #else with a #else before it, report the error.\n if (CondInfo.FoundElse)\n Diag(Tok, diag::pp_err_else_after_else);"},{N,3417,"/// HandleElseDirective - Implements the \\#else directive.\n///\nvoid Preprocessor::HandleElseDirective(Token &Result, const Token &HashToken) {\n // ...\n // If this is a #else with a #else before it, report the error.\n if (CI.FoundElse)\n Diag(Result, diag::pp_err_else_after_else);"}} | ||
}, | }, | ||
["pp_err_else_without_if"]={ | ["pp_err_else_without_if"]={ | ||
[e]="#else without #if", | [e]="#else without #if", | ||
[ | [a]=ec, | ||
[b]="\\#else without \\#if", | [b]="\\#else without \\#if", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,3408,"/// HandleElseDirective - Implements the \\#else directive.\n///\nvoid Preprocessor::HandleElseDirective(Token &Result, const Token &HashToken) {\n // ...\n if (CurPPLexer->popConditionalLevel(CI)) {\n Diag(Result, diag::pp_err_else_without_if);"}} | ||
}, | }, | ||
["pp_hash_warning"]={ | ["pp_hash_warning"]={ | ||
[ | [m]={"#warnings","cpp"}, | ||
[l]="#warnings", | |||
[e]=Hc, | |||
[a]=n, | |||
[ | [b]=Ic, | ||
[e]= | [c]=" \\[(?:\\-Werror,)?\\-W\\#warnings[^\\]]*\\]", | ||
[ | [d]="User-Defined Issue", | ||
[b]= | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,1656,"/// HandleUserDiagnosticDirective - Handle a #warning or #error directive.\n///\nvoid Preprocessor::HandleUserDiagnosticDirective(Token &Tok, bool isWarning) {\n // ...\n if (isWarning)\n Diag(Tok, diag::pp_hash_warning) << Msg;"},{"clang/unittests/Basic/DiagnosticTest.cpp",149,"TEST(DiagnosticTest, storedDiagEmptyWarning) {\n // ...\n Diags.Report(diag::pp_hash_warning) << \"\";"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/Preprocessor/include-directive3.c"]={"./clang/test/Preprocessor/file_to_include.h:2:2: warning: file successfully included [-W#warnings]"} | ["clang/test/Preprocessor/include-directive3.c"]={"./clang/test/Preprocessor/file_to_include.h:2:2: warning: file successfully included [-W#warnings]"} | ||
} | } | ||
}, | }, | ||
["pp_include_macros_out_of_predefines"]={ | ["pp_include_macros_out_of_predefines"]={ | ||
[e]="the #__include_macros directive is only for internal use by -imacros", | [e]="the #__include_macros directive is only for internal use by -imacros", | ||
[ | [a]=ec, | ||
[b]="the \\#__include_macros directive is only for internal use by \\-imacros", | [b]="the \\#__include_macros directive is only for internal use by \\-imacros", | ||
[ | [c]=j, | ||
[ | [d]=z, | ||
[ | [f]={"58a1eb0ba0e0",1239216400,"reject the #__include_macros directive unless it comes from the \npredefines buffer.\n\nllvm-svn: 68627","reject the #__include_macros directive unless it comes from the \npredefines buffer.\n\nllvm-svn: 68627"}, | ||
[ | [g]={{N,2639,"/// HandleIncludeMacrosDirective - The -imacros command line option turns into a\n/// pseudo directive in the predefines buffer. This handles it by sucking all\n/// tokens through the preprocessor and discarding them (only keeping the side\n/// effects on the preprocessor).\nvoid Preprocessor::HandleIncludeMacrosDirective(SourceLocation HashLoc, Token &IncludeMacrosTok) {\n // ...\n if (SourceMgr.getBufferName(Loc) != \"<built-in>\") {\n Diag(IncludeMacrosTok.getLocation(), diag::pp_include_macros_out_of_predefines);"}} | ||
}, | }, | ||
["pp_include_next_absolute_path"]={ | ["pp_include_next_absolute_path"]={ | ||
[ | [m]={"include-next-absolute-path"}, | ||
[l]="include-next-absolute-path", | |||
[ | |||
[e]="#include_next in file found relative to primary source file or found by absolute path; will search from start of include path", | [e]="#include_next in file found relative to primary source file or found by absolute path; will search from start of include path", | ||
[ | [a]=n, | ||
[b]="\\#include_next in file found relative to primary source file or found by absolute path; will search from start of include path", | [b]="\\#include_next in file found relative to primary source file or found by absolute path; will search from start of include path", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winclude\\-next\\-absolute\\-path[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,1948,"std::pair<ConstSearchDirIterator, const FileEntry *> Preprocessor::getIncludeNextStart(const Token &IncludeNextTok) const {\n // ...\n if (isInPrimaryFile() && LangOpts.IsHeaderFile) {\n // ...\n } else if (isInPrimaryFile()) {\n // ...\n } else if (CurLexerSubmodule) {\n // ...\n } else if (!Lookup) {\n // ...\n Diag(IncludeNextTok, diag::pp_include_next_absolute_path);"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/include-next.c"]={"clang/test/Preprocessor/Inputs/include-next-1/foo.h:1:2: warning: #include_next in file found relative to primary source file or found by absolute path; will search from start of include path [-Winclude-next-absolute-path]"} | ["clang/test/Preprocessor/include-next.c"]={"clang/test/Preprocessor/Inputs/include-next-1/foo.h:1:2: warning: #include_next in file found relative to primary source file or found by absolute path; will search from start of include path [-Winclude-next-absolute-path]"} | ||
} | } | ||
}, | }, | ||
["pp_include_next_in_primary"]={ | ["pp_include_next_in_primary"]={ | ||
[ | [m]={"include-next-outside-header"}, | ||
[l]="include-next-outside-header", | |||
[ | |||
[e]="#include_next in primary source file; will search from start of include path", | [e]="#include_next in primary source file; will search from start of include path", | ||
[ | [a]=n, | ||
[b]="\\#include_next in primary source file; will search from start of include path", | [b]="\\#include_next in primary source file; will search from start of include path", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winclude\\-next\\-outside\\-header[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,1936,"std::pair<ConstSearchDirIterator, const FileEntry *> Preprocessor::getIncludeNextStart(const Token &IncludeNextTok) const {\n // ...\n if (isInPrimaryFile() && LangOpts.IsHeaderFile) {\n // ...\n } else if (isInPrimaryFile()) {\n // ...\n Diag(IncludeNextTok, diag::pp_include_next_in_primary);"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:36:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:41:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:47:6: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:52:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:58:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:96:3: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]"} | ["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:36:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:41:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:47:6: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:52:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:58:5: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]","clang/test/Preprocessor/has_include.c:96:3: warning: #include_next in primary source file; will search from start of include path [-Winclude-next-outside-header]"} | ||
} | } | ||
}, | }, | ||
["pp_invalid_string_literal"]={ | ["pp_invalid_string_literal"]={ | ||
[e]="invalid string literal, ignoring final \'\\\'", | [e]="invalid string literal, ignoring final \'\\\'", | ||
[ | [a]=n, | ||
[b]="invalid string literal, ignoring final \'\\\\\'", | [b]="invalid string literal, ignoring final \'\\\\\'", | ||
[ | [c]=lb, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{"clang/lib/Lex/MacroArgs.cpp",279,"/// StringifyArgument - Implement C99 6.10.3.2p2, converting a sequence of\n/// tokens into the literal string token that should be produced by the C #\n/// preprocessor operator. If Charify is true, then it should be turned into\n/// a character literal for the Microsoft charize (#@) extension.\n///\nToken MacroArgs::StringifyArgument(const Token *ArgToks, Preprocessor &PP, bool Charify, SourceLocation ExpansionLocStart, SourceLocation ExpansionLocEnd) {\n // ...\n // If the last character of the string is a \\, and if it isn\'t escaped, this\n // is an invalid string literal, diagnose it as specified in C99.\n if (Result.back() == \'\\\\\') {\n // ...\n if ((Result.size() - 1 - FirstNonSlash) & 1) {\n // ...\n PP.Diag(ArgToks[-1], diag::pp_invalid_string_literal);"}} | ||
}, | }, | ||
["pp_macro_not_used"]={ | ["pp_macro_not_used"]={ | ||
[ | [m]={"unused-macros"}, | ||
[l]="unused-macros", | |||
[ | |||
[e]="macro is not used", | [e]="macro is not used", | ||
[ | [a]=n, | ||
[b]="macro is not used", | [b]="macro is not used", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunused\\-macros[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{N,3131,"/// 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 if (!OtherMI->isUsed() && OtherMI->isWarnIfUnused())\n Diag(OtherMI->getDefinitionLoc(), diag::pp_macro_not_used);"},{N,3157,"/// 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 if (getSourceManager().isInMainFile(MI->getDefinitionLoc()) && !Diags->isIgnored(diag::pp_macro_not_used, MI->getDefinitionLoc()) && !MacroExpansionInDirectivesOverride && getSourceManager().getFileID(MI->getDefinitionLoc()) != getPredefinesFileID()) {"},{N,3213,"/// 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 if (!MI->isUsed() && MI->isWarnIfUnused())\n Diag(MI->getDefinitionLoc(), diag::pp_macro_not_used);"},{"clang/lib/Lex/PPLexerChange.cpp",584,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (TUKind == TU_Complete) {\n // This is the end of the top-level file. \'WarnUnusedMacroLocs\' has\n // collected all macro locations that we need to warn because they are not\n // used.\n for (WarnUnusedMacroLocsTy::iterator I = WarnUnusedMacroLocs.begin(), E = WarnUnusedMacroLocs.end(); I != E; ++I)\n Diag(*I, diag::pp_macro_not_used);"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/Weverything_pragma.c"]={"clang/test/Preprocessor/Weverything_pragma.c:16:9: warning: macro is not used [-Wunused-macros]","clang/test/Preprocessor/Weverything_pragma.c:7:9: warning: macro is not used [-Wunused-macros]","clang/test/Preprocessor/Weverything_pragma.c:24:9: warning: macro is not used [-Wunused-macros]","clang/test/Preprocessor/Weverything_pragma.c:28:9: error: macro is not used [-Werror,-Wunused-macros]"} | ["clang/test/Preprocessor/Weverything_pragma.c"]={"clang/test/Preprocessor/Weverything_pragma.c:16:9: warning: macro is not used [-Wunused-macros]","clang/test/Preprocessor/Weverything_pragma.c:7:9: warning: macro is not used [-Wunused-macros]","clang/test/Preprocessor/Weverything_pragma.c:24:9: warning: macro is not used [-Wunused-macros]","clang/test/Preprocessor/Weverything_pragma.c:28:9: error: macro is not used [-Werror,-Wunused-macros]"} | ||
} | } | ||
}, | }, | ||
["pp_nonportable_path"]={ | ["pp_nonportable_path"]={ | ||
[ | [m]={"nonportable-include-path"}, | ||
[l]="nonportable-include-path", | |||
[ | |||
[e]="non-portable path to file \'%0\'; specified path differs in case from file name on disk", | [e]="non-portable path to file \'%0\'; specified path differs in case from file name on disk", | ||
[ | [a]=n, | ||
[b]="non\\-portable path to file \'(.*?)\'; specified path differs in case from file name on disk", | [b]="non\\-portable path to file \'(.*?)\'; specified path differs in case from file name on disk", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnonportable\\-include\\-path[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"fc5d13d9b180",1464979971,"Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import p...","Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.\n\nDifferential Revision: http://reviews.llvm.org/D19843\nCorresponding LLVM change: http://reviews.llvm.org/D19842\n\nPatch by Eric Niebler\n\nllvm-svn: 271708"}, | ||
[ | [g]={{N,2487,"#endif\n // ...\n auto DiagId = (FileCharacter == SrcMgr::C_User || warnByDefaultOnWrongCase(Name)) ? diag::pp_nonportable_path : diag::pp_nonportable_system_path;"}} | ||
}, | }, | ||
["pp_nonportable_system_path"]={ | ["pp_nonportable_system_path"]={ | ||
[ | [m]={"nonportable-system-include-path"}, | ||
[l]="nonportable-system-include-path", | |||
[ | |||
[e]="non-portable path to file \'%0\'; specified path differs in case from file name on disk", | [e]="non-portable path to file \'%0\'; specified path differs in case from file name on disk", | ||
[ | [a]=n, | ||
[b]="non\\-portable path to file \'(.*?)\'; specified path differs in case from file name on disk", | [b]="non\\-portable path to file \'(.*?)\'; specified path differs in case from file name on disk", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnonportable\\-system\\-include\\-path[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"e8533670bf22",1465837398,"Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import p...","Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.\n\nDifferential Revision: http://reviews.llvm.org/D19843\nCorresponding LLVM change: http://reviews.llvm.org/D19842\n\nRe-commit after addressing issues with of generating too many warnings for Windows and asan test failures.\n\nPatch by Eric Niebler\n\nllvm-svn: 272562"}, | ||
[ | [g]={{N,2488,"#endif\n // ...\n auto DiagId = (FileCharacter == SrcMgr::C_User || warnByDefaultOnWrongCase(Name)) ? diag::pp_nonportable_path : diag::pp_nonportable_system_path;"}} | ||
}, | }, | ||
["pp_out_of_date_dependency"]={ | ["pp_out_of_date_dependency"]={ | ||
[e]="current file is older than dependency %0", | [e]="current file is older than dependency %0", | ||
[ | [a]=n, | ||
[b]="current file is older than dependency (.*?)", | [b]="current file is older than dependency (.*?)", | ||
[ | [c]=lb, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Tb,567,"/// HandlePragmaDependency - Handle \\#pragma GCC dependency \"foo\" blah.\nvoid Preprocessor::HandlePragmaDependency(Token &DependencyTok) {\n // ...\n // If this file is older than the file it depends on, emit a diagnostic.\n if (CurFile && CurFile->getModificationTime() < File->getModificationTime()) {\n // ...\n Diag(FilenameTok, diag::pp_out_of_date_dependency) << Message;"}} | ||
}, | }, | ||
["pp_poisoning_existing_macro"]={ | ["pp_poisoning_existing_macro"]={ | ||
[e]="poisoning existing macro", | [e]="poisoning existing macro", | ||
[ | [a]=n, | ||
[b]="poisoning existing macro", | [b]="poisoning existing macro", | ||
[ | [c]=lb, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Tb,474,"/// HandlePragmaPoison - Handle \\#pragma GCC poison. PoisonTok is the \'poison\'.\nvoid Preprocessor::HandlePragmaPoison() {\n // ...\n while (true) {\n // ...\n // If this is a macro identifier, emit a warning.\n if (isMacroDefined(II))\n Diag(Tok, diag::pp_poisoning_existing_macro);"}} | ||
}, | }, | ||
["pp_pragma_once_in_main_file"]={ | ["pp_pragma_once_in_main_file"]={ | ||
[ | [m]={"pragma-once-outside-header"}, | ||
[l]="pragma-once-outside-header", | |||
[ | |||
[e]="#pragma once in main file", | [e]="#pragma once in main file", | ||
[ | [a]=n, | ||
[b]="\\#pragma once in main file", | [b]="\\#pragma once in main file", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpragma\\-once\\-outside\\-header[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Tb,424,"/// HandlePragmaOnce - Handle \\#pragma once. OnceTok is the \'once\'.\nvoid Preprocessor::HandlePragmaOnce(Token &OnceTok) {\n // Don\'t honor the \'once\' when handling the primary source file, unless\n // this is a prefix to a TU, which indicates we\'re generating a PCH file, or\n // when the main file is a header (e.g. when -xc-header is provided on the\n // commandline).\n if (isInPrimaryFile() && TUKind != TU_Prefix && !getLangOpts().IsHeaderFile) {\n Diag(OnceTok, diag::pp_pragma_once_in_main_file);"}}, | ||
[ | [h]={ | ||
["clang/test/Index/annotate-comments-preprocessor.c"]={"clang/test/Index/annotate-comments-preprocessor.c:32:9: warning: #pragma once in main file [-Wpragma-once-outside-header]"} | ["clang/test/Index/annotate-comments-preprocessor.c"]={"clang/test/Index/annotate-comments-preprocessor.c:32:9: warning: #pragma once in main file [-Wpragma-once-outside-header]"} | ||
} | } | ||
}, | }, | ||
["pp_pragma_sysheader_in_main_file"]={ | ["pp_pragma_sysheader_in_main_file"]={ | ||
[ | [m]={"pragma-system-header-outside-header"}, | ||
[l]="pragma-system-header-outside-header", | |||
[ | |||
[e]="#pragma system_header ignored in main file", | [e]="#pragma system_header ignored in main file", | ||
[ | [a]=n, | ||
[b]="\\#pragma system_header ignored in main file", | [b]="\\#pragma system_header ignored in main file", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpragma\\-system\\-header\\-outside\\-header[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Tb,487,"/// HandlePragmaSystemHeader - Implement \\#pragma GCC system_header. We know\n/// that the whole directive has been parsed.\nvoid Preprocessor::HandlePragmaSystemHeader(Token &SysHeaderTok) {\n if (isInPrimaryFile()) {\n Diag(SysHeaderTok, diag::pp_pragma_sysheader_in_main_file);"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/_Pragma.c"]={"clang/test/Preprocessor/_Pragma.c:3:1: warning: #pragma system_header ignored in main file [-Wpragma-system-header-outside-header]"} | ["clang/test/Preprocessor/_Pragma.c"]={"clang/test/Preprocessor/_Pragma.c:3:1: warning: #pragma system_header ignored in main file [-Wpragma-system-header-outside-header]"} | ||
} | } | ||
}, | }, | ||
["remark_cc1_round_trip_generated"]={ | ["remark_cc1_round_trip_generated"]={ | ||
[ | [m]={"round-trip-cc1-args"}, | ||
[l]="round-trip-cc1-args", | |||
[ | |||
[e]="generated arguments #%0 in round-trip: %1", | [e]="generated arguments #%0 in round-trip: %1", | ||
[ | [a]=Z, | ||
[b]="generated arguments \\#(.*?) in round\\-trip\\: (.*?)", | [b]="generated arguments \\#(.*?) in round\\-trip\\: (.*?)", | ||
[ | [c]=j, | ||
[ | [d]=j, | ||
[ | [f]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating po...","[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"}, | ||
[ | [g]={{"clang/lib/Frontend/CompilerInvocation.cpp",791,"#endif\n // ...\n Diags.Report(diag::remark_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{"clang/lib/Frontend/CompilerInvocation.cpp",793,"#endif\n // ...\n Diags.Report(diag::remark_cc1_round_trip_generated) << 2 << SerializeArgs(ComparisonArgs);"},{"clang/tools/driver/cc1_main.cpp",211,"int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) {\n // ...\n // Setup round-trip remarks for the DiagnosticsEngine used in CreateFromArgs.\n if (find(Argv, StringRef(\"-Rround-trip-cc1-args\")) != Argv.end())\n Diags.setSeverity(diag::remark_cc1_round_trip_generated, diag::Severity::Remark, {});"}}, | ||
[ | [h]={ | ||
["clang/test/Frontend/round-trip-cc1-args.c"]={"remark: generated arguments #1 in round-trip: \"-cc1\" \"-Rround-trip-cc1-args\" \"-fsyntax-only\" \"-x\" \"c\" \"clang/test/Frontend/round-trip-cc1-args.c\" \"-triple\" \"x86_64-unknown-linux-gnu\" \"-nostdsysteminc\" \"-isystem\" \"build/lib/clang/17/include\" \"-std=gnu17\" \"-ffp-contract=off\" \"-fno-experimental-relative-c++-abi-vtables\" \"-fno-file-reproducible\" \"-O0\" \"-save-temps=obj\" \"-fdiagnostics-hotness-threshold=0\" \"-fdiagnostics-misexpect-tolerance=0\" ","remark: generated arguments #2 in round-trip: \"-cc1\" \"-Rround-trip-cc1-args\" \"-fsyntax-only\" \"-x\" \"c\" \"clang/test/Frontend/round-trip-cc1-args.c\" \"-triple\" \"x86_64-unknown-linux-gnu\" \"-nostdsysteminc\" \"-isystem\" \"build/lib/clang/17/include\" \"-std=gnu17\" \"-ffp-contract=off\" \"-fno-experimental-relative-c++-abi-vtables\" \"-fno-file-reproducible\" \"-O0\" \"-save-temps=obj\" \"-fdiagnostics-hotness-threshold=0\" \"-fdiagnostics-misexpect-tolerance=0\" "} | ["clang/test/Frontend/round-trip-cc1-args.c"]={"remark: generated arguments #1 in round-trip: \"-cc1\" \"-Rround-trip-cc1-args\" \"-fsyntax-only\" \"-x\" \"c\" \"clang/test/Frontend/round-trip-cc1-args.c\" \"-triple\" \"x86_64-unknown-linux-gnu\" \"-nostdsysteminc\" \"-isystem\" \"build/lib/clang/17/include\" \"-std=gnu17\" \"-ffp-contract=off\" \"-fno-experimental-relative-c++-abi-vtables\" \"-fno-file-reproducible\" \"-O0\" \"-save-temps=obj\" \"-fdiagnostics-hotness-threshold=0\" \"-fdiagnostics-misexpect-tolerance=0\" ","remark: generated arguments #2 in round-trip: \"-cc1\" \"-Rround-trip-cc1-args\" \"-fsyntax-only\" \"-x\" \"c\" \"clang/test/Frontend/round-trip-cc1-args.c\" \"-triple\" \"x86_64-unknown-linux-gnu\" \"-nostdsysteminc\" \"-isystem\" \"build/lib/clang/17/include\" \"-std=gnu17\" \"-ffp-contract=off\" \"-fno-experimental-relative-c++-abi-vtables\" \"-fno-file-reproducible\" \"-O0\" \"-save-temps=obj\" \"-fdiagnostics-hotness-threshold=0\" \"-fdiagnostics-misexpect-tolerance=0\" "} | ||
} | } | ||
}, | }, | ||
["remark_fe_backend_optimization_remark"]={ | ["remark_fe_backend_optimization_remark"]={ | ||
[ | [m]={"pass"}, | ||
[l]="pass", | |||
[e]=Hc, | |||
[a]=Z, | |||
[b]=Ic, | |||
[ | [c]=" \\[[^\\]]*\\-Rpass[^\\]]*\\]", | ||
[e]= | [d]=mc, | ||
[ | [f]={"829b1700484d",1397667264,"Add support for optimization reports.\n\nSummary:\nThis patch adds a new flag -Rpass=. The flag indicat...","Add support for optimization reports.\n\nSummary:\nThis patch adds a new flag -Rpass=. The flag indicates the name\nof the optimization pass that should emit remarks stating when it\nmade a transformation to the code.\n\nThis implements the design I proposed in:\n\nhttps://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing\n\nOther changes:\n- Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to\n print \"-R\" instead of \"-W\" in the diagnostic message.\n\n- In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation\n object out of the file name, line and column number. Use that location\n in the call to Diags.Report().\n\n- When -Rpass is used without debug info a note is emitted alerting\n the user that they need to use -gline-tables-only -gcolumn-info to\n get this information.\n\nCC: llvm-commits\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D3226\n\nllvm-svn: 206401"}, | ||
[b]= | [g]={{Lc,796,"void BackendConsumer::OptimizationRemarkHandler(const llvm::DiagnosticInfoOptimizationBase &D) {\n // ...\n if (D.isPassed()) {\n // Optimization remarks are active only if the -Rpass flag has a regular\n // expression that matches the name of the pass name in \\p D.\n if (CodeGenOpts.OptimizationRemark.patternMatches(D.getPassName()))\n EmitOptimizationMessage(D, diag::remark_fe_backend_optimization_remark);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
[ | |||
["clang/test/CodeGenCUDA/atomics-remarks-gfx90a.cu"]={"clang/test/CodeGenCUDA/atomics-remarks-gfx90a.cu:15:10: remark: A compare and swap loop was generated for an atomic fadd operation at system memory scope [-Rpass=atomic-expand]"} | ["clang/test/CodeGenCUDA/atomics-remarks-gfx90a.cu"]={"clang/test/CodeGenCUDA/atomics-remarks-gfx90a.cu:15:10: remark: A compare and swap loop was generated for an atomic fadd operation at system memory scope [-Rpass=atomic-expand]"} | ||
} | } | ||
}, | }, | ||
["remark_fe_backend_optimization_remark_analysis"]={ | ["remark_fe_backend_optimization_remark_analysis"]={ | ||
[ | [m]={vc}, | ||
[l]=vc, | |||
[e]=Hc, | |||
[a]=Z, | |||
[b]=Ic, | |||
[ | [c]=" \\[[^\\]]*\\-Rpass\\-analysis[^\\]]*\\]", | ||
[e]= | [d]=mc, | ||
[ | [f]={"d23ec94393bf",1401393306,"Add flags -Rpass-missed and -Rpass-analysis.\n\nSummary:\nThese two flags are in the same family as -Rp...","Add flags -Rpass-missed and -Rpass-analysis.\n\nSummary:\nThese two flags are in the same family as -Rpass, but are used in\ndifferent situations.\n\n-Rpass-missed is used by optimizers to inform the user when they tried\nto apply an optimization but couldn\'t (or wouldn\'t).\n\n-Rpass-analysis is used by optimizers to report analysis results back\nto the user (e.g., why the transformation could not be applied).\n\nDepends on D3682.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D3683\n\nllvm-svn: 209839"}, | ||
[b]= | [g]={{Lc,814,"void BackendConsumer::OptimizationRemarkHandler(const llvm::DiagnosticInfoOptimizationBase &D) {\n // ...\n if (D.isPassed()) {\n // ...\n } else if (D.isMissed()) {\n // ...\n } else {\n // ...\n if (ShouldAlwaysPrint || CodeGenOpts.OptimizationRemarkAnalysis.patternMatches(D.getPassName()))\n EmitOptimizationMessage(D, diag::remark_fe_backend_optimization_remark_analysis);"}} | ||
[ | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["remark_fe_backend_optimization_remark_analysis_aliasing"]={ | ["remark_fe_backend_optimization_remark_analysis_aliasing"]={ | ||
[ | [m]={vc}, | ||
[l]=vc, | |||
[ | |||
[e]="%0; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop. If the arrays will always be independent specify \'#pragma clang loop vectorize(assume_safety)\' before the loop or provide the \'__restrict__\' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!", | [e]="%0; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop. If the arrays will always be independent specify \'#pragma clang loop vectorize(assume_safety)\' before the loop or provide the \'__restrict__\' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!", | ||
[ | [a]=Z, | ||
[b]="(.*?); allow reordering by specifying \'\\#pragma clang loop vectorize\\(enable\\)\' before the loop\\. If the arrays will always be independent specify \'\\#pragma clang loop vectorize\\(assume_safety\\)\' before the loop or provide the \'__restrict__\' qualifier with the independent array arguments\\. Erroneous results will occur if these options are incorrectly applied\\!", | [b]="(.*?); allow reordering by specifying \'\\#pragma clang loop vectorize\\(enable\\)\' before the loop\\. If the arrays will always be independent specify \'\\#pragma clang loop vectorize\\(assume_safety\\)\' before the loop or provide the \'__restrict__\' qualifier with the independent array arguments\\. Erroneous results will occur if these options are incorrectly applied\\!", | ||
[ | [c]=" \\[[^\\]]*\\-Rpass\\-analysis[^\\]]*\\]", | ||
[ | [d]=mc, | ||
[ | [f]={"034baf615477",1439247916,"Append options for vectorization when pointer checking threshold is exceeded.\n\nFollowing one of the ...","Append options for vectorization when pointer checking threshold is exceeded.\n\nFollowing one of the appended options will allow the loop to be vectorized. We do not include a command line option for modifying the pointer checking threshold because there is no clang-level interface for this currently.\n\nllvm-svn: 244526"}, | ||
[ | [g]={{Lc,839,"void BackendConsumer::OptimizationRemarkHandler(const llvm::OptimizationRemarkAnalysisAliasing &D) {\n // ...\n if (D.shouldAlwaysPrint() || CodeGenOpts.OptimizationRemarkAnalysis.patternMatches(D.getPassName()))\n EmitOptimizationMessage(D, diag::remark_fe_backend_optimization_remark_analysis_aliasing);"}}, | ||
[ | [h]={ | ||
["clang/test/Frontend/optimization-remark-options.c"]={"clang/test/Frontend/optimization-remark-options.c:18:3: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop. If the arrays will always be independent specify \'#pragma clang loop vectorize(assume_safety)\' before the loop or provide the \'__restrict__\' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied! [-Rpass-analysis=loop-vectorize]"} | ["clang/test/Frontend/optimization-remark-options.c"]={"clang/test/Frontend/optimization-remark-options.c:18:3: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop. If the arrays will always be independent specify \'#pragma clang loop vectorize(assume_safety)\' before the loop or provide the \'__restrict__\' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied! [-Rpass-analysis=loop-vectorize]"} | ||
} | } | ||
}, | }, | ||
["remark_fe_backend_optimization_remark_analysis_fpcommute"]={ | ["remark_fe_backend_optimization_remark_analysis_fpcommute"]={ | ||
[ | [m]={vc}, | ||
[l]=vc, | |||
[ | |||
[e]="%0; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop or by providing the compiler option \'-ffast-math\'.", | [e]="%0; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop or by providing the compiler option \'-ffast-math\'.", | ||
[ | [a]=Z, | ||
[b]="(.*?); allow reordering by specifying \'\\#pragma clang loop vectorize\\(enable\\)\' before the loop or by providing the compiler option \'\\-ffast\\-math\'\\.", | [b]="(.*?); allow reordering by specifying \'\\#pragma clang loop vectorize\\(enable\\)\' before the loop or by providing the compiler option \'\\-ffast\\-math\'\\.", | ||
[ | [c]=" \\[[^\\]]*\\-Rpass\\-analysis[^\\]]*\\]", | ||
[ | [d]=mc, | ||
[ | [f]={"8a0925cb627c",1439236600,"Append options for floating-point commutivity when related diagnostics are produced.\n\nWith this patc...","Append options for floating-point commutivity when related diagnostics are produced.\n\nWith this patch clang appends the command line options that would allow vectorization when floating-point commutativity is required. Specifically those are enabling fast-math or specifying a loop hint. \n\nllvm-svn: 244492"}, | ||
[ | [g]={{Lc,827,"void BackendConsumer::OptimizationRemarkHandler(const llvm::OptimizationRemarkAnalysisFPCommute &D) {\n // ...\n if (D.shouldAlwaysPrint() || CodeGenOpts.OptimizationRemarkAnalysis.patternMatches(D.getPassName()))\n EmitOptimizationMessage(D, diag::remark_fe_backend_optimization_remark_analysis_fpcommute);"}}, | ||
[ | [h]={ | ||
["clang/test/Frontend/optimization-remark-options.c"]={"clang/test/Frontend/optimization-remark-options.c:10:11: remark: loop not vectorized: cannot prove it is safe to reorder floating-point operations; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop or by providing the compiler option \'-ffast-math\'. [-Rpass-analysis=loop-vectorize]"} | ["clang/test/Frontend/optimization-remark-options.c"]={"clang/test/Frontend/optimization-remark-options.c:10:11: remark: loop not vectorized: cannot prove it is safe to reorder floating-point operations; allow reordering by specifying \'#pragma clang loop vectorize(enable)\' before the loop or by providing the compiler option \'-ffast-math\'. [-Rpass-analysis=loop-vectorize]"} | ||
} | } | ||
}, | }, | ||
["remark_fe_backend_optimization_remark_missed"]={ | ["remark_fe_backend_optimization_remark_missed"]={ | ||
[ | [m]={"pass-missed"}, | ||
[l]="pass-missed", | |||
[e]=Hc, | |||
[a]=Z, | |||
[b]=Ic, | |||
[ | [c]=" \\[[^\\]]*\\-Rpass\\-missed[^\\]]*\\]", | ||
[e]= | [d]=mc, | ||
[ | [f]={"d23ec94393bf",1401393306,"Add flags -Rpass-missed and -Rpass-analysis.\n\nSummary:\nThese two flags are in the same family as -Rp...","Add flags -Rpass-missed and -Rpass-analysis.\n\nSummary:\nThese two flags are in the same family as -Rpass, but are used in\ndifferent situations.\n\n-Rpass-missed is used by optimizers to inform the user when they tried\nto apply an optimization but couldn\'t (or wouldn\'t).\n\n-Rpass-analysis is used by optimizers to report analysis results back\nto the user (e.g., why the transformation could not be applied).\n\nDepends on D3682.\n\nReviewers: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D3683\n\nllvm-svn: 209839"}, | ||
[b]= | [g]={{Lc,803,"void BackendConsumer::OptimizationRemarkHandler(const llvm::DiagnosticInfoOptimizationBase &D) {\n // ...\n if (D.isPassed()) {\n // ...\n } else if (D.isMissed()) {\n // Missed optimization remarks are active only if the -Rpass-missed\n // flag has a regular expression that matches the name of the pass\n // name in \\p D.\n if (CodeGenOpts.OptimizationRemarkMissed.patternMatches(D.getPassName()))\n EmitOptimizationMessage(D, diag::remark_fe_backend_optimization_remark_missed);"}} | ||
[ | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["remark_fe_backend_plugin"]={ | ["remark_fe_backend_plugin"]={ | ||
[ | [m]={"remark-backend-plugin"}, | ||
[l]="remark-backend-plugin", | |||
[e]=Hc, | |||
[a]=Z, | |||
[b]=Ic, | |||
[ | [c]=" \\[[^\\]]*\\-Rremark\\-backend\\-plugin[^\\]]*\\]", | ||
[e]= | [d]=mc, | ||
[ | [f]={"741602461d20",1393578668,"Add \'remark\' diagnostic type in \'clang\'\n\nA \'remark\' is information that is not an error or a warning...","Add \'remark\' diagnostic type in \'clang\'\n\nA \'remark\' is information that is not an error or a warning, but rather some\nadditional information provided to the user. In contrast to a \'note\' a \'remark\'\nis an independent diagnostic, whereas a \'note\' always depends on another\ndiagnostic.\n\nA typical use case for remark nodes is information provided to the user, e.g.\ninformation provided by the vectorizer about loops that have been vectorized.\n\nThis patch provides the initial implementation of \'remarks\'. It includes the\nactual definiton of the remark nodes, their printing as well as basic parameter\nhandling. We are reusing the existing diagnostic parameters which means a remark\ncan be enabled with normal \'-Wdiagnostic-name\' flags and can be upgraded to\nan error using \'-Werror=diagnostic-name\'. \'-Werror\' alone does not upgrade\nremarks.\n\nThis patch is by intention minimal in terms of parameter handling. More\nexperience and more discussions will most likely lead to further enhancements\nin the parameter handling.\n\nllvm-svn: 202475"} | ||
[b]= | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["remark_module_build"]={ | ["remark_module_build"]={ | ||
[ | [m]={Wb}, | ||
[l]=Wb, | |||
[ | |||
[e]="building module \'%0\' as \'%1\'", | [e]="building module \'%0\' as \'%1\'", | ||
[ | [a]=Z, | ||
[b]="building module \'(.*?)\' as \'(.*?)\'", | [b]="building module \'(.*?)\' as \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-build[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"c95e56488d44",1399588562,"Switch Wmodule-build to a remark\n\nOn reflection, this is better despite the missing command-line han...","Switch Wmodule-build to a remark\n\nOn reflection, this is better despite the missing command-line handling\nbits for remarks. Making this a remark makes it much clearer that\nthis is purely informational and avoids the negative connotations of a\n\'warning\'.\n\nllvm-svn: 208367"}, | ||
[ | [g]={{uc,1259,"/// Compile a module file for the given module, using the options\n/// provided by the importing compiler instance. Returns true if the module\n/// was built without errors.\nstatic bool compileModuleImpl(\n // ...\n ImportingInstance.getDiagnostics().Report(ImportLoc, diag::remark_module_build) << ModuleName << ModuleFileName;"}} | ||
}, | }, | ||
["remark_module_build_done"]={ | ["remark_module_build_done"]={ | ||
[ | [m]={Wb}, | ||
[l]=Wb, | |||
[ | |||
[e]="finished building module \'%0\'", | [e]="finished building module \'%0\'", | ||
[ | [a]=Z, | ||
[b]="finished building module \'(.*?)\'", | [b]="finished building module \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-build[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"99891da71a88",1413252510,"Extend -Rmodule-build to also remark when module building finishes.\n\nIn cases of nested module build...","Extend -Rmodule-build to also remark when module building finishes.\n\nIn cases of nested module builds, or when you care how long module builds take,\nthis information was not previously easily available / obvious.\n\nllvm-svn: 219658"}, | ||
[ | [g]={{uc,1276,"/// Compile a module file for the given module, using the options\n/// provided by the importing compiler instance. Returns true if the module\n/// was built without errors.\nstatic bool compileModuleImpl(\n // ...\n ImportingInstance.getDiagnostics().Report(ImportLoc, diag::remark_module_build_done) << ModuleName;"}} | ||
}, | }, | ||
["remark_module_import"]={ | ["remark_module_import"]={ | ||
[ | [m]={"module-import"}, | ||
[l]="module-import", | |||
[ | |||
[e]="importing module \'%0\'%select{| into \'%3\'}2 from \'%1\'", | [e]="importing module \'%0\'%select{| into \'%3\'}2 from \'%1\'", | ||
[ | [a]=Z, | ||
[b]="importing module \'(.*?)\'(?:| into \'(.*?)\') from \'(.*?)\'", | [b]="importing module \'(.*?)\'(?:| into \'(.*?)\') from \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-import[^\\]]*\\]", | ||
[ | [d]="AST Deserialization Issue", | ||
[ | [f]={"9dda8f540c8e",1551840646,"Modules: Add -Rmodule-import\n\nAdd a remark for importing modules. Depending on whether this is a\ndi...","Modules: Add -Rmodule-import\n\nAdd a remark for importing modules. Depending on whether this is a\ndirect import (into the TU being built by this compiler instance) or\ntransitive import (into an already-imported module), the diagnostic has\ntwo forms:\n\n importing module \'Foo\' from \'path/to/Foo.pcm\'\n importing module \'Foo\' into \'Bar\' from \'path/to/Foo.pcm\'\n\nAlso drop a redundant FileCheck invocation in Rmodule-build.m that was\nusing -Reverything, since the notes from -Rmodule-import were confusing\nit.\n\nhttps://reviews.llvm.org/D58891\n\nllvm-svn: 355477"}, | ||
[ | [g]={{ac,2975,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case MODULE_NAME:\n // ...\n Diag(diag::remark_module_import) << F.ModuleName << F.FileName << (ImportedBy ? true : false) << (ImportedBy ? StringRef(ImportedBy->ModuleName) : StringRef());"},{ac,4592,"ASTReader::ASTReadResult ASTReader::ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, SmallVectorImpl<ImportedModule> &Loaded, off_t ExpectedSize, time_t ExpectedModTime, ASTFileSignature ExpectedSignature, unsigned ClientLoadCapabilities) {\n // ...\n case ModuleManager::AlreadyLoaded:\n Diag(diag::remark_module_import) << M->ModuleName << M->FileName << (ImportedBy ? true : false) << (ImportedBy ? StringRef(ImportedBy->ModuleName) : StringRef());"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/Rmodule-import.m"]={"clang/test/Modules/Rmodule-import.m:16:2: remark: importing module \'A\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/A.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:16:2: remark: importing module \'B\' into \'A\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/B.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:16:2: remark: importing module \'C\' into \'B\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/C.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:34:2: remark: importing module \'B\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/B.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:37:2: remark: importing module \'C\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/C.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:40:2: remark: importing module \'D\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/D.pcm\' [-Rmodule-import]"} | ["clang/test/Modules/Rmodule-import.m"]={"clang/test/Modules/Rmodule-import.m:16:2: remark: importing module \'A\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/A.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:16:2: remark: importing module \'B\' into \'A\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/B.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:16:2: remark: importing module \'C\' into \'B\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/C.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:34:2: remark: importing module \'B\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/B.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:37:2: remark: importing module \'C\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/C.pcm\' [-Rmodule-import]","clang/test/Modules/Rmodule-import.m:40:2: remark: importing module \'D\' from \'/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/build/tools/clang/test/Modules/Output/Rmodule-import.m.tmp2/D.pcm\' [-Rmodule-import]"} | ||
} | } | ||
}, | }, | ||
["remark_module_lock"]={ | ["remark_module_lock"]={ | ||
[ | [m]={"module-lock"}, | ||
[l]="module-lock", | |||
[ | |||
[e]="locking \'%0\' to build module \'%1\'", | [e]="locking \'%0\' to build module \'%1\'", | ||
[ | [a]=Z, | ||
[b]="locking \'(.*?)\' to build module \'(.*?)\'", | [b]="locking \'(.*?)\' to build module \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-lock[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"b714f73defc8",1611802254,"Frontend: Add -f{,no-}implicit-modules-uses-lock and -Rmodule-lock\n\nAdd -cc1 flags `-fmodules-uses-l...","Frontend: Add -f{,no-}implicit-modules-uses-lock and -Rmodule-lock\n\nAdd -cc1 flags `-fmodules-uses-lock` and `-fno-modules-uses-lock` to\nallow the lock manager to be turned off when building implicit modules.\n\nAdd `-Rmodule-lock` so that we can see when it\'s being used.\n\nDifferential Revision: https://reviews.llvm.org/D95583"}, | ||
[ | [g]={{uc,1441,"/// Compile a module in a separate compiler instance and read the AST,\n/// returning true if the module compiles without errors, using a lock manager\n/// to avoid building the same module in multiple compiler instances.\n///\n/// Uses a lock file manager and exponential backoff to reduce the chances that\n/// multiple instances will compete to create the same module. On timeout,\n/// deletes the lock file in order to avoid deadlock from crashing processes or\n/// bugs in the lock file manager.\nstatic bool compileModuleAndReadASTBehindLock(CompilerInstance &ImportingInstance, SourceLocation ImportLoc, SourceLocation ModuleNameLoc, Module *Module, StringRef ModuleFileName) {\n // ...\n Diags.Report(ModuleNameLoc, diag::remark_module_lock) << ModuleFileName << Module->Name;"}} | ||
}, | }, | ||
["remark_module_lock_failure"]={ | ["remark_module_lock_failure"]={ | ||
[ | [m]={Wb}, | ||
[l]=Wb, | |||
[ | |||
[e]="could not acquire lock file for module \'%0\': %1", | [e]="could not acquire lock file for module \'%0\': %1", | ||
[ | [a]=Z, | ||
[b]="could not acquire lock file for module \'(.*?)\'\\: (.*?)", | [b]="could not acquire lock file for module \'(.*?)\'\\: (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-build[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"5a0af1fcd16e",1489796778,"[Modules] In case of lock timeout, fallback and build module\n\nDuncan\'s r298165 introduced the PCMCac...","[Modules] In case of lock timeout, fallback and build module\n\nDuncan\'s r298165 introduced the PCMCache mechanism, which guarantees\nthat locks aren\'t necessary anymore for correctness but only for\nperformance, by avoiding building it twice when possible.\n\nChange the logic to avoid an error but actually build the module in case\nthe timeout happens. Instead of an error, still emit a remark for\ndebugging purposes.\n\nrdar://problem/30297862\n\nllvm-svn: 298175"}, | ||
[ | [g]={{uc,1456,"/// Compile a module in a separate compiler instance and read the AST,\n/// returning true if the module compiles without errors, using a lock manager\n/// to avoid building the same module in multiple compiler instances.\n///\n/// Uses a lock file manager and exponential backoff to reduce the chances that\n/// multiple instances will compete to create the same module. On timeout,\n/// deletes the lock file in order to avoid deadlock from crashing processes or\n/// bugs in the lock file manager.\nstatic bool compileModuleAndReadASTBehindLock(CompilerInstance &ImportingInstance, SourceLocation ImportLoc, SourceLocation ModuleNameLoc, Module *Module, StringRef ModuleFileName) {\n // ...\n while (true) {\n // ...\n case llvm::LockFileManager::LFS_Error:\n // ...\n Diags.Report(ModuleNameLoc, diag::remark_module_lock_failure) << Module->Name << Locked.getErrorMessage();"}} | ||
}, | }, | ||
["remark_module_lock_timeout"]={ | ["remark_module_lock_timeout"]={ | ||
[ | [m]={Wb}, | ||
[l]=Wb, | |||
[ | |||
[e]="timed out waiting to acquire lock file for module \'%0\'", | [e]="timed out waiting to acquire lock file for module \'%0\'", | ||
[ | [a]=Z, | ||
[b]="timed out waiting to acquire lock file for module \'(.*?)\'", | [b]="timed out waiting to acquire lock file for module \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-build[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"5a0af1fcd16e",1489796778,"[Modules] In case of lock timeout, fallback and build module\n\nDuncan\'s r298165 introduced the PCMCac...","[Modules] In case of lock timeout, fallback and build module\n\nDuncan\'s r298165 introduced the PCMCache mechanism, which guarantees\nthat locks aren\'t necessary anymore for correctness but only for\nperformance, by avoiding building it twice when possible.\n\nChange the logic to avoid an error but actually build the module in case\nthe timeout happens. Instead of an error, still emit a remark for\ndebugging purposes.\n\nrdar://problem/30297862\n\nllvm-svn: 298175"}, | ||
[ | [g]={{uc,1481,"/// Compile a module in a separate compiler instance and read the AST,\n/// returning true if the module compiles without errors, using a lock manager\n/// to avoid building the same module in multiple compiler instances.\n///\n/// Uses a lock file manager and exponential backoff to reduce the chances that\n/// multiple instances will compete to create the same module. On timeout,\n/// deletes the lock file in order to avoid deadlock from crashing processes or\n/// bugs in the lock file manager.\nstatic bool compileModuleAndReadASTBehindLock(CompilerInstance &ImportingInstance, SourceLocation ImportLoc, SourceLocation ModuleNameLoc, Module *Module, StringRef ModuleFileName) {\n // ...\n while (true) {\n // ...\n case llvm::LockFileManager::Res_Timeout:\n // ...\n Diags.Report(ModuleNameLoc, diag::remark_module_lock_timeout) << Module->Name;"}} | ||
}, | }, | ||
["remark_pp_include_directive_modular_translation"]={ | ["remark_pp_include_directive_modular_translation"]={ | ||
[ | [m]={"module-include-translation"}, | ||
[l]="module-include-translation", | |||
[ | |||
[e]="treating #%select{include|import|include_next|__include_macros}0 as an import of module \'%1\'", | [e]="treating #%select{include|import|include_next|__include_macros}0 as an import of module \'%1\'", | ||
[ | [a]=Z, | ||
[b]="treating \\#(?:include|import|include_next|__include_macros) as an import of module \'(.*?)\'", | [b]="treating \\#(?:include|import|include_next|__include_macros) as an import of module \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rmodule\\-include\\-translation[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{N,1858,"/// Produce a diagnostic informing the user that a #include or similar\n/// was implicitly treated as a module import.\nstatic void diagnoseAutoModuleImport(Preprocessor &PP, SourceLocation HashLoc, Token &IncludeTok, ArrayRef<std::pair<IdentifierInfo *, SourceLocation>> Path, SourceLocation PathEnd) {\n // ...\n PP.Diag(HashLoc, diag::remark_pp_include_directive_modular_translation) << IncludeKind << PathString;"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/subframeworks.m"]={"clang/test/Modules/Inputs/HasSubModules.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h:1:1: remark: treating #include as an import of module \'HasSubModules.Sub.Types\' [-Rmodule-include-translation]"} | ["clang/test/Modules/subframeworks.m"]={"clang/test/Modules/Inputs/HasSubModules.framework/Frameworks/Sub.framework/PrivateHeaders/SubPriv.h:1:1: remark: treating #include as an import of module \'HasSubModules.Sub.Types\' [-Rmodule-include-translation]"} | ||
} | } | ||
}, | }, | ||
["remark_pp_search_path_usage"]={ | ["remark_pp_search_path_usage"]={ | ||
[ | [m]={"search-path-usage"}, | ||
[l]="search-path-usage", | |||
[ | |||
[e]="search path used: \'%0\'", | [e]="search path used: \'%0\'", | ||
[ | [a]=Z, | ||
[b]="search path used\\: \'(.*?)\'", | [b]="search path used\\: \'(.*?)\'", | ||
[ | [c]=" \\[[^\\]]*\\-Rsearch\\-path\\-usage[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{"clang/lib/Lex/HeaderSearch.cpp",744,"void HeaderSearch::noteLookupUsage(unsigned HitIdx, SourceLocation Loc) {\n // ...\n if (UserEntryIdxIt != SearchDirToHSEntry.end())\n Diags.Report(Loc, diag::remark_pp_search_path_usage) << HSOpts->UserEntries[UserEntryIdxIt->second].Path;"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/search-path-usage.m"]={"clang/test/Preprocessor/search-path-usage.m:127:19: remark: search path used: \'build/tools/clang/test/Preprocessor/Output/search-path-usage.m.tmp/b-missing.hmap\' [-Rsearch-path-usage]"} | ["clang/test/Preprocessor/search-path-usage.m"]={"clang/test/Preprocessor/search-path-usage.m:127:19: remark: search path used: \'build/tools/clang/test/Preprocessor/Output/search-path-usage.m.tmp/b-missing.hmap\' [-Rsearch-path-usage]"} | ||
} | } | ||
}, | }, | ||
["remark_sanitize_address_insert_extra_padding_accepted"]={ | ["remark_sanitize_address_insert_extra_padding_accepted"]={ | ||
[ | [m]={"sanitize-address"}, | ||
[l]="sanitize-address", | |||
[ | |||
[e]="-fsanitize-address-field-padding applied to %0", | [e]="-fsanitize-address-field-padding applied to %0", | ||
[ | [a]=Z, | ||
[b]="\\-fsanitize\\-address\\-field\\-padding applied to (.*?)", | [b]="\\-fsanitize\\-address\\-field\\-padding applied to (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Rsanitize\\-address[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"293dc9be6e36",1413492892,"Insert poisoned paddings between fields in C++ classes so that AddressSanitizer can find intra-objec...","Insert poisoned paddings between fields in C++ classes so that AddressSanitizer can find intra-object-overflow bugs\n\nSummary:\nThe general approach is to add extra paddings after every field\nin AST/RecordLayoutBuilder.cpp, then add code to CTORs/DTORs that poisons the paddings\n(CodeGen/CGClass.cpp).\n\nEverything is done under the flag -fsanitize-address-field-padding. \nThe blacklist file (-fsanitize-blacklist) allows to avoid the transformation \nfor given classes or source files. \n\nSee also https://code.google.com/p/address-sanitizer/wiki/IntraObjectOverflow\n\nTest Plan: run SPEC2006 and some of the Chromium tests with -fsanitize-address-field-padding\n\nReviewers: samsonov, rnk, rsmith\n\nReviewed By: rsmith\n\nSubscribers: majnemer, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D5687\n\nllvm-svn: 219961"}, | ||
[ | [g]={{"clang/lib/AST/Decl.cpp",5004,"bool RecordDecl::mayInsertExtraPadding(bool EmitRemark) const {\n // ...\n if (EmitRemark) {\n if (ReasonToReject >= 0)\n // ...\n else\n Context.getDiagnostics().Report(getLocation(), diag::remark_sanitize_address_insert_extra_padding_accepted) << getQualifiedNameAsString();"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/sanitize-address-field-padding.cpp"]={"clang/test/CodeGen/sanitize-address-field-padding.cpp:28:7: remark: -fsanitize-address-field-padding applied to Positive1 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:48:7: remark: -fsanitize-address-field-padding applied to ClassWithVirtualBase [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:60:7: remark: -fsanitize-address-field-padding applied to WithFlexibleArray1 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:73:7: remark: -fsanitize-address-field-padding applied to WithFlexibleArray2 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:82:7: remark: -fsanitize-address-field-padding applied to WithFlexibleArray3 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:199:8: remark: -fsanitize-address-field-padding applied to WithVirtualDtor [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:203:8: remark: -fsanitize-address-field-padding applied to InheritsFrom_WithVirtualDtor [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:224:8: remark: -fsanitize-address-field-padding applied to ClassWithTrivialCopy [-Rsanitize-address]"} | ["clang/test/CodeGen/sanitize-address-field-padding.cpp"]={"clang/test/CodeGen/sanitize-address-field-padding.cpp:28:7: remark: -fsanitize-address-field-padding applied to Positive1 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:48:7: remark: -fsanitize-address-field-padding applied to ClassWithVirtualBase [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:60:7: remark: -fsanitize-address-field-padding applied to WithFlexibleArray1 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:73:7: remark: -fsanitize-address-field-padding applied to WithFlexibleArray2 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:82:7: remark: -fsanitize-address-field-padding applied to WithFlexibleArray3 [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:199:8: remark: -fsanitize-address-field-padding applied to WithVirtualDtor [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:203:8: remark: -fsanitize-address-field-padding applied to InheritsFrom_WithVirtualDtor [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:224:8: remark: -fsanitize-address-field-padding applied to ClassWithTrivialCopy [-Rsanitize-address]"} | ||
} | } | ||
}, | }, | ||
["remark_sanitize_address_insert_extra_padding_rejected"]={ | ["remark_sanitize_address_insert_extra_padding_rejected"]={ | ||
[ | [m]={"sanitize-address"}, | ||
[l]="sanitize-address", | |||
[ | |||
[e]="-fsanitize-address-field-padding ignored for %0 because it %select{is not C++|is packed|is a union|is trivially copyable|has trivial destructor|is standard layout|is in a ignorelisted file|is ignorelisted}1", | [e]="-fsanitize-address-field-padding ignored for %0 because it %select{is not C++|is packed|is a union|is trivially copyable|has trivial destructor|is standard layout|is in a ignorelisted file|is ignorelisted}1", | ||
[ | [a]=Z, | ||
[b]="\\-fsanitize\\-address\\-field\\-padding ignored for (.*?) because it (?:is not C\\+\\+|is packed|is a union|is trivially copyable|has trivial destructor|is standard layout|is in a ignorelisted file|is ignorelisted)", | [b]="\\-fsanitize\\-address\\-field\\-padding ignored for (.*?) because it (?:is not C\\+\\+|is packed|is a union|is trivially copyable|has trivial destructor|is standard layout|is in a ignorelisted file|is ignorelisted)", | ||
[ | [c]=" \\[[^\\]]*\\-Rsanitize\\-address[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"293dc9be6e36",1413492892,"Insert poisoned paddings between fields in C++ classes so that AddressSanitizer can find intra-objec...","Insert poisoned paddings between fields in C++ classes so that AddressSanitizer can find intra-object-overflow bugs\n\nSummary:\nThe general approach is to add extra paddings after every field\nin AST/RecordLayoutBuilder.cpp, then add code to CTORs/DTORs that poisons the paddings\n(CodeGen/CGClass.cpp).\n\nEverything is done under the flag -fsanitize-address-field-padding. \nThe blacklist file (-fsanitize-blacklist) allows to avoid the transformation \nfor given classes or source files. \n\nSee also https://code.google.com/p/address-sanitizer/wiki/IntraObjectOverflow\n\nTest Plan: run SPEC2006 and some of the Chromium tests with -fsanitize-address-field-padding\n\nReviewers: samsonov, rnk, rsmith\n\nReviewed By: rsmith\n\nSubscribers: majnemer, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D5687\n\nllvm-svn: 219961"}, | ||
[ | [g]={{"clang/lib/AST/Decl.cpp",4999,"bool RecordDecl::mayInsertExtraPadding(bool EmitRemark) const {\n // ...\n if (EmitRemark) {\n if (ReasonToReject >= 0)\n Context.getDiagnostics().Report(getLocation(), diag::remark_sanitize_address_insert_extra_padding_rejected) << getQualifiedNameAsString() << ReasonToReject;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/sanitize-address-field-padding.cpp"]={"clang/test/CodeGen/sanitize-address-field-padding.cpp:28:7: remark: -fsanitize-address-field-padding ignored for Positive1 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:44:8: remark: -fsanitize-address-field-padding ignored for VirtualBase because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:48:7: remark: -fsanitize-address-field-padding ignored for ClassWithVirtualBase because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:60:7: remark: -fsanitize-address-field-padding ignored for WithFlexibleArray1 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:73:7: remark: -fsanitize-address-field-padding ignored for WithFlexibleArray2 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:82:7: remark: -fsanitize-address-field-padding ignored for WithFlexibleArray3 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:91:7: remark: -fsanitize-address-field-padding ignored for Negative1 because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:99:7: remark: -fsanitize-address-field-padding ignored for Negative2 because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:108:7: remark: -fsanitize-address-field-padding ignored for Negative3 because it is a union [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:116:7: remark: -fsanitize-address-field-padding ignored for Negative4 because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:129:31: remark: -fsanitize-address-field-padding ignored for Negative5 because it is packed [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:144:7: remark: -fsanitize-address-field-padding ignored for SomeNamespace::IgnorelistedByName because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:158:7: remark: -fsanitize-address-field-padding ignored for ExternCStruct because it is not C++ [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:199:8: remark: -fsanitize-address-field-padding ignored for WithVirtualDtor because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:203:8: remark: -fsanitize-address-field-padding ignored for InheritsFrom_WithVirtualDtor because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:224:8: remark: -fsanitize-address-field-padding ignored for ClassWithTrivialCopy because it is in a ignorelisted file [-Rsanitize-address]"} | ["clang/test/CodeGen/sanitize-address-field-padding.cpp"]={"clang/test/CodeGen/sanitize-address-field-padding.cpp:28:7: remark: -fsanitize-address-field-padding ignored for Positive1 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:44:8: remark: -fsanitize-address-field-padding ignored for VirtualBase because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:48:7: remark: -fsanitize-address-field-padding ignored for ClassWithVirtualBase because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:60:7: remark: -fsanitize-address-field-padding ignored for WithFlexibleArray1 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:73:7: remark: -fsanitize-address-field-padding ignored for WithFlexibleArray2 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:82:7: remark: -fsanitize-address-field-padding ignored for WithFlexibleArray3 because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:91:7: remark: -fsanitize-address-field-padding ignored for Negative1 because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:99:7: remark: -fsanitize-address-field-padding ignored for Negative2 because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:108:7: remark: -fsanitize-address-field-padding ignored for Negative3 because it is a union [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:116:7: remark: -fsanitize-address-field-padding ignored for Negative4 because it is trivially copyable [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:129:31: remark: -fsanitize-address-field-padding ignored for Negative5 because it is packed [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:144:7: remark: -fsanitize-address-field-padding ignored for SomeNamespace::IgnorelistedByName because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:158:7: remark: -fsanitize-address-field-padding ignored for ExternCStruct because it is not C++ [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:199:8: remark: -fsanitize-address-field-padding ignored for WithVirtualDtor because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:203:8: remark: -fsanitize-address-field-padding ignored for InheritsFrom_WithVirtualDtor because it is in a ignorelisted file [-Rsanitize-address]","clang/test/CodeGen/sanitize-address-field-padding.cpp:224:8: remark: -fsanitize-address-field-padding ignored for ClassWithTrivialCopy because it is in a ignorelisted file [-Rsanitize-address]"} | ||
} | } | ||
}, | }, | ||
["remark_sloc_usage"]={ | ["remark_sloc_usage"]={ | ||
[ | [m]={"sloc-usage"}, | ||
[l]="sloc-usage", | |||
[ | |||
[e]="source manager location address space usage:", | [e]="source manager location address space usage:", | ||
[ | [a]=Z, | ||
[b]="source manager location address space usage\\:", | [b]="source manager location address space usage\\:", | ||
[ | [c]=" \\[[^\\]]*\\-Rsloc\\-usage[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"9e52db182794",1668037554,"When we run out of source locations, try to produce useful information\nindicating why we ran out.","When we run out of source locations, try to produce useful information\nindicating why we ran out."}, | ||
[ | [g]={{Tb,1202,"struct PragmaDebugHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &DebugToken) override {\n // ...\n if (II->isStr(\"assert\")) {\n // ...\n } else if (II->isStr(\"crash\")) {\n // ...\n } else if (II->isStr(\"parser_crash\")) {\n // ...\n } else if (II->isStr(\"dump\")) {\n // ...\n } else if (II->isStr(\"diag_mapping\")) {\n // ...\n } else if (II->isStr(\"llvm_fatal_error\")) {\n // ...\n } else if (II->isStr(\"llvm_unreachable\")) {\n // ...\n } else if (II->isStr(\"macro\")) {\n // ...\n } else if (II->isStr(\"module_map\")) {\n // ...\n } else if (II->isStr(\"overflow_stack\")) {\n // ...\n } else if (II->isStr(\"captured\")) {\n // ...\n } else if (II->isStr(\"modules\")) {\n // ...\n } else if (II->isStr(\"sloc_usage\")) {\n // ...\n PP.Diag(Tok, diag::remark_sloc_usage);"},{ac,3487,"llvm::Error ASTReader::ReadASTBlock(ModuleFile &F, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case SOURCE_LOCATION_OFFSETS: {\n // ...\n if (!F.SLocEntryBaseID) {\n if (!Diags.isDiagnosticInFlight()) {\n Diags.Report(SourceLocation(), diag::remark_sloc_usage);"}}, | ||
[ | [h]={ | ||
["clang/test/Misc/sloc-usage.cpp"]={"clang/test/Misc/sloc-usage.cpp:10:23: remark: source manager location address space usage: [-Rsloc-usage]"} | ["clang/test/Misc/sloc-usage.cpp"]={"clang/test/Misc/sloc-usage.cpp:10:23: remark: source manager location address space usage: [-Rsloc-usage]"} | ||
} | } | ||
}, | }, | ||
["trigraph_converted"]={ | ["trigraph_converted"]={ | ||
[ | [m]={O,V,eb,Rb}, | ||
[l]=Rb, | |||
[ | |||
[e]="trigraph converted to \'%0\' character", | [e]="trigraph converted to \'%0\' character", | ||
[ | [a]=n, | ||
[b]="trigraph converted to \'(.*?)\' character", | [b]="trigraph converted to \'(.*?)\' character", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtrigraphs[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{cb,1210,"/// DecodeTrigraphChar - If the specified character is a legal trigraph when\n/// prefixed with ??, emit a trigraph warning. If trigraphs are enabled,\n/// return the result character. Finally, emit a warning about trigraph use\n/// whether trigraphs are enabled or not.\nstatic char DecodeTrigraphChar(const char *CP, Lexer *L, bool Trigraphs) {\n // ...\n if (L && !L->isLexingRawMode())\n L->Diag(CP - 2, diag::trigraph_converted) << StringRef(&Res, 1);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/constants.c"]={"clang/test/Lexer/constants.c:28:4: warning: trigraph converted to \'|\' character [-Wtrigraphs]"} | ["clang/test/Lexer/constants.c"]={"clang/test/Lexer/constants.c:28:4: warning: trigraph converted to \'|\' character [-Wtrigraphs]"} | ||
} | } | ||
}, | }, | ||
["trigraph_ends_block_comment"]={ | ["trigraph_ends_block_comment"]={ | ||
[ | [m]={O,V,eb,Rb}, | ||
[l]=Rb, | |||
[ | |||
[e]="trigraph ends block comment", | [e]="trigraph ends block comment", | ||
[ | [a]=n, | ||
[b]="trigraph ends block comment", | [b]="trigraph ends block comment", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtrigraphs[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{cb,2690,"/// isBlockCommentEndOfEscapedNewLine - Return true if the specified newline\n/// character (either \\\\n or \\\\r) is part of an escaped newline sequence. Issue\n/// a diagnostic if so. We know that the newline is inside of a block comment.\nstatic bool isEndOfBlockCommentWithEscapedNewLine(const char *CurPtr, Lexer *L, bool Trigraphs) {\n // ...\n if (TrigraphPos) {\n // ...\n if (!L->isLexingRawMode())\n L->Diag(TrigraphPos, diag::trigraph_ends_block_comment);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/block_cmt_end.c"]={"clang/test/Lexer/block_cmt_end.c:26:168: warning: trigraph ends block comment [-Wtrigraphs]","clang/test/Lexer/block_cmt_end.c:39:1: warning: trigraph ends block comment [-Wtrigraphs]"} | ["clang/test/Lexer/block_cmt_end.c"]={"clang/test/Lexer/block_cmt_end.c:26:168: warning: trigraph ends block comment [-Wtrigraphs]","clang/test/Lexer/block_cmt_end.c:39:1: warning: trigraph ends block comment [-Wtrigraphs]"} | ||
} | } | ||
}, | }, | ||
["trigraph_ignored"]={ | ["trigraph_ignored"]={ | ||
[ | [m]={O,V,eb,Rb}, | ||
[l]=Rb, | |||
[ | |||
[e]="trigraph ignored", | [e]="trigraph ignored", | ||
[ | [a]=n, | ||
[b]="trigraph ignored", | [b]="trigraph ignored", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtrigraphs[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{cb,1205,"/// DecodeTrigraphChar - If the specified character is a legal trigraph when\n/// prefixed with ??, emit a trigraph warning. If trigraphs are enabled,\n/// return the result character. Finally, emit a warning about trigraph use\n/// whether trigraphs are enabled or not.\nstatic char DecodeTrigraphChar(const char *CP, Lexer *L, bool Trigraphs) {\n // ...\n if (!Trigraphs) {\n if (L && !L->isLexingRawMode())\n L->Diag(CP - 2, diag::trigraph_ignored);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx2a-nttp-printing.cpp"]={"clang/test/SemaCXX/cxx2a-nttp-printing.cpp:31:14: warning: trigraph ignored [-Wtrigraphs]"} | ["clang/test/SemaCXX/cxx2a-nttp-printing.cpp"]={"clang/test/SemaCXX/cxx2a-nttp-printing.cpp:31:14: warning: trigraph ignored [-Wtrigraphs]"} | ||
} | } | ||
}, | }, | ||
["trigraph_ignored_block_comment"]={ | ["trigraph_ignored_block_comment"]={ | ||
[ | [m]={O,V,eb,Rb}, | ||
[l]=Rb, | |||
[ | |||
[e]="ignored trigraph would end block comment", | [e]="ignored trigraph would end block comment", | ||
[ | [a]=n, | ||
[b]="ignored trigraph would end block comment", | [b]="ignored trigraph would end block comment", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtrigraphs[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{cb,2686,"/// isBlockCommentEndOfEscapedNewLine - Return true if the specified newline\n/// character (either \\\\n or \\\\r) is part of an escaped newline sequence. Issue\n/// a diagnostic if so. We know that the newline is inside of a block comment.\nstatic bool isEndOfBlockCommentWithEscapedNewLine(const char *CurPtr, Lexer *L, bool Trigraphs) {\n // ...\n if (TrigraphPos) {\n // If no trigraphs are enabled, warn that we ignored this trigraph and\n // ignore this * character.\n if (!Trigraphs) {\n if (!L->isLexingRawMode())\n L->Diag(TrigraphPos, diag::trigraph_ignored_block_comment);"}} | ||
}, | }, | ||
["warn_O4_is_O3"]={ | ["warn_O4_is_O3"]={ | ||
[ | [m]={zb}, | ||
[l]=zb, | |||
[ | |||
[e]="-O4 is equivalent to -O3", | [e]="-O4 is equivalent to -O3", | ||
[ | [a]=n, | ||
[b]="\\-O4 is equivalent to \\-O3", | [b]="\\-O4 is equivalent to \\-O3", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={"ad70d9683ea7",1377622695,"Warn that -O4 is the same as -O3.\n\nWe error on -O5 and higher. While it is tempting to do the same f...","Warn that -O4 is the same as -O3.\n\nWe error on -O5 and higher. While it is tempting to do the same for -O4, I\nagree with Jordan Rose: we should warn for a release at least first.\n\nllvm-svn: 189369"}, | ||
[ | [g]={{"clang/lib/Driver/ToolChains/Clang.cpp",5075,"void Clang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n // Embed-bitcode option.\n // Only white-listed flags below are allowed to be embedded.\n if (C.getDriver().embedBitcodeInObject() && !IsUsingLTO && (isa<BackendJobAction>(JA) || isa<AssembleJobAction>(JA))) {\n // ...\n // Optimization level for CodeGen.\n if (const Arg *A = Args.getLastArg(options::OPT_O_Group)) {\n if (A->getOption().matches(options::OPT_O4)) {\n // ...\n D.Diag(diag::warn_O4_is_O3);"},{"clang/lib/Driver/ToolChains/Clang.cpp",5932,"#endif\n // ...\n // Manually translate -O4 to -O3; let clang reject others.\n if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {\n if (A->getOption().matches(options::OPT_O4)) {\n // ...\n D.Diag(diag::warn_O4_is_O3);"},{"clang/lib/Driver/ToolChains/Flang.cpp",507,"void Flang::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n // Optimization level for CodeGen.\n if (const Arg *A = Args.getLastArg(options::OPT_O_Group)) {\n if (A->getOption().matches(options::OPT_O4)) {\n // ...\n D.Diag(diag::warn_O4_is_O3);"}} | ||
}, | }, | ||
["warn_abs_too_small"]={ | ["warn_abs_too_small"]={ | ||
[ | [m]={"absolute-value"}, | ||
[l]="absolute-value", | |||
[ | |||
[e]="absolute value function %0 given an argument of type %1 but has parameter of type %2 which may cause truncation of value", | [e]="absolute value function %0 given an argument of type %1 but has parameter of type %2 which may cause truncation of value", | ||
[ | [a]=n, | ||
[b]="absolute value function (.*?) given an argument of type (.*?) but has parameter of type (.*?) which may cause truncation of value", | [b]="absolute value function (.*?) given an argument of type (.*?) but has parameter of type (.*?) which may cause truncation of value", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wabsolute\\-value[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"7eb0b2c1819c",1393377448,"Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups....","Add -Wabsolute-value, warnings about absolute value functions.\n\nThe warnings fall into three groups.\n1) Using an absolute value function of the wrong type, for instance, using the\nint absolute value function when the argument is a floating point type.\n2) Using the improper sized absolute value function, for instance, using abs\nwhen the argument is a long long. llabs should be used instead.\n\nFrom these two cases, an implicit conversion will occur which may cause\nunexpected behavior. Where possible, suggest the proper absolute value\nfunction to use, and which header to include if the function is not available.\n\n3) Taking the absolute value of an unsigned value. In addition to this warning,\nsuggest to remove the function call. This usually indicates a logic error\nsince the programmer assumed negative values would have been possible.\n\nllvm-svn: 202211"}, | ||
[ | [g]={{y,12060,"// Warn when using the wrong abs() function.\nvoid Sema::CheckAbsoluteValueFunction(const CallExpr *Call, const FunctionDecl *FDecl) {\n // ...\n // The argument and parameter are the same kind. Check if they are the right\n // size.\n if (ArgValueKind == ParamValueKind) {\n // ...\n Diag(Call->getExprLoc(), diag::warn_abs_too_small) << FDecl << ArgType << ParamType;"},{"clang/utils/TableGen/ClangDiagnosticsEmitter.cpp",1409,"/// /* DiagArray2 */ diag::warn_abs_too_small,"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:23:9: warning: absolute value function \'abs\' given an argument of type \'long long\' but has parameter of type \'int\' which may cause truncation of value [-Wabsolute-value]"} | ["clang/test/Sema/warn-absolute-value-header.c"]={"clang/test/Sema/warn-absolute-value-header.c:23:9: warning: absolute value function \'abs\' given an argument of type \'long long\' but has parameter of type \'int\' which may cause truncation of value [-Wabsolute-value]"} | ||
} | } | ||
}, | }, | ||
["warn_abstract_final_class"]={ | ["warn_abstract_final_class"]={ | ||
[ | [m]={"abstract-final-class"}, | ||
[l]="abstract-final-class", | |||
[ | |||
[e]="abstract class is marked \'%select{final|sealed}0\'", | [e]="abstract class is marked \'%select{final|sealed}0\'", | ||
[ | [a]=n, | ||
[b]="abstract class is marked \'(?:final|sealed)\'", | [b]="abstract class is marked \'(?:final|sealed)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wabstract\\-final\\-class[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"348df509a0b7",1348197667,"PR13890: Warn on abstract final classes.\n\nllvm-svn: 164359","PR13890: Warn on abstract final classes.\n\nllvm-svn: 164359"}, | ||
[ | [g]={{s,6974,"/// Perform semantic checks on a class definition that has been\n/// completing, introducing implicitly-declared members, checking for\n/// abstract types, etc.\n///\n/// \\param S The scope in which the class was parsed. Null if we didn\'t just\n/// parse a class definition.\n/// \\param Record The completed class.\nvoid Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {\n // ...\n if (Record->isAbstract()) {\n if (FinalAttr *FA = Record->getAttr<FinalAttr>()) {\n Diag(Record->getLocation(), diag::warn_abstract_final_class) << FA->isSpelledAsSealed();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class/p2-0x.cpp"]={"clang/test/CXX/class/p2-0x.cpp:31:8: warning: abstract class is marked \'final\' [-Wabstract-final-class]","clang/test/CXX/class/p2-0x.cpp:34:8: warning: abstract class is marked \'final\' [-Wabstract-final-class]"} | ["clang/test/CXX/class/p2-0x.cpp"]={"clang/test/CXX/class/p2-0x.cpp:31:8: warning: abstract class is marked \'final\' [-Wabstract-final-class]","clang/test/CXX/class/p2-0x.cpp:34:8: warning: abstract class is marked \'final\' [-Wabstract-final-class]"} | ||
} | } | ||
}, | }, | ||
["warn_abstract_vbase_init_ignored"]={ | ["warn_abstract_vbase_init_ignored"]={ | ||
[ | [m]={"abstract-vbase-init"}, | ||
[l]="abstract-vbase-init", | |||
[ | |||
[e]="initializer for virtual base class %0 of abstract class %1 will never be used", | [e]="initializer for virtual base class %0 of abstract class %1 will never be used", | ||
[ | [a]=n, | ||
[b]="initializer for virtual base class (.*?) of abstract class (.*?) will never be used", | [b]="initializer for virtual base class (.*?) of abstract class (.*?) will never be used", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wabstract\\-vbase\\-init[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"bc46e4341e95",1374461816,"Implement DR257 / fix PR16659:\n A constructor for an abstract class does not call constructors for ...","Implement DR257 / fix PR16659:\n A constructor for an abstract class does not call constructors for virtual\n base classes, so it is not an error if no initializer is present for the\n virtual base and the virtual base cannot be default initialized.\n\nAlso provide a (disabled by default, for now) warning for the case where a\nvirtual base class\'s initializer is ignored in an abstract class\'s constructor,\nand address a defect in DR257 where it was not carried through to C++11\'s rules\nfor implicit deletion of special member functions.\n\nBased on a patch by Maurice Bos.\n\nllvm-svn: 186803"}, | ||
[ | [g]={{s,5351,"bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef<CXXCtorInitializer *> Initializers) {\n // ...\n // Push virtual bases before others.\n for (auto &VBase : ClassDecl->vbases()) {\n if (CXXCtorInitializer *Value = Info.AllBaseFields.lookup(VBase.getType()->getAs<RecordType>())) {\n // [class.base.init]p7, per DR257:\n // A mem-initializer where the mem-initializer-id names a virtual base\n // class is ignored during execution of a constructor of any class that\n // is not the most derived class.\n if (ClassDecl->isAbstract()) {\n // ...\n Diag(Value->getSourceLocation(), diag::warn_abstract_vbase_init_ignored) << VBase.getType() << ClassDecl;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/abstract.cpp"]={"clang/test/SemaCXX/abstract.cpp:318:23: warning: initializer for virtual base class \'A\' of abstract class \'RedundantInit\' will never be used [-Wabstract-vbase-init]"} | ["clang/test/SemaCXX/abstract.cpp"]={"clang/test/SemaCXX/abstract.cpp:318:23: warning: initializer for virtual base class \'A\' of abstract class \'RedundantInit\' will never be used [-Wabstract-vbase-init]"} | ||
} | } | ||
}, | }, | ||
["warn_access_decl_deprecated"]={ | ["warn_access_decl_deprecated"]={ | ||
[ | [m]={zb}, | ||
[l]=zb, | |||
[ | |||
[e]="access declarations are deprecated; use using declarations instead", | [e]="access declarations are deprecated; use using declarations instead", | ||
[ | [a]=n, | ||
[b]="access declarations are deprecated; use using declarations instead", | [b]="access declarations are deprecated; use using declarations instead", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={"a009726ce3a0",1260497403,"Implement access declarations. Most of the work here is parsing them, which\nis difficult because th...","Implement access declarations. Most of the work here is parsing them, which\nis difficult because they\'re so terribly, terribly ambiguous.\n\n\nWe implement access declarations in terms of using declarations, which is\nquite reasonable. However, we should really persist the access/using\ndistinction in the AST and use the appropriate name in diagnostics. This\nisn\'t a priority, so I\'ll just file a PR and hope someone else does it. :)\n\nllvm-svn: 91095"}, | ||
[ | [g]={{s,12069,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n // Warn about access declarations.\n if (UsingLoc.isInvalid()) {\n Diag(Name.getBeginLoc(), getLangOpts().CPlusPlus11 ? diag::err_access_decl : diag::warn_access_decl_deprecated) << FixItHint::CreateInsertion(SS.getRange().getBegin(), \"using \");"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/class.access/class.access.dcl/p1.cpp"]={"clang/test/CXX/class.access/class.access.dcl/p1.cpp:29:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:36:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:43:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:50:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:71:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:77:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:84:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:91:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:98:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:142:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:149:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:156:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:163:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:170:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:216:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:223:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:230:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:237:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:244:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:300:14: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:307:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:314:16: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:321:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:329:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:341:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]"} | ["clang/test/CXX/class.access/class.access.dcl/p1.cpp"]={"clang/test/CXX/class.access/class.access.dcl/p1.cpp:29:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:36:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:43:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:50:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:71:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:77:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:84:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:91:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:98:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:142:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:149:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:156:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:163:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:170:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:216:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:223:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:230:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:237:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:244:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:300:14: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:307:11: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:314:16: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:321:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:329:15: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]","clang/test/CXX/class.access/class.access.dcl/p1.cpp:341:8: warning: access declarations are deprecated; use using declarations instead [-Wdeprecated]"} | ||
} | } | ||
}, | }, | ||
["warn_accessor_property_type_mismatch"]={ | ["warn_accessor_property_type_mismatch"]={ | ||
[e]="type of property %0 does not match type of accessor %1", | [e]="type of property %0 does not match type of accessor %1", | ||
[ | [a]=n, | ||
[b]="type of property (.*?) does not match type of accessor (.*?)", | [b]="type of property (.*?) does not match type of accessor (.*?)", | ||
[ | [c]=lb, | ||
[ | [d]=i, | ||
[ | [f]={"b2ab73d93cf5",1241811394,"More type checking for properties, accessors and\nuse of dot-syntax expression. This is to match gcc\'...","More type checking for properties, accessors and\nuse of dot-syntax expression. This is to match gcc\'s.\n\nllvm-svn: 71243"}, | ||
[ | [g]={{x,1742,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n Diag(Loc, diag::warn_accessor_property_type_mismatch) << property->getDeclName() << GetterMethod->getSelector();"},{x,2452,"/// ProcessPropertyDecl - Make sure that any user-defined setter/getter methods\n/// have the property type and issue diagnostics if they don\'t.\n/// Also synthesize a getter/setter method if none exist (and update the\n/// appropriate lookup tables.\nvoid Sema::ProcessPropertyDecl(ObjCPropertyDecl *property) {\n // ...\n if (!property->isReadOnly() && SetterMethod) {\n // ...\n if (SetterMethod->param_size() != 1 || !Context.hasSameUnqualifiedType((*SetterMethod->param_begin())->getType().getNonReferenceType(), property->getType().getNonReferenceType())) {\n Diag(property->getLocation(), diag::warn_accessor_property_type_mismatch) << property->getDeclName() << SetterMethod->getSelector();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/property-impl-misuse.m"]={"clang/test/SemaObjC/property-impl-misuse.m:43:15: warning: type of property \'P1\' does not match type of accessor \'P1\'"} | ["clang/test/SemaObjC/property-impl-misuse.m"]={"clang/test/SemaObjC/property-impl-misuse.m:43:15: warning: type of property \'P1\' does not match type of accessor \'P1\'"} | ||
} | } | ||
}, | }, | ||
["warn_acquire_requires_negative_cap"]={ | ["warn_acquire_requires_negative_cap"]={ | ||
[ | [m]={"thread-safety-negative"}, | ||
[l]="thread-safety-negative", | |||
[ | |||
[e]="acquiring %0 \'%1\' requires negative capability \'%2\'", | [e]="acquiring %0 \'%1\' requires negative capability \'%2\'", | ||
[ | [a]=n, | ||
[b]="acquiring (.*?) \'(.*?)\' requires negative capability \'(.*?)\'", | [b]="acquiring (.*?) \'(.*?)\' requires negative capability \'(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-negative[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"3efd0495a081",1407190386,"Thread Safety Analysis: add a -Wthread-safety-negative flag that warns whenever\na mutex is acquired,...","Thread Safety Analysis: add a -Wthread-safety-negative flag that warns whenever\na mutex is acquired, but corresponding mutex is not provably not-held. This\nis based on the earlier negative requirements patch.\n\nllvm-svn: 214789"}, | ||
[ | [g]={{D,2021,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleNegativeNotHeld(StringRef Kind, Name LockName, Name Neg, SourceLocation Loc) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_acquire_requires_negative_cap) << Kind << LockName << Neg);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-thread-safety-negative.cpp"]={"clang/test/SemaCXX/warn-thread-safety-negative.cpp:52:8: warning: acquiring mutex \'mu\' requires negative capability \'!mu\' [-Wthread-safety-negative]","clang/test/SemaCXX/warn-thread-safety-negative.cpp:74:8: warning: acquiring mutex \'mu\' requires negative capability \'!mu\' [-Wthread-safety-negative]","clang/test/SemaCXX/warn-thread-safety-negative.cpp:88:15: warning: acquiring mutex \'mu\' requires negative capability \'!mu\' [-Wthread-safety-negative]"} | ["clang/test/SemaCXX/warn-thread-safety-negative.cpp"]={"clang/test/SemaCXX/warn-thread-safety-negative.cpp:52:8: warning: acquiring mutex \'mu\' requires negative capability \'!mu\' [-Wthread-safety-negative]","clang/test/SemaCXX/warn-thread-safety-negative.cpp:74:8: warning: acquiring mutex \'mu\' requires negative capability \'!mu\' [-Wthread-safety-negative]","clang/test/SemaCXX/warn-thread-safety-negative.cpp:88:15: warning: acquiring mutex \'mu\' requires negative capability \'!mu\' [-Wthread-safety-negative]"} | ||
} | } | ||
}, | }, | ||
["warn_acquired_before"]={ | ["warn_acquired_before"]={ | ||
[ | [m]={"thread-safety",jc}, | ||
[l]=jc, | |||
[ | |||
[e]="%0 \'%1\' must be acquired before \'%2\'", | [e]="%0 \'%1\' must be acquired before \'%2\'", | ||
[ | [a]=n, | ||
[b]="(.*?) \'(.*?)\' must be acquired before \'(.*?)\'", | [b]="(.*?) \'(.*?)\' must be acquired before \'(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-analysis[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"4980df623f15",1422987468,"Thread Safety Analysis: add support for before/after annotations on mutexes.\nThese checks detect pot...","Thread Safety Analysis: add support for before/after annotations on mutexes.\nThese checks detect potential deadlocks caused by inconsistent lock\nordering. The checks are implemented under the -Wthread-safety-beta flag.\n\nllvm-svn: 227997"}, | ||
[ | [g]={{D,2043,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleLockAcquiredBefore(StringRef Kind, Name L1Name, Name L2Name, SourceLocation Loc) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_acquired_before) << Kind << L1Name << L2Name);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:84:3: warning: mutex \'mu1\' must be acquired before \'mu2\' [-Wthread-safety-analysis]"} | ["clang/test/Sema/warn-thread-safety-analysis.c"]={"clang/test/Sema/warn-thread-safety-analysis.c:84:3: warning: mutex \'mu1\' must be acquired before \'mu2\' [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_acquired_before_after_cycle"]={ | ["warn_acquired_before_after_cycle"]={ | ||
[ | [m]={"thread-safety",jc}, | ||
[l]=jc, | |||
[ | |||
[e]="Cycle in acquired_before/after dependencies, starting with \'%0\'", | [e]="Cycle in acquired_before/after dependencies, starting with \'%0\'", | ||
[ | [a]=n, | ||
[b]="Cycle in acquired_before\\/after dependencies, starting with \'(.*?)\'", | [b]="Cycle in acquired_before\\/after dependencies, starting with \'(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-analysis[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"4980df623f15",1422987468,"Thread Safety Analysis: add support for before/after annotations on mutexes.\nThese checks detect pot...","Thread Safety Analysis: add support for before/after annotations on mutexes.\nThese checks detect potential deadlocks caused by inconsistent lock\nordering. The checks are implemented under the -Wthread-safety-beta flag.\n\nllvm-svn: 227997"}, | ||
[ | [g]={{D,2049,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleBeforeAfterCycle(Name L1Name, SourceLocation Loc) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_acquired_before_after_cycle) << L1Name);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5758:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu_b\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5759:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu_a\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5756:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu3\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5754:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu1\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5755:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu2\' [-Wthread-safety-analysis]"} | ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5758:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu_b\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5759:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu_a\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5756:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu3\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5754:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu1\' [-Wthread-safety-analysis]","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5755:9: warning: Cycle in acquired_before/after dependencies, starting with \'mu2\' [-Wthread-safety-analysis]"} | ||
} | } | ||
}, | }, | ||
["warn_addition_in_bitshift"]={ | ["warn_addition_in_bitshift"]={ | ||
[ | [m]={O,V,"parentheses","shift-op-parentheses"}, | ||
[l]="shift-op-parentheses", | |||
[ | |||
[e]="operator \'%0\' has lower precedence than \'%1\'; \'%1\' will be evaluated first", | [e]="operator \'%0\' has lower precedence than \'%1\'; \'%1\' will be evaluated first", | ||
[ | [a]=n, | ||
[b]="operator \'(.*?)\' has lower precedence than \'(.*?)\'; \'(.*?)\' will be evaluated first", | [b]="operator \'(.*?)\' has lower precedence than \'(.*?)\'; \'(.*?)\' will be evaluated first", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wshift\\-op\\-parentheses[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"15f17cbbd813",1349397663,"Implement -Wshift-op-parentheses for: a << b + c\n\nThis appears to be consistent with GCC\'s implement...","Implement -Wshift-op-parentheses for: a << b + c\n\nThis appears to be consistent with GCC\'s implementation of the same warning\nunder -Wparentheses. Suppressing a << b + c for cases where \'a\' is a user\ndefined type for compatibility with C++ stream IO. Otherwise suggest\nparentheses around the addition or subtraction subexpression.\n\n(this came up when MSVC was complaining (incorrectly, so far as I can tell)\nabout a perceived violation of this within the LLVM codebase, PR14001)\n\nllvm-svn: 165283"}, | ||
[ | [g]={{v,15846,"static void DiagnoseAdditionInShift(Sema &S, SourceLocation OpLoc, Expr *SubExpr, StringRef Shift) {\n if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(SubExpr)) {\n if (Bop->getOpcode() == BO_Add || Bop->getOpcode() == BO_Sub) {\n // ...\n S.Diag(Bop->getOperatorLoc(), diag::warn_addition_in_bitshift) << Bop->getSourceRange() << OpLoc << Shift << Op;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/parentheses.cpp"]={"clang/test/Sema/parentheses.cpp:88:17: warning: operator \'>>\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wshift-op-parentheses]","clang/test/Sema/parentheses.cpp:93:12: warning: operator \'<<\' has lower precedence than \'-\'; \'-\' will be evaluated first [-Wshift-op-parentheses]","clang/test/Sema/parentheses.cpp:99:17: warning: operator \'>>\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wshift-op-parentheses]"} | ["clang/test/Sema/parentheses.cpp"]={"clang/test/Sema/parentheses.cpp:88:17: warning: operator \'>>\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wshift-op-parentheses]","clang/test/Sema/parentheses.cpp:93:12: warning: operator \'<<\' has lower precedence than \'-\'; \'-\' will be evaluated first [-Wshift-op-parentheses]","clang/test/Sema/parentheses.cpp:99:17: warning: operator \'>>\' has lower precedence than \'+\'; \'+\' will be evaluated first [-Wshift-op-parentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_address_of_reference_bool_conversion"]={ | ["warn_address_of_reference_bool_conversion"]={ | ||
[ | [m]={"bool-conversion","bool-conversions",Eb,Ib,"undefined-bool-conversion"}, | ||
[l]="undefined-bool-conversion", | |||
[ | |||
[e]="reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true", | [e]="reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true", | ||
[ | [a]=n, | ||
[b]="reference cannot be bound to dereferenced null pointer in well\\-defined C\\+\\+ code; pointer may be assumed to always convert to true", | [b]="reference cannot be bound to dereferenced null pointer in well\\-defined C\\+\\+ code; pointer may be assumed to always convert to true", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wundefined\\-bool\\-conversion[^\\]]*\\]", | ||
[ | [d]=gc, | ||
[ | [f]={"f7432755d0c0",1402090766,"Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined b...","Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined behavior involving pointers.\n\nllvm-svn: 210372"}, | ||
[ | [g]={{y,15476,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n if (IsAddressOf) {\n unsigned DiagID = IsCompare ? diag::warn_address_of_reference_null_compare : diag::warn_address_of_reference_bool_conversion;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenCXX/reference-field.cpp"]={"clang/test/CodeGenCXX/reference-field.cpp:6:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]"} | ["clang/test/CodeGenCXX/reference-field.cpp"]={"clang/test/CodeGenCXX/reference-field.cpp:6:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_address_of_reference_null_compare"]={ | ["warn_address_of_reference_null_compare"]={ | ||
[ | [m]={O,V,eb,bc,"tautological-undefined-compare"}, | ||
[l]="tautological-undefined-compare", | |||
[ | |||
[e]="reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to %select{true|false}0", | [e]="reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to %select{true|false}0", | ||
[ | [a]=n, | ||
[b]="reference cannot be bound to dereferenced null pointer in well\\-defined C\\+\\+ code; comparison may be assumed to always evaluate to (?:true|false)", | [b]="reference cannot be bound to dereferenced null pointer in well\\-defined C\\+\\+ code; comparison may be assumed to always evaluate to (?:true|false)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-undefined\\-compare[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"f7432755d0c0",1402090766,"Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined b...","Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings\nto detect underfined behavior involving pointers.\n\nllvm-svn: 210372"}, | ||
[ | [g]={{y,15475,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n if (IsAddressOf) {\n unsigned DiagID = IsCompare ? diag::warn_address_of_reference_null_compare : diag::warn_address_of_reference_bool_conversion;"}}, | ||
[ | [h]={ | ||
["clang/test/Analysis/loop-widening-preserve-reference-type.cpp"]={"clang/test/Analysis/loop-widening-preserve-reference-type.cpp:13:24: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/Analysis/loop-widening-preserve-reference-type.cpp:21:24: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]"} | ["clang/test/Analysis/loop-widening-preserve-reference-type.cpp"]={"clang/test/Analysis/loop-widening-preserve-reference-type.cpp:13:24: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]","clang/test/Analysis/loop-widening-preserve-reference-type.cpp:21:24: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_alias_to_weak_alias"]={ | ["warn_alias_to_weak_alias"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%select{alias|ifunc}2 will always resolve to %0 even if weak definition of %1 is overridden", | [e]="%select{alias|ifunc}2 will always resolve to %0 even if weak definition of %1 is overridden", | ||
[ | [a]=n, | ||
[b]="(?:alias|ifunc) will always resolve to (.*?) even if weak definition of (.*?) is overridden", | [b]="(?:alias|ifunc) will always resolve to (.*?) even if weak definition of (.*?) is overridden", | ||
[ | [c]=C, | ||
[ | [d]=j, | ||
[ | [f]={"a39fc6dd2afa",1395934040,"Handle and warn on aliases to weak aliases.\n\nThis produces valid IR now that llvm rejects aliases to...","Handle and warn on aliases to weak aliases.\n\nThis produces valid IR now that llvm rejects aliases to weak aliases and warns\nthe user that the resolution is not changed if the weak alias is overridden.\n\nllvm-svn: 204935"}, | ||
[ | [g]={{zc,667,"void CodeGenModule::checkAliases() {\n // ...\n for (const GlobalDecl &GD : Aliases) {\n // ...\n // We have to handle alias to weak aliases in here. LLVM itself disallows\n // this since the object semantics would not match the IL one. For\n // compatibility with gcc we implement it by just pointing the alias\n // to its aliasee\'s aliasee. We also warn, since the user is probably\n // expecting the link to be weak.\n if (auto *GA = dyn_cast<llvm::GlobalAlias>(AliaseeGV)) {\n if (GA->isInterposable()) {\n Diags.Report(Location, diag::warn_alias_to_weak_alias) << GV->getName() << GA->getName() << IsIFunc;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:62:33: warning: alias will always resolve to test2_bar even if weak definition of test2_foo is overridden [-Wignored-attributes]"} | ["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:62:33: warning: alias will always resolve to test2_bar even if weak definition of test2_foo is overridden [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_alias_with_section"]={ | ["warn_alias_with_section"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%select{alias|ifunc}1 will not be in section \'%0\' but in the same section as the %select{aliasee|resolver}2", | [e]="%select{alias|ifunc}1 will not be in section \'%0\' but in the same section as the %select{aliasee|resolver}2", | ||
[ | [a]=n, | ||
[b]="(?:alias|ifunc) will not be in section \'(.*?)\' but in the same section as the (?:aliasee|resolver)", | [b]="(?:alias|ifunc) will not be in section \'(.*?)\' but in the same section as the (?:aliasee|resolver)", | ||
[ | [c]=C, | ||
[ | [d]=j, | ||
[ | [f]={"502f65ae54d0",1399321263,"Fix pr19653.\n\nWarn if an alias requests a section other than the aliasee section.\n\nllvm-svn: 207997","Fix pr19653.\n\nWarn if an alias requests a section other than the aliasee section.\n\nllvm-svn: 207997"}, | ||
[ | [g]={{zc,656,"void CodeGenModule::checkAliases() {\n // ...\n for (const GlobalDecl &GD : Aliases) {\n // ...\n if (const SectionAttr *SA = D->getAttr<SectionAttr>()) {\n // ...\n if (AliasSection != AliaseeGV->getSection())\n Diags.Report(SA->getLocation(), diag::warn_alias_with_section) << AliasSection << IsIFunc << IsIFunc;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:65:33: warning: alias will not be in section \'test\' but in the same section as the aliasee [-Wignored-attributes]"} | ["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:65:33: warning: alias will not be in section \'test\' but in the same section as the aliasee [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_aligned_attr_underaligned"]={ | ["warn_aligned_attr_underaligned"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="requested alignment is less than minimum alignment of %1 for type %0", | [e]="requested alignment is less than minimum alignment of %1 for type %0", | ||
[ | [a]=n, | ||
[b]="requested alignment is less than minimum alignment of (.*?) for type (.*?)", | [b]="requested alignment is less than minimum alignment of (.*?) for type (.*?)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{o,4518,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion) {\n // ...\n // On AIX, an aligned attribute can not decrease the alignment when applied\n // to a variable declaration with vector type.\n if (VD && Context.getTargetInfo().getTriple().isOSAIX()) {\n // ...\n if (Ty->isVectorType() && AlignVal < 16) {\n Diag(VD->getLocation(), diag::warn_aligned_attr_underaligned) << VD->getType() << 16;"},{o,4567,"void Sema::AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *TS, bool IsPackExpansion) {\n // ...\n // On AIX, an aligned attribute can not decrease the alignment when applied\n // to a variable declaration with vector type.\n if (VD && Context.getTargetInfo().getTriple().isOSAIX()) {\n // ...\n if (Ty->isVectorType() && Context.toCharUnitsFromBits(AlignVal).getQuantity() < 16) {\n Diag(VD->getLocation(), diag::warn_aligned_attr_underaligned) << VD->getType() << 16;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/aix-attr-aligned-vector-warn.c"]={"clang/test/Sema/aix-attr-aligned-vector-warn.c:9:12: warning: requested alignment is less than minimum alignment of 16 for type \'__vector int\' (vector of 4 \'int\' values) [-Wignored-attributes]","clang/test/Sema/aix-attr-aligned-vector-warn.c:10:12: warning: requested alignment is less than minimum alignment of 16 for type \'__vector int\' (vector of 4 \'int\' values) [-Wignored-attributes]"} | ["clang/test/Sema/aix-attr-aligned-vector-warn.c"]={"clang/test/Sema/aix-attr-aligned-vector-warn.c:9:12: warning: requested alignment is less than minimum alignment of 16 for type \'__vector int\' (vector of 4 \'int\' values) [-Wignored-attributes]","clang/test/Sema/aix-attr-aligned-vector-warn.c:10:12: warning: requested alignment is less than minimum alignment of 16 for type \'__vector int\' (vector of 4 \'int\' values) [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_alignment_builtin_useless"]={ | ["warn_alignment_builtin_useless"]={ | ||
[ | [m]={O,V,eb,bc}, | ||
[l]=bc, | |||
[ | |||
[e]="%select{aligning a value|the result of checking whether a value is aligned}0 to 1 byte is %select{a no-op|always true}0", | [e]="%select{aligning a value|the result of checking whether a value is aligned}0 to 1 byte is %select{a no-op|always true}0", | ||
[ | [a]=n, | ||
[b]="(?:aligning a value|the result of checking whether a value is aligned) to 1 byte is (?:a no\\-op|always true)", | [b]="(?:aligning a value|the result of checking whether a value is aligned) to 1 byte is (?:a no\\-op|always true)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-compare[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on V...","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"}, | ||
[ | [g]={{y,343,"/// Check that the value argument for __builtin_is_aligned(value, alignment) and\n/// __builtin_aligned_{up,down}(value, alignment) is an integer or a pointer\n/// type (but not a function pointer) and that the alignment is a power-of-two.\nstatic bool SemaBuiltinAlignment(Sema &S, CallExpr *TheCall, unsigned ID) {\n // ...\n // We can\'t check validity of alignment if it is value dependent.\n if (!AlignOp->isValueDependent() && AlignOp->EvaluateAsInt(AlignResult, S.Context, Expr::SE_AllowSideEffects)) {\n // ...\n if (AlignValue == 1) {\n S.Diag(AlignOp->getExprLoc(), diag::warn_alignment_builtin_useless) << IsBooleanAlignBuiltin;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/builtin-align.c"]={"clang/test/Sema/builtin-align.c:80:28: warning: the result of checking whether a value is aligned to 1 byte is always true [-Wtautological-compare]"} | ["clang/test/Sema/builtin-align.c"]={"clang/test/Sema/builtin-align.c:80:28: warning: the result of checking whether a value is aligned to 1 byte is always true [-Wtautological-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_alignment_not_power_of_two"]={ | ["warn_alignment_not_power_of_two"]={ | ||
[ | [m]={"non-power-of-two-alignment"}, | ||
[l]="non-power-of-two-alignment", | |||
[ | |||
[e]="requested alignment is not a power of 2", | [e]="requested alignment is not a power of 2", | ||
[ | [a]=n, | ||
[b]="requested alignment is not a power of 2", | [b]="requested alignment is not a power of 2", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnon\\-power\\-of\\-two\\-alignment[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{y,6741,"/// Handles the checks for format strings, non-POD arguments to vararg\n/// functions, NULL arguments passed to non-NULL parameters, and diagnose_if\n/// attributes.\nvoid Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, const Expr *ThisArg, ArrayRef<const Expr *> Args, bool IsMemberFunction, SourceLocation Loc, SourceRange Range, VariadicCallType CallType) {\n // ...\n if (FDecl && FDecl->hasAttr<AllocAlignAttr>()) {\n // ...\n if (!Arg->isValueDependent()) {\n // ...\n if (Arg->EvaluateAsInt(Align, Context)) {\n // ...\n if (!I.isPowerOf2())\n Diag(Arg->getExprLoc(), diag::warn_alignment_not_power_of_two) << Arg->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/alloc-align-attr.c"]={"clang/test/Sema/alloc-align-attr.c:27:31: warning: requested alignment is not a power of 2 [-Wnon-power-of-two-alignment]"} | ["clang/test/Sema/alloc-align-attr.c"]={"clang/test/Sema/alloc-align-attr.c:27:31: warning: requested alignment is not a power of 2 [-Wnon-power-of-two-alignment]"} | ||
} | } | ||
}, | }, | ||
["warn_alloca"]={ | ["warn_alloca"]={ | ||
[ | [m]={"alloca"}, | ||
[l]="alloca", | |||
[ | |||
[e]="use of function %0 is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability", | [e]="use of function %0 is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability", | ||
[ | [a]=n, | ||
[b]="use of function (.*?) is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability", | [b]="use of function (.*?) is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Walloca[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"9d045a5c1e6b",1564093420,"[Sema] add -Walloca to flag uses of `alloca`\n\nThis CL adds an optional warning to diagnose uses of t...","[Sema] add -Walloca to flag uses of `alloca`\n\nThis CL adds an optional warning to diagnose uses of the\n`__builtin_alloca` family of functions. The use of these functions is\ndiscouraged by many, so it seems like a good idea to allow clang to warn\nabout it.\n\nPatch by Elaina Guan!\n\nDifferential Revision: https://reviews.llvm.org/D64883\n\nllvm-svn: 367067"}, | ||
[ | [g]={{y,2205,"ExprResult Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case Builtin::BI__builtin_alloca:\n case Builtin::BI__builtin_alloca_uninitialized:\n Diag(TheCall->getBeginLoc(), diag::warn_alloca) << TheCall->getDirectCallee();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-alloca.c"]={"clang/test/Sema/warn-alloca.c:9:3: warning: use of function \'__builtin_alloca\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]","clang/test/Sema/warn-alloca.c:16:3: warning: use of function \'__builtin_alloca_with_align\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]","clang/test/Sema/warn-alloca.c:23:3: warning: use of function \'__builtin_alloca_uninitialized\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]","clang/test/Sema/warn-alloca.c:30:3: warning: use of function \'__builtin_alloca_with_align_uninitialized\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]"} | ["clang/test/Sema/warn-alloca.c"]={"clang/test/Sema/warn-alloca.c:9:3: warning: use of function \'__builtin_alloca\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]","clang/test/Sema/warn-alloca.c:16:3: warning: use of function \'__builtin_alloca_with_align\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]","clang/test/Sema/warn-alloca.c:23:3: warning: use of function \'__builtin_alloca_uninitialized\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]","clang/test/Sema/warn-alloca.c:30:3: warning: use of function \'__builtin_alloca_with_align_uninitialized\' is discouraged; there is no way to check for failure but failure may still occur, resulting in a possibly exploitable security vulnerability [-Walloca]"} | ||
} | } | ||
}, | }, | ||
["warn_alloca_align_alignof"]={ | ["warn_alloca_align_alignof"]={ | ||
[ | [m]={"alloca-with-align-alignof"}, | ||
[l]="alloca-with-align-alignof", | |||
[ | |||
[e]="second argument to __builtin_alloca_with_align is supposed to be in bits", | [e]="second argument to __builtin_alloca_with_align is supposed to be in bits", | ||
[ | [a]=n, | ||
[b]="second argument to __builtin_alloca_with_align is supposed to be in bits", | [b]="second argument to __builtin_alloca_with_align is supposed to be in bits", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Walloca\\-with\\-align\\-alignof[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"86b1bfad0509",1477937277,"[Sema] Warn when alignof is used with __builtin_alloca_with_align\n\nThe second argument to __builtin_...","[Sema] Warn when alignof is used with __builtin_alloca_with_align\n\nThe second argument to __builtin_alloca_with_align is supposed to be in\nbits, not bytes. Using alignof there would be indicative of a bug.\n\nllvm-svn: 285609"}, | ||
[ | [g]={{y,8625,"/// Handle __builtin_alloca_with_align. This is declared\n/// as (size_t, size_t) where the second size_t must be a power of 2 greater\n/// than 8.\nbool Sema::SemaBuiltinAllocaWithAlign(CallExpr *TheCall) {\n // ...\n // We can\'t check the value of a dependent argument.\n if (!Arg->isTypeDependent() && !Arg->isValueDependent()) {\n if (const auto *UE = dyn_cast<UnaryExprOrTypeTraitExpr>(Arg->IgnoreParenImpCasts()))\n if (UE->getKind() == UETT_AlignOf || UE->getKind() == UETT_PreferredAlignOf)\n Diag(TheCall->getBeginLoc(), diag::warn_alloca_align_alignof) << Arg->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/builtin-alloca-with-align.c"]={"clang/test/Sema/builtin-alloca-with-align.c:32:3: warning: second argument to __builtin_alloca_with_align is supposed to be in bits [-Walloca-with-align-alignof]"} | ["clang/test/Sema/builtin-alloca-with-align.c"]={"clang/test/Sema/builtin-alloca-with-align.c:32:3: warning: second argument to __builtin_alloca_with_align is supposed to be in bits [-Walloca-with-align-alignof]"} | ||
} | } | ||
}, | }, | ||
["warn_always_inline_coroutine"]={ | ["warn_always_inline_coroutine"]={ | ||
[ | [m]={"always-inline-coroutine","coroutine"}, | ||
[l]="always-inline-coroutine", | |||
[ | |||
[e]="this coroutine may be split into pieces; not every piece is guaranteed to be inlined", | [e]="this coroutine may be split into pieces; not every piece is guaranteed to be inlined", | ||
[ | [a]=n, | ||
[b]="this coroutine may be split into pieces; not every piece is guaranteed to be inlined", | [b]="this coroutine may be split into pieces; not every piece is guaranteed to be inlined", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Walways\\-inline\\-coroutine[^\\]]*\\]", | ||
[ | [d]="Coroutines Issue", | ||
[ | [f]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables i...","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, | ||
[ | [g]={{"clang/lib/Sema/SemaCoroutine.cpp",1116,"void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) {\n // ...\n // The always_inline attribute doesn\'t reliably apply to a coroutine,\n // because the coroutine will be split into pieces and some pieces\n // might be called indirectly, as in a virtual call. Even the ramp\n // function cannot be inlined at -O0, due to pipeline ordering\n // problems (see https://llvm.org/PR53413). Tell the user about it.\n if (FD->hasAttr<AlwaysInlineAttr>())\n Diag(FD->getLocation(), diag::warn_always_inline_coroutine);"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenCoroutines/coro-always-inline.cpp"]={"clang/test/CodeGenCoroutines/coro-always-inline.cpp:44:41: warning: this coroutine may be split into pieces; not every piece is guaranteed to be inlined [-Walways-inline-coroutine]"} | ["clang/test/CodeGenCoroutines/coro-always-inline.cpp"]={"clang/test/CodeGenCoroutines/coro-always-inline.cpp:44:41: warning: this coroutine may be split into pieces; not every piece is guaranteed to be inlined [-Walways-inline-coroutine]"} | ||
} | } | ||
}, | }, | ||
["warn_ambiguous_suitable_delete_function_found"]={ | ["warn_ambiguous_suitable_delete_function_found"]={ | ||
[ | [m]={"ambiguous-delete"}, | ||
[l]="ambiguous-delete", | |||
[ | |||
[e]="multiple suitable %0 functions for %1; no \'operator delete\' function will be invoked if initialization throws an exception", | [e]="multiple suitable %0 functions for %1; no \'operator delete\' function will be invoked if initialization throws an exception", | ||
[ | [a]=n, | ||
[b]="multiple suitable (.*?) functions for (.*?); no \'operator delete\' function will be invoked if initialization throws an exception", | [b]="multiple suitable (.*?) functions for (.*?); no \'operator delete\' function will be invoked if initialization throws an exception", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wambiguous\\-delete[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"189e52fcdfc3",1476081751,"P0035R4: Semantic analysis and code generation for C++17 overaligned\nallocation.\n\nllvm-svn: 283722","P0035R4: Semantic analysis and code generation for C++17 overaligned\nallocation.\n\nllvm-svn: 283722"}, | ||
[ | [g]={{Zb,2939,"bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose) {\n // ...\n // C++ [expr.new]p20:\n // [...] If the lookup finds a single matching deallocation\n // function, that function will be called; otherwise, no\n // deallocation function will be called.\n if (Matches.size() == 1) {\n // ...\n } else if (!Matches.empty()) {\n // ...\n Diag(StartLoc, diag::warn_ambiguous_suitable_delete_function_found) << DeleteName << AllocElemType;"}} | ||
}, | }, | ||
["warn_analyzer_deprecated_option"]={ | ["warn_analyzer_deprecated_option"]={ | ||
[ | [m]={"deprecated-static-analyzer-flag"}, | ||
[l]="deprecated-static-analyzer-flag", | |||
[ | |||
[e]="analyzer option \'%0\' is deprecated. This flag will be removed in %1, and passing this option will be an error.", | [e]="analyzer option \'%0\' is deprecated. This flag will be removed in %1, and passing this option will be an error.", | ||
[ | [a]=n, | ||
[b]="analyzer option \'(.*?)\' is deprecated\\. This flag will be removed in (.*?), and passing this option will be an error\\.", | [b]="analyzer option \'(.*?)\' is deprecated\\. This flag will be removed in (.*?), and passing this option will be an error\\.", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-static\\-analyzer\\-flag[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"aef03c9b3bed",1651866463,"[clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clan...","[clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang\n\nGCC 12 has been released and contains unconditional support for\n-ftrivial-auto-var-init=zero:\nhttps://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-var-init\n\nMaintain compatibility with GCC, and remove the -enable flag for \"zero\"\nmode. The flag is left to generate an \"unused\" warning, though, to not\nbreak all the existing users. The flag will be fully removed in Clang 17.\n\nLink: https://github.com/llvm/llvm-project/issues/44842\n\nReviewed By: nickdesaulniers, MaskRay, srhines, xbolva00\n\nDifferential Revision: https://reviews.llvm.org/D125142"} | ||
}, | }, | ||
["warn_analyzer_deprecated_option_with_alternative"]={ | ["warn_analyzer_deprecated_option_with_alternative"]={ | ||
[ | [m]={"deprecated-static-analyzer-flag"}, | ||
[l]="deprecated-static-analyzer-flag", | |||
[ | |||
[e]="analyzer option \'%0\' is deprecated. This flag will be removed in %1, and passing this option will be an error. Use \'%2\' instead.", | [e]="analyzer option \'%0\' is deprecated. This flag will be removed in %1, and passing this option will be an error. Use \'%2\' instead.", | ||
[ | [a]=n, | ||
[b]="analyzer option \'(.*?)\' is deprecated\\. This flag will be removed in (.*?), and passing this option will be an error\\. Use \'(.*?)\' instead\\.", | [b]="analyzer option \'(.*?)\' is deprecated\\. This flag will be removed in (.*?), and passing this option will be an error\\. Use \'(.*?)\' instead\\.", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-static\\-analyzer\\-flag[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"3738ce05a70c",1668637223,"Add support for a backdoor driver option that enables emitting header\nusage information in JSON to a...","Add support for a backdoor driver option that enables emitting header\nusage information in JSON to a file\n\nEach line in the file is a JSON object that has the name of the main\nsource file followed by the list of system header files included\ndirectly or indirectly from that file.\n\nFor example:\n\n{\"source\":\"/tmp/foo.c\",\n \"includes\":[\"/usr/include/stdio.h\", \"/usr/include/stdlib.h\"]}\n\nTo reduce the amount of data written to the file, only the system\nheaders that are directly included from a non-system header file are\nrecorded.\n\nIn order to emit the header information in JSON, it is necessary to set\nthe following environment variables:\n\nCC_PRINT_HEADERS_FORMAT=json CC_PRINT_HEADERS_FILTERING=only-direct-system\n\nThe following combination is equivalent to setting CC_PRINT_HEADERS=1:\n\nCC_PRINT_HEADERS_FORMAT=textual CC_PRINT_HEADERS_FILTERING=none\n\nDifferential Revision: https://reviews.llvm.org/D137996"} | ||
}, | }, | ||
["warn_anyx86_interrupt_regsave"]={ | ["warn_anyx86_interrupt_regsave"]={ | ||
[ | [m]={"interrupt-service-routine"}, | ||
[l]="interrupt-service-routine", | |||
[ | |||
[e]="interrupt service routine should only call a function with attribute \'no_caller_saved_registers\'", | [e]="interrupt service routine should only call a function with attribute \'no_caller_saved_registers\'", | ||
[ | [a]=n, | ||
[b]="interrupt service routine should only call a function with attribute \'no_caller_saved_registers\'", | [b]="interrupt service routine should only call a function with attribute \'no_caller_saved_registers\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winterrupt\\-service\\-routine[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the re...","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | ||
[ | [g]={{v,7365,"/// 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 Diag(Fn->getExprLoc(), diag::warn_anyx86_interrupt_regsave);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-x86-interrupt.c"]={"clang/test/Sema/attr-x86-interrupt.c:58:3: warning: interrupt service routine should only call a function with attribute \'no_caller_saved_registers\' [-Winterrupt-service-routine]"} | ["clang/test/Sema/attr-x86-interrupt.c"]={"clang/test/Sema/attr-x86-interrupt.c:58:3: warning: interrupt service routine should only call a function with attribute \'no_caller_saved_registers\' [-Winterrupt-service-routine]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_bridge_cast_nonarc"]={ | ["warn_arc_bridge_cast_nonarc"]={ | ||
[ | [m]={"arc-bridge-casts-disallowed-in-nonarc"}, | ||
[l]="arc-bridge-casts-disallowed-in-nonarc", | |||
[ | |||
[e]="\'%0\' casts have no effect when not using ARC", | [e]="\'%0\' casts have no effect when not using ARC", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' casts have no effect when not using ARC", | [b]="\'(.*?)\' casts have no effect when not using ARC", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-bridge\\-casts\\-disallowed\\-in\\-nonarc[^\\]]*\\]", | ||
[ | [d]="ARC Parse Issue", | ||
[ | [f]={"084e1b48a176",1329540158,"Change wording of warning about using __bridge casts in non-ARC.\n\nllvm-svn: 150868","Change wording of warning about using __bridge casts in non-ARC.\n\nllvm-svn: 150868"}, | ||
[ | [g]={{Bc,2922,"/// 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 if (BridgeCast && !getLangOpts().ObjCAutoRefCount) {\n if (!TryConsumeToken(tok::kw___bridge)) {\n // ...\n if (!PP.getSourceManager().isInSystemHeader(BridgeKeywordLoc))\n Diag(BridgeKeywordLoc, diag::warn_arc_bridge_cast_nonarc) << BridgeCastName << FixItHint::CreateReplacement(BridgeKeywordLoc, \"\");"}}, | ||
[ | [h]={ | ||
["clang/test/FixIt/bridge-in-non-arc.m"]={"clang/test/FixIt/bridge-in-non-arc.m:7:11: warning: \'__bridge_transfer\' casts have no effect when not using ARC [-Warc-bridge-casts-disallowed-in-nonarc]","clang/test/FixIt/bridge-in-non-arc.m:8:12: warning: \'__bridge_transfer\' casts have no effect when not using ARC [-Warc-bridge-casts-disallowed-in-nonarc]"} | ["clang/test/FixIt/bridge-in-non-arc.m"]={"clang/test/FixIt/bridge-in-non-arc.m:7:11: warning: \'__bridge_transfer\' casts have no effect when not using ARC [-Warc-bridge-casts-disallowed-in-nonarc]","clang/test/FixIt/bridge-in-non-arc.m:8:12: warning: \'__bridge_transfer\' casts have no effect when not using ARC [-Warc-bridge-casts-disallowed-in-nonarc]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_lifetime_result_type"]={ | ["warn_arc_lifetime_result_type"]={ | ||
[ | [m]={j,O,Jc,"ignored-qualifiers"}, | ||
[l]="ignored-qualifiers", | |||
[ | |||
[e]="ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 lifetime qualifier on return type is ignored", | [e]="ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 lifetime qualifier on return type is ignored", | ||
[ | [a]=n, | ||
[b]="ARC (?:unused|__unsafe_unretained|__strong|__weak|__autoreleasing) lifetime qualifier on return type is ignored", | [b]="ARC (?:unused|__unsafe_unretained|__strong|__weak|__autoreleasing) lifetime qualifier on return type is ignored", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wignored\\-qualifiers[^\\]]*\\]", | ||
[ | [d]=lc, | ||
[ | [f]={"cd78037ad117",1358465805,"In Objective-C ARC, completely ignore ownership qualifiers on the\nreturn type of a function by canon...","In Objective-C ARC, completely ignore ownership qualifiers on the\nreturn type of a function by canonicalizing them away. They are\nuseless anyway, and conflict with our rules for template argument\ndeduction and __strong. Fixes <rdar://problem/12367446>.\n\nllvm-svn: 172768"}, | ||
[ | [g]={{W,5402,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // Objective-C ARC ownership qualifiers are ignored on the function\n // return type (by type canonicalization). Complain if this attribute\n // was written here.\n if (T.getQualifiers().hasObjCLifetime()) {\n // ...\n if (AttrLoc.isValid()) {\n // ...\n S.Diag(AttrLoc, diag::warn_arc_lifetime_result_type) << T.getQualifiers().getObjCLifetime();"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenObjCXX/msabi-objc-extensions.mm"]={"clang/test/CodeGenObjCXX/msabi-objc-extensions.mm:66:1: warning: ARC __autoreleasing lifetime qualifier on return type is ignored [-Wignored-qualifiers]"} | ["clang/test/CodeGenObjCXX/msabi-objc-extensions.mm"]={"clang/test/CodeGenObjCXX/msabi-objc-extensions.mm:66:1: warning: ARC __autoreleasing lifetime qualifier on return type is ignored [-Wignored-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_literal_assign"]={ | ["warn_arc_literal_assign"]={ | ||
[ | [m]={Kc,hc}, | ||
[l]=hc, | |||
[ | |||
[e]="assigning %select{array literal|dictionary literal|numeric literal|boxed expression|<should not happen>|block literal}0 to a weak %select{property|variable}1; object will be released after assignment", | [e]="assigning %select{array literal|dictionary literal|numeric literal|boxed expression|<should not happen>|block literal}0 to a weak %select{property|variable}1; object will be released after assignment", | ||
[ | [a]=n, | ||
[b]="assigning (?:array literal|dictionary literal|numeric literal|boxed expression|block literal) to a weak (?:property|variable); object will be released after assignment", | [b]="assigning (?:array literal|dictionary literal|numeric literal|boxed expression|block literal) to a weak (?:property|variable); object will be released after assignment", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-unsafe\\-retained\\-assign[^\\]]*\\]", | ||
[ | [d]=lc, | ||
[ | [f]={"9304da95784c",1356077068,"Extend checkUnsafeAssigns() to also handle assigning an object literal to a weak reference.\n\nThanks ...","Extend checkUnsafeAssigns() to also handle assigning an object literal to a weak reference.\n\nThanks to Jordan Rose and John McCall for their sage code review.\n\nFixes <rdar://problem/12569201>.\n\nllvm-svn: 170864"}, | ||
[ | [g]={{y,17735,"static bool checkUnsafeAssignLiteral(Sema &S, SourceLocation Loc, Expr *RHS, bool isProperty) {\n // ...\n S.Diag(Loc, diag::warn_arc_literal_assign) << (unsigned)Kind << (isProperty ? 0 : 1) << RHS->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:758:15: warning: assigning dictionary literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:759:15: warning: assigning array literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:760:15: warning: assigning block literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:761:15: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:762:15: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:763:15: warning: assigning boxed expression to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:766:7: warning: assigning dictionary literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:767:7: warning: assigning array literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:768:7: warning: assigning block literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:769:7: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:770:7: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:771:7: warning: assigning boxed expression to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]"} | ["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:758:15: warning: assigning dictionary literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:759:15: warning: assigning array literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:760:15: warning: assigning block literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:761:15: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:762:15: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:763:15: warning: assigning boxed expression to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:766:7: warning: assigning dictionary literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:767:7: warning: assigning array literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:768:7: warning: assigning block literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:769:7: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:770:7: warning: assigning numeric literal to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc.m:771:7: warning: assigning boxed expression to a weak variable; object will be released after assignment [-Warc-unsafe-retained-assign]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_object_memaccess"]={ | ["warn_arc_object_memaccess"]={ | ||
[ | [m]={Kc,"arc-non-pod-memaccess"}, | ||
[l]="arc-non-pod-memaccess", | |||
[ | |||
[e]="%select{destination for|source of}0 this %1 call is a pointer to ownership-qualified type %2", | [e]="%select{destination for|source of}0 this %1 call is a pointer to ownership-qualified type %2", | ||
[ | [a]=n, | ||
[b]="(?:destination for|source of) this (.*?) call is a pointer to ownership\\-qualified type (.*?)", | [b]="(?:destination for|source of) this (.*?) call is a pointer to ownership\\-qualified type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-non\\-pod\\-memaccess[^\\]]*\\]", | ||
[ | [d]=lc, | ||
[ | [f]={Cc,1308178962,Dc,Ec}, | ||
[ | [g]={{y,12580,"/// 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 if (const CXXRecordDecl *ContainedRD = getContainedDynamicClass(PointeeTy, IsContained)) {\n // ...\n } else if (PointeeTy.hasNonTrivialObjCLifetime() && BId != Builtin::BImemset)\n DiagRuntimeBehavior(Dest->getExprLoc(), Dest, PDiag(diag::warn_arc_object_memaccess) << ArgIdx << FnName << PointeeTy << Call->getCallee()->getSourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-non-pod-memaccess.m"]={"clang/test/SemaObjC/arc-non-pod-memaccess.m:24:10: warning: destination for this \'memcpy\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:26:10: warning: destination for this \'memcpy\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:28:10: warning: destination for this \'memcpy\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:32:15: warning: source of this \'memcpy\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:34:15: warning: source of this \'memcpy\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:36:15: warning: source of this \'memcpy\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:40:11: warning: destination for this \'memmove\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:42:11: warning: destination for this \'memmove\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:44:11: warning: destination for this \'memmove\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:48:16: warning: source of this \'memmove\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:50:16: warning: source of this \'memmove\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:52:16: warning: source of this \'memmove\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]"} | ["clang/test/SemaObjC/arc-non-pod-memaccess.m"]={"clang/test/SemaObjC/arc-non-pod-memaccess.m:24:10: warning: destination for this \'memcpy\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:26:10: warning: destination for this \'memcpy\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:28:10: warning: destination for this \'memcpy\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:32:15: warning: source of this \'memcpy\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:34:15: warning: source of this \'memcpy\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:36:15: warning: source of this \'memcpy\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:40:11: warning: destination for this \'memmove\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:42:11: warning: destination for this \'memmove\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:44:11: warning: destination for this \'memmove\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:48:16: warning: source of this \'memmove\' call is a pointer to ownership-qualified type \'__strong id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:50:16: warning: source of this \'memmove\' call is a pointer to ownership-qualified type \'__weak id\' [-Warc-non-pod-memaccess]","clang/test/SemaObjC/arc-non-pod-memaccess.m:52:16: warning: source of this \'memmove\' call is a pointer to ownership-qualified type \'__autoreleasing id\' [-Warc-non-pod-memaccess]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_perform_selector_leaks"]={ | ["warn_arc_perform_selector_leaks"]={ | ||
[ | [m]={"arc-performSelector-leaks"}, | ||
[l]="arc-performSelector-leaks", | |||
[ | |||
[e]="performSelector may cause a leak because its selector is unknown", | [e]="performSelector may cause a leak because its selector is unknown", | ||
[ | [a]=n, | ||
[b]="performSelector may cause a leak because its selector is unknown", | [b]="performSelector may cause a leak because its selector is unknown", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-performSelector\\-leaks[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"b7a773626fea",1309905539,"objc-arc: enforce performSelector rules in rejecting retaining selectors\npassed to it, and unknown s...","objc-arc: enforce performSelector rules in rejecting retaining selectors\npassed to it, and unknown selectors causing potential leak.\n// rdar://9659270\n\nllvm-svn: 134449"}, | ||
[ | [g]={{fb,3316,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // In ARC, forbid the user from sending messages to\n // retain/release/autorelease/dealloc/retainCount explicitly.\n if (getLangOpts().ObjCAutoRefCount) {\n // ...\n case OMF_performSelector:\n if (Method && NumArgs >= 1) {\n if (const auto *SelExp = dyn_cast<ObjCSelectorExpr>(Args[0]->IgnoreParens())) {\n // ...\n } else {\n // ...\n Diag(SelLoc, diag::warn_arc_perform_selector_leaks);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-peformselector.m"]={"clang/test/SemaObjC/arc-peformselector.m:32:16: warning: performSelector may cause a leak because its selector is unknown [-Warc-performSelector-leaks]"} | ["clang/test/SemaObjC/arc-peformselector.m"]={"clang/test/SemaObjC/arc-peformselector.m:32:16: warning: performSelector may cause a leak because its selector is unknown [-Warc-performSelector-leaks]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_possible_repeated_use_of_weak"]={ | ["warn_arc_possible_repeated_use_of_weak"]={ | ||
[ | [m]={"arc-maybe-repeated-use-of-weak","arc-repeated-use-of-weak"}, | ||
[l]="arc-maybe-repeated-use-of-weak", | |||
[ | |||
[e]="weak %select{variable|property|implicit property|instance variable}0 %1 may be accessed multiple times in this %select{function|method|block|lambda}2 and may be unpredictably set to nil; assign to a strong variable to keep the object alive", | [e]="weak %select{variable|property|implicit property|instance variable}0 %1 may be accessed multiple times in this %select{function|method|block|lambda}2 and may be unpredictably set to nil; assign to a strong variable to keep the object alive", | ||
[ | [a]=n, | ||
[b]="weak (?:variable|property|implicit property|instance variable) (.*?) may be accessed multiple times in this (?:function|method|block|lambda) and may be unpredictably set to nil; assign to a strong variable to keep the object alive", | [b]="weak (?:variable|property|implicit property|instance variable) (.*?) may be accessed multiple times in this (?:function|method|block|lambda) and may be unpredictably set to nil; assign to a strong variable to keep the object alive", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-maybe\\-repeated\\-use\\-of\\-weak[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d393458c3316",1348870890,"Add a warning (off by default) for repeated use of the same weak property.\n\nThe motivating example:\n...","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"}, | ||
[ | [g]={{D,1472,"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 if (Key.isExactProfile())\n // ...\n else\n DiagKind = diag::warn_arc_possible_repeated_use_of_weak;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:67:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:72:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:386:9: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:413:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:420:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:471:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:475:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]"} | ["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:67:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:72:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:386:9: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:413:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:420:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:471:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:475:7: warning: weak property \'weakProp\' may be accessed multiple times in this function and may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-maybe-repeated-use-of-weak]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_repeated_use_of_weak"]={ | ["warn_arc_repeated_use_of_weak"]={ | ||
[ | [m]={"arc-repeated-use-of-weak"}, | ||
[l]="arc-repeated-use-of-weak", | |||
[ | |||
[e]="weak %select{variable|property|implicit property|instance variable}0 %1 is accessed multiple times in this %select{function|method|block|lambda}2 but may be unpredictably set to nil; assign to a strong variable to keep the object alive", | [e]="weak %select{variable|property|implicit property|instance variable}0 %1 is accessed multiple times in this %select{function|method|block|lambda}2 but may be unpredictably set to nil; assign to a strong variable to keep the object alive", | ||
[ | [a]=n, | ||
[b]="weak (?:variable|property|implicit property|instance variable) (.*?) is accessed multiple times in this (?:function|method|block|lambda) but may be unpredictably set to nil; assign to a strong variable to keep the object alive", | [b]="weak (?:variable|property|implicit property|instance variable) (.*?) is accessed multiple times in this (?:function|method|block|lambda) but may be unpredictably set to nil; assign to a strong variable to keep the object alive", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-repeated\\-use\\-of\\-weak[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d393458c3316",1348870890,"Add a warning (off by default) for repeated use of the same weak property.\n\nThe motivating example:\n...","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"}, | ||
[g]={{D,1470,"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 if (Key.isExactProfile())\n DiagKind = diag::warn_arc_repeated_use_of_weak;"},{D,2675,"void clang::sema::AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, sema::FunctionScopeInfo *fscope, const Decl *D, QualType BlockType) {\n // ...\n if (S.getLangOpts().ObjCWeak && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, D->getBeginLoc()))"},{y,17797,"void Sema::checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS) {\n // ...\n if (LT == Qualifiers::OCL_Weak) {\n if (!Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, Loc))"},{p,13379,"/// 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->isInvalidDecl()) {\n // ...\n // It is safe to assign a weak reference into a strong variable.\n // Although this code can still have problems:\n // id x = self.weakProp;\n // id y = self.weakProp;\n // we do not warn to warn spuriously when \'x\' and \'y\' are on separate\n // paths through the function. This should be revisited if\n // -Wrepeated-use-of-weak is made flow-sensitive.\n if (FunctionScopeInfo *FSI = getCurFunction())\n if ((VDecl->getType().getObjCLifetime() == Qualifiers::OCL_Strong || VDecl->getType().isNonWeakInMRRWithObjCWeak(Context)) && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, Init->getBeginLoc()))"},{v,2213,"/// BuildDeclRefExpr - Build an expression that references a\n/// declaration that does not require a closure capture.\nDeclRefExpr *Sema::BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, const DeclarationNameInfo &NameInfo, NestedNameSpecifierLoc NNS, NamedDecl *FoundD, SourceLocation TemplateKWLoc, const TemplateArgumentListInfo *TemplateArgs) {\n // ...\n if (getLangOpts().ObjCWeak && isa<VarDecl>(D) && Ty.getObjCLifetime() == Qualifiers::OCL_Weak && !isUnevaluatedContext() && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, E->getBeginLoc()))"},{v,3049,"ExprResult Sema::BuildIvarRefExpr(Scope *S, SourceLocation Loc, ObjCIvarDecl *IV) {\n // ...\n if (IV->getType().getObjCLifetime() == Qualifiers::OCL_Weak) {\n if (!isUnevaluatedContext() && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, Loc))"},{v,14631,"// C99 6.5.16.1\nQualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType, BinaryOperatorKind Opc) {\n // ...\n if (CompoundType.isNull()) {\n // ...\n if (ConvTy == Compatible) {\n // ...\n if (LHSType.getObjCLifetime() == Qualifiers::OCL_Strong || LHSType.isNonWeakInMRRWithObjCWeak(Context)) {\n // ...\n if (!Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, RHS.get()->getBeginLoc()))"},{"clang/lib/Sema/SemaExprMember.cpp",1483,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (IV->getType().getObjCLifetime() == Qualifiers::OCL_Weak) {\n if (!S.isUnevaluatedContext() && !S.Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, MemberLoc))"},{fb,3389,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (getLangOpts().ObjCWeak) {\n if (!isImplicit && Method) {\n if (const ObjCPropertyDecl *Prop = Method->findPropertyDecl()) {\n // ...\n if (IsWeak && !isUnevaluatedContext() && !Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, LBracLoc))"},{Hb,856,"/// @property-specific behavior for doing lvalue-to-rvalue conversion.\nExprResult ObjCPropertyOpBuilder::buildRValueOperation(Expr *op) {\n // ...\n // As a special case, if the method returns \'id\', try to get\n // a better type from the property.\n if (RefExpr->isExplicitProperty() && result.get()->isPRValue()) {\n // ...\n if (propType.getObjCLifetime() == Qualifiers::OCL_Weak && !S.Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, RefExpr->getLocation()))"},{Hb,975,"ExprResult ObjCPropertyOpBuilder::complete(Expr *SyntacticForm) {\n if (isWeakProperty() && !S.isUnevaluatedContext() && !S.Diags.isIgnored(diag::warn_arc_repeated_use_of_weak, SyntacticForm->getBeginLoc()))"}}, | |||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:23:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:58:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:77:7: warning: weak implicit property \'implicitProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:82:7: warning: weak implicit property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:93:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:99:7: warning: weak variable \'a\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:104:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:115:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:119:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:122:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:129:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:135:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:140:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:146:7: warning: weak variable \'a\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:169:9: warning: weak property \'weakProp\' is accessed multiple times in this block but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:212:8: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:219:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:226:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:233:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:240:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:248:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:257:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:274:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:282:9: warning: weak variable \'a\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:311:7: warning: weak property \'weakProp\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:316:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:321:7: warning: weak property \'weakProp\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:324:7: warning: weak property \'weakProp\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:327:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:375:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:402:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:407:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]"} | ["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:23:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:58:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:77:7: warning: weak implicit property \'implicitProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:82:7: warning: weak implicit property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:93:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:99:7: warning: weak variable \'a\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:104:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:115:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:119:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:122:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:129:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:135:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:140:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:146:7: warning: weak variable \'a\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:169:9: warning: weak property \'weakProp\' is accessed multiple times in this block but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:212:8: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:219:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:226:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:233:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:240:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:248:10: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:257:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:274:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:282:9: warning: weak variable \'a\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:311:7: warning: weak property \'weakProp\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:316:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:321:7: warning: weak property \'weakProp\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:324:7: warning: weak property \'weakProp\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:327:7: warning: weak instance variable \'weakIvar\' is accessed multiple times in this method but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:375:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:402:7: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]","clang/test/SemaObjC/arc-repeated-weak.mm:407:9: warning: weak property \'weakProp\' is accessed multiple times in this function but may be unpredictably set to nil; assign to a strong variable to keep the object alive [-Warc-repeated-use-of-weak]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_retain_cycle"]={ | ["warn_arc_retain_cycle"]={ | ||
[ | [m]={Kc,"arc-retain-cycles"}, | ||
[l]="arc-retain-cycles", | |||
[ | |||
[e]="capturing %0 strongly in this block is likely to lead to a retain cycle", | [e]="capturing %0 strongly in this block is likely to lead to a retain cycle", | ||
[ | [a]=n, | ||
[b]="capturing (.*?) strongly in this block is likely to lead to a retain cycle", | [b]="capturing (.*?) strongly in this block is likely to lead to a retain cycle", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-retain\\-cycles[^\\]]*\\]", | ||
[ | [d]="ARC Retain Cycle", | ||
[ | [f]={Cc,1308178962,Dc,Ec}, | ||
[ | [g]={{y,17473,"static void diagnoseRetainCycle(Sema &S, Expr *capturer, RetainCycleOwner &owner) {\n // ...\n S.Diag(capturer->getExprLoc(), diag::warn_arc_retain_cycle) << owner.Variable << capturer->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:12:12: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:14:12: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:17:12: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:31:22: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:48:31: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:49:30: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:63:33: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:69:28: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:71:31: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:74:28: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:81:28: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:94:18: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:126:19: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:149:5: warning: capturing \'b1\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:154:5: warning: capturing \'b2\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:170:6: warning: capturing \'obj\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:174:6: warning: capturing \'obj\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]"} | ["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:12:12: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:14:12: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:17:12: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:31:22: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:48:31: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:49:30: warning: capturing \'x\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:63:33: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:69:28: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:71:31: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:74:28: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:81:28: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:94:18: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:126:19: warning: capturing \'self\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:149:5: warning: capturing \'b1\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:154:5: warning: capturing \'b2\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:170:6: warning: capturing \'obj\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]","clang/test/SemaObjC/warn-retain-cycle.m:174:6: warning: capturing \'obj\' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_retained_assign"]={ | ["warn_arc_retained_assign"]={ | ||
[ | [m]={Kc,hc}, | ||
[l]=hc, | |||
[ | |||
[e]="assigning retained object to %select{weak|unsafe_unretained}0 %select{property|variable}1; object will be released after assignment", | [e]="assigning retained object to %select{weak|unsafe_unretained}0 %select{property|variable}1; object will be released after assignment", | ||
[ | [a]=n, | ||
[b]="assigning retained object to (?:weak|unsafe_unretained) (?:property|variable); object will be released after assignment", | [b]="assigning retained object to (?:weak|unsafe_unretained) (?:property|variable); object will be released after assignment", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-unsafe\\-retained\\-assign[^\\]]*\\]", | ||
[ | [d]=lc, | ||
[ | [f]={Cc,1308178962,Dc,Ec}, | ||
[ | [g]={{y,17749,"static bool checkUnsafeAssignObject(Sema &S, SourceLocation Loc, Qualifiers::ObjCLifetime LT, Expr *RHS, bool isProperty) {\n // Strip off any implicit cast added to get to the one ARC-specific.\n while (ImplicitCastExpr *cast = dyn_cast<ImplicitCastExpr>(RHS)) {\n if (cast->getCastKind() == CK_ARCConsumeObject) {\n S.Diag(Loc, diag::warn_arc_retained_assign) << (LT == Qualifiers::OCL_ExplicitNone) << (isProperty ? 0 : 1) << RHS->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-unsafe-assigns.m"]={"clang/test/SemaObjC/arc-unsafe-assigns.m:25:21: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:27:21: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:30:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:31:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:39:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:40:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]"} | ["clang/test/SemaObjC/arc-unsafe-assigns.m"]={"clang/test/SemaObjC/arc-unsafe-assigns.m:25:21: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:27:21: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:30:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:31:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:39:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:40:14: warning: assigning retained object to unsafe_unretained variable; object will be released after assignment [-Warc-unsafe-retained-assign]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_retained_property_assign"]={ | ["warn_arc_retained_property_assign"]={ | ||
[ | [m]={Kc,hc}, | ||
[l]=hc, | |||
[ | |||
[e]="assigning retained object to unsafe property; object will be released after assignment", | [e]="assigning retained object to unsafe property; object will be released after assignment", | ||
[ | [a]=n, | ||
[b]="assigning retained object to unsafe property; object will be released after assignment", | [b]="assigning retained object to unsafe property; object will be released after assignment", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warc\\-unsafe\\-retained\\-assign[^\\]]*\\]", | ||
[ | [d]=lc, | ||
[ | [f]={"5f98da0ea2bb",1308939934,"objc-arc: Check on a variety of unsafe assignment of retained \nobjects. // rdar://9495837\n\nllvm-svn...","objc-arc: Check on a variety of unsafe assignment of retained \nobjects. // rdar://9495837\n\nllvm-svn: 133806"}, | ||
[ | [g]={{y,17827,"void Sema::checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS) {\n // ...\n if (PRE) {\n // ...\n if (Attributes & ObjCPropertyAttribute::kind_assign) {\n // ...\n while (ImplicitCastExpr *cast = dyn_cast<ImplicitCastExpr>(RHS)) {\n if (cast->getCastKind() == CK_ARCConsumeObject) {\n Diag(Loc, diag::warn_arc_retained_property_assign) << RHS->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc-unsafe-assigns.m"]={"clang/test/SemaObjC/arc-unsafe-assigns.m:24:20: warning: assigning retained object to unsafe property; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:26:20: warning: assigning retained object to unsafe property; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:36:17: warning: assigning retained object to unsafe property; object will be released after assignment [-Warc-unsafe-retained-assign]"} | ["clang/test/SemaObjC/arc-unsafe-assigns.m"]={"clang/test/SemaObjC/arc-unsafe-assigns.m:24:20: warning: assigning retained object to unsafe property; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:26:20: warning: assigning retained object to unsafe property; object will be released after assignment [-Warc-unsafe-retained-assign]","clang/test/SemaObjC/arc-unsafe-assigns.m:36:17: warning: assigning retained object to unsafe property; object will be released after assignment [-Warc-unsafe-retained-assign]"} | ||
} | } | ||
}, | }, | ||
["warn_arc_strong_pointer_objc_pointer"]={ | ["warn_arc_strong_pointer_objc_pointer"]={ | ||
[ | [m]={"explicit-ownership-type"}, | ||
[l]="explicit-ownership-type", | |||
[ | |||
[e]="method parameter of type %0 with no explicit ownership", | [e]="method parameter of type %0 with no explicit ownership", | ||
[ | [a]=n, | ||
[b]="method parameter of type (.*?) with no explicit ownership", | [b]="method parameter of type (.*?) with no explicit ownership", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wexplicit\\-ownership\\-type[^\\]]*\\]", | ||
[ | [d]="ARC Restrictions", | ||
[ | [f]={"cd278ffa2856",1346370962,"objective-C ARC: under -Wexplicit-ownership-type diagnose those\nmethod parameter types which are ref...","objective-C ARC: under -Wexplicit-ownership-type diagnose those\nmethod parameter types which are reference to an objective-C\npointer to object with no explicit ownership. // rdar://10907090\n\nllvm-svn: 162959"}, | ||
[ | [g]={{u,403,"/// ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible\n/// and user declared, in the method definition\'s AST.\nvoid Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) {\n // ...\n // Introduce all of the other parameters into this scope.\n for (auto *Param : MDecl->parameters()) {\n if (!Param->isInvalidDecl() && getLangOpts().ObjCAutoRefCount && !HasExplicitOwnershipAttr(*this, Param))\n Diag(Param->getLocation(), diag::warn_arc_strong_pointer_objc_pointer) << Param->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/arc-objc-lifetime.mm"]={"clang/test/SemaObjCXX/arc-objc-lifetime.mm:50:50: warning: method parameter of type \'NSObject<P> *__autoreleasing &\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:50:77: warning: method parameter of type \'__autoreleasing id<P> &\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:53:26: warning: method parameter of type \'NSObject *__autoreleasing *\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:53:38: warning: method parameter of type \'__autoreleasing id *\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:56:23: warning: method parameter of type \'__autoreleasing T &\' (aka \'void (^__autoreleasing &)()\') with no explicit ownership [-Wexplicit-ownership-type]"} | ["clang/test/SemaObjCXX/arc-objc-lifetime.mm"]={"clang/test/SemaObjCXX/arc-objc-lifetime.mm:50:50: warning: method parameter of type \'NSObject<P> *__autoreleasing &\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:50:77: warning: method parameter of type \'__autoreleasing id<P> &\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:53:26: warning: method parameter of type \'NSObject *__autoreleasing *\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:53:38: warning: method parameter of type \'__autoreleasing id *\' with no explicit ownership [-Wexplicit-ownership-type]","clang/test/SemaObjCXX/arc-objc-lifetime.mm:56:23: warning: method parameter of type \'__autoreleasing T &\' (aka \'void (^__autoreleasing &)()\') with no explicit ownership [-Wexplicit-ownership-type]"} | ||
} | } | ||
}, | }, | ||
["warn_arcmt_nsalloc_realloc"]={ | ["warn_arcmt_nsalloc_realloc"]={ | ||
[e]="[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC", | [e]="[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC", | ||
[ | [a]=n, | ||
[b]="\\[rewriter\\] call returns pointer to GC managed memory; it will become unmanaged in ARC", | [b]="\\[rewriter\\] call returns pointer to GC managed memory; it will become unmanaged in ARC", | ||
[ | [c]=lb, | ||
[ | [d]=j, | ||
[ | [f]={"403a4f9b826d",1400539871,"Get ARCMT/GC-check-warn-nsalloc.m working\n\nThe -no-ns-alloc-error migration option now causes the di...","Get ARCMT/GC-check-warn-nsalloc.m working\n\nThe -no-ns-alloc-error migration option now causes the diagnostic to be ignored\ncompletely. If this isn\'t desired, the error can be downgraded to a warning\nusing the usual -Wno-error=arcmt-ns-alloc.\n\nNote that we can\'t use -verify right now on this test because\nVerifyDiagnosticConsumer gets confused by multiple SourceManager instances,\nwhich is presumably the reason it was XFAILed in the first place and why the\nregression wasn\'t detected. We\'ll grep instead for now.\n\nllvm-svn: 209172"}, | ||
[ | [g]={{"clang/lib/ARCMigrate/ARCMT.cpp",319,"bool arcmt::checkForManualIssues(CompilerInvocation &origCI, const FrontendInputFile &Input, std::shared_ptr<PCHContainerOperations> PCHContainerOps, DiagnosticConsumer *DiagClient, bool emitPremigrationARCErrors, StringRef plistOut) {\n // ...\n if (!NoNSAllocReallocError)\n Diags->setSeverity(diag::warn_arcmt_nsalloc_realloc, diag::Severity::Error, SourceLocation());"},{"clang/lib/ARCMigrate/TransGCCalls.cpp",41,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n // ...\n bool VisitCallExpr(CallExpr *E) {\n // ...\n if (MigrateCtx.isGCOwnedNonObjC(E->getType())) {\n TA.report(E->getBeginLoc(), diag::warn_arcmt_nsalloc_realloc, E->getSourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/ARCMT/GC-check-warn-nsalloc.m"]={"clang/test/ARCMT/GC-check-warn-nsalloc.m:10:3: warning: [rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC"} | ["clang/test/ARCMT/GC-check-warn-nsalloc.m"]={"clang/test/ARCMT/GC-check-warn-nsalloc.m:10:3: warning: [rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC"} | ||
} | } | ||
}, | }, | ||
["warn_argument_invalid_range"]={ | ["warn_argument_invalid_range"]={ | ||
[ | [m]={"argument-outside-range"}, | ||
[l]="argument-outside-range", | |||
[ | |||
[e]="argument value %0 is outside the valid range [%1, %2]", | [e]="argument value %0 is outside the valid range [%1, %2]", | ||
[ | [a]=Ac, | ||
[b]="argument value (.*?) is outside the valid range \\[(.*?), (.*?)\\]", | [b]="argument value (.*?) is outside the valid range \\[(.*?), (.*?)\\]", | ||
[ | [c]=" \\[[^\\]]*\\-Wargument\\-outside\\-range[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"16e6bc23a12e",1529624769,"[x86] Teach the builtin argument range check to allow invalid ranges in\ndead code.\n\nThis is importan...","[x86] Teach the builtin argument range check to allow invalid ranges in\ndead code.\n\nThis is important for C++ templates that essentially compute the valid\ninput in a way that is constant and will cause all the invalid cases to\nbe dead code that is deleted. Code in the wild actually does this and\nGCC also accepts these kinds of patterns so it is important to support\nit.\n\nTo make this work, we provide a non-error path to diagnose these issues,\nand use a default-error warning instead. This keeps the relatively\nstrict handling but prevents nastiness like SFINAE on these errors. It\nalso allows us to safely use the system to diagnose this only when it\noccurs at runtime (in emitted code).\n\nEntertainingly, this required fixing the syntax in various other ways\nfor the x86 test because we never bothered to diagnose that the returns\nwere invalid.\n\nSince debugging these compile failures was super confusing, I\'ve also\nimproved the diagnostic to actually say what the value was. Most of the\nchecks I\'ve made ignore this to simplify maintenance, but I\'ve checked\nit in a few places to make sure the diagnsotic is working.\n\nDepends on D48462. Without that, we might actually crash some part of\nthe compiler after bypassing the error here.\n\nThanks to Richard, Ben Kramer, and especially Craig Topper for all the\nhelp here.\n\nDifferential Revision: https://reviews.llvm.org/D48464\n\nllvm-svn: 335309"}, | ||
[ | [g]={{y,8815,"/// SemaBuiltinConstantArgRange - Handle a check if argument ArgNum of CallExpr\n/// TheCall is a constant expression in the range [Low, High].\nbool Sema::SemaBuiltinConstantArgRange(CallExpr *TheCall, int ArgNum, int Low, int High, bool RangeIsError) {\n // ...\n if (Result.getSExtValue() < Low || Result.getSExtValue() > High) {\n if (RangeIsError)\n // ...\n else\n // ...\n DiagRuntimeBehavior(TheCall->getBeginLoc(), TheCall, PDiag(diag::warn_argument_invalid_range) << toString(Result, 10) << Low << High << Arg->getSourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/builtins-x86.c"]={"clang/test/Sema/builtins-x86.c:25:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:29:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:33:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:37:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:41:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:45:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:49:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:53:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:57:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:61:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:65:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:69:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:73:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:77:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:114:3: error: argument value 1 is outside the valid range [2, 3] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:118:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:122:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:126:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:130:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:134:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:138:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:142:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:146:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:150:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:154:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:158:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:162:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:166:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:170:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:174:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:178:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:182:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:186:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]"} | ["clang/test/Sema/builtins-x86.c"]={"clang/test/Sema/builtins-x86.c:25:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:29:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:33:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:37:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:41:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:45:10: error: argument value 32 is outside the valid range [0, 31] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:49:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:53:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:57:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:61:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:65:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:69:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:73:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:77:10: error: argument value 8 is outside the valid range [0, 7] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:114:3: error: argument value 1 is outside the valid range [2, 3] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:118:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:122:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:126:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:130:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:134:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:138:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:142:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:146:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:150:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:154:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:158:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:162:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:166:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:170:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:174:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:178:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:182:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]","clang/test/Sema/builtins-x86.c:186:10: error: argument value 1024 is outside the valid range [0, 255] [-Wargument-outside-range]"} | ||
} | } | ||
}, | }, | ||
["warn_argument_undefined_behaviour"]={ | ["warn_argument_undefined_behaviour"]={ | ||
[ | [m]={"argument-undefined-behaviour"}, | ||
[l]="argument-undefined-behaviour", | |||
[ | |||
[e]="argument value %0 will result in undefined behaviour", | [e]="argument value %0 will result in undefined behaviour", | ||
[ | [a]=n, | ||
[b]="argument value (.*?) will result in undefined behaviour", | [b]="argument value (.*?) will result in undefined behaviour", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wargument\\-undefined\\-behaviour[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{y,4324,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_ppc_addex: {\n // ...\n if (ArgValue != 0)\n Diag(TheCall->getBeginLoc(), diag::warn_argument_undefined_behaviour) << ArgValue;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c:9:19: warning: argument value 1 will result in undefined behaviour [-Wargument-undefined-behaviour]","clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c:10:29: warning: argument value 3 will result in undefined behaviour [-Wargument-undefined-behaviour]"} | ["clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c:9:19: warning: argument value 1 will result in undefined behaviour [-Wargument-undefined-behaviour]","clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c:10:29: warning: argument value 3 will result in undefined behaviour [-Wargument-undefined-behaviour]"} | ||
} | } | ||
}, | }, | ||
["warn_arith_conv_enum_float"]={ | ["warn_arith_conv_enum_float"]={ | ||
[ | [m]={Eb,pc,"enum-float-conversion",Ib}, | ||
[l]="enum-float-conversion", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 %select{floating-point|enumeration}1 type %2 %plural{2:with|4:from|:and}0 %select{enumeration|floating-point}1 type %3", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 %select{floating-point|enumeration}1 type %2 %plural{2:with|4:from|:and}0 %select{enumeration|floating-point}1 type %3", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) (?:floating\\-point|enumeration) type (.*?) (?:with|from|and) (?:enumeration|floating\\-point) type (.*?)", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) (?:floating\\-point|enumeration) type (.*?) (?:with|from|and) (?:enumeration|floating\\-point) type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wenum\\-float\\-conversion[^\\]]*\\]", | ||
[ | [d]=gc, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1504,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n S.Diag(Loc, S.getLangOpts().CPlusPlus20 ? diag::warn_arith_conv_enum_float_cxx20 : diag::warn_arith_conv_enum_float) << LHS->getSourceRange() << RHS->getSourceRange() << (int)ACK << LEnum << L << R;"}}, | ||
[ | [h]={ | ||
[ | [yc]={"clang/test/CXX/expr/expr.arith.conv/p2.cpp:13:11: warning: arithmetic between enumeration type \'enum E1\' and floating-point type \'double\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:14:10: warning: arithmetic between floating-point type \'double\' and enumeration type \'enum E1\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:18:11: warning: arithmetic between enumeration type \'enum E1\' and floating-point type \'double\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:19:10: warning: arithmetic between floating-point type \'double\' and enumeration type \'enum E1\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:30:11: warning: comparison of enumeration type \'enum E1\' with floating-point type \'double\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:31:10: warning: comparison of floating-point type \'double\' with enumeration type \'enum E1\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:35:11: warning: comparison of enumeration type \'enum E1\' with floating-point type \'double\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:36:10: warning: comparison of floating-point type \'double\' with enumeration type \'enum E1\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:40:10: warning: conditional expression between enumeration type \'enum E1\' and floating-point type \'double\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:41:10: warning: conditional expression between floating-point type \'double\' and enumeration type \'enum E1\' [-Wenum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:51:10: warning: compound assignment of floating-point type \'double\' from enumeration type \'enum E1\' [-Wenum-float-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_arith_conv_enum_float_cxx20"]={ | ["warn_arith_conv_enum_float_cxx20"]={ | ||
[ | [m]={Eb,zb,"deprecated-enum-float-conversion",pc,"enum-float-conversion",Ib}, | ||
[l]="deprecated-enum-float-conversion", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 %select{floating-point|enumeration}1 type %2 %plural{2:with|4:from|:and}0 %select{enumeration|floating-point}1 type %3 is deprecated", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 %select{floating-point|enumeration}1 type %2 %plural{2:with|4:from|:and}0 %select{enumeration|floating-point}1 type %3 is deprecated", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) (?:floating\\-point|enumeration) type (.*?) (?:with|from|and) (?:enumeration|floating\\-point) type (.*?) is deprecated", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) (?:floating\\-point|enumeration) type (.*?) (?:with|from|and) (?:enumeration|floating\\-point) type (.*?) is deprecated", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-enum\\-float\\-conversion[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1503,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n S.Diag(Loc, S.getLangOpts().CPlusPlus20 ? diag::warn_arith_conv_enum_float_cxx20 : diag::warn_arith_conv_enum_float) << LHS->getSourceRange() << RHS->getSourceRange() << (int)ACK << LEnum << L << R;"}}, | ||
[ | [h]={ | ||
[ | [yc]={"clang/test/CXX/expr/expr.arith.conv/p2.cpp:13:11: warning: arithmetic between enumeration type \'enum E1\' and floating-point type \'double\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:14:10: warning: arithmetic between floating-point type \'double\' and enumeration type \'enum E1\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:18:11: warning: arithmetic between enumeration type \'enum E1\' and floating-point type \'double\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:19:10: warning: arithmetic between floating-point type \'double\' and enumeration type \'enum E1\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:30:11: warning: comparison of enumeration type \'enum E1\' with floating-point type \'double\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:31:10: warning: comparison of floating-point type \'double\' with enumeration type \'enum E1\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:35:11: warning: comparison of enumeration type \'enum E1\' with floating-point type \'double\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:36:10: warning: comparison of floating-point type \'double\' with enumeration type \'enum E1\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:40:10: warning: conditional expression between enumeration type \'enum E1\' and floating-point type \'double\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:41:10: warning: conditional expression between floating-point type \'double\' and enumeration type \'enum E1\' is deprecated [-Wdeprecated-enum-float-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:51:10: warning: compound assignment of floating-point type \'double\' from enumeration type \'enum E1\' is deprecated [-Wdeprecated-enum-float-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_arith_conv_mixed_anon_enum_types"]={ | ["warn_arith_conv_mixed_anon_enum_types"]={ | ||
[ | [m]={"anon-enum-enum-conversion"}, | ||
[l]="anon-enum-enum-conversion", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wanon\\-enum\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1517,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_arith_conv_mixed_anon_enum_types_cxx20 : diag::warn_arith_conv_mixed_anon_enum_types;"}} | ||
}, | }, | ||
["warn_arith_conv_mixed_anon_enum_types_cxx20"]={ | ["warn_arith_conv_mixed_anon_enum_types_cxx20"]={ | ||
[ | [m]={"anon-enum-enum-conversion",zb,"deprecated-anon-enum-enum-conversion"}, | ||
[l]="deprecated-anon-enum-enum-conversion", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-anon\\-enum\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1516,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_arith_conv_mixed_anon_enum_types_cxx20 : diag::warn_arith_conv_mixed_anon_enum_types;"}} | ||
}, | }, | ||
["warn_arith_conv_mixed_enum_types"]={ | ["warn_arith_conv_mixed_enum_types"]={ | ||
[ | [m]={Eb,pc,"enum-enum-conversion",Ib}, | ||
[l]="enum-enum-conversion", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wenum\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [d]=gc, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1533,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n } else if (ACK == Sema::ACK_Conditional) {\n // ...\n } else if (ACK == Sema::ACK_Comparison) {\n // ...\n } else {\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_arith_conv_mixed_enum_types_cxx20 : diag::warn_arith_conv_mixed_enum_types;"}}, | ||
[ | [h]={ | ||
[ | [yc]={"clang/test/CXX/expr/expr.arith.conv/p2.cpp:12:11: warning: arithmetic between different enumeration types (\'enum E1\' and \'enum E2\') [-Wenum-enum-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:17:11: warning: arithmetic between different enumeration types (\'enum E1\' and \'enum E2\') [-Wenum-enum-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_arith_conv_mixed_enum_types_cxx20"]={ | ["warn_arith_conv_mixed_enum_types_cxx20"]={ | ||
[ | [m]={Eb,zb,"deprecated-enum-enum-conversion",pc,"enum-enum-conversion",Ib}, | ||
[l]="deprecated-enum-enum-conversion", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-enum\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1532,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n } else if (ACK == Sema::ACK_Conditional) {\n // ...\n } else if (ACK == Sema::ACK_Comparison) {\n // ...\n } else {\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_arith_conv_mixed_enum_types_cxx20 : diag::warn_arith_conv_mixed_enum_types;"}}, | ||
[ | [h]={ | ||
[ | [yc]={"clang/test/CXX/expr/expr.arith.conv/p2.cpp:12:11: warning: arithmetic between different enumeration types (\'enum E1\' and \'enum E2\') is deprecated [-Wdeprecated-enum-enum-conversion]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:17:11: warning: arithmetic between different enumeration types (\'enum E1\' and \'enum E2\') is deprecated [-Wdeprecated-enum-enum-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_arm_interrupt_calling_convention"]={ | ["warn_arm_interrupt_calling_convention"]={ | ||
[ | [m]={j,O,Jc}, | ||
[l]=Jc, | |||
[ | |||
[e]="call to function without interrupt attribute could clobber interruptee\'s VFP registers", | [e]="call to function without interrupt attribute could clobber interruptee\'s VFP registers", | ||
[ | [a]=n, | ||
[b]="call to function without interrupt attribute could clobber interruptee\'s VFP registers", | [b]="call to function without interrupt attribute could clobber interruptee\'s VFP registers", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wextra[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"8277c41a899b",1484753471,"Warn when calling a non interrupt function from an interrupt on ARM\n\nThe idea for this originated fr...","Warn when calling a non interrupt function from an interrupt on ARM\n\nThe idea for this originated from a really tricky bug: ISRs on ARM don\'t\nautomatically save off the VFP regs, so if say, memcpy gets interrupted and the\nISR itself calls memcpy, the regs are left clobbered when the ISR is done.\n\nhttps://reviews.llvm.org/D28820\n\nllvm-svn: 292375"}, | ||
[ | [g]={{v,7358,"/// 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 Diag(Fn->getExprLoc(), diag::warn_arm_interrupt_calling_convention);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/arm-interrupt-attr.c"]={"clang/test/Sema/arm-interrupt-attr.c:34:3: warning: call to function without interrupt attribute could clobber interruptee\'s VFP registers [-Wextra]","clang/test/Sema/arm-interrupt-attr.c:40:3: warning: call to function without interrupt attribute could clobber interruptee\'s VFP registers [-Wextra]"} | ["clang/test/Sema/arm-interrupt-attr.c"]={"clang/test/Sema/arm-interrupt-attr.c:34:3: warning: call to function without interrupt attribute could clobber interruptee\'s VFP registers [-Wextra]","clang/test/Sema/arm-interrupt-attr.c:40:3: warning: call to function without interrupt attribute could clobber interruptee\'s VFP registers [-Wextra]"} | ||
} | } | ||
}, | }, | ||
["warn_array_index_exceeds_bounds"]={ | ["warn_array_index_exceeds_bounds"]={ | ||
[ | [m]={rc}, | ||
[l]=rc, | |||
[ | |||
[e]="array index %0 is past the end of the array (that has type %1%select{|, cast to %3}2)", | [e]="array index %0 is past the end of the array (that has type %1%select{|, cast to %3}2)", | ||
[ | [a]=n, | ||
[b]="array index (.*?) is past the end of the array \\(that has type (.*?)(?:|, cast to (.*?))\\)", | [b]="array index (.*?) is past the end of the array \\(that has type (.*?)(?:|, cast to (.*?))\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"108b2d56bf41",1297828904,"Tweak -Warray-bounds diagnostics based on feedback from Chandler.\n\nllvm-svn: 125649","Tweak -Warray-bounds diagnostics based on feedback from Chandler.\n\nllvm-svn: 125649"}, | ||
[ | [g]={{y,17168,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n unsigned DiagID = ASE ? diag::warn_array_index_exceeds_bounds : diag::warn_ptr_arith_exceeds_bounds;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/array-bounds-system-header.cpp"]={"clang/test/SemaCXX/array-bounds-system-header.cpp:6:15: warning: array index 3 is past the end of the array (that has type \'char[3]\') [-Warray-bounds]","clang/test/SemaCXX/array-bounds-system-header.cpp:8:7: warning: array index 3 is past the end of the array (that has type \'char[3]\') [-Warray-bounds]"} | ["clang/test/SemaCXX/array-bounds-system-header.cpp"]={"clang/test/SemaCXX/array-bounds-system-header.cpp:6:15: warning: array index 3 is past the end of the array (that has type \'char[3]\') [-Warray-bounds]","clang/test/SemaCXX/array-bounds-system-header.cpp:8:7: warning: array index 3 is past the end of the array (that has type \'char[3]\') [-Warray-bounds]"} | ||
} | } | ||
}, | }, | ||
["warn_array_index_exceeds_max_addressable_bounds"]={ | ["warn_array_index_exceeds_max_addressable_bounds"]={ | ||
[ | [m]={rc}, | ||
[l]=rc, | |||
[ | |||
[e]="array index %0 refers past the last possible element for an array in %1-bit address space containing %2-bit (%3-byte) elements (max possible %4 element%s5)", | [e]="array index %0 refers past the last possible element for an array in %1-bit address space containing %2-bit (%3-byte) elements (max possible %4 element%s5)", | ||
[ | [a]=n, | ||
[b]="array index (.*?) refers past the last possible element for an array in (.*?)\\-bit address space containing (.*?)\\-bit \\((.*?)\\-byte\\) elements \\(max possible (.*?) element(.*?)\\)", | [b]="array index (.*?) refers past the last possible element for an array in (.*?)\\-bit address space containing (.*?)\\-bit \\((.*?)\\-byte\\) elements \\(max possible (.*?) element(.*?)\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"da55e9ba1273",1600125132,"[Sema] Address-space sensitive index check for unbounded arrays\n\nCheck applied to unbounded (incompl...","[Sema] Address-space sensitive index check for unbounded arrays\n\nCheck applied to unbounded (incomplete) arrays and pointers\nto spot cases where the computed address is beyond the\nlargest possible addressable extent of the array, based\non the address space in which the array is delcared, or\nwhich the pointer refers to.\n\nCheck helps to avoid cases of nonsense pointer math and\narray indexing which could lead to linker failures or\nruntime exceptions. Of particular interest when building\nfor embedded systems with small address spaces.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D86796"}, | ||
[ | [g]={{y,17078,"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 unsigned DiagID = ASE ? diag::warn_array_index_exceeds_max_addressable_bounds : diag::warn_ptr_arith_exceeds_max_addressable_bounds;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/const-eval.c"]={"clang/test/Sema/const-eval.c:148:20: warning: array index 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]"} | ["clang/test/Sema/const-eval.c"]={"clang/test/Sema/const-eval.c:148:20: warning: array index 18446744073709551615 refers past the last possible element for an array in 64-bit address space containing 64-bit (8-byte) elements (max possible 2305843009213693952 elements) [-Warray-bounds]"} | ||
} | } | ||
}, | }, | ||
["warn_array_index_precedes_bounds"]={ | ["warn_array_index_precedes_bounds"]={ | ||
[ | [m]={rc}, | ||
[l]=rc, | |||
[ | |||
[e]="array index %0 is before the beginning of the array", | [e]="array index %0 is before the beginning of the array", | ||
[ | [a]=n, | ||
[b]="array index (.*?) is before the beginning of the array", | [b]="array index (.*?) is before the beginning of the array", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Warray\\-bounds[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"108b2d56bf41",1297828904,"Tweak -Warray-bounds diagnostics based on feedback from Chandler.\n\nllvm-svn: 125649","Tweak -Warray-bounds diagnostics based on feedback from Chandler.\n\nllvm-svn: 125649"}, | ||
[ | [g]={{y,17178,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n } else {\n unsigned DiagID = diag::warn_array_index_precedes_bounds;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/array-bounds.cpp"]={"clang/test/SemaCXX/array-bounds.cpp:16:10: warning: array index -1 is before the beginning of the array [-Warray-bounds]","clang/test/SemaCXX/array-bounds.cpp:300:41: warning: array index -1 is before the beginning of the array [-Warray-bounds]","clang/test/SemaCXX/array-bounds.cpp:307:14: warning: array index -1 is before the beginning of the array [-Warray-bounds]","clang/test/SemaCXX/array-bounds.cpp:307:14: warning: array index -1 is before the beginning of the array [-Warray-bounds]"} | ["clang/test/SemaCXX/array-bounds.cpp"]={"clang/test/SemaCXX/array-bounds.cpp:16:10: warning: array index -1 is before the beginning of the array [-Warray-bounds]","clang/test/SemaCXX/array-bounds.cpp:300:41: warning: array index -1 is before the beginning of the array [-Warray-bounds]","clang/test/SemaCXX/array-bounds.cpp:307:14: warning: array index -1 is before the beginning of the array [-Warray-bounds]","clang/test/SemaCXX/array-bounds.cpp:307:14: warning: array index -1 is before the beginning of the array [-Warray-bounds]"} | ||
} | } | ||
}, | }, | ||
["warn_asm_label_on_auto_decl"]={ | ["warn_asm_label_on_auto_decl"]={ | ||
[e]="ignored asm label \'%0\' on automatic variable", | [e]="ignored asm label \'%0\' on automatic variable", | ||
[ | [a]=n, | ||
[b]="ignored asm label \'(.*?)\' on automatic variable", | [b]="ignored asm label \'(.*?)\' on automatic variable", | ||
[ | [c]=lb, | ||
[ | [d]="Inline Assembly Issue", | ||
[ | [f]={"133922318641",1294759012,"Added warning about invalid register specification for local variables.\n\nllvm-svn: 123236","Added warning about invalid register specification for local variables.\n\nllvm-svn: 123236"}, | ||
[ | [g]={{p,7939,"NamedDecl *Sema::ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef<BindingDecl *> Bindings) {\n // ...\n // Handle GNU asm-label extension (encoded as an attribute).\n if (Expr *E = (Expr *)D.getAsmLabel()) {\n // ...\n if (S->getFnParent() != nullptr) {\n // ...\n case SC_None:\n case SC_Auto:\n Diag(E->getExprLoc(), diag::warn_asm_label_on_auto_decl) << Label;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:112:14: warning: ignored asm label \'a_asm\' on automatic variable","clang/test/Sema/asm.c:113:20: warning: ignored asm label \'aa_asm\' on automatic variable"} | ["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:112:14: warning: ignored asm label \'a_asm\' on automatic variable","clang/test/Sema/asm.c:113:20: warning: ignored asm label \'aa_asm\' on automatic variable"} | ||
} | } | ||
}, | }, | ||
["warn_asm_mismatched_size_modifier"]={ | ["warn_asm_mismatched_size_modifier"]={ | ||
[ | [m]={"asm","asm-operand-widths"}, | ||
[l]="asm-operand-widths", | |||
[ | |||
[e]="value size does not match register size specified by the constraint and modifier", | [e]="value size does not match register size specified by the constraint and modifier", | ||
[ | [a]=n, | ||
[b]="value size does not match register size specified by the constraint and modifier", | [b]="value size does not match register size specified by the constraint and modifier", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wasm\\-operand\\-widths[^\\]]*\\]", | ||
[ | [d]="Inline Assembly Issue", | ||
[ | [f]={"9d1ee1175de3",1351207728,"Recommit Eric\'s code to validate ASM string\'s constraints and modifiers.\n\nThis code checks the ASM s...","Recommit Eric\'s code to validate ASM string\'s constraints and modifiers.\n\nThis code checks the ASM string to see if the output size is able to fit within\nthe variable specified as the output. For instance, scalar-to-vector conversions\nmay not really work. It\'s on by default, but can be turned off with a flag if\nyou think you know what you\'re doing.\n\nThis is placed under a flag (\'-Wasm-operand-widths\') and flag group (\'-Wasm\').\n\n<rdar://problem/12284092>\n\nllvm-svn: 166737"}, | ||
[ | [g]={{"clang/lib/Sema/SemaStmtAsm.cpp",550,"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 targetDiag(Exprs[ConstraintIdx]->getBeginLoc(), diag::warn_asm_mismatched_size_modifier);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:33: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]"} | ["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:33: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]"} | ||
} | } | ||
}, | }, | ||
["warn_assume_aligned_too_great"]={ | ["warn_assume_aligned_too_great"]={ | ||
[ | [m]={"builtin-assume-aligned-alignment"}, | ||
[l]="builtin-assume-aligned-alignment", | |||
[ | |||
[e]="requested alignment must be %0 bytes or smaller; maximum alignment assumed", | [e]="requested alignment must be %0 bytes or smaller; maximum alignment assumed", | ||
[ | [a]=n, | ||
[b]="requested alignment must be (.*?) bytes or smaller; maximum alignment assumed", | [b]="requested alignment must be (.*?) bytes or smaller; maximum alignment assumed", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-assume\\-aligned\\-alignment[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{y,6745,"/// Handles the checks for format strings, non-POD arguments to vararg\n/// functions, NULL arguments passed to non-NULL parameters, and diagnose_if\n/// attributes.\nvoid Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, const Expr *ThisArg, ArrayRef<const Expr *> Args, bool IsMemberFunction, SourceLocation Loc, SourceRange Range, VariadicCallType CallType) {\n // ...\n if (FDecl && FDecl->hasAttr<AllocAlignAttr>()) {\n // ...\n if (!Arg->isValueDependent()) {\n // ...\n if (Arg->EvaluateAsInt(Align, Context)) {\n // ...\n if (I > Sema::MaximumAlignment)\n Diag(Arg->getExprLoc(), diag::warn_assume_aligned_too_great) << Arg->getSourceRange() << Sema::MaximumAlignment;"},{y,8678,"/// Handle __builtin_assume_aligned. This is declared\n/// as (const void*, size_t, ...) and can take one optional constant int arg.\nbool Sema::SemaBuiltinAssumeAligned(CallExpr *TheCall) {\n // ...\n // We can\'t check the value of a dependent argument.\n if (!SecondArg->isValueDependent()) {\n // ...\n if (Result > Sema::MaximumAlignment)\n Diag(TheCall->getBeginLoc(), diag::warn_assume_aligned_too_great) << SecondArg->getSourceRange() << Sema::MaximumAlignment;"},{o,1717,"void Sema::AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE) {\n // ...\n if (!E->isValueDependent()) {\n // ...\n if (*I > Sema::MaximumAlignment)\n Diag(CI.getLoc(), diag::warn_assume_aligned_too_great) << CI.getRange() << Sema::MaximumAlignment;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/alloc-align-attr.c"]={"clang/test/Sema/alloc-align-attr.c:30:31: warning: requested alignment must be 4294967296 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment]"} | ["clang/test/Sema/alloc-align-attr.c"]={"clang/test/Sema/alloc-align-attr.c:30:31: warning: requested alignment must be 4294967296 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment]"} | ||
} | } | ||
}, | }, | ||
["warn_assume_attribute_string_unknown"]={ | ["warn_assume_attribute_string_unknown"]={ | ||
[ | [m]={"unknown-assumption"}, | ||
[l]="unknown-assumption", | |||
[ | |||
[e]="unknown assumption string \'%0\'; attribute is potentially ignored", | [e]="unknown assumption string \'%0\'; attribute is potentially ignored", | ||
[ | [a]=n, | ||
[b]="unknown assumption string \'(.*?)\'; attribute is potentially ignored", | [b]="unknown assumption string \'(.*?)\'; attribute is potentially ignored", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunknown\\-assumption[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{o,1784,"/// Check if \\p AssumptionStr is a known assumption and warn if not.\nstatic void checkAssumptionAttr(Sema &S, SourceLocation Loc, StringRef AssumptionStr) {\n // ...\n if (!Suggestion.empty())\n // ...\n else\n S.Diag(Loc, diag::warn_assume_attribute_string_unknown) << AssumptionStr;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-assume.c"]={"clang/test/Sema/attr-assume.c:6:37: warning: unknown assumption string \'QQQQ\'; attribute is potentially ignored [-Wunknown-assumption]"} | ["clang/test/Sema/attr-assume.c"]={"clang/test/Sema/attr-assume.c:6:37: warning: unknown assumption string \'QQQQ\'; attribute is potentially ignored [-Wunknown-assumption]"} | ||
} | } | ||
}, | }, | ||
["warn_assume_attribute_string_unknown_suggested"]={ | ["warn_assume_attribute_string_unknown_suggested"]={ | ||
[ | [m]={"misspelled-assumption"}, | ||
[l]="misspelled-assumption", | |||
[ | |||
[e]="unknown assumption string \'%0\' may be misspelled; attribute is potentially ignored, did you mean \'%1\'?", | [e]="unknown assumption string \'%0\' may be misspelled; attribute is potentially ignored, did you mean \'%1\'?", | ||
[ | [a]=n, | ||
[b]="unknown assumption string \'(.*?)\' may be misspelled; attribute is potentially ignored, did you mean \'(.*?)\'\\?", | [b]="unknown assumption string \'(.*?)\' may be misspelled; attribute is potentially ignored, did you mean \'(.*?)\'\\?", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmisspelled\\-assumption[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{o,1781,"/// Check if \\p AssumptionStr is a known assumption and warn if not.\nstatic void checkAssumptionAttr(Sema &S, SourceLocation Loc, StringRef AssumptionStr) {\n // ...\n if (!Suggestion.empty())\n S.Diag(Loc, diag::warn_assume_attribute_string_unknown_suggested) << AssumptionStr << Suggestion;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-assume.c"]={"clang/test/Sema/attr-assume.c:8:37: warning: unknown assumption string \'omp_noopenmp\' may be misspelled; attribute is potentially ignored, did you mean \'omp_no_openmp\'? [-Wmisspelled-assumption]","clang/test/Sema/attr-assume.c:9:37: warning: unknown assumption string \'omp_no_openmp_routine\' may be misspelled; attribute is potentially ignored, did you mean \'omp_no_openmp_routines\'? [-Wmisspelled-assumption]","clang/test/Sema/attr-assume.c:10:37: warning: unknown assumption string \'omp_no_openmp1\' may be misspelled; attribute is potentially ignored, did you mean \'omp_no_openmp\'? [-Wmisspelled-assumption]"} | ["clang/test/Sema/attr-assume.c"]={"clang/test/Sema/attr-assume.c:8:37: warning: unknown assumption string \'omp_noopenmp\' may be misspelled; attribute is potentially ignored, did you mean \'omp_no_openmp\'? [-Wmisspelled-assumption]","clang/test/Sema/attr-assume.c:9:37: warning: unknown assumption string \'omp_no_openmp_routine\' may be misspelled; attribute is potentially ignored, did you mean \'omp_no_openmp_routines\'? [-Wmisspelled-assumption]","clang/test/Sema/attr-assume.c:10:37: warning: unknown assumption string \'omp_no_openmp1\' may be misspelled; attribute is potentially ignored, did you mean \'omp_no_openmp\'? [-Wmisspelled-assumption]"} | ||
} | } | ||
}, | }, | ||
["warn_assume_side_effects"]={ | ["warn_assume_side_effects"]={ | ||
[ | [m]={"assume"}, | ||
[l]="assume", | |||
[ | |||
[e]="the argument to %0 has side effects that will be discarded", | [e]="the argument to %0 has side effects that will be discarded", | ||
[ | [a]=n, | ||
[b]="the argument to (.*?) has side effects that will be discarded", | [b]="the argument to (.*?) has side effects that will be discarded", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wassume[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"f04173358502",1405607155,"Add an __assume side-effects warning\n\nIn MS-compatibility mode, we support the __assume builtin. The...","Add an __assume side-effects warning\n\nIn MS-compatibility mode, we support the __assume builtin. The __assume builtin\ndoes not evaluate its arguments, and we should issue a warning if __assume is\nprovided with an argument with side effects (because these effects will be\ndiscarded).\n\nThis is similar in spirit to the warnings issued by other compilers (Intel\nDiagnostic 2261, MS Compiler Warning C4557).\n\nllvm-svn: 213266"}, | ||
[ | [g]={{y,8605,"/// SemaBuiltinAssume - Handle __assume (MS Extension).\n// __assume does not evaluate its arguments, and should warn if its argument\n// has side effects.\nbool Sema::SemaBuiltinAssume(CallExpr *TheCall) {\n // ...\n if (Arg->HasSideEffects(Context))\n Diag(Arg->getBeginLoc(), diag::warn_assume_side_effects) << Arg->getSourceRange() << cast<FunctionDecl>(TheCall->getCalleeDecl())->getIdentifier();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/stmtexprs.c"]={"clang/test/Sema/stmtexprs.c:8:21: warning: the argument to \'__builtin_assume\' has side effects that will be discarded [-Wassume]"} | ["clang/test/Sema/stmtexprs.c"]={"clang/test/Sema/stmtexprs.c:8:21: warning: the argument to \'__builtin_assume\' has side effects that will be discarded [-Wassume]"} | ||
} | } | ||
}, | }, | ||
["warn_at_available_unchecked_use"]={ | ["warn_at_available_unchecked_use"]={ | ||
[ | [m]={"unsupported-availability-guard"}, | ||
[l]="unsupported-availability-guard", | |||
[ | |||
[e]="%select{@available|__builtin_available}0 does not guard availability here; use if (%select{@available|__builtin_available}0) instead", | [e]="%select{@available|__builtin_available}0 does not guard availability here; use if (%select{@available|__builtin_available}0) instead", | ||
[ | [a]=n, | ||
[b]="(?:@available|__builtin_available) does not guard availability here; use if \\((?:@available|__builtin_available)\\) instead", | [b]="(?:@available|__builtin_available) does not guard availability here; use if \\((?:@available|__builtin_available)\\) instead", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-availability\\-guard[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"0a484baa8516",1495638929,"Warn about uses of `@available` that can\'t suppress the\n-Wunguarded-availability warnings\n\nrdar://32...","Warn about uses of `@available` that can\'t suppress the\n-Wunguarded-availability warnings\n\nrdar://32306520\n\nDifferential Revision: https://reviews.llvm.org/D33450\n\nllvm-svn: 303761"}, | ||
[ | [g]={{Nb,730,"/// This class implements -Wunguarded-availability.\n///\n/// This is done with a traversal of the AST of a function that makes reference\n/// to a partially available declaration. Whenever we encounter an \\c if of the\n/// form: \\c if(@available(...)), we use the version from the condition to visit\n/// the then statement.\nclass DiagnoseUnguardedAvailability : public RecursiveASTVisitor<DiagnoseUnguardedAvailability> {\n // ...\n bool VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) {\n SemaRef.Diag(E->getBeginLoc(), diag::warn_at_available_unchecked_use) << (!SemaRef.getLangOpts().ObjC);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/unguarded-availability.m"]={"clang/test/SemaObjC/unguarded-availability.m:169:7: warning: @available does not guard availability here; use if (@available) instead [-Wunsupported-availability-guard]","clang/test/SemaObjC/unguarded-availability.m:175:22: warning: @available does not guard availability here; use if (@available) instead [-Wunsupported-availability-guard]"} | ["clang/test/SemaObjC/unguarded-availability.m"]={"clang/test/SemaObjC/unguarded-availability.m:169:7: warning: @available does not guard availability here; use if (@available) instead [-Wunsupported-availability-guard]","clang/test/SemaObjC/unguarded-availability.m:175:22: warning: @available does not guard availability here; use if (@available) instead [-Wunsupported-availability-guard]"} | ||
} | } | ||
}, | }, | ||
["warn_atimport_in_framework_header"]={ | ["warn_atimport_in_framework_header"]={ | ||
[ | [m]={"atimport-in-framework-header"}, | ||
[l]="atimport-in-framework-header", | |||
[ | |||
[e]="use of \'@import\' in framework header is discouraged, including this header requires -fmodules", | [e]="use of \'@import\' in framework header is discouraged, including this header requires -fmodules", | ||
[ | [a]=n, | ||
[b]="use of \'@import\' in framework header is discouraged, including this header requires \\-fmodules", | [b]="use of \'@import\' in framework header is discouraged, including this header requires \\-fmodules", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Watimport\\-in\\-framework\\-header[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"03e0d2d82be7",1530131376,"[Modules][ObjC] Warn on the use of \'@import\' in framework headers\n\nUsing @import in framework header...","[Modules][ObjC] Warn on the use of \'@import\' in framework headers\n\nUsing @import in framework headers inhibit the use of such headers\nwhen not using modules, this is specially bad for headers that end\nup in the SDK (or any other system framework). Add a warning to give\nusers some indication that this is discouraged.\n\nrdar://problem/39192894\n\nllvm-svn: 335780"}, | ||
[ | [g]={{"clang/lib/Parse/Parser.cpp",2606,"/// Parse a module import declaration. This is essentially the same for\n/// Objective-C and C++20 except for the leading \'@\' (in ObjC) and the\n/// trailing optional attributes (in C++).\n///\n/// [ObjC] @import declaration:\n/// \'@\' \'import\' module-name \';\'\n/// [ModTS] module-import-declaration:\n/// \'import\' module-name attribute-specifier-seq[opt] \';\'\n/// [C++20] module-import-declaration:\n/// \'export\'[opt] \'import\' module-name\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' module-partition\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' header-name\n/// attribute-specifier-seq[opt] \';\'\nDecl *Parser::ParseModuleImport(SourceLocation AtLoc, Sema::ModuleImportState &ImportState) {\n // ...\n // Using \'@import\' in framework headers requires modules to be enabled so that\n // the header is parseable. Emit a warning to make the user aware.\n if (IsObjCAtImport && AtLoc.isValid()) {\n // ...\n if (FE && llvm::sys::path::parent_path(FE->getDir().getName()).endswith(\".framework\"))\n Diags.Report(AtLoc, diag::warn_atimport_in_framework_header);"}}, | ||
[ | [h]={ | ||
["clang/test/Modules/self-import-header.m"]={"clang/test/Modules/Inputs/self-import-header/af.framework/Headers/a1.h:1:1: warning: use of \'@import\' in framework header is discouraged, including this header requires -fmodules [-Watimport-in-framework-header]"} | ["clang/test/Modules/self-import-header.m"]={"clang/test/Modules/Inputs/self-import-header/af.framework/Headers/a1.h:1:1: warning: use of \'@import\' in framework header is discouraged, including this header requires -fmodules [-Watimport-in-framework-header]"} | ||
} | } | ||
}, | }, | ||
["warn_atl_uuid_deprecated"]={ | ["warn_atl_uuid_deprecated"]={ | ||
[ | [m]={zb,"deprecated-declarations"}, | ||
[l]="deprecated-declarations", | |||
[ | |||
[e]="specifying \'uuid\' as an ATL attribute is deprecated; use __declspec instead", | [e]="specifying \'uuid\' as an ATL attribute is deprecated; use __declspec instead", | ||
[ | [a]=n, | ||
[b]="specifying \'uuid\' as an ATL attribute is deprecated; use __declspec instead", | [b]="specifying \'uuid\' as an ATL attribute is deprecated; use __declspec instead", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-declarations[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={"469891e7a293",1494003956,"Warn that the [] spelling of uuid(...) is deprecated.\n\nhttps://reviews.llvm.org/D32879\n\nllvm-svn: 30...","Warn that the [] spelling of uuid(...) is deprecated.\n\nhttps://reviews.llvm.org/D32879\n\nllvm-svn: 302255"}, | ||
[ | [g]={{o,7040,"static void handleUuidAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // FIXME: It\'d be nice to also emit a fixit removing uuid(...) (and, if it\'s\n // the only thing in the [] list, the [] too), and add an insertion of\n // __declspec(uuid(...)). But sadly, neither the SourceLocs of the commas\n // separating attributes nor of the [ and the ] are in the AST.\n // Cf \"SourceLocations of attribute list delimiters - [[ ... , ... ]] etc\"\n // on cfe-dev.\n if (AL.isMicrosoftAttribute()) // Check for [uuid(...)] spelling.\n S.Diag(AL.getLoc(), diag::warn_atl_uuid_deprecated);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:71:2: warning: specifying \'uuid\' as an ATL attribute is deprecated; use __declspec instead [-Wdeprecated-declarations]"} | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:71:2: warning: specifying \'uuid\' as an ATL attribute is deprecated; use __declspec instead [-Wdeprecated-declarations]"} | ||
} | } | ||
}, | }, | ||
["warn_atomic_implicit_seq_cst"]={ | ["warn_atomic_implicit_seq_cst"]={ | ||
[ | [m]={"atomic-implicit-seq-cst"}, | ||
[l]="atomic-implicit-seq-cst", | |||
[ | |||
[e]="implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary", | [e]="implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary", | ||
[ | [a]=n, | ||
[b]="implicit use of sequentially\\-consistent atomic may incur stronger memory barriers than necessary", | [b]="implicit use of sequentially\\-consistent atomic may incur stronger memory barriers than necessary", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Watomic\\-implicit\\-seq\\-cst[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"e77b48b07840",1536612176,"Implement -Watomic-implicit-seq-cst\n\nSummary:\n_Atomic and __sync_* operations are implicitly sequent...","Implement -Watomic-implicit-seq-cst\n\nSummary:\n_Atomic and __sync_* operations are implicitly sequentially-consistent. Some\ncodebases want to force explicit usage of memory order instead. This warning\nallows them to know where implicit sequentially-consistent memory order is used.\nThe warning isn\'t on by default because _Atomic was purposefully designed to\nhave seq_cst as the default: the idea was that it\'s the right thing to use most\nof the time. This warning allows developers who disagree to enforce explicit\nusage instead.\n\nA follow-up patch will take care of C++\'s std::atomic. It\'ll be different enough\nfrom this patch that I think it should be separate: for C++ the atomic\noperations all have a memory order parameter (or two), but it\'s defaulted. I\nbelieve this warning should trigger when the default is used, but not when\nseq_cst is used explicitly (or implicitly as the failure order for cmpxchg).\n\n<rdar://problem/28172966>\n\nReviewers: rjmccall\n\nSubscribers: dexonsmith, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51084\n\nllvm-svn: 341860"}, | ||
[ | [g]={{y,2356,"ExprResult Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case Builtin::BI__sync_synchronize:\n Diag(TheCall->getBeginLoc(), diag::warn_atomic_implicit_seq_cst) << TheCall->getCallee()->getSourceRange();"},{y,7817,"/// We have a call to a function like __sync_fetch_and_add, which is an\n/// overloaded function based on the pointer type of its first argument.\n/// The main BuildCallExpr routines have already promoted the types of\n/// arguments because all of these calls are prototyped as void(...).\n///\n/// This function goes through and does final semantic checking for these\n/// builtins, as well as generating any warnings.\nExprResult Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {\n // ...\n Diag(TheCall->getEndLoc(), diag::warn_atomic_implicit_seq_cst) << Callee->getSourceRange();"},{y,14185,"/// Analyze the given simple or compound assignment for warning-worthy\n/// operations.\nstatic void AnalyzeAssignment(Sema &S, BinaryOperator *E) {\n // ...\n // Diagnose implicitly sequentially-consistent atomic assignment.\n if (E->getLHS()->getType()->isAtomicType())\n S.Diag(E->getRHS()->getBeginLoc(), diag::warn_atomic_implicit_seq_cst);"},{y,14356,"/// Analyze the given compound assignment for the possible losing of\n/// floating-point precision.\nstatic void AnalyzeCompoundAssignment(Sema &S, BinaryOperator *E) {\n // ...\n if (E->getLHS()->getType()->isAtomicType())\n S.Diag(E->getOperatorLoc(), diag::warn_atomic_implicit_seq_cst);"},{y,14673,"static void CheckImplicitConversion(Sema &S, Expr *E, QualType T, SourceLocation CC, bool *ICContext = nullptr, bool IsListInit = false) {\n // ...\n if (Source->isAtomicType())\n S.Diag(E->getExprLoc(), diag::warn_atomic_implicit_seq_cst);"},{y,15288,"/// 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 // Skip past explicit casts.\n if (auto *CE = dyn_cast<ExplicitCastExpr>(E)) {\n // ...\n if (!CE->getType()->isVoidType() && E->getType()->isAtomicType())\n S.Diag(E->getBeginLoc(), diag::warn_atomic_implicit_seq_cst);"},{y,15355,"/// 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 UnaryOperator *U = dyn_cast<UnaryOperator>(E)) {\n if (U->getOpcode() == UO_LNot) {\n // ...\n } else if (U->getOpcode() != UO_AddrOf) {\n if (U->getSubExpr()->getType()->isAtomicType())\n S.Diag(U->getSubExpr()->getBeginLoc(), diag::warn_atomic_implicit_seq_cst);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/atomic-implicit-seq_cst.c"]={ | ["clang/test/Sema/atomic-implicit-seq_cst.c"]={ | ||
[1]="clang/test/Sema/atomic-implicit-seq_cst.c:10:5: warning: implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary [-Watomic-implicit-seq-cst]", | [1]="clang/test/Sema/atomic-implicit-seq_cst.c:10:5: warning: implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary [-Watomic-implicit-seq-cst]", | ||
Line 7,080: | Line 5,713: | ||
}, | }, | ||
["warn_atomic_member_access"]={ | ["warn_atomic_member_access"]={ | ||
[ | [m]={"atomic-access"}, | ||
[l]="atomic-access", | |||
[ | |||
[e]="accessing a member of an atomic structure or union is undefined behavior", | [e]="accessing a member of an atomic structure or union is undefined behavior", | ||
[ | [a]=Ac, | ||
[b]="accessing a member of an atomic structure or union is undefined behavior", | [b]="accessing a member of an atomic structure or union is undefined behavior", | ||
[ | [c]=" \\[[^\\]]*\\-Watomic\\-access[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handlin...","[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handling for:\n\nexport module M;\n\nexport namespace {};\n\nexport namespace N {};\nexport using namespace N;\n\nIn the first case, we were allowing empty anonymous namespaces\nas part of an extension allowing empty top-level entities, but that seems\ninappropriate in this case, since the linkage would be internal for the\nanonymous namespace. We now report an error for this.\n\nThe second case was producing a warning diagnostic that this was\naccepted as an extension - however the C++20 standard does allow this\nas well-formed.\n\nIn the third case we keep the current practice that this is accepted with a\nwarning (as an extension). The C++20 standard says it\'s an error.\n\nWe also ensure that using decls are only applied to items with external linkage.\n\nThis adjusts error messages for exports involving redeclarations in modules to\nbe more specific about the reason that the decl has been rejected.\n\nDifferential Revision: https://reviews.llvm.org/D122119"}, | ||
[ | [g]={{"clang/lib/Sema/SemaExprMember.cpp",1306,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // If the base type is an atomic type, this access is undefined behavior per\n // C11 6.5.2.3p5. Instead of giving a typecheck error, we\'ll warn the user\n // about the UB and recover by converting the atomic lvalue into a non-atomic\n // lvalue. Because this is inherently unsafe as an atomic operation, the\n // warning defaults to an error.\n if (const auto *ATy = BaseType->getAs<AtomicType>()) {\n S.DiagRuntimeBehavior(OpLoc, nullptr, S.PDiag(diag::warn_atomic_member_access));"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/atomic-expr.c"]={"clang/test/Sema/atomic-expr.c:86:4: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:87:5: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:93:4: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:94:5: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:97:15: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:98:12: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:99:15: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:100:12: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:104:4: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:105:15: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]"} | ["clang/test/Sema/atomic-expr.c"]={"clang/test/Sema/atomic-expr.c:86:4: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:87:5: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:93:4: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:94:5: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:97:15: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:98:12: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:99:15: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:100:12: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:104:4: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]","clang/test/Sema/atomic-expr.c:105:15: error: accessing a member of an atomic structure or union is undefined behavior [-Watomic-access]"} | ||
} | } | ||
}, | }, | ||
["warn_atomic_op_has_invalid_memory_order"]={ | ["warn_atomic_op_has_invalid_memory_order"]={ | ||
[ | [m]={"atomic-memory-ordering"}, | ||
[l]="atomic-memory-ordering", | |||
[ | |||
[e]="memory order argument to atomic operation is invalid", | [e]="memory order argument to atomic operation is invalid", | ||
[ | [a]=n, | ||
[b]="memory order argument to atomic operation is invalid", | [b]="memory order argument to atomic operation is invalid", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Watomic\\-memory\\-ordering[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"c83472e0ff4c",1394537710,"Sema: demote invalid atomic ordering message to warning.\n\nSomeone could write:\n if (0) {\n __c11_...","Sema: demote invalid atomic ordering message to warning.\n\nSomeone could write:\n if (0) {\n __c11_atomic_load(ptr, memory_order_release);\n }\n\nor the equivalent, which is perfectly valid, so we shouldn\'t outright reject\ninvalid orderings on purely static grounds.\n\nrdar://problem/16242991\n\nllvm-svn: 203564"}, | ||
[ | [g]={{y,4449,"bool Sema::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n // Check validity of memory ordering as per C11 / C++11\'s memody model.\n // Only fence needs check. Atomic dec/inc allow all memory orders.\n if (!llvm::isValidAtomicOrderingCABI(Ord))\n return Diag(ArgExpr->getBeginLoc(), diag::warn_atomic_op_has_invalid_memory_order) << ArgExpr->getSourceRange();"},{y,4456,"bool Sema::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case llvm::AtomicOrderingCABI::relaxed:\n case llvm::AtomicOrderingCABI::consume:\n if (BuiltinID == AMDGPU::BI__builtin_amdgcn_fence)\n return Diag(ArgExpr->getBeginLoc(), diag::warn_atomic_op_has_invalid_memory_order) << ArgExpr->getSourceRange();"},{y,7427,"ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder) {\n // ...\n if (SubExprs.size() >= 2 && Form != Init) {\n if (std::optional<llvm::APSInt> Result = SubExprs[1]->getIntegerConstantExpr(Context))\n if (!isValidOrderingForOp(Result->getSExtValue(), Op))\n Diag(SubExprs[1]->getBeginLoc(), diag::warn_atomic_op_has_invalid_memory_order) << SubExprs[1]->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCUDA/atomic-ops.cu"]={"clang/test/SemaCUDA/atomic-ops.cu:20:33: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]","clang/test/SemaCUDA/atomic-ops.cu:43:31: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]","clang/test/SemaCUDA/atomic-ops.cu:44:31: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]","clang/test/SemaCUDA/atomic-ops.cu:45:31: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]"} | ["clang/test/SemaCUDA/atomic-ops.cu"]={"clang/test/SemaCUDA/atomic-ops.cu:20:33: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]","clang/test/SemaCUDA/atomic-ops.cu:43:31: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]","clang/test/SemaCUDA/atomic-ops.cu:44:31: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]","clang/test/SemaCUDA/atomic-ops.cu:45:31: warning: memory order argument to atomic operation is invalid [-Watomic-memory-ordering]"} | ||
} | } | ||
}, | }, | ||
["warn_atomic_op_misaligned"]={ | ["warn_atomic_op_misaligned"]={ | ||
[ | [m]={"atomic-alignment"}, | ||
[l]="atomic-alignment", | |||
[ | |||
[e]="misaligned atomic operation may incur significant performance penalty; the expected alignment (%0 bytes) exceeds the actual alignment (%1 bytes)", | [e]="misaligned atomic operation may incur significant performance penalty; the expected alignment (%0 bytes) exceeds the actual alignment (%1 bytes)", | ||
[ | [a]=n, | ||
[b]="misaligned atomic operation may incur significant performance penalty; the expected alignment \\((.*?) bytes\\) exceeds the actual alignment \\((.*?) bytes\\)", | [b]="misaligned atomic operation may incur significant performance penalty; the expected alignment \\((.*?) bytes\\) exceeds the actual alignment \\((.*?) bytes\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Watomic\\-alignment[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"9dc1d0c74eb1",1524471384,"[Atomics] warn about atomic accesses using libcalls\n\nIf an atomic variable is misaligned (and that s...","[Atomics] warn about atomic accesses using libcalls\n\nIf an atomic variable is misaligned (and that suspicion is why Clang emits\nlibcalls at all) the runtime support library will have to use a lock to safely\naccess it, with potentially very bad performance consequences. There\'s a very\ngood chance this is unintentional so it makes sense to issue a warning.\n\nAlso give it a named group so people can promote it to an error, or disable it\nif they really don\'t care.\n\nllvm-svn: 330566"}, | ||
[ | [g]={{"clang/lib/CodeGen/CGAtomic.cpp",847,"RValue CodeGenFunction::EmitAtomicExpr(AtomicExpr *E) {\n // ...\n if (Misaligned) {\n Diags.Report(E->getBeginLoc(), diag::warn_atomic_op_misaligned) << (int)TInfo.Width.getQuantity() << (int)Ptr.getAlignment().getQuantity();"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/atomic-arm64.c"]={"clang/test/CodeGen/atomic-arm64.c:69:3: warning: misaligned atomic operation may incur significant performance penalty; the expected alignment (32 bytes) exceeds the actual alignment (8 bytes) [-Watomic-alignment]"} | ["clang/test/CodeGen/atomic-arm64.c"]={"clang/test/CodeGen/atomic-arm64.c:69:3: warning: misaligned atomic operation may incur significant performance penalty; the expected alignment (32 bytes) exceeds the actual alignment (8 bytes) [-Watomic-alignment]"} | ||
} | } | ||
}, | }, | ||
["warn_atomic_op_oversized"]={ | ["warn_atomic_op_oversized"]={ | ||
[ | [m]={"atomic-alignment"}, | ||
[l]="atomic-alignment", | |||
[ | |||
[e]="large atomic operation may incur significant performance penalty; the access size (%0 bytes) exceeds the max lock-free size (%1 bytes)", | [e]="large atomic operation may incur significant performance penalty; the access size (%0 bytes) exceeds the max lock-free size (%1 bytes)", | ||
[ | [a]=n, | ||
[b]="large atomic operation may incur significant performance penalty; the access size \\((.*?) bytes\\) exceeds the max lock\\-free size \\((.*?) bytes\\)", | [b]="large atomic operation may incur significant performance penalty; the access size \\((.*?) bytes\\) exceeds the max lock\\-free size \\((.*?) bytes\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Watomic\\-alignment[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"e18c6ef6b41a",1596564601,"[clang] improve diagnostics for misaligned and large atomics\n\n\"Listing the alignment and access size...","[clang] improve diagnostics for misaligned and large atomics\n\n\"Listing the alignment and access size (== expected alignment) in the warning\nseems like a good idea.\"\n\nsolves PR 46947\n\n struct Foo {\n struct Bar {\n void * a;\n void * b;\n };\n Bar bar;\n };\n\n struct ThirtyTwo {\n struct Large {\n void * a;\n void * b;\n void * c;\n void * d;\n };\n Large bar;\n };\n\n void braz(Foo *foo, ThirtyTwo *braz) {\n Foo::Bar bar;\n __atomic_load(&foo->bar, &bar, __ATOMIC_RELAXED);\n\n ThirtyTwo::Large foobar;\n __atomic_load(&braz->bar, &foobar, __ATOMIC_RELAXED);\n }\n\nrepro.cpp:21:3: warning: misaligned atomic operation may incur significant performance penalty; the expected (16 bytes) exceeds the actual alignment (8 bytes) [-Watomic-alignment]\n __atomic_load(&foo->bar, &bar, __ATOMIC_RELAXED);\n ^\nrepro.cpp:24:3: warning: misaligned atomic operation may incur significant performance penalty; the expected (32 bytes) exceeds the actual alignment (8 bytes) [-Watomic-alignment]\n __atomic_load(&braz->bar, &foobar, __ATOMIC_RELAXED);\n ^\nrepro.cpp:24:3: warning: large atomic operation may incur significant performance penalty; the access size (32 bytes) exceeds the max lock-free size (16 bytes) [-Watomic-alignment]\n3 warnings generated.\n\nDifferential Revision: https://reviews.llvm.org/D85102"}, | ||
[ | [g]={{"clang/lib/CodeGen/CGAtomic.cpp",853,"RValue CodeGenFunction::EmitAtomicExpr(AtomicExpr *E) {\n // ...\n if (Oversized) {\n Diags.Report(E->getBeginLoc(), diag::warn_atomic_op_oversized) << (int)TInfo.Width.getQuantity() << (int)MaxInlineWidth.getQuantity();"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/arm-atomics-m0.c"]={"clang/test/CodeGen/arm-atomics-m0.c:15:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:17:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:20:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:23:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:26:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:28:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:31:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:34:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]"} | ["clang/test/CodeGen/arm-atomics-m0.c"]={"clang/test/CodeGen/arm-atomics-m0.c:15:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:17:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:20:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:23:3: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:26:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:28:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:31:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]","clang/test/CodeGen/arm-atomics-m0.c:34:3: warning: large atomic operation may incur significant performance penalty; the access size (8 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]"} | ||
} | } | ||
}, | }, | ||
["warn_atomic_property_rule"]={ | ["warn_atomic_property_rule"]={ | ||
[ | [m]={"atomic-property-with-user-defined-accessor"}, | ||
[l]="atomic-property-with-user-defined-accessor", | |||
[ | |||
[e]="writable atomic property %0 cannot pair a synthesized %select{getter|setter}1 with a user defined %select{getter|setter}2", | [e]="writable atomic property %0 cannot pair a synthesized %select{getter|setter}1 with a user defined %select{getter|setter}2", | ||
[ | [a]=n, | ||
[b]="writable atomic property (.*?) cannot pair a synthesized (?:getter|setter) with a user defined (?:getter|setter)", | [b]="writable atomic property (.*?) cannot pair a synthesized (?:getter|setter) with a user defined (?:getter|setter)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Watomic\\-property\\-with\\-user\\-defined\\-accessor[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"13e0c90fc1a9",1257979211,"writable atomic property\'s setter/getter must be in \'lock\' step of\neither both synthesized or bith u...","writable atomic property\'s setter/getter must be in \'lock\' step of\neither both synthesized or bith user defined. \nImplements radar 6557233.\n\nllvm-svn: 86887"}, | ||
[ | [g]={{x,2228,"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 Diag(MethodLoc, diag::warn_atomic_property_rule) << Property->getIdentifier() << (GetterMethod != nullptr) << (SetterMethod != nullptr);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/atomic-property-synthesis-rules.m"]={"clang/test/SemaObjC/atomic-property-synthesis-rules.m:251:1: warning: writable atomic property \'Get\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:252:1: warning: writable atomic property \'Set\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:269:1: warning: writable atomic property \'Get_ReadWriteInExt\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:270:1: warning: writable atomic property \'Set_ReadWriteInExt\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:279:1: warning: writable atomic property \'Get_LateSynthesize\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:280:1: warning: writable atomic property \'Set_LateSynthesize\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:297:1: warning: writable atomic property \'Get_ReadWriteInExt_LateSynthesize\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:298:1: warning: writable atomic property \'Set_ReadWriteInExt_LateSynthesize\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]"} | ["clang/test/SemaObjC/atomic-property-synthesis-rules.m"]={"clang/test/SemaObjC/atomic-property-synthesis-rules.m:251:1: warning: writable atomic property \'Get\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:252:1: warning: writable atomic property \'Set\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:269:1: warning: writable atomic property \'Get_ReadWriteInExt\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:270:1: warning: writable atomic property \'Set_ReadWriteInExt\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:279:1: warning: writable atomic property \'Get_LateSynthesize\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:280:1: warning: writable atomic property \'Set_LateSynthesize\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:297:1: warning: writable atomic property \'Get_ReadWriteInExt_LateSynthesize\' cannot pair a synthesized setter with a user defined getter [-Watomic-property-with-user-defined-accessor]","clang/test/SemaObjC/atomic-property-synthesis-rules.m:298:1: warning: writable atomic property \'Set_ReadWriteInExt_LateSynthesize\' cannot pair a synthesized getter with a user defined setter [-Watomic-property-with-user-defined-accessor]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_abi_tag_namespace"]={ | ["warn_attr_abi_tag_namespace"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'abi_tag\' attribute on %select{non-inline|anonymous}0 namespace ignored", | [e]="\'abi_tag\' attribute on %select{non-inline|anonymous}0 namespace ignored", | ||
[ | [a]=n, | ||
[b]="\'abi_tag\' attribute on (?:non\\-inline|anonymous) namespace ignored", | [b]="\'abi_tag\' attribute on (?:non\\-inline|anonymous) namespace ignored", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"bf17ecf59a9b",1457537453,"[GCC] PR23529 Sema part of attrbute abi_tag support\n\nOriginal patch by Stefan Bühler http://reviews...","[GCC] PR23529 Sema part of attrbute abi_tag support\n\nOriginal patch by Stefan Bühler http://reviews.llvm.org/D12834\n\nDifference between original and this one:\n- fixed all comments in original code review\n- added more tests, all new diagnostics now covered by tests\n- moved abi_tag on re-declaration checks to Sema::mergeDeclAttributes\n where they actually may work as designed\n- clang-format + other stylistic changes\n\nMangle part will be sent for review as a separate patch.\n\nDifferential Revision: http://reviews.llvm.org/D17567\n\nllvm-svn: 263015"}, | ||
[ | [g]={{o,7331,"static void handleAbiTagAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *NS = dyn_cast<NamespaceDecl>(D)) {\n if (!NS->isInline()) {\n S.Diag(AL.getLoc(), diag::warn_attr_abi_tag_namespace) << 0;"},{o,7335,"static void handleAbiTagAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *NS = dyn_cast<NamespaceDecl>(D)) {\n // ...\n if (NS->isAnonymousNamespace()) {\n S.Diag(AL.getLoc(), diag::warn_attr_abi_tag_namespace) << 1;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/attr-abi-tag-syntax.cpp"]={"clang/test/SemaCXX/attr-abi-tag-syntax.cpp:5:26: warning: \'abi_tag\' attribute on non-inline namespace ignored [-Wignored-attributes]","clang/test/SemaCXX/attr-abi-tag-syntax.cpp:8:28: warning: \'abi_tag\' attribute on non-inline namespace ignored [-Wignored-attributes]","clang/test/SemaCXX/attr-abi-tag-syntax.cpp:15:33: warning: \'abi_tag\' attribute on anonymous namespace ignored [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-abi-tag-syntax.cpp"]={"clang/test/SemaCXX/attr-abi-tag-syntax.cpp:5:26: warning: \'abi_tag\' attribute on non-inline namespace ignored [-Wignored-attributes]","clang/test/SemaCXX/attr-abi-tag-syntax.cpp:8:28: warning: \'abi_tag\' attribute on non-inline namespace ignored [-Wignored-attributes]","clang/test/SemaCXX/attr-abi-tag-syntax.cpp:15:33: warning: \'abi_tag\' attribute on anonymous namespace ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_on_unconsumable_class"]={ | ["warn_attr_on_unconsumable_class"]={ | ||
[ | [m]={"consumed"}, | ||
[l]="consumed", | |||
[ | |||
[e]="consumed analysis attribute is attached to member of class %0 which isn\'t marked as consumable", | [e]="consumed analysis attribute is attached to member of class %0 which isn\'t marked as consumable", | ||
[ | [a]=n, | ||
[b]="consumed analysis attribute is attached to member of class (.*?) which isn\'t marked as consumable", | [b]="consumed analysis attribute is attached to member of class (.*?) which isn\'t marked as consumable", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wconsumed[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"5a715c4f00ac",1377903394,"Consumed analysis: add \'consumable\' class attribute.\nPatch by chris.wailes@gmail.com\n\nAdds the \'cons...","Consumed analysis: add \'consumable\' class attribute.\nPatch by chris.wailes@gmail.com\n\nAdds the \'consumable\' attribute that can be attached to classes. This replaces\nthe previous method of scanning a class\'s methods to see if any of them have\nconsumed analysis attributes attached to them. If consumed analysis attributes\nare attached to methods of a class that isn\'t marked \'consumable\' a warning\nis generated.\n\nllvm-svn: 189702"}, | ||
[ | [g]={{o,1231,"static bool checkForConsumableClass(Sema &S, const CXXMethodDecl *MD, const ParsedAttr &AL) {\n // ...\n if (const CXXRecordDecl *RD = ThisType->getAsCXXRecordDecl()) {\n if (!RD->hasAttr<ConsumableAttr>()) {\n S.Diag(AL.getLoc(), diag::warn_attr_on_unconsumable_class) << RD;"}}, | ||
[ | [h]={ | ||
[ | [Fc]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:51:25: warning: consumed analysis attribute is attached to member of class \'AttrTester2\' which isn\'t marked as consumable [-Wconsumed]","clang/test/SemaCXX/warn-consumed-parsing.cpp:52:25: warning: consumed analysis attribute is attached to member of class \'AttrTester2\' which isn\'t marked as consumable [-Wconsumed]","clang/test/SemaCXX/warn-consumed-parsing.cpp:53:25: warning: consumed analysis attribute is attached to member of class \'AttrTester2\' which isn\'t marked as consumable [-Wconsumed]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_decl_kind"]={ | ["warn_attr_swift_name_decl_kind"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute cannot be applied to this declaration", | [e]="%0 attribute cannot be applied to this declaration", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute cannot be applied to this declaration", | [b]="(.*?) attribute cannot be applied to this declaration", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6856,"bool Sema::DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) {\n if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {\n // ...\n } else if ((isa<EnumConstantDecl>(D) || isa<ObjCProtocolDecl>(D) || isa<ObjCInterfaceDecl>(D) || isa<ObjCPropertyDecl>(D) || isa<VarDecl>(D) || isa<TypedefNameDecl>(D) || isa<TagDecl>(D) || isa<IndirectFieldDecl>(D) || isa<FieldDecl>(D)) && !IsAsync) {\n // ...\n } else {\n Diag(Loc, diag::warn_attr_swift_name_decl_kind) << AL;"}} | ||
}, | }, | ||
["warn_attr_swift_name_decl_missing_params"]={ | ["warn_attr_swift_name_decl_missing_params"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute cannot be applied to a %select{function|method}1 with no parameters", | [e]="%0 attribute cannot be applied to a %select{function|method}1 with no parameters", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute cannot be applied to a (?:function|method) with no parameters", | [b]="(.*?) attribute cannot be applied to a (?:function|method) with no parameters", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{o,6794,"bool Sema::DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) {\n if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {\n // ...\n // The async name drops the last callback parameter.\n if (IsAsync) {\n if (ParamCount == 0) {\n Diag(Loc, diag::warn_attr_swift_name_decl_missing_params) << AL << isa<ObjCMethodDecl>(D);"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:191:42: warning: \'__swift_async_name__\' attribute cannot be applied to a method with no parameters [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:201:43: warning: \'__swift_async_name__\' attribute cannot be applied to a function with no parameters [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:191:42: warning: \'__swift_async_name__\' attribute cannot be applied to a method with no parameters [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:201:43: warning: \'__swift_async_name__\' attribute cannot be applied to a function with no parameters [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_function"]={ | ["warn_attr_swift_name_function"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute argument must be a string literal specifying a Swift function name", | [e]="%0 attribute argument must be a string literal specifying a Swift function name", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute argument must be a string literal specifying a Swift function name", | [b]="(.*?) attribute argument must be a string literal specifying a Swift function name", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6602,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (Name.back() != \')\') {\n S.Diag(Loc, diag::warn_attr_swift_name_function) << AL;"},{o,6664,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (Parameters.back() != \':\') {\n S.Diag(Loc, diag::warn_attr_swift_name_function) << AL;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:27:45: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:57:42: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:59:42: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:82:27: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:161:34: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:164:46: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:167:43: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:27:45: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:57:42: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:59:42: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:82:27: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:161:34: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:164:46: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:167:43: warning: \'__swift_name__\' attribute argument must be a string literal specifying a Swift function name [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_getter_parameters"]={ | ["warn_attr_swift_name_getter_parameters"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute for getter must not have any parameters besides \'self:\'", | [e]="%0 attribute for getter must not have any parameters besides \'self:\'", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute for getter must not have any parameters besides \'self\\:\'", | [b]="(.*?) attribute for getter must not have any parameters besides \'self\\:\'", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6720,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // Check the number of parameters for a getter/setter.\n if (IsGetter || IsSetter) {\n // ...\n unsigned ParamDiag = IsGetter ? diag::warn_attr_swift_name_getter_parameters : diag::warn_attr_swift_name_setter_parameters;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:104:78: warning: \'__swift_name__\' attribute for getter must not have any parameters besides \'self:\' [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:158:38: warning: \'__swift_name__\' attribute for getter must not have any parameters besides \'self:\' [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:104:78: warning: \'__swift_name__\' attribute for getter must not have any parameters besides \'self:\' [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:158:38: warning: \'__swift_name__\' attribute for getter must not have any parameters besides \'self:\' [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_invalid_identifier"]={ | ["warn_attr_swift_name_invalid_identifier"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute has invalid identifier for the %select{base|context|parameter}1 name", | [e]="%0 attribute has invalid identifier for the %select{base|context|parameter}1 name", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute has invalid identifier for the (?:base|context|parameter) name", | [b]="(.*?) attribute has invalid identifier for the (?:base|context|parameter) name", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6618,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (BaseName.empty()) {\n // ...\n } else if (ContextName.empty() || !isValidAsciiIdentifier(ContextName)) {\n S.Diag(Loc, diag::warn_attr_swift_name_invalid_identifier) << AL << /*context*/ 1;"},{o,6626,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (!isValidAsciiIdentifier(BaseName) || BaseName == \"_\") {\n S.Diag(Loc, diag::warn_attr_swift_name_invalid_identifier) << AL << /*basename*/ 0;"},{o,6676,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n do {\n // ...\n if (!isValidAsciiIdentifier(CurrentParam)) {\n S.Diag(Loc, diag::warn_attr_swift_name_invalid_identifier) << AL << /*parameter*/ 2;"},{o,6845,"bool Sema::DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) {\n if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {\n // ...\n } else if ((isa<EnumConstantDecl>(D) || isa<ObjCProtocolDecl>(D) || isa<ObjCInterfaceDecl>(D) || isa<ObjCPropertyDecl>(D) || isa<VarDecl>(D) || isa<TypedefNameDecl>(D) || isa<TagDecl>(D) || isa<IndirectFieldDecl>(D) || isa<FieldDecl>(D)) && !IsAsync) {\n // ...\n if (BaseName.empty()) {\n // ...\n } else if (!isValidAsciiIdentifier(ContextName)) {\n Diag(Loc, diag::warn_attr_swift_name_invalid_identifier) << AL << /*context*/ 1;"},{o,6851,"bool Sema::DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) {\n if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {\n // ...\n } else if ((isa<EnumConstantDecl>(D) || isa<ObjCProtocolDecl>(D) || isa<ObjCInterfaceDecl>(D) || isa<ObjCPropertyDecl>(D) || isa<VarDecl>(D) || isa<TypedefNameDecl>(D) || isa<TagDecl>(D) || isa<IndirectFieldDecl>(D) || isa<FieldDecl>(D)) && !IsAsync) {\n // ...\n if (!isValidAsciiIdentifier(BaseName)) {\n Diag(Loc, diag::warn_attr_swift_name_invalid_identifier) << AL << /*basename*/ 0;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:61:53: warning: \'__swift_name__\' attribute has invalid identifier for the base name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:63:53: warning: \'__swift_name__\' attribute has invalid identifier for the parameter name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:73:21: warning: \'__swift_name__\' attribute has invalid identifier for the base name [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:61:53: warning: \'__swift_name__\' attribute has invalid identifier for the base name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:63:53: warning: \'__swift_name__\' attribute has invalid identifier for the parameter name [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:73:21: warning: \'__swift_name__\' attribute has invalid identifier for the base name [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_missing_parameters"]={ | ["warn_attr_swift_name_missing_parameters"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute is missing parameter label clause", | [e]="%0 attribute is missing parameter label clause", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute is missing parameter label clause", | [b]="(.*?) attribute is missing parameter label clause", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6640,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (Parameters.empty()) {\n S.Diag(Loc, diag::warn_attr_swift_name_missing_parameters) << AL;"}} | ||
}, | }, | ||
["warn_attr_swift_name_multiple_selfs"]={ | ["warn_attr_swift_name_multiple_selfs"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute cannot specify more than one \'self:\' parameter", | [e]="%0 attribute cannot specify more than one \'self:\' parameter", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute cannot specify more than one \'self\\:\' parameter", | [b]="(.*?) attribute cannot specify more than one \'self\\:\' parameter", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6686,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n do {\n // ...\n if (IsMember && CurrentParam == \"self\") {\n // ...\n // More than one \"self\"?\n if (SelfLocation) {\n S.Diag(Loc, diag::warn_attr_swift_name_multiple_selfs) << AL;"}} | ||
}, | }, | ||
["warn_attr_swift_name_num_params"]={ | ["warn_attr_swift_name_num_params"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="too %select{few|many}0 parameters in the signature specified by the %1 attribute (expected %2; got %3)", | [e]="too %select{few|many}0 parameters in the signature specified by the %1 attribute (expected %2; got %3)", | ||
[ | [a]=n, | ||
[b]="too (?:few|many) parameters in the signature specified by the (.*?) attribute \\(expected (.*?); got (.*?)\\)", | [b]="too (?:few|many) parameters in the signature specified by the (.*?) attribute \\(expected (.*?); got (.*?)\\)", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6828,"bool Sema::DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) {\n if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {\n // ...\n if (!ParamCountValid) {\n Diag(Loc, diag::warn_attr_swift_name_num_params) << (SwiftParamCount > ParamCount) << AL << ParamCount << SwiftParamCount;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/attr-swift_name-cxx.mm"]={"clang/test/SemaObjCXX/attr-swift_name-cxx.mm:12:85: warning: too few parameters in the signature specified by the \'__swift_async_name__\' attribute (expected 1; got 0) [-Wswift-name-attribute]"} | ["clang/test/SemaObjCXX/attr-swift_name-cxx.mm"]={"clang/test/SemaObjCXX/attr-swift_name-cxx.mm:12:85: warning: too few parameters in the signature specified by the \'__swift_async_name__\' attribute (expected 1; got 0) [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_setter_parameters"]={ | ["warn_attr_swift_name_setter_parameters"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute for setter must have one parameter for new value", | [e]="%0 attribute for setter must have one parameter for new value", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute for setter must have one parameter for new value", | [b]="(.*?) attribute for setter must have one parameter for new value", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6656,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (Parameters.empty()) {\n // ...\n if (IsSetter) {\n S.Diag(Loc, diag::warn_attr_swift_name_setter_parameters) << AL;"},{o,6721,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // Check the number of parameters for a getter/setter.\n if (IsGetter || IsSetter) {\n // ...\n unsigned ParamDiag = IsGetter ? diag::warn_attr_swift_name_getter_parameters : diag::warn_attr_swift_name_setter_parameters;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:113:88: warning: \'__swift_name__\' attribute for setter must have one parameter for new value [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:113:88: warning: \'__swift_name__\' attribute for setter must have one parameter for new value [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_subscript_getter_newValue"]={ | ["warn_attr_swift_name_subscript_getter_newValue"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute for \'subscript\' getter cannot have a \'newValue:\' parameter", | [e]="%0 attribute for \'subscript\' getter cannot have a \'newValue:\' parameter", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute for \'subscript\' getter cannot have a \'newValue\\:\' parameter", | [b]="(.*?) attribute for \'subscript\' getter cannot have a \'newValue\\:\' parameter", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6751,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // Check the number of parameters for a getter/setter.\n if (IsGetter || IsSetter) {\n // ...\n // Subscripts may have additional parameters beyond the expected params for\n // the index.\n if (IsSubscript) {\n // ...\n // A subscript setter must explicitly label its newValue parameter to\n // distinguish it from index parameters.\n if (IsSetter) {\n // ...\n } else {\n // Subscript getters should have no \'newValue:\' parameter.\n if (NewValueLocation) {\n S.Diag(Loc, diag::warn_attr_swift_name_subscript_getter_newValue) << AL;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:131:94: warning: \'__swift_name__\' attribute for \'subscript\' getter cannot have a \'newValue:\' parameter [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:131:94: warning: \'__swift_name__\' attribute for \'subscript\' getter cannot have a \'newValue:\' parameter [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_subscript_invalid_parameter"]={ | ["warn_attr_swift_name_subscript_invalid_parameter"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute for \'subscript\' must %select{be a getter or setter|have at least one parameter|have a \'self:\' parameter}1", | [e]="%0 attribute for \'subscript\' must %select{be a getter or setter|have at least one parameter|have a \'self:\' parameter}1", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute for \'subscript\' must (?:be a getter or setter|have at least one parameter|have a \'self\\:\' parameter)", | [b]="(.*?) attribute for \'subscript\' must (?:be a getter or setter|have at least one parameter|have a \'self\\:\' parameter)", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6634,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // A subscript accessor must be a getter or setter.\n if (IsSubscript && !IsGetter && !IsSetter) {\n S.Diag(Loc, diag::warn_attr_swift_name_subscript_invalid_parameter) << AL << /* getter or setter */ 0;"},{o,6650,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n if (Parameters.empty()) {\n // Setters and subscripts must have at least one parameter.\n if (IsSubscript) {\n S.Diag(Loc, diag::warn_attr_swift_name_subscript_invalid_parameter) << AL << /* have at least one parameter */ 1;"},{o,6707,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // Only instance subscripts are currently supported.\n if (IsSubscript && !SelfLocation) {\n S.Diag(Loc, diag::warn_attr_swift_name_subscript_invalid_parameter) << AL << /*have a \'self:\' parameter*/ 2;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:125:80: warning: \'__swift_name__\' attribute for \'subscript\' must be a getter or setter [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:137:53: warning: \'__swift_name__\' attribute for \'subscript\' must have a \'self:\' parameter [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:140:53: warning: \'__swift_name__\' attribute for \'subscript\' must have at least one parameter [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:125:80: warning: \'__swift_name__\' attribute for \'subscript\' must be a getter or setter [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:137:53: warning: \'__swift_name__\' attribute for \'subscript\' must have a \'self:\' parameter [-Wswift-name-attribute]","clang/test/SemaObjC/attr-swift_name.m:140:53: warning: \'__swift_name__\' attribute for \'subscript\' must have at least one parameter [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_subscript_setter_multiple_newValues"]={ | ["warn_attr_swift_name_subscript_setter_multiple_newValues"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute for \'subscript\' setter cannot have multiple \'newValue:\' parameters", | [e]="%0 attribute for \'subscript\' setter cannot have multiple \'newValue:\' parameters", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute for \'subscript\' setter cannot have multiple \'newValue\\:\' parameters", | [b]="(.*?) attribute for \'subscript\' setter cannot have multiple \'newValue\\:\' parameters", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6744,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // Check the number of parameters for a getter/setter.\n if (IsGetter || IsSetter) {\n // ...\n // Subscripts may have additional parameters beyond the expected params for\n // the index.\n if (IsSubscript) {\n // ...\n // A subscript setter must explicitly label its newValue parameter to\n // distinguish it from index parameters.\n if (IsSetter) {\n // ...\n if (NewValueCount > 1) {\n S.Diag(Loc, diag::warn_attr_swift_name_subscript_setter_multiple_newValues) << AL;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:128:97: warning: \'__swift_name__\' attribute for \'subscript\' setter cannot have multiple \'newValue:\' parameters [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:128:97: warning: \'__swift_name__\' attribute for \'subscript\' setter cannot have multiple \'newValue:\' parameters [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attr_swift_name_subscript_setter_no_newValue"]={ | ["warn_attr_swift_name_subscript_setter_no_newValue"]={ | ||
[ | [m]={M}, | ||
[l]=M, | |||
[ | |||
[e]="%0 attribute for \'subscript\' setter must have a \'newValue:\' parameter", | [e]="%0 attribute for \'subscript\' setter must have a \'newValue:\' parameter", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute for \'subscript\' setter must have a \'newValue\\:\' parameter", | [b]="(.*?) attribute for \'subscript\' setter must have a \'newValue\\:\' parameter", | ||
[ | [c]=gb, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{o,6739,"// For a function, this will validate a compound Swift name, e.g.\n// <code>init(foo:bar:baz:)</code> or <code>controllerForName(_:)</code>, and\n// the function will output the number of parameter names, and whether this is a\n// single-arg initializer.\n//\n// For a type, enum constant, property, or variable declaration, this will\n// validate either a simple identifier, or a qualified\n// <code>context.identifier</code> name.\nstatic bool validateSwiftFunctionName(Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit) {\n // ...\n // Check the number of parameters for a getter/setter.\n if (IsGetter || IsSetter) {\n // ...\n // Subscripts may have additional parameters beyond the expected params for\n // the index.\n if (IsSubscript) {\n // ...\n // A subscript setter must explicitly label its newValue parameter to\n // distinguish it from index parameters.\n if (IsSetter) {\n if (!NewValueLocation) {\n S.Diag(Loc, diag::warn_attr_swift_name_subscript_setter_no_newValue) << AL;"}}, | ||
[ | [h]={ | ||
[Kb]={"clang/test/SemaObjC/attr-swift_name.m:122:83: warning: \'__swift_name__\' attribute for \'subscript\' setter must have a \'newValue:\' parameter [-Wswift-name-attribute]"} | [Kb]={"clang/test/SemaObjC/attr-swift_name.m:122:83: warning: \'__swift_name__\' attribute for \'subscript\' setter must have a \'newValue:\' parameter [-Wswift-name-attribute]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_address_multiple_identical_qualifiers"]={ | ["warn_attribute_address_multiple_identical_qualifiers"]={ | ||
[ | [m]={"duplicate-decl-specifier"}, | ||
[l]="duplicate-decl-specifier", | |||
[ | |||
[e]="multiple identical address spaces specified for type", | [e]="multiple identical address spaces specified for type", | ||
[ | [a]=n, | ||
[b]="multiple identical address spaces specified for type", | [b]="multiple identical address spaces specified for type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wduplicate\\-decl\\-specifier[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"f29d777f847b",1529483484,"[Sema] Allow creating types with multiple of the same addrspace.\n\nSummary:\nThe comment with the Open...","[Sema] Allow creating types with multiple of the same addrspace.\n\nSummary:\nThe comment with the OpenCL clause about this clearly\nsays: \"No type shall be qualified by qualifiers for\ntwo or more different address spaces.\"\n\nThis must mean that two or more qualifiers for the\n_same_ address space is allowed. However, it is\nlikely unintended by the programmer, so emit a\nwarning.\n\nFor dependent address space types, reject them like\nbefore since we cannot know what the address space\nwill be.\n\nPatch by Bevin Hansson (ebevhan).\n\nReviewers: Anastasia\n\nReviewed By: Anastasia\n\nSubscribers: bader, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D47630\n\nllvm-svn: 335103"}, | ||
[ | [g]={{W,4629,"// Diagnose whether this is a case with the multiple addr spaces.\n// Returns true if this is an invalid case.\n// ISO/IEC TR 18037 S5.3 (amending C99 6.7.3): \"No type shall be qualified\n// by qualifiers for two or more different address spaces.\"\nstatic bool DiagnoseMultipleAddrSpaceAttributes(Sema &S, LangAS ASOld, LangAS ASNew, SourceLocation AttrLoc) {\n if (ASOld != LangAS::Default) {\n // ...\n S.Diag(AttrLoc, diag::warn_attribute_address_multiple_identical_qualifiers);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/address_spaces.c"]={"clang/test/Sema/address_spaces.c:17:13: warning: multiple identical address spaces specified for type [-Wduplicate-decl-specifier]"} | ["clang/test/Sema/address_spaces.c"]={"clang/test/Sema/address_spaces.c:17:13: warning: multiple identical address spaces specified for type [-Wduplicate-decl-specifier]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_after_definition_ignored"]={ | ["warn_attribute_after_definition_ignored"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute %0 after definition is ignored", | [e]="attribute %0 after definition is ignored", | ||
[ | [a]=n, | ||
[b]="attribute (.*?) after definition is ignored", | [b]="attribute (.*?) after definition is ignored", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"06e1b13209a8",1342067550,"Ignore visibility attributes after definitions. This matches newer (4.7) gcc\'s\nbehavior and is the f...","Ignore visibility attributes after definitions. This matches newer (4.7) gcc\'s\nbehavior and is the first step in fixing pr13338.\n\nllvm-svn: 160104"}, | ||
[ | [g]={{s,10383,"void Sema::ActOnFinishCXXMemberSpecification(Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList) {\n // ...\n for (const ParsedAttr &AL : AttrList) {\n // ...\n Diag(AL.getLoc(), diag::warn_attribute_after_definition_ignored) << AL;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/attr-visibility.cpp"]={"clang/test/SemaCXX/attr-visibility.cpp:20:16: warning: attribute \'visibility\' after definition is ignored [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-visibility.cpp"]={"clang/test/SemaCXX/attr-visibility.cpp:20:16: warning: attribute \'visibility\' after definition is ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_argument_n_negative"]={ | ["warn_attribute_argument_n_negative"]={ | ||
[ | [m]={"cuda-compat"}, | ||
[l]="cuda-compat", | |||
[ | |||
[e]="%0 attribute parameter %1 is negative and will be ignored", | [e]="%0 attribute parameter %1 is negative and will be ignored", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute parameter (.*?) is negative and will be ignored", | [b]="(.*?) attribute parameter (.*?) is negative and will be ignored", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcuda\\-compat[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"7093e4064116",1429656954,"[cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments.\n\n - C...","[cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments.\n\n - Changed CUDALaunchBounds arguments from integers to Expr* so they can\n be saved in AST for instantiation.\n - Added support for template instantiation of launch_bounds attrubute.\n - Moved evaluation of launch_bounds arguments to NVPTXTargetCodeGenInfo::\n SetTargetAttributes() where it can be done after template instantiation.\n - Added a warning on negative launch_bounds arguments.\n - Amended test cases.\n\nDifferential Revision: http://reviews.llvm.org/D8985\n\nllvm-svn: 235452"}, | ||
[ | [g]={{o,5624,"// Checks whether an argument of launch_bounds attribute is\n// acceptable, performs implicit conversion to Rvalue, and returns\n// non-nullptr Expr result on success. Otherwise, it returns nullptr\n// and may output an error.\nstatic Expr *makeLaunchBoundsArgExpr(Sema &S, Expr *E, const CUDALaunchBoundsAttr &AL, const unsigned Idx) {\n // ...\n if (*I < 0)\n S.Diag(E->getExprLoc(), diag::warn_attribute_argument_n_negative) << &AL << Idx << E->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCUDA/launch_bounds.cu"]={"clang/test/SemaCUDA/launch_bounds.cu:12:19: warning: \'launch_bounds\' attribute parameter 0 is negative and will be ignored [-Wcuda-compat]","clang/test/SemaCUDA/launch_bounds.cu:13:24: warning: \'launch_bounds\' attribute parameter 1 is negative and will be ignored [-Wcuda-compat]"} | ["clang/test/SemaCUDA/launch_bounds.cu"]={"clang/test/SemaCUDA/launch_bounds.cu:12:19: warning: \'launch_bounds\' attribute parameter 0 is negative and will be ignored [-Wcuda-compat]","clang/test/SemaCUDA/launch_bounds.cu:13:24: warning: \'launch_bounds\' attribute parameter 1 is negative and will be ignored [-Wcuda-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_cmse_entry_static"]={ | ["warn_attribute_cmse_entry_static"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'cmse_nonsecure_entry\' cannot be applied to functions with internal linkage", | [e]="\'cmse_nonsecure_entry\' cannot be applied to functions with internal linkage", | ||
[ | [a]=n, | ||
[b]="\'cmse_nonsecure_entry\' cannot be applied to functions with internal linkage", | [b]="\'cmse_nonsecure_entry\' cannot be applied to functions with internal linkage", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{o,2152,"static void handleCmseNSEntryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!FD->isExternallyVisible()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_cmse_entry_static);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/arm-cmse.c"]={"clang/test/Sema/arm-cmse.c:17:38: warning: \'cmse_nonsecure_entry\' cannot be applied to functions with internal linkage [-Wignored-attributes]"} | ["clang/test/Sema/arm-cmse.c"]={"clang/test/Sema/arm-cmse.c:17:38: warning: \'cmse_nonsecure_entry\' cannot be applied to functions with internal linkage [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_dll_instantiated_base_class"]={ | ["warn_attribute_dll_instantiated_base_class"]={ | ||
[ | [m]={"unsupported-dll-base-class-template"}, | ||
[l]="unsupported-dll-base-class-template", | |||
[ | |||
[e]="propagating dll attribute to %select{already instantiated|explicitly specialized}0 base class template without dll attribute is not supported", | [e]="propagating dll attribute to %select{already instantiated|explicitly specialized}0 base class template without dll attribute is not supported", | ||
[ | [a]=n, | ||
[b]="propagating dll attribute to (?:already instantiated|explicitly specialized) base class template without dll attribute is not supported", | [b]="propagating dll attribute to (?:already instantiated|explicitly specialized) base class template without dll attribute is not supported", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-dll\\-base\\-class\\-template[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"9bea9cc73bd0",1403720757,"MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)\n\nConsi...","MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170)\n\nConsider the following code:\n\n template <typename T> class Base {};\n class __declspec(dllexport) class Derived : public Base<int> {}\n\nWhen the base of an exported or imported class is a class template\nspecialization, MSVC will propagate the dll attribute to the base.\nIn the example code, Base<int> becomes a dllexported class.\n\nThis commit makes Clang do the proopagation when the base hasn\'t been\ninstantiated yet, and warns about it being unsupported otherwise.\nThis is different from MSVC, which allows changing a specialization\nback and forth between dllimport and dllexport and seems to let the\nlast one win. Changing the dll attribute after instantiation would be\nhard for us, and doesn\'t seem to come up in practice, so I think this\nis a reasonable limitation to have.\n\nMinGW doesn\'t do this kind of propagation.\n\nDifferential Revision: http://reviews.llvm.org/D4264\n\nllvm-svn: 211725"}, | ||
[ | [g]={{s,6656,"/// 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(BaseLoc, diag::warn_attribute_dll_instantiated_base_class) << BaseTemplateSpec->isExplicitSpecialization();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:501:80: warning: propagating dll attribute to explicitly specialized base class template without dll attribute is not supported [-Wunsupported-dll-base-class-template]","clang/test/SemaCXX/dllexport.cpp:513:81: warning: propagating dll attribute to already instantiated base class template without dll attribute is not supported [-Wunsupported-dll-base-class-template]"} | ["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:501:80: warning: propagating dll attribute to explicitly specialized base class template without dll attribute is not supported [-Wunsupported-dll-base-class-template]","clang/test/SemaCXX/dllexport.cpp:513:81: warning: propagating dll attribute to already instantiated base class template without dll attribute is not supported [-Wunsupported-dll-base-class-template]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_dll_redeclaration"]={ | ["warn_attribute_dll_redeclaration"]={ | ||
[ | [m]={"dll-attribute-on-redeclaration"}, | ||
[l]="dll-attribute-on-redeclaration", | |||
[ | |||
[e]="redeclaration of %q0 should not add %q1 attribute", | [e]="redeclaration of %q0 should not add %q1 attribute", | ||
[ | [a]=n, | ||
[b]="redeclaration of (.*?) should not add (.*?) attribute", | [b]="redeclaration of (.*?) should not add (.*?) attribute", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdll\\-attribute\\-on\\-redeclaration[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"dd96db2c034c",1409174860,"Allow adding dll attributes on certain redecls with a warning if the decl hasn\'t been used yet (PR20...","Allow adding dll attributes on certain redecls with a warning if the decl hasn\'t been used yet (PR20746)\n\nThis shouldn\'t really be allowed, but it comes up in real code (see PR). As\nlong as the decl hasn\'t been used there\'s no technical difficulty in supporting\nit, so downgrade the error to a warning.\n\nDifferential Revision: http://reviews.llvm.org/D5087\n\nllvm-svn: 216619"}, | ||
[ | [g]={{p,7092,"static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, NamedDecl *NewDecl, bool IsSpecialization, bool IsDefinition) {\n // ...\n if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) {\n // ...\n unsigned DiagID = JustWarn ? diag::warn_attribute_dll_redeclaration : diag::err_attribute_dll_redeclaration;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/dllexport.c"]={"clang/test/Sema/dllexport.c:52:34: warning: redeclaration of \'GlobalRedecl4\' should not add \'dllexport\' attribute [-Wdll-attribute-on-redeclaration]","clang/test/Sema/dllexport.c:112:28: warning: redeclaration of \'redecl6\' should not add \'dllexport\' attribute [-Wdll-attribute-on-redeclaration]"} | ["clang/test/Sema/dllexport.c"]={"clang/test/Sema/dllexport.c:52:34: warning: redeclaration of \'GlobalRedecl4\' should not add \'dllexport\' attribute [-Wdll-attribute-on-redeclaration]","clang/test/Sema/dllexport.c:112:28: warning: redeclaration of \'redecl6\' should not add \'dllexport\' attribute [-Wdll-attribute-on-redeclaration]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_dllexport_explicit_instantiation_decl"]={ | ["warn_attribute_dllexport_explicit_instantiation_decl"]={ | ||
[ | [m]={"dllexport-explicit-instantiation-decl"}, | ||
[l]="dllexport-explicit-instantiation-decl", | |||
[ | |||
[e]="explicit instantiation declaration should not be \'dllexport\'", | [e]="explicit instantiation declaration should not be \'dllexport\'", | ||
[ | [a]=n, | ||
[b]="explicit instantiation declaration should not be \'dllexport\'", | [b]="explicit instantiation declaration should not be \'dllexport\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdllexport\\-explicit\\-instantiation\\-decl[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"fd76d9136601",1421356710,"Warn about dllexported explicit class template instantiation declarations (PR22035)\n\nClang would pre...","Warn about dllexported explicit class template instantiation declarations (PR22035)\n\nClang would previously become confused and crash here.\n\nIt does not make a lot of sense to export these, so warning seems appropriate.\n\nMSVC will export some member functions for this kind of specializations, whereas\nMinGW ignores the dllexport-edness. The latter behaviour seems better.\n\nDifferential Revision: http://reviews.llvm.org/D6984\n\nllvm-svn: 226208"}, | ||
[ | [g]={{r,9995,"// 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 Diag(ExternLoc, diag::warn_attribute_dllexport_explicit_instantiation_decl);"},{r,10003,"// 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 Diag(ExternLoc, diag::warn_attribute_dllexport_explicit_instantiation_decl);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:383:1: warning: explicit instantiation declaration should not be \'dllexport\' [-Wdllexport-explicit-instantiation-decl]","clang/test/SemaCXX/dllexport.cpp:418:1: warning: explicit instantiation declaration should not be \'dllexport\' [-Wdllexport-explicit-instantiation-decl]","clang/test/SemaCXX/dllexport.cpp:425:1: warning: explicit instantiation declaration should not be \'dllexport\' [-Wdllexport-explicit-instantiation-decl]"} | ["clang/test/SemaCXX/dllexport.cpp"]={"clang/test/SemaCXX/dllexport.cpp:383:1: warning: explicit instantiation declaration should not be \'dllexport\' [-Wdllexport-explicit-instantiation-decl]","clang/test/SemaCXX/dllexport.cpp:418:1: warning: explicit instantiation declaration should not be \'dllexport\' [-Wdllexport-explicit-instantiation-decl]","clang/test/SemaCXX/dllexport.cpp:425:1: warning: explicit instantiation declaration should not be \'dllexport\' [-Wdllexport-explicit-instantiation-decl]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_dllexport_explicit_instantiation_def"]={ | ["warn_attribute_dllexport_explicit_instantiation_def"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'dllexport\' attribute ignored on explicit instantiation definition", | [e]="\'dllexport\' attribute ignored on explicit instantiation definition", | ||
[ | [a]=n, | ||
[b]="\'dllexport\' attribute ignored on explicit instantiation definition", | [b]="\'dllexport\' attribute ignored on explicit instantiation definition", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"5be69bc68a65",1556266191,"[MinGW] Fix dllexport of explicit template instantiation\n\nContrary to MSVC, GCC/MinGW needs to have ...","[MinGW] Fix dllexport of explicit template instantiation\n\nContrary to MSVC, GCC/MinGW needs to have the dllexport attribute\non the template instantiation declaration, not on the definition.\n\nPreviously clang never marked explicit template instantiations as\ndllexport in MinGW mode, if the instantiation had a previous\ndeclaration, regardless of where the attribute was placed. This\nmakes Clang behave like GCC in this regard, and allows using the\nsame attribute form for both MinGW compilers.\n\nThis fixes PR40256.\n\nDifferential Revision: https://reviews.llvm.org/D61118\n\nllvm-svn: 359285"}, | ||
[ | [g]={{r,10059,"// 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_ExplicitInstantiationDefinition && PrevDecl != nullptr && Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) {\n // Check for dllexport class template instantiation definitions in MinGW\n // mode, if a previous declaration of the instantiation was seen.\n for (const ParsedAttr &AL : Attr) {\n if (AL.getKind() == ParsedAttr::AT_DLLExport) {\n Diag(AL.getLoc(), diag::warn_attribute_dllexport_explicit_instantiation_def);"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenCXX/mingw-template-dllexport.cpp"]={"clang/test/CodeGenCXX/mingw-template-dllexport.cpp:23:27: warning: \'dllexport\' attribute ignored on explicit instantiation definition [-Wignored-attributes]"} | ["clang/test/CodeGenCXX/mingw-template-dllexport.cpp"]={"clang/test/CodeGenCXX/mingw-template-dllexport.cpp:23:27: warning: \'dllexport\' attribute ignored on explicit instantiation definition [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_dllimport_static_field_definition"]={ | ["warn_attribute_dllimport_static_field_definition"]={ | ||
[ | [m]={"dllimport-static-field-def"}, | ||
[l]="dllimport-static-field-def", | |||
[ | |||
[e]="definition of dllimport static field", | [e]="definition of dllimport static field", | ||
[ | [a]=n, | ||
[b]="definition of dllimport static field", | [b]="definition of dllimport static field", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdllimport\\-static\\-field\\-def[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"e9af3164237f",1401841121,"Downgrade \"definition of dllimport static field\" error to warning for class templates (PR19902)\n\nThi...","Downgrade \"definition of dllimport static field\" error to warning for class templates (PR19902)\n\nThis allows us to compile the following kind of code, which occurs in MSVC\nheaders:\n\n template <typename> struct S {\n __declspec(dllimport) static int x;\n };\n template <typename T> int S<T>::x;\n\nThe definition works similarly to a dllimport inline function definition and\ngets available_externally linkage.\n\nDifferential Revision: http://reviews.llvm.org/D3998\n\nllvm-svn: 210141"}, | ||
[ | [g]={{p,14445,"/// 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(VD->getLocation(), IsClassTemplateMember ? diag::warn_attribute_dllimport_static_field_definition : diag::err_attribute_dllimport_static_field_definition);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/dllimport.cpp"]={"clang/test/SemaCXX/dllimport.cpp:1237:61: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1238:61: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1289:65: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1292:65: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1404:80: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1405:80: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1452:87: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1455:87: warning: definition of dllimport static field [-Wdllimport-static-field-def]"} | ["clang/test/SemaCXX/dllimport.cpp"]={"clang/test/SemaCXX/dllimport.cpp:1237:61: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1238:61: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1289:65: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1292:65: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1404:80: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1405:80: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1452:87: warning: definition of dllimport static field [-Wdllimport-static-field-def]","clang/test/SemaCXX/dllimport.cpp:1455:87: warning: definition of dllimport static field [-Wdllimport-static-field-def]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_has_no_effect_on_compile_time_if"]={ | ["warn_attribute_has_no_effect_on_compile_time_if"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute %0 has no effect when annotating an \'if %select{constexpr|consteval}1\' statement", | [e]="attribute %0 has no effect when annotating an \'if %select{constexpr|consteval}1\' statement", | ||
[ | [a]=n, | ||
[b]="attribute (.*?) has no effect when annotating an \'if (?:constexpr|consteval)\' statement", | [b]="attribute (.*?) has no effect when annotating an \'if (?:constexpr|consteval)\' statement", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{J,909,"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 Diags.Report(A->getLocation(), diag::warn_attribute_has_no_effect_on_compile_time_if) << A << ConstevalOrNegatedConsteval << A->getRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:18: warning: attribute \'likely\' has no effect when annotating an \'if consteval\' statement [-Wignored-attributes]","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:45:10: warning: attribute \'unlikely\' has no effect when annotating an \'if consteval\' statement [-Wignored-attributes]"} | ["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:18: warning: attribute \'likely\' has no effect when annotating an \'if consteval\' statement [-Wignored-attributes]","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:45:10: warning: attribute \'unlikely\' has no effect when annotating an \'if consteval\' statement [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_has_no_effect_on_infinite_loop"]={ | ["warn_attribute_has_no_effect_on_infinite_loop"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute %0 has no effect when annotating an infinite loop", | [e]="attribute %0 has no effect when annotating an infinite loop", | ||
[ | [a]=n, | ||
[b]="attribute (.*?) has no effect when annotating an infinite loop", | [b]="attribute (.*?) has no effect when annotating an infinite loop", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{"clang/lib/CodeGen/CGStmt.cpp",933,"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 CGM.getDiags().Report(A->getLocation(), diag::warn_attribute_has_no_effect_on_infinite_loop) << A << A->getRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp"]={"clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp:63:14: warning: attribute \'likely\' has no effect when annotating an infinite loop [-Wignored-attributes]"} | ["clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp"]={"clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp:63:14: warning: attribute \'likely\' has no effect when annotating an infinite loop [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_iboutlet"]={ | ["warn_attribute_iboutlet"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute can only be applied to instance variables or properties", | [e]="%0 attribute can only be applied to instance variables or properties", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute can only be applied to instance variables or properties", | [b]="(.*?) attribute can only be applied to instance variables or properties", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"d68ec818c351",1296802456,"Downgrade error about attribute \'iboutlet\' and \'ibaction\' being applied to anything but a instance m...","Downgrade error about attribute \'iboutlet\' and \'ibaction\' being applied to anything but a instance method to a warning.\n\nllvm-svn: 124858"}, | ||
[ | [g]={{o,1487,"static bool checkIBOutletCommon(Sema &S, Decl *D, const ParsedAttr &AL) {\n // The IBOutlet/IBOutletCollection attributes only apply to instance\n // variables or properties of Objective-C classes. The outlet must also\n // have an object reference type.\n if (const auto *VD = dyn_cast<ObjCIvarDecl>(D)) {\n // ...\n } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_attribute_iboutlet) << AL;"}} | ||
}, | }, | ||
["warn_attribute_ignored"]={ | ["warn_attribute_ignored"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute ignored", | [e]="%0 attribute ignored", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute ignored", | [b]="(.*?) attribute ignored", | ||
[ | [c]=C, | ||
[ | [d]=j, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Yb,3342,"/// 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 DoneWithDeclSpec:\n if (!AttrsLastTime)\n // ...\n else {\n // Reject C++11 / C2x attributes that aren\'t type attributes.\n for (const ParsedAttr &PA : attrs) {\n // ...\n // GCC ignores this attribute when placed on the DeclSpec in [[]]\n // syntax, so we do the same.\n if (PA.getKind() == ParsedAttr::AT_VectorSize) {\n Diag(PA.getLoc(), diag::warn_attribute_ignored) << PA;"},{"clang/lib/Parse/ParseStmt.cpp",343,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::kw_asm: {\n for (const ParsedAttr &AL : CXX11Attrs)\n // ...\n (AL.isRegularKeywordAttribute() ? Diag(AL.getRange().getBegin(), diag::err_keyword_not_allowed) : Diag(AL.getRange().getBegin(), diag::warn_attribute_ignored)) << AL;"},{"clang/lib/Sema/ParsedAttr.cpp",184,"bool ParsedAttr::diagnoseLangOpts(Sema &S) const {\n // ...\n S.Diag(getLoc(), diag::warn_attribute_ignored) << *this;"},{o,1428,"static void handlePackedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (auto *TD = dyn_cast<TagDecl>(D))\n // ...\n else if (auto *FD = dyn_cast<FieldDecl>(D)) {\n // ...\n } else\n S.Diag(AL.getLoc(), diag::warn_attribute_ignored) << AL;"},{o,2897,"static void handleVisibilityAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) {\n // Visibility attributes don\'t mean anything on a typedef.\n if (isa<TypedefNameDecl>(D)) {\n S.Diag(AL.getRange().getBegin(), diag::warn_attribute_ignored) << AL;"},{o,3846,"/// Handle __attribute__((init_priority(priority))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html\nstatic void handleInitPriorityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!S.getLangOpts().CPlusPlus) {\n S.Diag(AL.getLoc(), diag::warn_attribute_ignored) << AL;"},{o,4887,"AlwaysInlineAttr *Sema::mergeAlwaysInlineAttr(Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident) {\n if (OptimizeNoneAttr *Optnone = D->getAttr<OptimizeNoneAttr>()) {\n Diag(CI.getLoc(), diag::warn_attribute_ignored) << Ident;"},{o,4943,"MinSizeAttr *Sema::mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (OptimizeNoneAttr *Optnone = D->getAttr<OptimizeNoneAttr>()) {\n Diag(CI.getLoc(), diag::warn_attribute_ignored) << \"\'minsize\'\";"},{o,4973,"OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (AlwaysInlineAttr *Inline = D->getAttr<AlwaysInlineAttr>()) {\n Diag(Inline->getLocation(), diag::warn_attribute_ignored) << Inline;"},{o,4978,"OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI) {\n // ...\n if (MinSizeAttr *MinSize = D->getAttr<MinSizeAttr>()) {\n Diag(MinSize->getLocation(), diag::warn_attribute_ignored) << MinSize;"},{o,8006,"DLLImportAttr *Sema::mergeDLLImportAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (D->hasAttr<DLLExportAttr>()) {\n Diag(CI.getLoc(), diag::warn_attribute_ignored) << \"\'dllimport\'\";"},{o,8019,"DLLExportAttr *Sema::mergeDLLExportAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (DLLImportAttr *Import = D->getAttr<DLLImportAttr>()) {\n Diag(Import->getLocation(), diag::warn_attribute_ignored) << Import;"},{o,8032,"static void handleDLLAttr(Sema &S, Decl *D, const ParsedAttr &A) {\n if (isa<ClassTemplatePartialSpecializationDecl>(D) && (S.Context.getTargetInfo().shouldDLLImportComdatSymbols())) {\n S.Diag(A.getRange().getBegin(), diag::warn_attribute_ignored) << A;"},{W,7805,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (attr.getKind() == ParsedAttr::AT_CmseNSCall) {\n // ...\n // Ignore if we don\'t have CMSE enabled.\n if (!S.getLangOpts().Cmse) {\n S.Diag(attr.getLoc(), diag::warn_attribute_ignored) << attr;"},{W,8664,"static void processTypeAttrs(TypeProcessingState &state, QualType &type, TypeAttrLocation TAL, const ParsedAttributesView &attrs) {\n // ...\n for (ParsedAttr &attr : AttrsCopy) {\n // ...\n case ParsedAttr::AT_NoDeref: {\n // FIXME: `noderef` currently doesn\'t work correctly in [[]] syntax.\n // See https://github.com/llvm/llvm-project/issues/55790 for details.\n // For the time being, we simply emit a warning that the attribute is\n // ignored.\n if (attr.isStandardAttributeSyntax()) {\n state.getSema().Diag(attr.getLoc(), diag::warn_attribute_ignored) << attr;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:31:16: warning: \'always_inline\' attribute ignored [-Wignored-attributes]","clang/test/Sema/pragma-attribute.c:36:16: warning: \'always_inline\' attribute ignored [-Wignored-attributes]"} | ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:31:16: warning: \'always_inline\' attribute ignored [-Wignored-attributes]","clang/test/Sema/pragma-attribute.c:36:16: warning: \'always_inline\' attribute ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_ignored_for_field_of_type"]={ | ["warn_attribute_ignored_for_field_of_type"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute ignored for field of type %1", | [e]="%0 attribute ignored for field of type %1", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute ignored for field of type (.*?)", | [b]="(.*?) attribute ignored for field of type (.*?)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{o,1415,"static void handlePackedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (auto *TD = dyn_cast<TagDecl>(D))\n // ...\n else if (auto *FD = dyn_cast<FieldDecl>(D)) {\n // ...\n if (S.getASTContext().getTargetInfo().getTriple().isPS()) {\n if (BitfieldByteAligned)\n // ...\n S.Diag(AL.getLoc(), diag::warn_attribute_ignored_for_field_of_type) << AL << FD->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/struct-packed-align.c"]={"clang/test/Sema/struct-packed-align.c:154:29: warning: \'packed\' attribute ignored for field of type \'char\' [-Wignored-attributes]"} | ["clang/test/Sema/struct-packed-align.c"]={"clang/test/Sema/struct-packed-align.c:154:29: warning: \'packed\' attribute ignored for field of type \'char\' [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_ignored_no_calls_in_stmt"]={ | ["warn_attribute_ignored_no_calls_in_stmt"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute is ignored because there exists no call expression inside the statement", | [e]="%0 attribute is ignored because there exists no call expression inside the statement", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute is ignored because there exists no call expression inside the statement", | [b]="(.*?) attribute is ignored because there exists no call expression inside the statement", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"f60dc3caa673",1620118562,"[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handlin...","[C++20][Modules] Adjust handling of exports of namespaces and using-decls.\n\nThis adjusts the handling for:\n\nexport module M;\n\nexport namespace {};\n\nexport namespace N {};\nexport using namespace N;\n\nIn the first case, we were allowing empty anonymous namespaces\nas part of an extension allowing empty top-level entities, but that seems\ninappropriate in this case, since the linkage would be internal for the\nanonymous namespace. We now report an error for this.\n\nThe second case was producing a warning diagnostic that this was\naccepted as an extension - however the C++20 standard does allow this\nas well-formed.\n\nIn the third case we keep the current practice that this is accepted with a\nwarning (as an extension). The C++20 standard says it\'s an error.\n\nWe also ensure that using decls are only applied to items with external linkage.\n\nThis adjusts error messages for exports involving redeclarations in modules to\nbe more specific about the reason that the decl has been rejected.\n\nDifferential Revision: https://reviews.llvm.org/D122119"}, | ||
[ | [g]={{"clang/lib/Sema/SemaStmtAttr.cpp",211,"static Attr *handleNoMergeAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (!CEF.foundCallExpr() && !CEF.foundAsmStmt()) {\n S.Diag(St->getBeginLoc(), diag::warn_attribute_ignored_no_calls_in_stmt) << A;"},{"clang/lib/Sema/SemaStmtAttr.cpp",238,"template <typename OtherAttr, int DiagIdx> static bool CheckStmtInlineAttr(Sema &SemaRef, const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A) {\n // ...\n if (!CEF.foundCallExpr()) {\n return SemaRef.Diag(CurSt->getBeginLoc(), diag::warn_attribute_ignored_no_calls_in_stmt) << A;"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/stmt-attributes.m"]={"clang/test/Parser/stmt-attributes.m:31:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]","clang/test/Parser/stmt-attributes.m:37:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]","clang/test/Parser/stmt-attributes.m:51:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]","clang/test/Parser/stmt-attributes.m:54:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]"} | ["clang/test/Parser/stmt-attributes.m"]={"clang/test/Parser/stmt-attributes.m:31:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]","clang/test/Parser/stmt-attributes.m:37:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]","clang/test/Parser/stmt-attributes.m:51:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]","clang/test/Parser/stmt-attributes.m:54:28: warning: \'nomerge\' attribute is ignored because there exists no call expression inside the statement [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_ignored_non_function_pointer"]={ | ["warn_attribute_ignored_non_function_pointer"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute is ignored because %1 is not a function pointer", | [e]="%0 attribute is ignored because %1 is not a function pointer", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute is ignored because (.*?) is not a function pointer", | [b]="(.*?) attribute is ignored because (.*?) is not a function pointer", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{o,8382,"static void handleNoMergeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (VDecl && !VDecl->isFunctionPointerType()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_ignored_non_function_pointer) << AL << VDecl;"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/stmt-attributes.c"]={"clang/test/Parser/stmt-attributes.c:91:16: warning: \'nomerge\' attribute is ignored because \'i\' is not a function pointer [-Wignored-attributes]"} | ["clang/test/Parser/stmt-attributes.c"]={"clang/test/Parser/stmt-attributes.c:91:16: warning: \'nomerge\' attribute is ignored because \'i\' is not a function pointer [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_ignored_on_inline"]={ | ["warn_attribute_ignored_on_inline"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute ignored on inline function", | [e]="%0 attribute ignored on inline function", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute ignored on inline function", | [b]="(.*?) attribute ignored on inline function", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"606bd6dcc547",1415024685,"Don\'t dllimport inline functions when targeting MinGW (PR21366)\n\nIt turns out that MinGW never dllim...","Don\'t dllimport inline functions when targeting MinGW (PR21366)\n\nIt turns out that MinGW never dllimports of exports inline functions.\nThis means that code compiled with Clang would fail to link with\nMinGW-compiled libraries since we might try to import functions that\nare not imported.\n\nTo fix this, make Clang never dllimport inline functions when targeting\nMinGW.\n\nllvm-svn: 221154"}, | ||
[ | [g]={{o,8040,"static void handleDLLAttr(Sema &S, Decl *D, const ParsedAttr &A) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n if (FD->isInlined() && A.getKind() == ParsedAttr::AT_DLLImport && !(S.Context.getTargetInfo().shouldDLLImportComdatSymbols())) {\n // ...\n S.Diag(A.getRange().getBegin(), diag::warn_attribute_ignored_on_inline) << A;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/dllimport.c"]={"clang/test/Sema/dllimport.c:172:12: warning: \'dllimport\' attribute ignored on inline function [-Wignored-attributes]","clang/test/Sema/dllimport.c:173:28: warning: \'dllimport\' attribute ignored on inline function [-Wignored-attributes]","clang/test/Sema/dllimport.c:217:12: warning: \'dllimport\' attribute ignored on inline function [-Wignored-attributes]"} | ["clang/test/Sema/dllimport.c"]={"clang/test/Sema/dllimport.c:172:12: warning: \'dllimport\' attribute ignored on inline function [-Wignored-attributes]","clang/test/Sema/dllimport.c:173:28: warning: \'dllimport\' attribute ignored on inline function [-Wignored-attributes]","clang/test/Sema/dllimport.c:217:12: warning: \'dllimport\' attribute ignored on inline function [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_ignored_on_non_definition"]={ | ["warn_attribute_ignored_on_non_definition"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute ignored on a non-definition declaration", | [e]="%0 attribute ignored on a non-definition declaration", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute ignored on a non\\-definition declaration", | [b]="(.*?) attribute ignored on a non\\-definition declaration", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{p,14471,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // ...\n if (UsedAttr *Attr = VD->getAttr<UsedAttr>()) {\n if (!Attr->isInherited() && !VD->isThisDeclarationADefinition()) {\n Diag(Attr->getLocation(), diag::warn_attribute_ignored_on_non_definition) << Attr;"},{p,14478,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // ...\n if (RetainAttr *Attr = VD->getAttr<RetainAttr>()) {\n if (!Attr->isInherited() && !VD->isThisDeclarationADefinition()) {\n Diag(Attr->getLocation(), diag::warn_attribute_ignored_on_non_definition) << Attr;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-used.c"]={"clang/test/Sema/attr-used.c:3:30: warning: \'used\' attribute ignored on a non-definition declaration [-Wignored-attributes]","clang/test/Sema/attr-used.c:4:42: warning: \'used\' attribute ignored on a non-definition declaration [-Wignored-attributes]"} | ["clang/test/Sema/attr-used.c"]={"clang/test/Sema/attr-used.c:3:30: warning: \'used\' attribute ignored on a non-definition declaration [-Wignored-attributes]","clang/test/Sema/attr-used.c:4:42: warning: \'used\' attribute ignored on a non-definition declaration [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_invalid_on_definition"]={ | ["warn_attribute_invalid_on_definition"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'%0\' attribute cannot be specified on a definition", | [e]="\'%0\' attribute cannot be specified on a definition", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' attribute cannot be specified on a definition", | [b]="\'(.*?)\' attribute cannot be specified on a definition", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"52d598e24269",1369086809,"Warn on and drop dllimport attrs from variable definitions\n\nAsmPrinter::EmitLinkage() does not handl...","Warn on and drop dllimport attrs from variable definitions\n\nAsmPrinter::EmitLinkage() does not handle dllimport linkage. The LLVM\nverifier should also be fixed to reject this.\n\nllvm-svn: 182320"}, | ||
[ | [g]={{o,3195,"static void handleWeakImportAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!D->canBeWeakImported(isDef)) {\n if (isDef)\n S.Diag(AL.getLoc(), diag::warn_attribute_invalid_on_definition) << \"weak_import\";"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/2009-03-09-WeakDeclarations-1.c"]={"clang/test/Sema/2009-03-09-WeakDeclarations-1.c:8:38: warning: \'weak_import\' attribute cannot be specified on a definition [-Wignored-attributes]","clang/test/Sema/2009-03-09-WeakDeclarations-1.c:9:50: warning: \'weak_import\' attribute cannot be specified on a definition [-Wignored-attributes]"} | ["clang/test/Sema/2009-03-09-WeakDeclarations-1.c"]={"clang/test/Sema/2009-03-09-WeakDeclarations-1.c:8:38: warning: \'weak_import\' attribute cannot be specified on a definition [-Wignored-attributes]","clang/test/Sema/2009-03-09-WeakDeclarations-1.c:9:50: warning: \'weak_import\' attribute cannot be specified on a definition [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_no_builtin_invalid_builtin_name"]={ | ["warn_attribute_no_builtin_invalid_builtin_name"]={ | ||
[ | [m]={"invalid-no-builtin-names"}, | ||
[l]="invalid-no-builtin-names", | |||
[ | |||
[e]="\'%0\' is not a valid builtin name for %1", | [e]="\'%0\' is not a valid builtin name for %1", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' is not a valid builtin name for (.*?)", | [b]="\'(.*?)\' is not a valid builtin name for (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-no\\-builtin\\-names[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"bd8791610948",1569403888,"[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nTh...","[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"}, | ||
[ | [g]={{o,1153,"static void handleNoBuiltinAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Add current attributes.\n if (AL.getNumArgs() == 0)\n // ...\n else\n for (unsigned I = 0, E = AL.getNumArgs(); I != E; ++I) {\n // ...\n if (Builtin::Context::isBuiltinFunc(BuiltinName))\n // ...\n else\n S.Diag(LiteralLoc, diag::warn_attribute_no_builtin_invalid_builtin_name) << BuiltinName << AL;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/no-builtin.cpp"]={"clang/test/Sema/no-builtin.cpp:18:50: warning: \'not_a_builtin\' is not a valid builtin name for \'no_builtin\' [-Winvalid-no-builtin-names]"} | ["clang/test/Sema/no-builtin.cpp"]={"clang/test/Sema/no-builtin.cpp:18:50: warning: \'not_a_builtin\' is not a valid builtin name for \'no_builtin\' [-Winvalid-no-builtin-names]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_no_decl"]={ | ["warn_attribute_no_decl"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute %0 ignored, because it is not attached to a declaration", | [e]="attribute %0 ignored, because it is not attached to a declaration", | ||
[ | [a]=n, | ||
[b]="attribute (.*?) ignored, because it is not attached to a declaration", | [b]="attribute (.*?) ignored, because it is not attached to a declaration", | ||
[ | [c]=C, | ||
[ | [d]=K, | ||
[ | [f]={"71d610329554",1330727390,"Issue warning when late-parsed attributes have no declaration.\n\nllvm-svn: 151947","Issue warning when late-parsed attributes have no declaration.\n\nllvm-svn: 151947"}, | ||
[ | [g]={{"clang/lib/Parse/ParseCXXInlineMethods.cpp",767,"/// Finish parsing an attribute for which parsing was delayed.\n/// This will be called at the end of parsing a class declaration\n/// for each LateParsedAttribute. We consume the saved tokens and\n/// create an attribute with the arguments filled in. We add this\n/// to the Attribute list for the decl.\nvoid Parser::ParseLexedAttribute(LateParsedAttribute &LA, bool EnterScope, bool OnDefinition) {\n // ...\n if (LA.Decls.size() > 0) {\n // ...\n } else {\n Diag(Tok, diag::warn_attribute_no_decl) << LA.AttrName.getName();"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/cxx-attributes.cpp"]={"clang/test/Parser/cxx-attributes.cpp:17:69: warning: attribute locks_excluded ignored, because it is not attached to a declaration [-Wignored-attributes]"} | ["clang/test/Parser/cxx-attributes.cpp"]={"clang/test/Parser/cxx-attributes.cpp:17:69: warning: attribute locks_excluded ignored, because it is not attached to a declaration [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_nonnull_no_pointers"]={ | ["warn_attribute_nonnull_no_pointers"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'nonnull\' attribute applied to function with no pointer arguments", | [e]="\'nonnull\' attribute applied to function with no pointer arguments", | ||
[ | [a]=n, | ||
[b]="\'nonnull\' attribute applied to function with no pointer arguments", | [b]="\'nonnull\' attribute applied to function with no pointer arguments", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{o,1618,"static void handleNonNullAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // If no arguments were specified to __attribute__((nonnull)) then all pointer\n // arguments have a nonnull attribute; warn if there aren\'t any. Skip this\n // check if the attribute came from a macro expansion or a template\n // instantiation.\n if (NonNullArgs.empty() && AL.getLoc().isFileID() && !S.inTemplateInstantiation()) {\n // ...\n if (!AnyPointers)\n S.Diag(AL.getLoc(), diag::warn_attribute_nonnull_no_pointers);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-nonnull.c"]={"clang/test/Sema/attr-nonnull.c:7:30: warning: \'nonnull\' attribute applied to function with no pointer arguments [-Wignored-attributes]"} | ["clang/test/Sema/attr-nonnull.c"]={"clang/test/Sema/attr-nonnull.c:7:30: warning: \'nonnull\' attribute applied to function with no pointer arguments [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_nonnull_parm_no_args"]={ | ["warn_attribute_nonnull_parm_no_args"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'nonnull\' attribute when used on parameters takes no arguments", | [e]="\'nonnull\' attribute when used on parameters takes no arguments", | ||
[ | [a]=n, | ||
[b]="\'nonnull\' attribute when used on parameters takes no arguments", | [b]="\'nonnull\' attribute when used on parameters takes no arguments", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"9aedc159ef4c",1389939896,"Enhance attribute \'nonnull\' to be applicable to parameters directly (infix).\n\nThis allows the follow...","Enhance attribute \'nonnull\' to be applicable to parameters directly (infix).\n\nThis allows the following syntax:\n\n void baz(__attribute__((nonnull)) const char *str);\n\ninstead of:\n\n void baz(const char *str) __attribute__((nonnull(1)));\n\nThis also extends to Objective-C methods.\n\nThe checking logic in Sema is not as clean as I would like. Effectively\nnow we need to check both the FunctionDecl/ObjCMethodDecl and the parameters,\nso the point of truth is spread in two places, but the logic isn\'t that\ncumbersome.\n\nImplements <rdar://problem/14691443>.\n\nllvm-svn: 199467"}, | ||
[ | [g]={{o,1633,"static void handleNonNullAttrParameter(Sema &S, ParmVarDecl *D, const ParsedAttr &AL) {\n if (AL.getNumArgs() > 0) {\n if (D->getFunctionType()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_attribute_nonnull_parm_no_args) << D->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:106:60: warning: \'nonnull\' attribute when used on parameters takes no arguments [-Wignored-attributes]"} | ["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:106:60: warning: \'nonnull\' attribute when used on parameters takes no arguments [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_not_on_decl"]={ | ["warn_attribute_not_on_decl"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute ignored when parsing type", | [e]="%0 attribute ignored when parsing type", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute ignored when parsing type", | [b]="(.*?) attribute ignored when parsing type", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"42856de54283",1317446223,"Hey, maybe we shouldn\'t silently ignore decl attributes\non declarators written as types.\n\nllvm-svn: ...","Hey, maybe we shouldn\'t silently ignore decl attributes\non declarators written as types.\n\nllvm-svn: 140931"}, | ||
[ | [g]={{o,9621,"/// checkUnusedDeclAttributes - Check a list of attributes to see if it\n/// contains any decl attributes that we should warn about.\nstatic void checkUnusedDeclAttributes(Sema &S, const ParsedAttributesView &A) {\n for (const ParsedAttr &AL : A) {\n // ...\n if (AL.getKind() == ParsedAttr::UnknownAttribute) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_attribute_not_on_decl) << AL << AL.getRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/using-declspec.cpp"]={"clang/test/SemaCXX/using-declspec.cpp:5:27: warning: \'align\' attribute ignored when parsing type [-Wignored-attributes]","clang/test/SemaCXX/using-declspec.cpp:15:21: warning: \'align\' attribute ignored when parsing type [-Wignored-attributes]"} | ["clang/test/SemaCXX/using-declspec.cpp"]={"clang/test/SemaCXX/using-declspec.cpp:5:27: warning: \'align\' attribute ignored when parsing type [-Wignored-attributes]","clang/test/SemaCXX/using-declspec.cpp:15:21: warning: \'align\' attribute ignored when parsing type [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_on_function_definition"]={ | ["warn_attribute_on_function_definition"]={ | ||
[ | [m]={fc}, | ||
[l]=fc, | |||
[ | |||
[e]="GCC does not allow %0 attribute in this position on a function definition", | [e]="GCC does not allow %0 attribute in this position on a function definition", | ||
[ | [a]=n, | ||
[b]="GCC does not allow (.*?) attribute in this position on a function definition", | [b]="GCC does not allow (.*?) attribute in this position on a function definition", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"3fc6e4a7cda9",1329411043,"Allow thread safety attributes on function definitions.\nFor compatibility with gcc, clang will now p...","Allow thread safety attributes on function definitions.\nFor compatibility with gcc, clang will now parse gcc attributes on\nfunction definitions, but issue a warning if the attribute is not a\nthread safety attribute. Warning controlled by -Wgcc-compat.\n\nllvm-svn: 150698"}, | ||
[ | [g]={{"clang/lib/Parse/ParseCXXInlineMethods.cpp",772,"/// Finish parsing an attribute for which parsing was delayed.\n/// This will be called at the end of parsing a class declaration\n/// for each LateParsedAttribute. We consume the saved tokens and\n/// create an attribute with the arguments filled in. We add this\n/// to the Attribute list for the decl.\nvoid Parser::ParseLexedAttribute(LateParsedAttribute &LA, bool EnterScope, bool OnDefinition) {\n // ...\n if (OnDefinition && !Attrs.empty() && !Attrs.begin()->isCXX11Attribute() && Attrs.begin()->isKnownToGCC())\n Diag(Tok, diag::warn_attribute_on_function_definition) << &LA.AttrName;"},{"clang/lib/Parse/Parser.cpp",1295,"/// ParseFunctionDefinition - We parsed and verified that the specified\n/// Declarator is well formed. If this is a K&R-style function, read the\n/// parameters declaration-list, then start the compound-statement.\n///\n/// function-definition: [C99 6.9.1]\n/// decl-specs declarator declaration-list[opt] compound-statement\n/// [C90] function-definition: [C99 6.7.1] - implicit int result\n/// [C90] decl-specs[opt] declarator declaration-list[opt] compound-statement\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator ctor-initializer[opt]\n/// function-body\n/// [C++] function-definition: [C++ 8.4]\n/// decl-specifier-seq[opt] declarator function-try-block\n///\nDecl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, LateParsedAttrList *LateParsedAttrs) {\n // ...\n // Check to make sure that any normal attributes are allowed to be on\n // a definition. Late parsed attributes are checked at the end.\n if (Tok.isNot(tok::equal)) {\n for (const ParsedAttr &AL : D.getAttributes())\n if (AL.isKnownToGCC() && !AL.isStandardAttributeSyntax())\n Diag(AL.getLoc(), diag::warn_attribute_on_function_definition) << AL;"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/attributes.c"]={"clang/test/Parser/attributes.c:67:40: warning: GCC does not allow \'nonnull\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:73:39: warning: GCC does not allow \'noreturn\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:78:40: warning: GCC does not allow \'nonnull\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:80:38: warning: GCC does not allow \'pure\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:85:40: warning: GCC does not allow \'nonnull\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:87:36: warning: GCC does not allow \'pure\' attribute in this position on a function definition [-Wgcc-compat]"} | ["clang/test/Parser/attributes.c"]={"clang/test/Parser/attributes.c:67:40: warning: GCC does not allow \'nonnull\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:73:39: warning: GCC does not allow \'noreturn\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:78:40: warning: GCC does not allow \'nonnull\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:80:38: warning: GCC does not allow \'pure\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:85:40: warning: GCC does not allow \'nonnull\' attribute in this position on a function definition [-Wgcc-compat]","clang/test/Parser/attributes.c:87:36: warning: GCC does not allow \'pure\' attribute in this position on a function definition [-Wgcc-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_packed_for_bitfield"]={ | ["warn_attribute_packed_for_bitfield"]={ | ||
[ | [m]={"attribute-packed-for-bitfield"}, | ||
[l]="attribute-packed-for-bitfield", | |||
[ | |||
[e]="\'packed\' attribute was ignored on bit-fields with single-byte alignment in older versions of GCC and Clang", | [e]="\'packed\' attribute was ignored on bit-fields with single-byte alignment in older versions of GCC and Clang", | ||
[ | [a]=n, | ||
[b]="\'packed\' attribute was ignored on bit\\-fields with single\\-byte alignment in older versions of GCC and Clang", | [b]="\'packed\' attribute was ignored on bit\\-fields with single\\-byte alignment in older versions of GCC and Clang", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wattribute\\-packed\\-for\\-bitfield[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"830dfccfb2c0",1449135289,"PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type, patch by D. Polukhin\n\nTh...","PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type, patch by D. Polukhin\n\nThis CL is for discussion how to better fix bit-filed layout compatibility issue with GCC (see PR25575 for test case and more details). Current clang behavior is compatible with GCC 4.1-4.3 series but it was fixed in 4.4+. Ignoring packed attribute looks very odd and because it was also fixed in GCC 4.4+, it makes sense also fix it in clang.\nDifferential Revision: http://reviews.llvm.org/D14872\n\nllvm-svn: 254596"}, | ||
[ | [g]={{o,1422,"static void handlePackedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (auto *TD = dyn_cast<TagDecl>(D))\n // ...\n else if (auto *FD = dyn_cast<FieldDecl>(D)) {\n // ...\n if (S.getASTContext().getTargetInfo().getTriple().isPS()) {\n // ...\n } else {\n // Report warning about changed offset in the newer compiler versions.\n if (BitfieldByteAligned)\n S.Diag(AL.getLoc(), diag::warn_attribute_packed_for_bitfield);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/struct-packed-align.c"]={"clang/test/Sema/struct-packed-align.c:157:29: warning: \'packed\' attribute was ignored on bit-fields with single-byte alignment in older versions of GCC and Clang [-Wattribute-packed-for-bitfield]"} | ["clang/test/Sema/struct-packed-align.c"]={"clang/test/Sema/struct-packed-align.c:157:29: warning: \'packed\' attribute was ignored on bit-fields with single-byte alignment in older versions of GCC and Clang [-Wattribute-packed-for-bitfield]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_pointer_or_reference_only"]={ | ["warn_attribute_pointer_or_reference_only"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute only applies to a pointer or reference (%1 is invalid)", | [e]="%0 attribute only applies to a pointer or reference (%1 is invalid)", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute only applies to a pointer or reference \\((.*?) is invalid\\)", | [b]="(.*?) attribute only applies to a pointer or reference \\((.*?) is invalid\\)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"1b0d24e03abf",1412284885,"Initial support for the align_value attribute\n\nThis adds support for the align_value attribute. This...","Initial support for the align_value attribute\n\nThis adds support for the align_value attribute. This attribute is supported by\nIntel\'s compiler (versions 14.0+), and several of my HPC users have requested\nsupport in Clang. It specifies an alignment assumption on the values to which a\npointer points, and is used by numerical libraries to encourage efficient\ngeneration of vector code.\n\nOf course, we already have an aligned attribute that can specify enhanced\nalignment for a type, so why is this additional attribute important? The\nproblem is that if you want to specify that an input array of T is, say,\n64-byte aligned, you could try this:\n\n typedef double aligned_double attribute((aligned(64)));\n void foo(aligned_double *P) {\n double x = P[0]; // This is fine.\n double y = P[1]; // What alignment did those doubles have again?\n }\n\nthe access here to P[1] causes problems. P was specified as a pointer to type\naligned_double, and any object of type aligned_double must be 64-byte aligned.\nBut if P[0] is 64-byte aligned, then P[1] cannot be, and this access causes\nundefined behavior. Getting round this problem requires a lot of awkward\ncasting and hand-unrolling of loops, all of which is bad.\n\nWith the align_value attribute, we can accomplish what we\'d like in a well\ndefined way:\n\n typedef double *aligned_double_ptr attribute((align_value(64)));\n void foo(aligned_double_ptr P) {\n double x = P[0]; // This is fine.\n double y = P[1]; // This is fine too.\n }\n\nThis attribute does not create a new type (and so it not part of the type\nsystem), and so will only \"propagate\" through templates, auto, etc. by\noptimizer deduction after inlining. This seems consistent with Intel\'s\nimplementation (thanks to Alexey for confirming the various Intel-compiler\nbehaviors).\n\nAs a final note, I would have chosen to call this aligned_value, not\nalign_value, for better naming consistency with the aligned attribute, but I\nthink it would be more useful to users to adopt Intel\'s name.\n\nllvm-svn: 218910"}, | ||
[ | [g]={{o,4323,"void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) {\n // ...\n if (!T->isDependentType() && !T->isAnyPointerType() && !T->isReferenceType() && !T->isMemberPointerType()) {\n Diag(AttrLoc, diag::warn_attribute_pointer_or_reference_only) << &TmpAttr << T << D->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/align_value.c"]={"clang/test/Sema/align_value.c:26:28: warning: \'align_value\' attribute only applies to a pointer or reference (\'int\' is invalid) [-Wignored-attributes]"} | ["clang/test/Sema/align_value.c"]={"clang/test/Sema/align_value.c:26:28: warning: \'align_value\' attribute only applies to a pointer or reference (\'int\' is invalid) [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_pointers_only"]={ | ["warn_attribute_pointers_only"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute only applies to%select{| constant}1 pointer arguments", | [e]="%0 attribute only applies to%select{| constant}1 pointer arguments", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute only applies to(?:| constant) pointer arguments", | [b]="(.*?) attribute only applies to(?:| constant) pointer arguments", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"cedaaea69127",1388077669,"This diagnostic did not accept arguments, and did not have any test coverage. Parameterized the diag...","This diagnostic did not accept arguments, and did not have any test coverage. Parameterized the diagnostic, and made it more consistent with other attribute diagnostic wordings. Added test coverage.\n\nSince this warning was generalized, it was also given a sensible warning group flag and the corresponding test was updated to reflect this.\n\nllvm-svn: 198053"}, | ||
[ | [g]={{o,1577,"static bool attrNonNullArgCheck(Sema &S, QualType T, const ParsedAttr &AL, SourceRange AttrParmRange, SourceRange TypeRange, bool isReturnValue = false) {\n if (!S.isValidPointerAttrType(T)) {\n if (isReturnValue)\n // ...\n else\n S.Diag(AL.getLoc(), diag::warn_attribute_pointers_only) << AL << AttrParmRange << TypeRange << 0;"},{o,1664,"static void handleNoEscapeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!S.isValidPointerAttrType(T, /* RefOkay */ true)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_pointers_only) << AL << AL.getRange() << 0;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:104:66: warning: \'nonnull\' attribute only applies to pointer arguments [-Wignored-attributes]"} | ["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:104:66: warning: \'nonnull\' attribute only applies to pointer arguments [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_precede_definition"]={ | ["warn_attribute_precede_definition"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute declaration must precede definition", | [e]="attribute declaration must precede definition", | ||
[ | [a]=n, | ||
[b]="attribute declaration must precede definition", | [b]="attribute declaration must precede definition", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"e5dc8594ea99",1248560984,"PR3575 - warn on declared variable or function attributes after a definition, which are currently ig...","PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.\n\nllvm-svn: 77095"}, | ||
[ | [g]={{p,3122,"/// 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 S.Diag(NewAttribute->getLocation(), diag::warn_attribute_precede_definition);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-target-mv.c"]={"clang/test/Sema/attr-target-mv.c:60:20: warning: attribute declaration must precede definition [-Wignored-attributes]"} | ["clang/test/Sema/attr-target-mv.c"]={"clang/test/Sema/attr-target-mv.c:60:20: warning: attribute declaration must precede definition [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_protected_visibility"]={ | ["warn_attribute_protected_visibility"]={ | ||
[ | [m]={"unsupported-visibility"}, | ||
[l]="unsupported-visibility", | |||
[ | |||
[e]="target does not support \'protected\' visibility; using \'default\'", | [e]="target does not support \'protected\' visibility; using \'default\'", | ||
[ | [a]=n, | ||
[b]="target does not support \'protected\' visibility; using \'default\'", | [b]="target does not support \'protected\' visibility; using \'default\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wunsupported\\-visibility[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"eed64c77d27f",1327800030,"Complain about attempts to use \'protected\' visibility on targets\nlike Darwin that don\'t support it. ...","Complain about attempts to use \'protected\' visibility on targets\nlike Darwin that don\'t support it. We should also complain about\ninvalid -fvisibility=protected, but that information doesn\'t seem\nto exist at the most appropriate time, so I\'ve left a FIXME behind.\n\nllvm-svn: 149186"}, | ||
[ | [g]={{o,2926,"static void handleVisibilityAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) {\n // ...\n // Complain about attempts to use protected visibility on targets\n // (like Darwin) that don\'t support it.\n if (type == VisibilityAttr::Protected && !S.Context.getTargetInfo().hasProtectedVisibility()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_protected_visibility);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-visibility.c"]={"clang/test/Sema/attr-visibility.c:8:33: warning: target does not support \'protected\' visibility; using \'default\' [-Wunsupported-visibility]"} | ["clang/test/Sema/attr-visibility.c"]={"clang/test/Sema/attr-visibility.c:8:33: warning: target does not support \'protected\' visibility; using \'default\' [-Wunsupported-visibility]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_return_pointers_only"]={ | ["warn_attribute_return_pointers_only"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute only applies to return values that are pointers", | [e]="%0 attribute only applies to return values that are pointers", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute only applies to return values that are pointers", | [b]="(.*?) attribute only applies to return values that are pointers", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"dbf62e3eee51",1390197047,"Wire up basic parser/sema support for attribute \'returns_nonnull\'.\n\nThis attribute is supported by G...","Wire up basic parser/sema support for attribute \'returns_nonnull\'.\n\nThis attribute is supported by GCC. More generally it should\nprobably be a type attribute, but this behavior matches \'nonnull\'.\n\nThis patch does not include warning logic for checking if a null\nvalue is returned from a function annotated with this attribute.\nThat will come in subsequent patches.\n\nllvm-svn: 199626"}, | ||
[ | [g]={{o,835,"static void handleAllocSizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!RetTy->isPointerType()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_return_pointers_only) << AL;"},{o,1574,"static bool attrNonNullArgCheck(Sema &S, QualType T, const ParsedAttr &AL, SourceRange AttrParmRange, SourceRange TypeRange, bool isReturnValue = false) {\n if (!S.isValidPointerAttrType(T)) {\n if (isReturnValue)\n S.Diag(AL.getLoc(), diag::warn_attribute_return_pointers_only) << AL << AttrParmRange << TypeRange;"},{o,2058,"static void handleRestrictAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n S.Diag(AL.getLoc(), diag::warn_attribute_return_pointers_only) << AL << getFunctionOrMethodResultSourceRange(D);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/alloc-size.c"]={"clang/test/Sema/alloc-size.c:15:33: warning: \'alloc_size\' attribute only applies to return values that are pointers [-Wignored-attributes]"} | ["clang/test/Sema/alloc-size.c"]={"clang/test/Sema/alloc-size.c:15:33: warning: \'alloc_size\' attribute only applies to return values that are pointers [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_return_pointers_refs_only"]={ | ["warn_attribute_return_pointers_refs_only"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute only applies to return values that are pointers or references", | [e]="%0 attribute only applies to return values that are pointers or references", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute only applies to return values that are pointers or references", | [b]="(.*?) attribute only applies to return values that are pointers or references", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"ee90a223ead9",1411707870,"Support the assume_aligned function attribute\n\nIn addition to __builtin_assume_aligned, GCC also sup...","Support the assume_aligned function attribute\n\nIn addition to __builtin_assume_aligned, GCC also supports an assume_aligned\nattribute which specifies the alignment (and optional offset) of a function\'s\nreturn value. Here we implement support for the assume_aligned attribute by making\nuse of the @llvm.assume intrinsic.\n\nllvm-svn: 218500"}, | ||
[ | [g]={{o,1691,"void Sema::AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE) {\n // ...\n if (!isValidPointerAttrType(ResultType, /* RefOkay */ true)) {\n Diag(AttrLoc, diag::warn_attribute_return_pointers_refs_only) << &TmpAttr << TmpAttr.getRange() << SR;"},{o,1740,"void Sema::AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr) {\n // ...\n if (!ResultType->isDependentType() && !isValidPointerAttrType(ResultType, /* RefOkay */ true)) {\n Diag(AttrLoc, diag::warn_attribute_return_pointers_refs_only) << &TmpAttr << CI.getRange() << getFunctionOrMethodResultSourceRange(D);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/alloc-align-attr.c"]={"clang/test/Sema/alloc-align-attr.c:4:49: warning: \'alloc_align\' attribute only applies to return values that are pointers or references [-Wignored-attributes]"} | ["clang/test/Sema/alloc-align-attr.c"]={"clang/test/Sema/alloc-align-attr.c:4:49: warning: \'alloc_align\' attribute only applies to return values that are pointers or references [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_section_drectve"]={ | ["warn_attribute_section_drectve"]={ | ||
[ | [m]={"microsoft","microsoft-drectve-section"}, | ||
[l]="microsoft-drectve-section", | |||
[ | |||
[e]="#pragma %0(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead", | [e]="#pragma %0(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead", | ||
[ | [a]=n, | ||
[b]="\\#pragma (.*?)\\(\"\\.drectve\"\\) has undefined behavior, use \\#pragma comment\\(linker, \\.\\.\\.\\) instead", | [b]="\\#pragma (.*?)\\(\"\\.drectve\"\\) has undefined behavior, use \\#pragma comment\\(linker, \\.\\.\\.\\) instead", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmicrosoft\\-drectve\\-section[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"9801621616b2",1562630543,"clang-cl: Port cl.exe\'s C4659 to clang-cl\n\nDifferential Revision: https://reviews.llvm.org/D64349\n\nl...","clang-cl: Port cl.exe\'s C4659 to clang-cl\n\nDifferential Revision: https://reviews.llvm.org/D64349\n\nllvm-svn: 365411"}, | ||
[ | [g]={{nb,756,"/// Called on well formed \\#pragma bss_seg().\nvoid Sema::ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName) {\n // ...\n if (SegmentName) {\n // ...\n if (SegmentName->getString() == \".drectve\" && Context.getTargetInfo().getCXXABI().isMicrosoft())\n Diag(PragmaLocation, diag::warn_attribute_section_drectve) << PragmaName;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pragma-section.c"]={"clang/test/Sema/pragma-section.c:46:9: warning: #pragma bss_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]","clang/test/Sema/pragma-section.c:47:9: warning: #pragma code_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]","clang/test/Sema/pragma-section.c:48:9: warning: #pragma const_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]","clang/test/Sema/pragma-section.c:49:9: warning: #pragma data_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]"} | ["clang/test/Sema/pragma-section.c"]={"clang/test/Sema/pragma-section.c:46:9: warning: #pragma bss_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]","clang/test/Sema/pragma-section.c:47:9: warning: #pragma code_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]","clang/test/Sema/pragma-section.c:48:9: warning: #pragma const_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]","clang/test/Sema/pragma-section.c:49:9: warning: #pragma data_seg(\".drectve\") has undefined behavior, use #pragma comment(linker, ...) instead [-Wmicrosoft-drectve-section]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_section_on_redeclaration"]={ | ["warn_attribute_section_on_redeclaration"]={ | ||
[ | [m]={"section"}, | ||
[l]="section", | |||
[ | |||
[e]="section attribute is specified on redeclared variable", | [e]="section attribute is specified on redeclared variable", | ||
[ | [a]=n, | ||
[b]="section attribute is specified on redeclared variable", | [b]="section attribute is specified on redeclared variable", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wsection[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"99fdfb6a4644",1506469354,"Emit section information for extern variables. \n\nCurrently, if _attribute_((section())) is used for ...","Emit section information for extern variables. \n\nCurrently, if _attribute_((section())) is used for extern variables, \nsection information is not emitted in generated IR when the variables are used. \nThis is expected since sections are not generated for external linkage objects. \nHowever NiosII requires this information as it uses special GP-relative accesses \nfor any objects that use attribute section (.sdata). GCC keeps this attribute in \n middle-end.\n\nThis change emits the section information for all targets.\n\nPatch By: Elizabeth Andrews\n\nDifferential Revision:https://reviews.llvm.org/D36487\n\nllvm-svn: 314262"}, | ||
[ | [g]={{p,3272,"/// mergeDeclAttributes - Copy attributes from the Old decl to the New one.\nvoid Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK) {\n // ...\n // This redeclaration adds a section attribute.\n if (New->hasAttr<SectionAttr>() && !Old->hasAttr<SectionAttr>()) {\n if (auto *VD = dyn_cast<VarDecl>(New)) {\n if (VD->isThisDeclarationADefinition() == VarDecl::DeclarationOnly) {\n Diag(New->getLocation(), diag::warn_attribute_section_on_redeclaration);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/attr-section.cpp"]={"clang/test/SemaCXX/attr-section.cpp:21:12: warning: section attribute is specified on redeclared variable [-Wsection]"} | ["clang/test/SemaCXX/attr-section.cpp"]={"clang/test/SemaCXX/attr-section.cpp:21:12: warning: section attribute is specified on redeclared variable [-Wsection]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_sentinel_named_arguments"]={ | ["warn_attribute_sentinel_named_arguments"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'sentinel\' attribute requires named arguments", | [e]="\'sentinel\' attribute requires named arguments", | ||
[ | [a]=n, | ||
[b]="\'sentinel\' attribute requires named arguments", | [b]="\'sentinel\' attribute requires named arguments", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"9363e3106edc",1237331027,"don\'t crash when sentinel attribute is used on function without a prototype,\ndiscovered as part of P...","don\'t crash when sentinel attribute is used on function without a prototype,\ndiscovered as part of PR3817\n\nllvm-svn: 67127"}, | ||
[ | [g]={{o,3091,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n if (isa<FunctionNoProtoType>(FT)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_sentinel_named_arguments);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/sentinel-attribute.c"]={"clang/test/Sema/sentinel-attribute.c:19:26: warning: \'sentinel\' attribute requires named arguments [-Wignored-attributes]"} | ["clang/test/Sema/sentinel-attribute.c"]={"clang/test/Sema/sentinel-attribute.c:19:26: warning: \'sentinel\' attribute requires named arguments [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_sentinel_not_variadic"]={ | ["warn_attribute_sentinel_not_variadic"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="\'sentinel\' attribute only supported for variadic %select{functions|blocks}0", | [e]="\'sentinel\' attribute only supported for variadic %select{functions|blocks}0", | ||
[ | [a]=n, | ||
[b]="\'sentinel\' attribute only supported for variadic (?:functions|blocks)", | [b]="\'sentinel\' attribute only supported for variadic (?:functions|blocks)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{o,3096,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n if (!cast<FunctionProtoType>(FT)->isVariadic()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_sentinel_not_variadic) << 0;"},{o,3101,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n if (!MD->isVariadic()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_sentinel_not_variadic) << 0;"},{o,3106,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {\n if (!BD->isVariadic()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_sentinel_not_variadic) << 1;"},{o,3119,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {\n // ...\n } else if (const auto *V = dyn_cast<VarDecl>(D)) {\n // ...\n if (Ty->isBlockPointerType() || Ty->isFunctionPointerType()) {\n // ...\n if (!cast<FunctionProtoType>(FT)->isVariadic()) {\n // ...\n S.Diag(AL.getLoc(), diag::warn_attribute_sentinel_not_variadic) << m;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:9:40: warning: \'sentinel\' attribute only supported for variadic functions [-Wignored-attributes]"} | ["clang/test/SemaObjC/method-sentinel-attr.m"]={"clang/test/SemaObjC/method-sentinel-attr.m:9:40: warning: \'sentinel\' attribute only supported for variadic functions [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_type_not_supported"]={ | ["warn_attribute_type_not_supported"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute argument not supported: %1", | [e]="%0 attribute argument not supported: %1", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute argument not supported\\: (.*?)", | [b]="(.*?) attribute argument not supported\\: (.*?)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Yb,1574,"void Parser::ParseSwiftNewTypeAttribute(IdentifierInfo &AttrName, SourceLocation AttrNameLoc, ParsedAttributes &Attrs, SourceLocation *EndLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n if (Tok.isNot(tok::kw_struct) && Tok.isNot(tok::kw_enum)) {\n Diag(Tok, diag::warn_attribute_type_not_supported) << &AttrName << Tok.getIdentifierInfo();"},{o,1212,"static void handleConsumableAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isArgIdent(0)) {\n // ...\n if (!ConsumableAttr::ConvertStrToConsumedState(IL->Ident->getName(), DefaultState)) {\n S.Diag(IL->Loc, diag::warn_attribute_type_not_supported) << AL << IL->Ident;"},{o,1264,"static void handleCallableWhenAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned ArgIndex = 0; ArgIndex < AL.getNumArgs(); ++ArgIndex) {\n // ...\n if (!CallableWhenAttr::ConvertStrToConsumedState(StateString, CallableState)) {\n S.Diag(Loc, diag::warn_attribute_type_not_supported) << AL << StateString;"},{o,1284,"static void handleParamTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isArgIdent(0)) {\n // ...\n if (!ParamTypestateAttr::ConvertStrToConsumedState(StateString, ParamState)) {\n S.Diag(Ident->Loc, diag::warn_attribute_type_not_supported) << AL << StateString;"},{o,1316,"static void handleReturnTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isArgIdent(0)) {\n // ...\n if (!ReturnTypestateAttr::ConvertStrToConsumedState(IL->Ident->getName(), ReturnState)) {\n S.Diag(IL->Loc, diag::warn_attribute_type_not_supported) << AL << IL->Ident;"},{o,1363,"static void handleSetTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isArgIdent(0)) {\n // ...\n if (!SetTypestateAttr::ConvertStrToConsumedState(Param, NewState)) {\n S.Diag(Ident->Loc, diag::warn_attribute_type_not_supported) << AL << Param;"},{o,1385,"static void handleTestTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isArgIdent(0)) {\n // ...\n if (!TestTypestateAttr::ConvertStrToConsumedState(Param, TestState)) {\n S.Diag(Ident->Loc, diag::warn_attribute_type_not_supported) << AL << Param;"},{o,2917,"static void handleVisibilityAttr(Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) {\n // ...\n if (!VisibilityAttr::ConvertStrToVisibilityType(TypeStr, type)) {\n S.Diag(LiteralLoc, diag::warn_attribute_type_not_supported) << AL << TypeStr;"},{o,2975,"static void handleObjCMethodFamilyAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!ObjCMethodFamilyAttr::ConvertStrToFamilyKind(IL->Ident->getName(), F)) {\n S.Diag(IL->Loc, diag::warn_attribute_type_not_supported) << AL << IL->Ident;"},{o,3041,"static void handleBlocksAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!BlocksAttr::ConvertStrToBlockType(II->getName(), type)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << II;"},{o,3763,"static void handleEnumExtensibilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!EnumExtensibilityAttr::ConvertStrToKind(II->getName(), ExtensibilityKind)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << II;"},{o,3962,"/// Handle __attribute__((format(type,idx,firstarg))) attributes based on\n/// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html\nstatic void handleFormatAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (Kind == InvalidFormat) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << II->getName();"},{o,6427,"static void handleSwiftError(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!SwiftErrorAttr::ConvertStrToConventionKind(Loc->Ident->getName(), Convention)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << Loc->Ident;"},{o,6543,"static void handleSwiftAsyncError(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!SwiftAsyncErrorAttr::ConvertStrToConventionKind(IDLoc->Ident->getName(), ConvKind)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << IDLoc->Ident;"},{o,6900,"static void handleSwiftNewType(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!SwiftNewTypeAttr::ConvertStrToNewtypeKind(II->getName(), Kind)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << II;"},{o,7192,"static void handleHLSLShaderAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!HLSLShaderAttr::ConvertStrToShaderType(Str, ShaderType) ||\n // ...\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << Str << ArgLoc;"},{o,7368,"static void handleARMInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!ARMInterruptAttr::ConvertStrToInterruptType(Str, Kind)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << Str << ArgLoc;"},{o,7477,"static void handleMipsInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!MipsInterruptAttr::ConvertStrToInterruptType(Str, Kind)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << \"\'\" + std::string(Str) + \"\'\";"},{o,7798,"static void handleRISCVInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!RISCVInterruptAttr::ConvertStrToInterruptType(Str, Kind)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << Str << ArgLoc;"},{o,8344,"static void handleZeroCallUsedRegsAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!ZeroCallUsedRegsAttr::ConvertStrToZeroCallUsedRegsKind(KindStr, Kind)) {\n S.Diag(LiteralLoc, diag::warn_attribute_type_not_supported) << AL << KindStr;"},{o,8362,"static void handleFunctionReturnThunksAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!FunctionReturnThunksAttr::ConvertStrToKind(KindStr, Kind)) {\n S.Diag(LiteralLoc, diag::warn_attribute_type_not_supported) << AL << KindStr;"},{o,8600,"static void handleCFGuardAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!CFGuardAttr::ConvertStrToGuardArg(II->getName(), Arg)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_type_not_supported) << AL << II;"},{W,6953,"/// 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 if (II->isStr(\"none\"))\n // ...\n else if (II->isStr(\"strong\"))\n // ...\n else if (II->isStr(\"weak\"))\n // ...\n else if (II->isStr(\"autoreleasing\"))\n // ...\n else {\n S.Diag(AttrLoc, diag::warn_attribute_type_not_supported) << attr << II;"},{W,7126,"/// handleObjCGCTypeAttr - Process the __attribute__((objc_gc)) type\n/// attribute on the specified type. Returns true to indicate that\n/// the attribute was handled, false to indicate that the type does\n/// not permit the attribute.\nstatic bool handleObjCGCTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n if (II->isStr(\"weak\"))\n // ...\n else if (II->isStr(\"strong\"))\n // ...\n else {\n S.Diag(attr.getLoc(), diag::warn_attribute_type_not_supported) << attr << II;"}}, | ||
[ | [h]={ | ||
[ | [Fc]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:39:39: warning: \'callable_when\' attribute argument not supported: foo [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:45:55: warning: \'return_typestate\' attribute argument not supported: \'not_a_state\' [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_type_not_supported_global"]={ | ["warn_attribute_type_not_supported_global"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 attribute argument \'%1\' not supported on a global variable", | [e]="%0 attribute argument \'%1\' not supported on a global variable", | ||
[ | [a]=n, | ||
[b]="(.*?) attribute argument \'(.*?)\' not supported on a global variable", | [b]="(.*?) attribute argument \'(.*?)\' not supported on a global variable", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{o,8234,"static void handleNoSanitizeAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned I = 0, E = AL.getNumArgs(); I != E; ++I) {\n // ...\n if (parseSanitizerValue(SanitizerName, /*AllowGroups=*/true) == SanitizerMask() && SanitizerName != \"coverage\")\n // ...\n else if (isGlobalVar(D) && !isSanitizerAttributeAllowedOnGlobals(SanitizerName))\n S.Diag(D->getLocation(), diag::warn_attribute_type_not_supported_global) << AL << SanitizerName;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/attr-no-sanitize.cpp"]={"clang/test/SemaCXX/attr-no-sanitize.cpp:9:41: warning: \'no_sanitize\' attribute argument \'all\' not supported on a global variable [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-no-sanitize.cpp"]={"clang/test/SemaCXX/attr-no-sanitize.cpp:9:41: warning: \'no_sanitize\' attribute argument \'all\' not supported on a global variable [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_unknown_visibility"]={ | ["warn_attribute_unknown_visibility"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="unknown visibility %0", | [e]="unknown visibility %0", | ||
[ | [a]=n, | ||
[b]="unknown visibility (.*?)", | [b]="unknown visibility (.*?)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{nb,1304,"void Sema::ActOnPragmaVisibility(const IdentifierInfo *VisType, SourceLocation PragmaLoc) {\n if (VisType) {\n // ...\n if (!VisibilityAttr::ConvertStrToVisibilityType(VisType->getName(), T)) {\n Diag(PragmaLoc, diag::warn_attribute_unknown_visibility) << VisType;"}} | ||
}, | }, | ||
["warn_attribute_void_function_method"]={ | ["warn_attribute_void_function_method"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute %0 cannot be applied to %select{functions|Objective-C method}1 without return value", | [e]="attribute %0 cannot be applied to %select{functions|Objective-C method}1 without return value", | ||
[ | [a]=n, | ||
[b]="attribute (.*?) cannot be applied to (?:functions|Objective\\-C method) without return value", | [b]="attribute (.*?) cannot be applied to (?:functions|Objective\\-C method) without return value", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"5cab26d058d3",1269973335,"Add Support for \'warn_unused_result\" attribute on\nobjective-c methods. (radar 7418262).\n\nllvm-svn: 9...","Add Support for \'warn_unused_result\" attribute on\nobjective-c methods. (radar 7418262).\n\nllvm-svn: 99903"}, | ||
[ | [g]={{o,3141,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (D->getFunctionType() && D->getFunctionType()->getReturnType()->isVoidType() && !isa<CXXConstructorDecl>(D)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_void_function_method) << AL << 0;"},{o,3146,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *MD = dyn_cast<ObjCMethodDecl>(D))\n if (MD->getReturnType()->isVoidType()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_void_function_method) << AL << 1;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:107:30: warning: attribute \'warn_unused_result\' cannot be applied to functions without return value [-Wignored-attributes]"} | ["clang/test/Sema/unused-expr.c"]={"clang/test/Sema/unused-expr.c:107:30: warning: attribute \'warn_unused_result\' cannot be applied to functions without return value [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_weak_on_field"]={ | ["warn_attribute_weak_on_field"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="__weak attribute cannot be specified on a field declaration", | [e]="__weak attribute cannot be specified on a field declaration", | ||
[ | [a]=n, | ||
[b]="__weak attribute cannot be specified on a field declaration", | [b]="__weak attribute cannot be specified on a field declaration", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,18265,"/// 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 (T.isObjCGCWeak())\n Diag(Loc, diag::warn_attribute_weak_on_field);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/objc2-warn-weak-decl.m"]={"clang/test/SemaObjC/objc2-warn-weak-decl.m:4:13: warning: __weak attribute cannot be specified on a field declaration [-Wignored-attributes]"} | ["clang/test/SemaObjC/objc2-warn-weak-decl.m"]={"clang/test/SemaObjC/objc2-warn-weak-decl.m:4:13: warning: __weak attribute cannot be specified on a field declaration [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_weak_on_local"]={ | ["warn_attribute_weak_on_local"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="__weak attribute cannot be specified on an automatic variable when ARC is not enabled", | [e]="__weak attribute cannot be specified on an automatic variable when ARC is not enabled", | ||
[ | [a]=n, | ||
[b]="__weak attribute cannot be specified on an automatic variable when ARC is not enabled", | [b]="__weak attribute cannot be specified on an automatic variable when ARC is not enabled", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{p,8651,"void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {\n // ...\n if (NewVD->hasLocalStorage() && T.isObjCGCWeak() && !NewVD->hasAttr<BlocksAttr>()) {\n if (getLangOpts().getGC() != LangOptions::NonGC)\n // ...\n else {\n // ...\n Diag(NewVD->getLocation(), diag::warn_attribute_weak_on_local);"}} | ||
}, | }, | ||
["warn_attribute_wrong_decl_type"]={ | ["warn_attribute_wrong_decl_type"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0%select{ attribute|}1 only applies to %select{functions|unions|variables and functions|functions and methods|functions, methods and blocks|functions, methods, and parameters|variables|variables and fields|variables, data members and tag types|types and namespaces|variables, functions and classes|kernel functions|non-K&R-style functions}2", | [e]="%0%select{ attribute|}1 only applies to %select{functions|unions|variables and functions|functions and methods|functions, methods and blocks|functions, methods, and parameters|variables|variables and fields|variables, data members and tag types|types and namespaces|variables, functions and classes|kernel functions|non-K&R-style functions}2", | ||
[ | [a]=n, | ||
[b]="(.*?)(?: attribute|) only applies to (?:functions|unions|variables and functions|functions and methods|functions, methods and blocks|functions, methods, and parameters|variables|variables and fields|variables, data members and tag types|types and namespaces|variables, functions and classes|kernel functions|non\\-K&R\\-style functions)", | [b]="(.*?)(?: attribute|) only applies to (?:functions|unions|variables and functions|functions and methods|functions, methods and blocks|functions, methods, and parameters|variables|variables and fields|variables, data members and tag types|types and namespaces|variables, functions and classes|kernel functions|non\\-K&R\\-style functions)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Nc,1186,"/// ActOnEndOfTranslationUnit - This is called at the very end of the\n/// translation unit when EOF is reached and all but the top-level scope is\n/// popped.\nvoid Sema::ActOnEndOfTranslationUnit() {\n // ...\n for (const auto &WeakIDs : WeakUndeclaredIdentifiers) {\n // ...\n if (PrevDecl != nullptr && !(isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl)))\n for (const auto &WI : WeakIDs.second)\n Diag(WI.getLocation(), diag::warn_attribute_wrong_decl_type) << \"\'weak\'\" << /*isRegularKeyword=*/0 << ExpectedVariableOrFunction;"},{o,2186,"static void handleNoReturnAttr(Sema &S, Decl *D, const ParsedAttr &Attrs) {\n // ...\n if (!isa<ObjCMethodDecl>(D)) {\n S.Diag(Attrs.getLoc(), diag::warn_attribute_wrong_decl_type) << Attrs << Attrs.isRegularKeywordAttribute() << ExpectedFunctionOrMethod;"},{o,2250,"static void handleAnalyzerNoReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // The checking path for \'noreturn\' and \'analyzer_noreturn\' are different\n // because \'analyzer_noreturn\' does not impact the type.\n if (!isFunctionOrMethodOrBlock(D)) {\n // ...\n if (!VD || (!VD->getType()->isBlockPointerType() && !VD->getType()->isFunctionPointerType())) {\n S.Diag(AL.getLoc(), AL.isStandardAttributeSyntax() ? diag::err_attribute_wrong_decl_type : diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionMethodOrBlock;"},{o,3123,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {\n // ...\n } else if (const auto *V = dyn_cast<VarDecl>(D)) {\n // ...\n if (Ty->isBlockPointerType() || Ty->isFunctionPointerType()) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionMethodOrBlock;"},{o,3129,"static void handleSentinelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (const auto *BD = dyn_cast<BlockDecl>(D)) {\n // ...\n } else if (const auto *V = dyn_cast<VarDecl>(D)) {\n // ...\n } else {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionMethodOrBlock;"},{o,3202,"static void handleWeakImportAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!D->canBeWeakImported(isDef)) {\n if (isDef)\n // ...\n else if (isa<ObjCPropertyDecl>(D) || isa<ObjCMethodDecl>(D) || (S.Context.getTargetInfo().getTriple().isOSDarwin() && (isa<ObjCInterfaceDecl>(D) || isa<EnumDecl>(D)))) {\n // ...\n } else\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedVariableOrFunction;"},{o,4218,"static void handleTransparentUnionAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!RD || !RD->isUnion()) {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedUnion;"},{o,4904,"InternalLinkageAttr *Sema::mergeInternalLinkageAttr(Decl *D, const ParsedAttr &AL) {\n if (const auto *VD = dyn_cast<VarDecl>(D)) {\n // Attribute applies to Var but not any subclass of it (like ParmVar,\n // ImplicitParm or VarTemplateSpecialization).\n if (VD->getKind() != Decl::Var) {\n Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << (getLangOpts().CPlusPlus ? ExpectedFunctionVariableOrClass : ExpectedVariableOrFunction);"},{o,4925,"InternalLinkageAttr *Sema::mergeInternalLinkageAttr(Decl *D, const InternalLinkageAttr &AL) {\n if (const auto *VD = dyn_cast<VarDecl>(D)) {\n // Attribute applies to Var but not any subclass of it (like ParmVar,\n // ImplicitParm or VarTemplateSpecialization).\n if (VD->getKind() != Decl::Var) {\n Diag(AL.getLocation(), diag::warn_attribute_wrong_decl_type) << &AL << AL.isRegularKeywordAttribute() << (getLangOpts().CPlusPlus ? ExpectedFunctionVariableOrClass : ExpectedVariableOrFunction);"},{o,5125,"static void handleCallConvAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!isa<ObjCMethodDecl>(D)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionOrMethod;"},{o,6012,"static void handleXReturnsXRetainedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else if (S.getLangOpts().ObjCAutoRefCount && hasDeclarator(D) && (AL.getKind() == ParsedAttr::AT_NSReturnsRetained)) {\n // ...\n } else if (const auto *PD = dyn_cast<ObjCPropertyDecl>(D)) {\n // ...\n } else if (const auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n } else if (const auto *Param = dyn_cast<ParmVarDecl>(D)) {\n // ...\n } else if (AL.isUsedAsTypeAttr()) {\n // ...\n } else {\n // ...\n S.Diag(D->getBeginLoc(), diag::warn_attribute_wrong_decl_type) << AL.getRange() << AL << AL.isRegularKeywordAttribute() << ExpectedDeclKind;"},{o,6784,"bool Sema::DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) {\n if (isa<ObjCMethodDecl>(D) || isa<FunctionDecl>(D)) {\n // ...\n if (const auto *Method = dyn_cast<ObjCMethodDecl>(D)) {\n // ...\n } else {\n // ...\n if (!F->hasWrittenPrototype()) {\n Diag(Loc, diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionWithProtoType;"},{o,7380,"static void handleMSP430InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // MSP430 \'interrupt\' attribute is applied to\n // a function with no parameters and void return type.\n if (!isFunctionOrMethod(D)) {\n S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionOrMethod;"},{o,7453,"static void handleMipsInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!isFunctionOrMethod(D)) {\n S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionOrMethod;"},{o,7528,"static void handleAnyX86InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Semantic checks for a function with the \'interrupt\' attribute.\n // a) Must be a function.\n // b) Must have the \'void\' return type.\n // c) Must take 1 or 2 arguments.\n // d) The 1st argument must be a pointer.\n // e) The 2nd argument (if any) must be an unsigned integer.\n if (!isFunctionOrMethod(D) || !hasFunctionProto(D) || isInstanceMethod(D) || CXXMethodDecl::isStaticOverloadedOperator(cast<NamedDecl>(D)->getDeclName().getCXXOverloadedOperator())) {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunctionWithProtoType;"},{o,7585,"static void handleAVRInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!isFunctionOrMethod(D)) {\n S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunction;"},{o,7598,"static void handleAVRSignalAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!isFunctionOrMethod(D)) {\n S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunction;"},{o,7655,"static void handleWebAssemblyExportNameAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (!isFunctionOrMethod(D)) {\n S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunction;"},{o,7779,"static void handleRISCVInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (D->getFunctionType() == nullptr) {\n S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunction;"},{o,7974,"static void handleX86ForceAlignArgPointerAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Attribute can only be applied to function types.\n if (!isa<FunctionDecl>(D)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type) << AL << AL.isRegularKeywordAttribute() << ExpectedFunction;"}}, | ||
[ | [h]={ | ||
[ | [Fc]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:25:10: warning: \'set_typestate\' attribute only applies to functions [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:26:10: warning: \'test_typestate\' attribute only applies to functions [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:27:10: warning: \'callable_when\' attribute only applies to functions [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:31:18: warning: \'set_typestate\' attribute only applies to functions [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:32:18: warning: \'test_typestate\' attribute only applies to functions [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:33:18: warning: \'callable_when\' attribute only applies to functions [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attribute_wrong_decl_type_str"]={ | ["warn_attribute_wrong_decl_type_str"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0%select{ attribute|}1 only applies to %2", | [e]="%0%select{ attribute|}1 only applies to %2", | ||
[ | [a]=n, | ||
[b]="(.*?)(?: attribute|) only applies to (.*?)", | [b]="(.*?)(?: attribute|) only applies to (.*?)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"adf66b617461",1511726472,"Determine the attribute subject for diagnostics based on declarative information in DeclNodes.td. Th...","Determine the attribute subject for diagnostics based on declarative information in DeclNodes.td. This greatly reduces the number of enumerated values used for more complex diagnostics; these are now only required when the \"attribute only applies to\" diagnostic needs to be generated manually as part of semantic processing.\n\nThis also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc).\n\nMany of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute).\n\nllvm-svn: 319002"}, | ||
[ | [g]={{"clang/examples/Attribute/Attribute.cpp",46,"struct ExampleAttrInfo : public ParsedAttrInfo {\n // ...\n bool diagAppertainsToDecl(Sema &S, const ParsedAttr &Attr, const Decl *D) const override {\n // This attribute appertains to functions only.\n if (!isa<FunctionDecl>(D)) {\n S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type_str) << Attr << Attr.isRegularKeywordAttribute() << \"functions\";"},{"clang/examples/CallSuperAttribute/CallSuperAttrInfo.cpp",172,"struct CallSuperAttrInfo : public ParsedAttrInfo {\n // ...\n bool diagAppertainsToDecl(Sema &S, const ParsedAttr &Attr, const Decl *D) const override {\n // ...\n if (!TheMethod || !TheMethod->isVirtual()) {\n S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type_str) << Attr << Attr.isRegularKeywordAttribute() << \"virtual functions\";"},{o,3155,"static void handleWarnUnusedResult(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isStandardAttributeSyntax() && !AL.getScopeName()) {\n // The standard attribute cannot be applied to variable declarations such\n // as a function pointer.\n if (isa<VarDecl>(D))\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type_str) << AL << AL.isRegularKeywordAttribute() << \"functions, classes, or enumerations\";"},{o,6905,"static void handleSwiftNewType(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (!isa<TypedefNameDecl>(D)) {\n S.Diag(AL.getLoc(), diag::warn_attribute_wrong_decl_type_str) << AL << AL.isRegularKeywordAttribute() << \"typedefs\";"}}, | ||
[ | [h]={ | ||
[ | [Fc]={"clang/test/SemaCXX/warn-consumed-parsing.cpp:28:10: warning: \'consumable\' attribute only applies to classes [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:29:10: warning: \'return_typestate\' attribute only applies to functions and parameters [-Wignored-attributes]","clang/test/SemaCXX/warn-consumed-parsing.cpp:34:18: warning: \'consumable\' attribute only applies to classes [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_attributes_likelihood_ifstmt_conflict"]={ | ["warn_attributes_likelihood_ifstmt_conflict"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="conflicting attributes %0 are ignored", | [e]="conflicting attributes %0 are ignored", | ||
[ | [a]=n, | ||
[b]="conflicting attributes (.*?) are ignored", | [b]="conflicting attributes (.*?) are ignored", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{J,929,"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(ThenAttr->getLocation(), diag::warn_attributes_likelihood_ifstmt_conflict) << ThenAttr << ThenAttr->getRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/attr-likelihood.cpp"]={"clang/test/SemaCXX/attr-likelihood.cpp:14:7: warning: conflicting attributes \'likely\' are ignored [-Wignored-attributes]","clang/test/SemaCXX/attr-likelihood.cpp:21:7: warning: conflicting attributes \'unlikely\' are ignored [-Wignored-attributes]"} | ["clang/test/SemaCXX/attr-likelihood.cpp"]={"clang/test/SemaCXX/attr-likelihood.cpp:14:7: warning: conflicting attributes \'likely\' are ignored [-Wignored-attributes]","clang/test/SemaCXX/attr-likelihood.cpp:21:7: warning: conflicting attributes \'unlikely\' are ignored [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_auto_implicit_atomic_property"]={ | ["warn_auto_implicit_atomic_property"]={ | ||
[ | [m]={"atomic-properties","implicit-atomic-properties"}, | ||
[l]="implicit-atomic-properties", | |||
[ | |||
[e]="property is assumed atomic when auto-synthesizing the property", | [e]="property is assumed atomic when auto-synthesizing the property", | ||
[ | [a]=n, | ||
[b]="property is assumed atomic when auto\\-synthesizing the property", | [b]="property is assumed atomic when auto\\-synthesizing the property", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wimplicit\\-atomic\\-properties[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"382c040da2a6",1292624896,"Warn when synthesizing a property which is\nimplicitly atomic under -Wimplicit-atomic-properties\nflag...","Warn when synthesizing a property which is\nimplicitly atomic under -Wimplicit-atomic-properties\nflag. // rdar://8774580\n\nllvm-svn: 122095"}, | ||
[ | [g]={{x,1127,"/// 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 ((PIkind & (ObjCPropertyAttribute::kind_atomic | ObjCPropertyAttribute::kind_nonatomic)) == 0) {\n if (AtLoc.isValid())\n // ...\n else\n Diag(IC->getLocation(), diag::warn_auto_implicit_atomic_property);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/warn-implicit-atomic-property.m"]={"clang/test/SemaObjC/warn-implicit-atomic-property.m:11:17: warning: property is assumed atomic when auto-synthesizing the property [-Wimplicit-atomic-properties]"} | ["clang/test/SemaObjC/warn-implicit-atomic-property.m"]={"clang/test/SemaObjC/warn-implicit-atomic-property.m:11:17: warning: property is assumed atomic when auto-synthesizing the property [-Wimplicit-atomic-properties]"} | ||
} | } | ||
}, | }, | ||
["warn_auto_readonly_iboutlet_property"]={ | ["warn_auto_readonly_iboutlet_property"]={ | ||
[ | [m]={"readonly-iboutlet-property"}, | ||
[l]="readonly-iboutlet-property", | |||
[ | |||
[e]="readonly IBOutlet property %0 when auto-synthesized may not work correctly with \'nib\' loader", | [e]="readonly IBOutlet property %0 when auto-synthesized may not work correctly with \'nib\' loader", | ||
[ | [a]=n, | ||
[b]="readonly IBOutlet property (.*?) when auto\\-synthesized may not work correctly with \'nib\' loader", | [b]="readonly IBOutlet property (.*?) when auto\\-synthesized may not work correctly with \'nib\' loader", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wreadonly\\-iboutlet\\-property[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"199a9b57a6bb",1337451437,"objective-c: Warn if default synthesizing readonly IBOutlet properties\nand provide a \'fixit\' to chan...","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"}, | ||
[ | [g]={{x,1156,"/// 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 Diag(property->getLocation(), diag::warn_auto_readonly_iboutlet_property) << property;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/iboutlet.m"]={"clang/test/SemaObjC/iboutlet.m:10:66: warning: readonly IBOutlet property \'myView\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]","clang/test/SemaObjC/iboutlet.m:12:53: warning: readonly IBOutlet property \'myView1\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]","clang/test/SemaObjC/iboutlet.m:14:59: warning: readonly IBOutlet property \'myView2\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]","clang/test/SemaObjC/iboutlet.m:28:58: warning: readonly IBOutlet property \'autoReadOnlyReadOnly\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]"} | ["clang/test/SemaObjC/iboutlet.m"]={"clang/test/SemaObjC/iboutlet.m:10:66: warning: readonly IBOutlet property \'myView\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]","clang/test/SemaObjC/iboutlet.m:12:53: warning: readonly IBOutlet property \'myView1\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]","clang/test/SemaObjC/iboutlet.m:14:59: warning: readonly IBOutlet property \'myView2\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]","clang/test/SemaObjC/iboutlet.m:28:58: warning: readonly IBOutlet property \'autoReadOnlyReadOnly\' when auto-synthesized may not work correctly with \'nib\' loader [-Wreadonly-iboutlet-property]"} | ||
} | } | ||
}, | }, | ||
["warn_auto_storage_class"]={ | ["warn_auto_storage_class"]={ | ||
[ | [m]={"c++0x-compat","c++11-compat","c++11-compat-pedantic"}, | ||
[l]="c++11-compat", | |||
[ | |||
[e]="\'auto\' storage class specifier is redundant and incompatible with C++11", | [e]="\'auto\' storage class specifier is redundant and incompatible with C++11", | ||
[ | [a]=n, | ||
[b]="\'auto\' storage class specifier is redundant and incompatible with C\\+\\+11", | [b]="\'auto\' storage class specifier is redundant and incompatible with C\\+\\+11", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc\\+\\+11\\-compat[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"58c743370994",1315166054,"PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ...","PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.\n\nllvm-svn: 139102"}, | ||
[ | [g]={{"clang/lib/Sema/DeclSpec.cpp",1372,"/// 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 if (S.getLangOpts().CPlusPlus && !S.getLangOpts().CPlusPlus11 && StorageClassSpec == SCS_auto)\n S.Diag(StorageClassSpecLoc, diag::warn_auto_storage_class) << FixItHint::CreateRemoval(StorageClassSpecLoc);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/auto-cxx98.cpp"]={"clang/test/SemaCXX/auto-cxx98.cpp:3:3: warning: \'auto\' storage class specifier is redundant and incompatible with C++11 [-Wc++11-compat]","clang/test/SemaCXX/auto-cxx98.cpp:4:7: warning: \'auto\' storage class specifier is redundant and incompatible with C++11 [-Wc++11-compat]"} | ["clang/test/SemaCXX/auto-cxx98.cpp"]={"clang/test/SemaCXX/auto-cxx98.cpp:3:3: warning: \'auto\' storage class specifier is redundant and incompatible with C++11 [-Wc++11-compat]","clang/test/SemaCXX/auto-cxx98.cpp:4:7: warning: \'auto\' storage class specifier is redundant and incompatible with C++11 [-Wc++11-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_auto_synthesizing_protocol_property"]={ | ["warn_auto_synthesizing_protocol_property"]={ | ||
[ | [m]={"objc-protocol-property-synthesis"}, | ||
[l]="objc-protocol-property-synthesis", | |||
[ | |||
[e]="auto property synthesis will not synthesize property %0 declared in protocol %1", | [e]="auto property synthesis will not synthesize property %0 declared in protocol %1", | ||
[ | [a]=n, | ||
[b]="auto property synthesis will not synthesize property (.*?) declared in protocol (.*?)", | [b]="auto property synthesis will not synthesize property (.*?) declared in protocol (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-protocol\\-property\\-synthesis[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"9e49b6a6ffae",1323910998,"objc: do not auto synthesize properties declared in\nprotocols; with a warning. // rdar://10567333\n\nl...","objc: do not auto synthesize properties declared in\nprotocols; with a warning. // rdar://10567333\n\nllvm-svn: 146626"}, | ||
[ | [g]={{x,1935,"/// 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 Diag(IMPDecl->getLocation(), diag::warn_auto_synthesizing_protocol_property) << Prop << Proto;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:139:17: warning: auto property synthesis will not synthesize property \'requiredString\' declared in protocol \'MyProtocol\' [-Wobjc-protocol-property-synthesis]"} | ["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:139:17: warning: auto property synthesis will not synthesize property \'requiredString\' declared in protocol \'MyProtocol\' [-Wobjc-protocol-property-synthesis]"} | ||
} | } | ||
}, | }, | ||
["warn_auto_var_is_id"]={ | ["warn_auto_var_is_id"]={ | ||
[ | [m]={"auto-var-id"}, | ||
[l]="auto-var-id", | |||
[ | |||
[e]="\'auto\' deduced as \'id\' in declaration of %0", | [e]="\'auto\' deduced as \'id\' in declaration of %0", | ||
[ | [a]=n, | ||
[b]="\'auto\' deduced as \'id\' in declaration of (.*?)", | [b]="\'auto\' deduced as \'id\' in declaration of (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wauto\\-var\\-id[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d8d56694352c",1339195567,"Warn in ObjC++ when an \'auto\' variable deduces type \'id\'.\n\nThis could happen for cases like this:\n\n-...","Warn in ObjC++ when an \'auto\' variable deduces type \'id\'.\n\nThis could happen for cases like this:\n\n- (NSArray *)getAllNames:(NSArray *)images {\n NSMutableArray *results = [NSMutableArray array];\n for (auto img in images) {\n [results addObject:img.name];\n }\n return results;\n}\n\nHere the property access will fail because \'img\' has type \'id\', rather than,\nsay, NSImage.\n\nThis warning will not fire in templated code, since the \'id\' could have\ncome from a template parameter.\n\nllvm-svn: 158239"}, | ||
[ | [g]={{p,12805,"QualType Sema::deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init) {\n // ...\n // Warn if we deduced \'id\'. \'auto\' usually implies type-safety, but using\n // \'id\' instead of a specific object type prevents most of our usual\n // checks.\n // We only want to warn outside of template instantiations, though:\n // inside a template, the \'id\' could have come from a parameter.\n if (!inTemplateInstantiation() && !DefaultedAnyToId && !IsInitCapture && !DeducedType.isNull() && DeducedType->isObjCIdType()) {\n // ...\n Diag(Loc, diag::warn_auto_var_is_id) << VN << Range;"},{J,2331,"StmtResult Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc) {\n // ...\n if (First) {\n // ...\n if (DeclStmt *DS = dyn_cast<DeclStmt>(First)) {\n // ...\n // If the type contained \'auto\', deduce the \'auto\' to \'id\'.\n if (FirstType->getContainedAutoType()) {\n // ...\n if (!inTemplateInstantiation()) {\n // ...\n Diag(Loc, diag::warn_auto_var_is_id) << D->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjCXX/foreach.mm"]={"clang/test/SemaObjCXX/foreach.mm:14:8: warning: \'auto\' deduced as \'id\' in declaration of \'thisKey\' [-Wauto-var-id]"} | ["clang/test/SemaObjCXX/foreach.mm"]={"clang/test/SemaObjCXX/foreach.mm:14:8: warning: \'auto\' deduced as \'id\' in declaration of \'thisKey\' [-Wauto-var-id]"} | ||
} | } | ||
}, | }, | ||
["warn_autosynthesis_property_in_superclass"]={ | ["warn_autosynthesis_property_in_superclass"]={ | ||
[ | [m]={"objc-property-synthesis"}, | ||
[l]="objc-property-synthesis", | |||
[ | |||
[e]="auto property synthesis will not synthesize property %0; it will be implemented by its superclass, use @dynamic to acknowledge intention", | [e]="auto property synthesis will not synthesize property %0; it will be implemented by its superclass, use @dynamic to acknowledge intention", | ||
[ | [a]=n, | ||
[b]="auto property synthesis will not synthesize property (.*?); it will be implemented by its superclass, use @dynamic to acknowledge intention", | [b]="auto property synthesis will not synthesize property (.*?); it will be implemented by its superclass, use @dynamic to acknowledge intention", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-synthesis[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"6c9ee7b0c856",1406407946,"Objective-C. Issue more warning diagnostic when certain\nproperties are not synthesized in property a...","Objective-C. Issue more warning diagnostic when certain\nproperties are not synthesized in property auto-synthesis,\nas it can potentiall lead to runtime errors.\nrdar://17774815\n\nllvm-svn: 214032"}, | ||
[ | [g]={{x,1957,"/// 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 property to be implemented in the super class, ignore.\n if (PropInSuperClass) {\n if ((Prop->getPropertyAttributes() & ObjCPropertyAttribute::kind_readwrite) && (PropInSuperClass->getPropertyAttributes() & ObjCPropertyAttribute::kind_readonly) && !IMPDecl->getInstanceMethod(Prop->getSetterName()) && !IDecl->HasUserDeclaredSetterMethod(Prop)) {\n // ...\n } else {\n Diag(Prop->getLocation(), diag::warn_autosynthesis_property_in_superclass) << Prop->getIdentifier();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:44:46: warning: auto property synthesis will not synthesize property \'foo\'; it will be implemented by its superclass, use @dynamic to acknowledge intention [-Wobjc-property-synthesis]"} | ["clang/test/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:44:46: warning: auto property synthesis will not synthesize property \'foo\'; it will be implemented by its superclass, use @dynamic to acknowledge intention [-Wobjc-property-synthesis]"} | ||
} | } | ||
}, | }, | ||
["warn_autosynthesis_property_ivar_match"]={ | ["warn_autosynthesis_property_ivar_match"]={ | ||
[ | [m]={"objc-autosynthesis-property-ivar-name-match"}, | ||
[l]="objc-autosynthesis-property-ivar-name-match", | |||
[ | |||
[e]="autosynthesized property %0 will use %select{|synthesized}1 instance variable %2, not existing instance variable %3", | [e]="autosynthesized property %0 will use %select{|synthesized}1 instance variable %2, not existing instance variable %3", | ||
[ | [a]=n, | ||
[b]="autosynthesized property (.*?) will use (?:|synthesized) instance variable (.*?), not existing instance variable (.*?)", | [b]="autosynthesized property (.*?) will use (?:|synthesized) instance variable (.*?), not existing instance variable (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-autosynthesis\\-property\\-ivar\\-name\\-match[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"63d40202fb47",1340146282,"objective-c: warn when autosynthesizing a property which has same\nname as an existing ivar since thi...","objective-c: warn when autosynthesizing a property which has same\nname as an existing ivar since this is common source of error\nwhen people remove @synthesize to take advantage of autosynthesis. \n// rdar://11671080\n\nllvm-svn: 158756"}, | ||
[ | [g]={{x,1286,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n if (AtLoc.isInvalid()) {\n // ...\n if (originalIvar) {\n Diag(PropertyDiagLoc, diag::warn_autosynthesis_property_ivar_match) << PropertyId << (Ivar == nullptr) << PropertyIvar << originalIvar->getIdentifier();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/default-synthesize-2.m"]={"clang/test/SemaObjC/default-synthesize-2.m:50:1: warning: autosynthesized property \'uid\' will use synthesized instance variable \'_uid\', not existing instance variable \'uid\' [-Wobjc-autosynthesis-property-ivar-name-match]","clang/test/SemaObjC/default-synthesize-2.m:128:1: warning: autosynthesized property \'y\' will use instance variable \'_y\', not existing instance variable \'y\' [-Wobjc-autosynthesis-property-ivar-name-match]"} | ["clang/test/SemaObjC/default-synthesize-2.m"]={"clang/test/SemaObjC/default-synthesize-2.m:50:1: warning: autosynthesized property \'uid\' will use synthesized instance variable \'_uid\', not existing instance variable \'uid\' [-Wobjc-autosynthesis-property-ivar-name-match]","clang/test/SemaObjC/default-synthesize-2.m:128:1: warning: autosynthesized property \'y\' will use instance variable \'_y\', not existing instance variable \'y\' [-Wobjc-autosynthesis-property-ivar-name-match]"} | ||
} | } | ||
}, | }, | ||
["warn_availability_and_unavailable"]={ | ["warn_availability_and_unavailable"]={ | ||
[ | [m]={mb}, | ||
[l]=mb, | |||
[ | |||
[e]="\'unavailable\' availability overrides all other availability information", | [e]="\'unavailable\' availability overrides all other availability information", | ||
[ | [a]=n, | ||
[b]="\'unavailable\' availability overrides all other availability information", | [b]="\'unavailable\' availability overrides all other availability information", | ||
[ | [c]=kc, | ||
[ | [d]=K, | ||
[ | [f]={"7ab142b55a6e",1301110555,"Extend the new \'availability\' attribute with support for an\n\'unavailable\' argument, which specifies ...","Extend the new \'availability\' attribute with support for an\n\'unavailable\' argument, which specifies that the declaration to which\nthe attribute appertains is unavailable on that platform.\n\nllvm-svn: 128329"}, | ||
[ | [g]={{Yb,1324,"/// Parse the contents of the \"availability\" attribute.\n///\n/// availability-attribute:\n/// \'availability\' \'(\' platform \',\' opt-strict version-arg-list,\n/// opt-replacement, opt-message\')\'\n///\n/// platform:\n/// identifier\n///\n/// opt-strict:\n/// \'strict\' \',\'\n///\n/// version-arg-list:\n/// version-arg\n/// version-arg \',\' version-arg-list\n///\n/// version-arg:\n/// \'introduced\' \'=\' version\n/// \'deprecated\' \'=\' version\n/// \'obsoleted\' = version\n/// \'unavailable\'\n/// opt-replacement:\n/// \'replacement\' \'=\' <string>\n/// opt-message:\n/// \'message\' \'=\' <string>\nvoid Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, SourceLocation AvailabilityLoc, ParsedAttributes &attrs, SourceLocation *endLoc, IdentifierInfo *ScopeName, SourceLocation ScopeLoc, ParsedAttr::Form Form) {\n // ...\n // The \'unavailable\' availability cannot be combined with any other\n // availability changes. Make sure that hasn\'t happened.\n if (UnavailableLoc.isValid()) {\n // ...\n for (unsigned Index = Introduced; Index != Unknown; ++Index) {\n if (Changes[Index].KeywordLoc.isValid()) {\n if (!Complained) {\n Diag(UnavailableLoc, diag::warn_availability_and_unavailable) << SourceRange(Changes[Index].KeywordLoc, Changes[Index].VersionRange.getEnd());"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/attr-availability.c"]={"clang/test/Parser/attr-availability.c:19:50: warning: \'unavailable\' availability overrides all other availability information [-Wavailability]"} | ["clang/test/Parser/attr-availability.c"]={"clang/test/Parser/attr-availability.c:19:50: warning: \'unavailable\' availability overrides all other availability information [-Wavailability]"} | ||
} | } | ||
}, | }, | ||
["warn_availability_fuchsia_unavailable_minor"]={ | ["warn_availability_fuchsia_unavailable_minor"]={ | ||
[ | [m]={mb}, | ||
[l]=mb, | |||
[ | |||
[e]="Fuchsia API Level prohibits specifying a minor or sub-minor version", | [e]="Fuchsia API Level prohibits specifying a minor or sub-minor version", | ||
[ | [a]=n, | ||
[b]="Fuchsia API Level prohibits specifying a minor or sub\\-minor version", | [b]="Fuchsia API Level prohibits specifying a minor or sub\\-minor version", | ||
[ | [c]=kc, | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{o,2651,"static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (II->isStr(\"fuchsia\")) {\n // ...\n if ((Min = Introduced.Version.getMinor()) || (Sub = Introduced.Version.getSubminor())) {\n S.Diag(AL.getLoc(), diag::warn_availability_fuchsia_unavailable_minor);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-availability-fuchsia.c"]={"clang/test/Sema/attr-availability-fuchsia.c:17:29: warning: Fuchsia API Level prohibits specifying a minor or sub-minor version [-Wavailability]","clang/test/Sema/attr-availability-fuchsia.c:18:29: warning: Fuchsia API Level prohibits specifying a minor or sub-minor version [-Wavailability]"} | ["clang/test/Sema/attr-availability-fuchsia.c"]={"clang/test/Sema/attr-availability-fuchsia.c:17:29: warning: Fuchsia API Level prohibits specifying a minor or sub-minor version [-Wavailability]","clang/test/Sema/attr-availability-fuchsia.c:18:29: warning: Fuchsia API Level prohibits specifying a minor or sub-minor version [-Wavailability]"} | ||
} | } | ||
}, | }, | ||
["warn_availability_on_static_initializer"]={ | ["warn_availability_on_static_initializer"]={ | ||
[ | [m]={mb}, | ||
[l]=mb, | |||
[ | |||
[e]="ignoring availability attribute %select{on \'+load\' method|with constructor attribute|with destructor attribute}0", | [e]="ignoring availability attribute %select{on \'+load\' method|with constructor attribute|with destructor attribute}0", | ||
[ | [a]=n, | ||
[b]="ignoring availability attribute (?:on \'\\+load\' method|with constructor attribute|with destructor attribute)", | [b]="ignoring availability attribute (?:on \'\\+load\' method|with constructor attribute|with destructor attribute)", | ||
[ | [c]=kc, | ||
[ | [d]=i, | ||
[ | [f]={"3bb4aa566e1f",1523921658,"[Availability] Improve availability to consider functions run at load time\n\nSummary:\nThere are some ...","[Availability] Improve availability to consider functions run at load time\n\nSummary:\nThere are some functions/methods that run when the application launches\nor the library loads. Those functions will run reguardless the OS\nversion as long as it satifies the minimum deployment target. Annotate\nthem with availability attributes doesn\'t really make sense because they\nare essentially available on all targets since minimum deployment\ntarget.\n\nrdar://problem/36093384\n\nReviewers: arphaman, erik.pilkington\n\nReviewed By: erik.pilkington\n\nSubscribers: erik.pilkington, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D45699\n\nllvm-svn: 330166"}, | ||
[ | [g]={{p,10778,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n // Diagnose availability attributes. Availability cannot be used on functions\n // that are run during load/unload.\n if (const auto *attr = NewFD->getAttr<AvailabilityAttr>()) {\n if (NewFD->hasAttr<ConstructorAttr>()) {\n Diag(attr->getLocation(), diag::warn_availability_on_static_initializer) << 1;"},{p,10783,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n // Diagnose availability attributes. Availability cannot be used on functions\n // that are run during load/unload.\n if (const auto *attr = NewFD->getAttr<AvailabilityAttr>()) {\n // ...\n if (NewFD->hasAttr<DestructorAttr>()) {\n Diag(attr->getLocation(), diag::warn_availability_on_static_initializer) << 2;"},{u,5067,"Decl *Sema::ActOnMethodDeclaration(Scope *S, SourceLocation MethodLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef<SourceLocation> SelectorLocs, Selector Sel,\n // ...\n // + load method cannot have availability attributes. It get called on\n // startup, so it has to have the availability of the deployment target.\n if (const auto *attr = ObjCMethod->getAttr<AvailabilityAttr>()) {\n if (ObjCMethod->isClassMethod() && ObjCMethod->getSelector().getAsString() == \"load\") {\n Diag(attr->getLocation(), diag::warn_availability_on_static_initializer) << 0;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/unguarded-availability.m"]={"clang/test/SemaObjC/unguarded-availability.m:361:14: warning: ignoring availability attribute on \'+load\' method [-Wavailability]","clang/test/SemaObjC/unguarded-availability.m:389:1: warning: ignoring availability attribute with constructor attribute [-Wavailability]","clang/test/SemaObjC/unguarded-availability.m:394:1: warning: ignoring availability attribute with destructor attribute [-Wavailability]"} | ["clang/test/SemaObjC/unguarded-availability.m"]={"clang/test/SemaObjC/unguarded-availability.m:361:14: warning: ignoring availability attribute on \'+load\' method [-Wavailability]","clang/test/SemaObjC/unguarded-availability.m:389:1: warning: ignoring availability attribute with constructor attribute [-Wavailability]","clang/test/SemaObjC/unguarded-availability.m:394:1: warning: ignoring availability attribute with destructor attribute [-Wavailability]"} | ||
} | } | ||
}, | }, | ||
["warn_availability_swift_unavailable_deprecated_only"]={ | ["warn_availability_swift_unavailable_deprecated_only"]={ | ||
[ | [m]={mb}, | ||
[l]=mb, | |||
[ | |||
[e]="only \'unavailable\' and \'deprecated\' are supported for Swift availability", | [e]="only \'unavailable\' and \'deprecated\' are supported for Swift availability", | ||
[ | [a]=n, | ||
[b]="only \'unavailable\' and \'deprecated\' are supported for Swift availability", | [b]="only \'unavailable\' and \'deprecated\' are supported for Swift availability", | ||
[ | [c]=kc, | ||
[ | [d]=i, | ||
[ | [f]={"260e96240297",1541990673,"Support Swift in platform availability attribute\n\nSummary: This adds support for Swift platform avai...","Support Swift in platform availability attribute\n\nSummary: This adds support for Swift platform availability attributes. It\'s largely a port of the changes made to https://github.com/apple/swift-clang/ for Swift availability attributes. Specifically, https://github.com/apple/swift-clang/commit/84b5a21c31cb5b0d7d958a478bc01964939b6952 and https://github.com/apple/swift-clang/commit/e5b87f265aede41c8381094bbf54e2715c8293b0 . The implementation of attribute_availability_swift is a little different and additional tests in test/Index/availability.c were added.\n\nReviewers: manmanren, friss, doug.gregor, arphaman, jfb, erik.pilkington, aaron.ballman\n\nReviewed By: aaron.ballman\n\nSubscribers: aaron.ballman, ColinKinloch, jrmuizel, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D50318\n\nllvm-svn: 346633"}, | ||
[ | [g]={{o,2642,"static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (II->isStr(\"swift\")) {\n if (Introduced.isValid() || Obsoleted.isValid() || (!IsUnavailable && !Deprecated.isValid())) {\n S.Diag(AL.getLoc(), diag::warn_availability_swift_unavailable_deprecated_only);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-availability-swift.c"]={"clang/test/Sema/attr-availability-swift.c:24:42: warning: only \'unavailable\' and \'deprecated\' are supported for Swift availability [-Wavailability]"} | ["clang/test/Sema/attr-availability-swift.c"]={"clang/test/Sema/attr-availability-swift.c:24:42: warning: only \'unavailable\' and \'deprecated\' are supported for Swift availability [-Wavailability]"} | ||
} | } | ||
}, | }, | ||
["warn_availability_unknown_platform"]={ | ["warn_availability_unknown_platform"]={ | ||
[ | [m]={mb}, | ||
[l]=mb, | |||
[ | |||
[e]="unknown platform %0 in availability macro", | [e]="unknown platform %0 in availability macro", | ||
[ | [a]=n, | ||
[b]="unknown platform (.*?) in availability macro", | [b]="unknown platform (.*?) in availability macro", | ||
[ | [c]=kc, | ||
[ | [d]=i, | ||
[ | [f]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide...","Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide a certain facility. For example,\n\n void foo()\n __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));\n\nsays that the function \"foo\" was introduced in 10.2, deprecated in\n10.4, and completely obsoleted in 10.6. This attribute ties in with\nthe deployment targets (e.g., -mmacosx-version-min=10.1 specifies that\nwe want to deploy back to Mac OS X 10.1). There are several concrete\nbehaviors that this attribute enables, as illustrated with the\nfunction foo() above:\n\n - If we choose a deployment target >= Mac OS X 10.4, uses of \"foo\"\n will result in a deprecation warning, as if we had placed\n attribute((deprecated)) on it (but with a better diagnostic)\n - If we choose a deployment target >= Mac OS X 10.6, uses of \"foo\"\n will result in an \"unavailable\" warning (in C)/error (in C++), as\n if we had placed attribute((unavailable)) on it\n - If we choose a deployment target prior to 10.2, foo() is\n weak-imported (if it is a kind of entity that can be weak\n imported), as if we had placed the weak_import attribute on it.\n\nNaturally, there can be multiple availability attributes on a\ndeclaration, for different platforms; only the current platform\nmatters when checking availability attributes.\n\nThe only platforms this attribute currently works for are \"ios\" and\n\"macosx\", since we already have -mxxxx-version-min flags for them and we\nhave experience there with macro tricks translating down to the\ndeprecated/unavailable/weak_import attributes. The end goal is to open\nthis up to other platforms, and even extension to other \"platforms\"\nthat are really libraries (say, through a #pragma clang\ndefine_system), but that hasn\'t yet been designed and we may want to\nshake out more issues with this narrower problem first.\n\nAddresses <rdar://problem/6690412>.\n\nAs a drive-by bug-fix, if an entity is both deprecated and\nunavailable, we only emit the \"unavailable\" diagnostic.\n\nllvm-svn: 128127"}, | ||
[ | [g]={{o,2619,"static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AvailabilityAttr::getPrettyPlatformName(II->getName()).empty())\n S.Diag(Platform->Loc, diag::warn_availability_unknown_platform) << Platform->Ident;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-availability-square-brackets.c"]={"clang/test/Sema/attr-availability-square-brackets.c:25:29: warning: unknown platform \'this\' in availability macro [-Wavailability]"} | ["clang/test/Sema/attr-availability-square-brackets.c"]={"clang/test/Sema/attr-availability-square-brackets.c:25:29: warning: unknown platform \'this\' in availability macro [-Wavailability]"} | ||
} | } | ||
}, | }, | ||
["warn_availability_version_ordering"]={ | ["warn_availability_version_ordering"]={ | ||
[ | [m]={mb}, | ||
[l]=mb, | |||
[ | |||
[e]="feature cannot be %select{introduced|deprecated|obsoleted}0 in %1 version %2 before it was %select{introduced|deprecated|obsoleted}3 in version %4; attribute ignored", | [e]="feature cannot be %select{introduced|deprecated|obsoleted}0 in %1 version %2 before it was %select{introduced|deprecated|obsoleted}3 in version %4; attribute ignored", | ||
[ | [a]=n, | ||
[b]="feature cannot be (?:introduced|deprecated|obsoleted) in (.*?) version (.*?) before it was (?:introduced|deprecated|obsoleted) in version (.*?); attribute ignored", | [b]="feature cannot be (?:introduced|deprecated|obsoleted) in (.*?) version (.*?) before it was (?:introduced|deprecated|obsoleted) in version (.*?); attribute ignored", | ||
[ | [c]=kc, | ||
[ | [d]=i, | ||
[ | [f]={"20b2ebd78586",1300841403,"Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide...","Implement a new \'availability\' attribute, that allows one to specify\nwhich versions of an OS provide a certain facility. For example,\n\n void foo()\n __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));\n\nsays that the function \"foo\" was introduced in 10.2, deprecated in\n10.4, and completely obsoleted in 10.6. This attribute ties in with\nthe deployment targets (e.g., -mmacosx-version-min=10.1 specifies that\nwe want to deploy back to Mac OS X 10.1). There are several concrete\nbehaviors that this attribute enables, as illustrated with the\nfunction foo() above:\n\n - If we choose a deployment target >= Mac OS X 10.4, uses of \"foo\"\n will result in a deprecation warning, as if we had placed\n attribute((deprecated)) on it (but with a better diagnostic)\n - If we choose a deployment target >= Mac OS X 10.6, uses of \"foo\"\n will result in an \"unavailable\" warning (in C)/error (in C++), as\n if we had placed attribute((unavailable)) on it\n - If we choose a deployment target prior to 10.2, foo() is\n weak-imported (if it is a kind of entity that can be weak\n imported), as if we had placed the weak_import attribute on it.\n\nNaturally, there can be multiple availability attributes on a\ndeclaration, for different platforms; only the current platform\nmatters when checking availability attributes.\n\nThe only platforms this attribute currently works for are \"ios\" and\n\"macosx\", since we already have -mxxxx-version-min flags for them and we\nhave experience there with macro tricks translating down to the\ndeprecated/unavailable/weak_import attributes. The end goal is to open\nthis up to other platforms, and even extension to other \"platforms\"\nthat are really libraries (say, through a #pragma clang\ndefine_system), but that hasn\'t yet been designed and we may want to\nshake out more issues with this narrower problem first.\n\nAddresses <rdar://problem/6690412>.\n\nAs a drive-by bug-fix, if an entity is both deprecated and\nunavailable, we only emit the \"unavailable\" diagnostic.\n\nllvm-svn: 128127"}, | ||
[ | [g]={{o,2398,"static bool checkAvailabilityAttr(Sema &S, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted) {\n // ...\n // Ensure that Introduced <= Deprecated <= Obsoleted (although not all\n // of these steps are needed).\n if (!Introduced.empty() && !Deprecated.empty() && !(Introduced <= Deprecated)) {\n S.Diag(Range.getBegin(), diag::warn_availability_version_ordering) << 1 << PlatformName << Deprecated.getAsString() << 0 << Introduced.getAsString();"},{o,2406,"static bool checkAvailabilityAttr(Sema &S, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted) {\n // ...\n if (!Introduced.empty() && !Obsoleted.empty() && !(Introduced <= Obsoleted)) {\n S.Diag(Range.getBegin(), diag::warn_availability_version_ordering) << 2 << PlatformName << Obsoleted.getAsString() << 0 << Introduced.getAsString();"},{o,2414,"static bool checkAvailabilityAttr(Sema &S, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted) {\n // ...\n if (!Deprecated.empty() && !Obsoleted.empty() && !(Deprecated <= Obsoleted)) {\n S.Diag(Range.getBegin(), diag::warn_availability_version_ordering) << 2 << PlatformName << Obsoleted.getAsString() << 1 << Deprecated.getAsString();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/attr-availability-square-brackets.c"]={"clang/test/Sema/attr-availability-square-brackets.c:3:10: warning: feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored [-Wavailability]","clang/test/Sema/attr-availability-square-brackets.c:4:10: warning: feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored [-Wavailability]"} | ["clang/test/Sema/attr-availability-square-brackets.c"]={"clang/test/Sema/attr-availability-square-brackets.c:3:10: warning: feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored [-Wavailability]","clang/test/Sema/attr-availability-square-brackets.c:4:10: warning: feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored [-Wavailability]"} | ||
} | } | ||
}, | }, | ||
["warn_avx_calling_convention"]={ | ["warn_avx_calling_convention"]={ | ||
[ | [m]={"psabi"}, | ||
[l]="psabi", | |||
[ | |||
[e]="AVX vector %select{return|argument}0 of type %1 without \'%2\' enabled changes the ABI", | [e]="AVX vector %select{return|argument}0 of type %1 without \'%2\' enabled changes the ABI", | ||
[ | [a]=n, | ||
[b]="AVX vector (?:return|argument) of type (.*?) without \'(.*?)\' enabled changes the ABI", | [b]="AVX vector (?:return|argument) of type (.*?) without \'(.*?)\' enabled changes the ABI", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpsabi[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"2831a317b689",1592939649,"Implement AVX ABI Warning/error\n\nThe x86-64 \"avx\" feature changes how >128 bit vector types are pass...","Implement AVX ABI Warning/error\n\nThe x86-64 \"avx\" feature changes how >128 bit vector types are passed,\ninstead of being passed in separate 128 bit registers, they can be\npassed in 256 bit registers.\n\n\"avx512f\" does the same thing, except it switches from 256 bit registers\nto 512 bit registers.\n\nThe result of both of these is an ABI incompatibility between functions\ncompiled with and without these features.\n\nThis patch implements a warning/error pair upon an attempt to call a\nfunction that would run afoul of this. First, if a function is called\nthat would have its ABI changed, we issue a warning.\n\nSecond, if said call is made in a situation where the caller and callee\nare known to have different calling conventions (such as the case of\n\'target\'), we instead issue an error.\n\nDifferential Revision: https://reviews.llvm.org/D82562"}, | ||
[ | [g]={{"clang/lib/CodeGen/Targets/X86.cpp",1499,"static bool checkAVXParamFeature(DiagnosticsEngine &Diag, SourceLocation CallLoc, const llvm::StringMap<bool> &CallerMap, const llvm::StringMap<bool> &CalleeMap, QualType Ty, StringRef Feature, bool IsArgument) {\n // ...\n if (!CallerHasFeat && !CalleeHasFeat)\n return Diag.Report(CallLoc, diag::warn_avx_calling_convention) << IsArgument << Ty << Feature;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGen/convertvector.c"]={"clang/test/CodeGen/convertvector.c:84:12: warning: AVX vector argument of type \'vector8long\' (vector of 8 \'long\' values) without \'avx512f\' enabled changes the ABI [-Wpsabi]"} | ["clang/test/CodeGen/convertvector.c"]={"clang/test/CodeGen/convertvector.c:84:12: warning: AVX vector argument of type \'vector8long\' (vector of 8 \'long\' values) without \'avx512f\' enabled changes the ABI [-Wpsabi]"} | ||
} | } | ||
}, | }, | ||
["warn_bad_character_encoding"]={ | ["warn_bad_character_encoding"]={ | ||
[ | [m]={"invalid-source-encoding"}, | ||
[l]="invalid-source-encoding", | |||
[ | |||
[e]="illegal character encoding in character literal", | [e]="illegal character encoding in character literal", | ||
[ | [a]=n, | ||
[b]="illegal character encoding in character literal", | [b]="illegal character encoding in character literal", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-source\\-encoding[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"9436352a8297",1328936890,"Implement warning for non-wide string literals with an unexpected encoding. Downgrade error for non...","Implement warning for non-wide string literals with an unexpected encoding. Downgrade error for non-wide character literals with an unexpected encoding to a warning for compatibility with gcc and older versions of clang. <rdar://problem/10837678>.\n\nllvm-svn: 150295"}, | ||
[ | [g]={{Rc,1747,"/// \\verbatim\n/// user-defined-character-literal: [C++11 lex.ext]\n/// character-literal ud-suffix\n/// ud-suffix:\n/// identifier\n/// character-literal: [C++11 lex.ccon]\n/// \' c-char-sequence \'\n/// u\' c-char-sequence \'\n/// U\' c-char-sequence \'\n/// L\' c-char-sequence \'\n/// u8\' c-char-sequence \' [C++1z lex.ccon]\n/// c-char-sequence:\n/// c-char\n/// c-char-sequence c-char\n/// c-char:\n/// any member of the source character set except the single-quote \',\n/// backslash \\, or new-line character\n/// escape-sequence\n/// universal-character-name\n/// escape-sequence:\n/// simple-escape-sequence\n/// octal-escape-sequence\n/// hexadecimal-escape-sequence\n/// simple-escape-sequence:\n/// one of \\\' \\\" \\? \\\\ \\a \\b \\f \\n \\r \\t \\v\n/// octal-escape-sequence:\n/// \\ octal-digit\n/// \\ octal-digit octal-digit\n/// \\ octal-digit octal-digit octal-digit\n/// hexadecimal-escape-sequence:\n/// \\x hexadecimal-digit\n/// hexadecimal-escape-sequence hexadecimal-digit\n/// universal-character-name: [C++11 lex.charset]\n/// \\u hex-quad\n/// \\U hex-quad hex-quad\n/// hex-quad:\n/// hex-digit hex-digit hex-digit hex-digit\n/// \\endverbatim\n///\nCharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) {\n // ...\n while (begin != end) {\n // Is this a span of non-escape characters?\n if (begin[0] != \'\\\\\') {\n // ...\n if (res != llvm::conversionOK) {\n // ...\n if (NoErrorOnBadEncoding)\n Msg = diag::warn_bad_character_encoding;"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/char-literal-encoding-error.c"]={"clang/test/Lexer/char-literal-encoding-error.c:6:9: warning: illegal character encoding in character literal [-Winvalid-source-encoding]","clang/test/Lexer/char-literal-encoding-error.c:13:32: warning: illegal character encoding in character literal [-Winvalid-source-encoding]","clang/test/Lexer/char-literal-encoding-error.c:14:17: warning: illegal character encoding in character literal [-Winvalid-source-encoding]"} | ["clang/test/Lexer/char-literal-encoding-error.c"]={"clang/test/Lexer/char-literal-encoding-error.c:6:9: warning: illegal character encoding in character literal [-Winvalid-source-encoding]","clang/test/Lexer/char-literal-encoding-error.c:13:32: warning: illegal character encoding in character literal [-Winvalid-source-encoding]","clang/test/Lexer/char-literal-encoding-error.c:14:17: warning: illegal character encoding in character literal [-Winvalid-source-encoding]"} | ||
} | } | ||
}, | }, | ||
["warn_bad_cxx_cast_nested_pointer_addr_space"]={ | ["warn_bad_cxx_cast_nested_pointer_addr_space"]={ | ||
[ | [m]={"incompatible-pointer-types","incompatible-pointer-types-discards-qualifiers"}, | ||
[l]="incompatible-pointer-types-discards-qualifiers", | |||
[ | |||
[e]="%select{reinterpret_cast|C-style cast}0 from %1 to %2 changes address space of nested pointers", | [e]="%select{reinterpret_cast|C-style cast}0 from %1 to %2 changes address space of nested pointers", | ||
[ | [a]=n, | ||
[b]="(?:reinterpret_cast|C\\-style cast) from (.*?) to (.*?) changes address space of nested pointers", | [b]="(?:reinterpret_cast|C\\-style cast) from (.*?) to (.*?) changes address space of nested pointers", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wincompatible\\-pointer\\-types\\-discards\\-qualifiers[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={qb,1576809732,vb,pb}, | ||
[ | [g]={{db,2583,"static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, bool CStyle, SourceRange OpRange, unsigned &msg, CastKind &Kind) {\n // ...\n while (!DestPtee.isNull() && !SrcPtee.isNull()) {\n if (DestPtee.getAddressSpace() != SrcPtee.getAddressSpace()) {\n Self.Diag(OpRange.getBegin(), diag::warn_bad_cxx_cast_nested_pointer_addr_space) << CStyle << SrcType << DestType << SrcExpr.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp"]={"clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp:11:12: warning: reinterpret_cast from \'__local int *__generic *\' to \'__generic int *__generic *\' changes address space of nested pointers [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp:16:12: warning: reinterpret_cast from \'__constant int *__generic *\' to \'__generic int *__generic *\' changes address space of nested pointers [-Wincompatible-pointer-types-discards-qualifiers]"} | ["clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp"]={"clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp:11:12: warning: reinterpret_cast from \'__local int *__generic *\' to \'__generic int *__generic *\' changes address space of nested pointers [-Wincompatible-pointer-types-discards-qualifiers]","clang/test/SemaOpenCLCXX/address-space-castoperators.clcpp:16:12: warning: reinterpret_cast from \'__constant int *__generic *\' to \'__generic int *__generic *\' changes address space of nested pointers [-Wincompatible-pointer-types-discards-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_bad_function_cast"]={ | ["warn_bad_function_cast"]={ | ||
[ | [m]={"bad-function-cast"}, | ||
[l]="bad-function-cast", | |||
[ | |||
[e]="cast from function call of type %0 to non-matching type %1", | [e]="cast from function call of type %0 to non-matching type %1", | ||
[ | [a]=n, | ||
[b]="cast from function call of type (.*?) to non\\-matching type (.*?)", | [b]="cast from function call of type (.*?) to non\\-matching type (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbad\\-function\\-cast[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"91f548b04b7d",1345224154,"c: implement gcc\'s -Wbad-function-cast which warns\non unsafe cast of a c-function call. This is\na C-...","c: implement gcc\'s -Wbad-function-cast which warns\non unsafe cast of a c-function call. This is\na C-only option.\n\nllvm-svn: 162109"}, | ||
[ | [g]={{db,2877,"/// DiagnoseBadFunctionCast - Warn whenever a function call is cast to a\n/// non-matching type. Such as enum function call to int, int call to\n/// pointer; etc. Cast to \'void\' is an exception.\nstatic void DiagnoseBadFunctionCast(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n if (Self.Diags.isIgnored(diag::warn_bad_function_cast, SrcExpr.get()->getExprLoc()))"},{db,2906,"/// DiagnoseBadFunctionCast - Warn whenever a function call is cast to a\n/// non-matching type. Such as enum function call to int, int call to\n/// pointer; etc. Cast to \'void\' is an exception.\nstatic void DiagnoseBadFunctionCast(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n Self.Diag(SrcExpr.get()->getExprLoc(), diag::warn_bad_function_cast) << SrcType << DestType << SrcExpr.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-bad-function-cast.c"]={"clang/test/Sema/warn-bad-function-cast.c:42:10: warning: cast from function call of type \'int\' to non-matching type \'float\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:43:11: warning: cast from function call of type \'char\' to non-matching type \'double\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:44:10: warning: cast from function call of type \'long\' to non-matching type \'_Bool\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:45:8: warning: cast from function call of type \'float\' to non-matching type \'int\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:46:9: warning: cast from function call of type \'double\' to non-matching type \'long\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:47:11: warning: cast from function call of type \'_Complex double\' to non-matching type \'double\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:48:8: warning: cast from function call of type \'enum e\' to non-matching type \'int\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:49:8: warning: cast from function call of type \'_Bool\' to non-matching type \'int\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:50:18: warning: cast from function call of type \'char *\' to non-matching type \'unsigned long\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:51:21: warning: cast from function call of type \'int *\' to non-matching type \'long\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:52:12: warning: cast from function call of type \'int\' to non-matching type \'_Fract\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:53:8: warning: cast from function call of type \'_Fract\' to non-matching type \'int\' [-Wbad-function-cast]"} | ["clang/test/Sema/warn-bad-function-cast.c"]={"clang/test/Sema/warn-bad-function-cast.c:42:10: warning: cast from function call of type \'int\' to non-matching type \'float\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:43:11: warning: cast from function call of type \'char\' to non-matching type \'double\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:44:10: warning: cast from function call of type \'long\' to non-matching type \'_Bool\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:45:8: warning: cast from function call of type \'float\' to non-matching type \'int\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:46:9: warning: cast from function call of type \'double\' to non-matching type \'long\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:47:11: warning: cast from function call of type \'_Complex double\' to non-matching type \'double\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:48:8: warning: cast from function call of type \'enum e\' to non-matching type \'int\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:49:8: warning: cast from function call of type \'_Bool\' to non-matching type \'int\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:50:18: warning: cast from function call of type \'char *\' to non-matching type \'unsigned long\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:51:21: warning: cast from function call of type \'int *\' to non-matching type \'long\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:52:12: warning: cast from function call of type \'int\' to non-matching type \'_Fract\' [-Wbad-function-cast]","clang/test/Sema/warn-bad-function-cast.c:53:8: warning: cast from function call of type \'_Fract\' to non-matching type \'int\' [-Wbad-function-cast]"} | ||
} | } | ||
}, | }, | ||
["warn_bad_receiver_type"]={ | ["warn_bad_receiver_type"]={ | ||
[ | [m]={"receiver-expr"}, | ||
[l]="receiver-expr", | |||
[ | |||
[e]="receiver type %0 is not \'id\' or interface pointer, consider casting it to \'id\'", | [e]="receiver type %0 is not \'id\' or interface pointer, consider casting it to \'id\'", | ||
[ | [a]=n, | ||
[b]="receiver type (.*?) is not \'id\' or interface pointer, consider casting it to \'id\'", | [b]="receiver type (.*?) is not \'id\' or interface pointer, consider casting it to \'id\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wreceiver\\-expr[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{fb,2914,"/// Build an Objective-C instance message expression.\n///\n/// This routine takes care of both normal instance messages and\n/// instance messages to the superclass instance.\n///\n/// \\param Receiver The expression that computes the object that will\n/// receive this message. This may be empty, in which case we are\n/// sending to the superclass instance and \\p SuperLoc must be a valid\n/// source location.\n///\n/// \\param ReceiverType The (static) type of the object receiving the\n/// message. When a \\p Receiver expression is provided, this is the\n/// same type as that expression. For a superclass instance send, this\n/// is a pointer to the type of the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass instance message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this instance message is invoking, if\n/// already known.\n///\n/// \\param LBracLoc The location of the opening square bracket \']\'.\n///\n/// \\param RBracLoc The location of the closing square bracket \']\'.\n///\n/// \\param ArgsIn The message arguments.\nExprResult Sema::BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // If we have a receiver expression, perform appropriate promotions\n // and determine receiver type.\n if (Receiver) {\n // ...\n // If the receiver is an ObjC pointer, a block pointer, or an\n // __attribute__((NSObject)) pointer, we don\'t need to do any\n // special conversion in order to look up a receiver.\n if (ReceiverType->isObjCRetainableType()) {\n // ...\n } else if (!getLangOpts().ObjCAutoRefCount && !Context.getObjCIdType().isNull() && (ReceiverType->isPointerType() || ReceiverType->isIntegerType())) {\n // ...\n Diag(Loc, diag::warn_bad_receiver_type) << ReceiverType << RecRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:38:4: warning: receiver type \'struct objc_class *\' is not \'id\' or interface pointer, consider casting it to \'id\' [-Wreceiver-expr]","clang/test/SemaObjC/deprecated-objc-introspection.m:40:4: warning: receiver type \'struct objc_class *\' is not \'id\' or interface pointer, consider casting it to \'id\' [-Wreceiver-expr]"} | ["clang/test/SemaObjC/deprecated-objc-introspection.m"]={"clang/test/SemaObjC/deprecated-objc-introspection.m:38:4: warning: receiver type \'struct objc_class *\' is not \'id\' or interface pointer, consider casting it to \'id\' [-Wreceiver-expr]","clang/test/SemaObjC/deprecated-objc-introspection.m:40:4: warning: receiver type \'struct objc_class *\' is not \'id\' or interface pointer, consider casting it to \'id\' [-Wreceiver-expr]"} | ||
} | } | ||
}, | }, | ||
["warn_bad_string_encoding"]={ | ["warn_bad_string_encoding"]={ | ||
[ | [m]={"invalid-source-encoding"}, | ||
[l]="invalid-source-encoding", | |||
[ | |||
[e]="illegal character encoding in string literal", | [e]="illegal character encoding in string literal", | ||
[ | [a]=n, | ||
[b]="illegal character encoding in string literal", | [b]="illegal character encoding in string literal", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Winvalid\\-source\\-encoding[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"9436352a8297",1328936890,"Implement warning for non-wide string literals with an unexpected encoding. Downgrade error for non...","Implement warning for non-wide string literals with an unexpected encoding. Downgrade error for non-wide character literals with an unexpected encoding to a warning for compatibility with gcc and older versions of clang. <rdar://problem/10837678>.\n\nllvm-svn: 150295"}, | ||
[ | [g]={{Rc,2264,"/// This function copies from Fragment, which is a sequence of bytes\n/// within Tok\'s contents (which begin at TokBegin) into ResultPtr.\n/// Performs widening for multi-byte characters.\nbool StringLiteralParser::CopyStringFragment(const Token &Tok, const char *TokBegin, StringRef Fragment) {\n // ...\n if (Diags) {\n // ...\n const DiagnosticBuilder &Builder = Diag(Diags, Features, SourceLoc, TokBegin, ErrorPtr, resyncUTF8(ErrorPtr, Fragment.end()), NoErrorOnBadEncoding ? diag::warn_bad_string_encoding : diag::err_bad_string_encoding);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/string-literal-encoding.c"]={"clang/test/Lexer/string-literal-encoding.c:16:22: warning: illegal character encoding in string literal [-Winvalid-source-encoding]","clang/test/Lexer/string-literal-encoding.c:18:24: warning: illegal character encoding in string literal [-Winvalid-source-encoding]","clang/test/Lexer/string-literal-encoding.c:30:26: warning: illegal character encoding in string literal [-Winvalid-source-encoding]","clang/test/Lexer/string-literal-encoding.c:32:28: warning: illegal character encoding in string literal [-Winvalid-source-encoding]"} | ["clang/test/Lexer/string-literal-encoding.c"]={"clang/test/Lexer/string-literal-encoding.c:16:22: warning: illegal character encoding in string literal [-Winvalid-source-encoding]","clang/test/Lexer/string-literal-encoding.c:18:24: warning: illegal character encoding in string literal [-Winvalid-source-encoding]","clang/test/Lexer/string-literal-encoding.c:30:26: warning: illegal character encoding in string literal [-Winvalid-source-encoding]","clang/test/Lexer/string-literal-encoding.c:32:28: warning: illegal character encoding in string literal [-Winvalid-source-encoding]"} | ||
} | } | ||
}, | }, | ||
["warn_base_class_is_uninit"]={ | ["warn_base_class_is_uninit"]={ | ||
[ | [m]={O,V,eb,"uninitialized"}, | ||
[l]="uninitialized", | |||
[ | |||
[e]="base class %0 is uninitialized when used here to access %q1", | [e]="base class %0 is uninitialized when used here to access %q1", | ||
[ | [a]=n, | ||
[b]="base class (.*?) is uninitialized when used here to access (.*?)", | [b]="base class (.*?) is uninitialized when used here to access (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wuninitialized[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"3630c399727a",1416539430,"Extend -Wuninitialized to warn when accessing uninitialized base classes in a\nconstructor.\n\nllvm-svn...","Extend -Wuninitialized to warn when accessing uninitialized base classes in a\nconstructor.\n\nllvm-svn: 222503"}, | ||
[ | [g]={{s,3836,"class UninitializedFieldVisitor : public EvaluatedExprVisitor<UninitializedFieldVisitor> {\n // ...\n void HandleMemberExpr(MemberExpr *ME, bool CheckReferenceOnly, bool AddressOf) {\n // ...\n if (ImplicitCastExpr *BaseCast = dyn_cast<ImplicitCastExpr>(Base)) {\n // ...\n if (BaseCast->getCastKind() == CK_UncheckedDerivedToBase) {\n // ...\n if (T->isPointerType() && BaseClasses.count(T->getPointeeType())) {\n S.Diag(FieldME->getExprLoc(), diag::warn_base_class_is_uninit) << T->getPointeeType() << FoundVD;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/uninitialized.cpp"]={"clang/test/SemaCXX/uninitialized.cpp:1380:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::i\' [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1383:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::foo\' [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1395:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::i\' [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1398:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::foo\' [-Wuninitialized]"} | ["clang/test/SemaCXX/uninitialized.cpp"]={"clang/test/SemaCXX/uninitialized.cpp:1380:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::i\' [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1383:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::foo\' [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1395:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::i\' [-Wuninitialized]","clang/test/SemaCXX/uninitialized.cpp:1398:21: warning: base class \'base_class_access::A\' is uninitialized when used here to access \'base_class_access::A::foo\' [-Wuninitialized]"} | ||
} | } | ||
}, | }, | ||
["warn_bind_ref_member_to_parameter"]={ | ["warn_bind_ref_member_to_parameter"]={ | ||
[ | [m]={"dangling","dangling-field"}, | ||
[l]="dangling-field", | |||
[ | |||
[e]="binding reference member %0 to stack allocated %select{variable|parameter}2 %1", | [e]="binding reference member %0 to stack allocated %select{variable|parameter}2 %1", | ||
[ | [a]=n, | ||
[b]="binding reference member (.*?) to stack allocated (?:variable|parameter) (.*?)", | [b]="binding reference member (.*?) to stack allocated (?:variable|parameter) (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdangling\\-field[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"599deef37946",1315012455,"Add a simple new warning to catch blatantly dangling pointer and\nreference members of classes. We\'ve...","Add a simple new warning to catch blatantly dangling pointer and\nreference members of classes. We\'ve had several bugs reported because of\nthis, and there\'s no reason not to flag it right away in the compiler.\n\nComments especially welcome on the strategy for implementing this\nwarning (IE, what should trigger this?) and on the text of the warning\nitself.\n\nI\'m going to extend this to cover obvious cases with temporaries and\nbeef up the test cases some in subsequent patches. I\'ll then run it over\na large codebase and make sure its not misbehaving before I add it to\n-Wall or turn it on by default. I think this one might be a good\ncandidate for on by default.\n\nllvm-svn: 139075"}, | ||
[ | [g]={{Q,8226,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_MemInitializer: {\n if (isa<MaterializeTemporaryExpr>(L)) {\n // ...\n } else {\n // ...\n if (auto *Member = ExtendingEntity ? ExtendingEntity->getDecl() : nullptr) {\n // ...\n Diag(DiagLoc, IsPointer ? diag::warn_init_ptr_member_to_parameter_addr : diag::warn_bind_ref_member_to_parameter) << Member << VD << isa<ParmVarDecl>(VD) << DiagRange;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-dangling-field.cpp"]={"clang/test/SemaCXX/warn-dangling-field.cpp:15:9: warning: binding reference member \'x\' to stack allocated parameter \'i\' [-Wdangling-field]","clang/test/SemaCXX/warn-dangling-field.cpp:33:17: warning: binding reference member \'x\' to stack allocated parameter \'i\' [-Wdangling-field]"} | ["clang/test/SemaCXX/warn-dangling-field.cpp"]={"clang/test/SemaCXX/warn-dangling-field.cpp:15:9: warning: binding reference member \'x\' to stack allocated parameter \'i\' [-Wdangling-field]","clang/test/SemaCXX/warn-dangling-field.cpp:33:17: warning: binding reference member \'x\' to stack allocated parameter \'i\' [-Wdangling-field]"} | ||
} | } | ||
}, | }, | ||
["warn_binding_null_to_reference"]={ | ["warn_binding_null_to_reference"]={ | ||
[ | [m]={"null-dereference"}, | ||
[l]="null-dereference", | |||
[ | |||
[e]="binding dereferenced null pointer to reference has undefined behavior", | [e]="binding dereferenced null pointer to reference has undefined behavior", | ||
[ | [a]=n, | ||
[b]="binding dereferenced null pointer to reference has undefined behavior", | [b]="binding dereferenced null pointer to reference has undefined behavior", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnull\\-dereference[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"2eeddfb1efc8",1463247854,"Warn when a reference is bound to an empty l-value (dereferenced null pointer).\n\nllvm-svn: 269572","Warn when a reference is bound to an empty l-value (dereferenced null pointer).\n\nllvm-svn: 269572"}, | ||
[ | [g]={{Q,8453,"static void CheckForNullPointerDereference(Sema &S, const Expr *E) {\n // Check to see if we are dereferencing a null pointer. If so, this is\n // undefined behavior, so warn about it. This only handles the pattern\n // \"*null\", which is a very syntactic check.\n if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(E->IgnoreParenCasts()))\n if (UO->getOpcode() == UO_Deref && UO->getSubExpr()->IgnoreParenCasts()->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull)) {\n S.DiagRuntimeBehavior(UO->getOperatorLoc(), UO, S.PDiag(diag::warn_binding_null_to_reference) << UO->getSubExpr()->getSourceRange());"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:14:35: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:14:35: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]"} | ||
} | } | ||
}, | }, | ||
["warn_bitfield_too_small_for_enum"]={ | ["warn_bitfield_too_small_for_enum"]={ | ||
[ | [m]={"bitfield-enum-conversion",Eb,Ib}, | ||
[l]="bitfield-enum-conversion", | |||
[ | |||
[e]="bit-field %0 is not wide enough to store all enumerators of %1", | [e]="bit-field %0 is not wide enough to store all enumerators of %1", | ||
[ | [a]=n, | ||
[b]="bit\\-field (.*?) is not wide enough to store all enumerators of (.*?)", | [b]="bit\\-field (.*?) is not wide enough to store all enumerators of (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbitfield\\-enum\\-conversion[^\\]]*\\]", | ||
[ | [d]=gc, | ||
[ | [f]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion...","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"}, | ||
[ | [g]={{y,14109,"/// 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 // Check the bitwidth.\n if (BitsNeeded > FieldWidth) {\n // ...\n S.Diag(InitLoc, diag::warn_bitfield_too_small_for_enum) << Bitfield << ED;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:28:14: warning: bit-field \'two_bits\' is not wide enough to store all enumerators of \'ThreeBits\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:29:14: warning: bit-field \'two_bits\' is not wide enough to store all enumerators of \'ThreeBitsSigned\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:34:21: warning: bit-field \'two_bits_signed\' is not wide enough to store all enumerators of \'ThreeBits\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:35:21: warning: bit-field \'two_bits_signed\' is not wide enough to store all enumerators of \'ThreeBitsSigned\' [-Wbitfield-enum-conversion]"} | ["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:28:14: warning: bit-field \'two_bits\' is not wide enough to store all enumerators of \'ThreeBits\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:29:14: warning: bit-field \'two_bits\' is not wide enough to store all enumerators of \'ThreeBitsSigned\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:34:21: warning: bit-field \'two_bits_signed\' is not wide enough to store all enumerators of \'ThreeBits\' [-Wbitfield-enum-conversion]","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:35:21: warning: bit-field \'two_bits_signed\' is not wide enough to store all enumerators of \'ThreeBitsSigned\' [-Wbitfield-enum-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_bitfield_width_exceeds_type_width"]={ | ["warn_bitfield_width_exceeds_type_width"]={ | ||
[ | [m]={"bitfield-width"}, | ||
[l]="bitfield-width", | |||
[ | |||
[e]="width of bit-field %0 (%1 bits) exceeds the width of its type; value will be truncated to %2 bit%s2", | [e]="width of bit-field %0 (%1 bits) exceeds the width of its type; value will be truncated to %2 bit%s2", | ||
[ | [a]=n, | ||
[b]="width of bit\\-field (.*?) \\((.*?) bits\\) exceeds the width of its type; value will be truncated to (.*?) bit(.*?)", | [b]="width of bit\\-field (.*?) \\((.*?) bits\\) exceeds the width of its type; value will be truncated to (.*?) bit(.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbitfield\\-width[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"022bdc7d7361",1442266056,"C11 _Bool bitfield diagnostic\n\nSummary: Implement DR262 (for C). This patch will mainly affect bitfi...","C11 _Bool bitfield diagnostic\n\nSummary: Implement DR262 (for C). This patch will mainly affect bitfields of type _Bool\n\nReviewers: fraggamuffin, rsmith\n\nSubscribers: hubert.reinterpretcast, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D10018\n\nllvm-svn: 247618"}, | ||
[ | [g]={{p,17961,"// Note that FieldName may be null for anonymous bitfields.\nExprResult Sema::VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth) {\n // ...\n if (!FieldTy->isDependentType()) {\n // ...\n // Warn on types where the user might conceivably expect to get all\n // specified bits as value bits: that\'s all integral types other than\n // \'bool\'.\n if (BitfieldIsOverwide && !FieldTy->isBooleanType() && FieldName) {\n Diag(FieldLoc, diag::warn_bitfield_width_exceeds_type_width) << FieldName << toString(Value, 10) << (unsigned)TypeWidth;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/bitfield-layout.cpp"]={"clang/test/SemaCXX/bitfield-layout.cpp:8:8: warning: width of bit-field \'c\' (9 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:20:8: warning: width of bit-field \'c\' (16 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:26:8: warning: width of bit-field \'c\' (32 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:32:8: warning: width of bit-field \'c\' (64 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:38:8: warning: width of bit-field \'c\' (4294967297 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]"} | ["clang/test/SemaCXX/bitfield-layout.cpp"]={"clang/test/SemaCXX/bitfield-layout.cpp:8:8: warning: width of bit-field \'c\' (9 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:20:8: warning: width of bit-field \'c\' (16 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:26:8: warning: width of bit-field \'c\' (32 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:32:8: warning: width of bit-field \'c\' (64 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]","clang/test/SemaCXX/bitfield-layout.cpp:38:8: warning: width of bit-field \'c\' (4294967297 bits) exceeds the width of its type; value will be truncated to 8 bits [-Wbitfield-width]"} | ||
} | } | ||
}, | }, | ||
["warn_bitwise_instead_of_logical"]={ | ["warn_bitwise_instead_of_logical"]={ | ||
[ | [m]={O,V,"bitwise-instead-of-logical","bool-operation",eb}, | ||
[l]="bitwise-instead-of-logical", | |||
[ | |||
[e]="use of bitwise \'%0\' with boolean operands", | [e]="use of bitwise \'%0\' with boolean operands", | ||
[ | [a]=n, | ||
[b]="use of bitwise \'(.*?)\' with boolean operands", | [b]="use of bitwise \'(.*?)\' with boolean operands", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbitwise\\-instead\\-of\\-logical[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{y,15248,"/// 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 S.Diag(BO->getBeginLoc(), diag::warn_bitwise_instead_of_logical) << (BO->getOpcode() == BO_And ? \"&\" : \"|\") << OrigE->getSourceRange() << FixItHint::CreateReplacement(BO->getOperatorLoc(), (BO->getOpcode() == BO_And ? \"&&\" : \"||\"));"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-bitwise-or-bool.c"]={"clang/test/Sema/warn-bitwise-or-bool.c:27:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:32:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:35:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:40:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:48:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:52:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:58:8: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]"} | ["clang/test/Sema/warn-bitwise-or-bool.c"]={"clang/test/Sema/warn-bitwise-or-bool.c:27:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:32:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:35:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:40:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:48:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:52:7: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]","clang/test/Sema/warn-bitwise-or-bool.c:58:8: warning: use of bitwise \'|\' with boolean operands [-Wbitwise-instead-of-logical]"} | ||
} | } | ||
}, | }, | ||
["warn_bitwise_negation_bool"]={ | ["warn_bitwise_negation_bool"]={ | ||
[ | [m]={O,V,"bool-operation",eb}, | ||
[l]="bool-operation", | |||
[ | |||
[e]="bitwise negation of a boolean expression%select{;| always evaluates to \'true\';}0 did you mean logical negation?", | [e]="bitwise negation of a boolean expression%select{;| always evaluates to \'true\';}0 did you mean logical negation?", | ||
[ | [a]=n, | ||
[b]="bitwise negation of a boolean expression(?:;| always evaluates to \'true\';) did you mean logical negation\\?", | [b]="bitwise negation of a boolean expression(?:;| always evaluates to \'true\';) did you mean logical negation\\?", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbool\\-operation[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{y,15238,"/// 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 *UO = dyn_cast<UnaryOperator>(SourceExpr))\n if (UO->getOpcode() == UO_Not && UO->getSubExpr()->isKnownToHaveBooleanValue())\n S.Diag(UO->getBeginLoc(), diag::warn_bitwise_negation_bool) << OrigE->getSourceRange() << T->isBooleanType() << FixItHint::CreateReplacement(UO->getBeginLoc(), \"!\");"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-bitwise-negation-bool.c"]={"clang/test/Sema/warn-bitwise-negation-bool.c:15:7: warning: bitwise negation of a boolean expression always evaluates to \'true\'; did you mean logical negation? [-Wbool-operation]","clang/test/Sema/warn-bitwise-negation-bool.c:17:7: warning: bitwise negation of a boolean expression always evaluates to \'true\'; did you mean logical negation? [-Wbool-operation]","clang/test/Sema/warn-bitwise-negation-bool.c:20:7: warning: bitwise negation of a boolean expression; did you mean logical negation? [-Wbool-operation]","clang/test/Sema/warn-bitwise-negation-bool.c:22:7: warning: bitwise negation of a boolean expression always evaluates to \'true\'; did you mean logical negation? [-Wbool-operation]"} | ["clang/test/Sema/warn-bitwise-negation-bool.c"]={"clang/test/Sema/warn-bitwise-negation-bool.c:15:7: warning: bitwise negation of a boolean expression always evaluates to \'true\'; did you mean logical negation? [-Wbool-operation]","clang/test/Sema/warn-bitwise-negation-bool.c:17:7: warning: bitwise negation of a boolean expression always evaluates to \'true\'; did you mean logical negation? [-Wbool-operation]","clang/test/Sema/warn-bitwise-negation-bool.c:20:7: warning: bitwise negation of a boolean expression; did you mean logical negation? [-Wbool-operation]","clang/test/Sema/warn-bitwise-negation-bool.c:22:7: warning: bitwise negation of a boolean expression always evaluates to \'true\'; did you mean logical negation? [-Wbool-operation]"} | ||
} | } | ||
}, | }, | ||
["warn_bitwise_op_in_bitwise_op"]={ | ["warn_bitwise_op_in_bitwise_op"]={ | ||
[ | [m]={O,V,"bitwise-op-parentheses","parentheses"}, | ||
[l]="bitwise-op-parentheses", | |||
[ | |||
[e]="\'%0\' within \'%1\'", | [e]="\'%0\' within \'%1\'", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' within \'(.*?)\'", | [b]="\'(.*?)\' within \'(.*?)\'", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbitwise\\-op\\-parentheses[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"84543b09cb28",1449985301,"[Sema] Add -Wparentheses warnings for \'^\' in \'|\' expressions and \'&\' in \'^\' expressions to complimen...","[Sema] Add -Wparentheses warnings for \'^\' in \'|\' expressions and \'&\' in \'^\' expressions to compliment \'&\' in \'|\' that is already present. Matches gcc behavior.\n\nllvm-svn: 255450"}, | ||
[ | [g]={{v,15831,"/// Look for bitwise op in the left or right hand of a bitwise op with\n/// lower precedence and emit a diagnostic together with a fixit hint that wraps\n/// the \'&\' expression in parentheses.\nstatic void DiagnoseBitwiseOpInBitwiseOp(Sema &S, BinaryOperatorKind Opc, SourceLocation OpLoc, Expr *SubExpr) {\n if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(SubExpr)) {\n if (Bop->isBitwiseOp() && Bop->getOpcode() < Opc) {\n S.Diag(Bop->getOperatorLoc(), diag::warn_bitwise_op_in_bitwise_op) << Bop->getOpcodeStr() << BinaryOperator::getOpcodeStr(Opc) << Bop->getSourceRange() << OpLoc;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/bitwise-op-parentheses.c"]={"clang/test/Sema/bitwise-op-parentheses.c:11:12: warning: \'&\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:19:16: warning: \'&\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:27:12: warning: \'^\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:35:16: warning: \'^\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:43:12: warning: \'&\' within \'^\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:51:16: warning: \'&\' within \'^\' [-Wbitwise-op-parentheses]"} | ["clang/test/Sema/bitwise-op-parentheses.c"]={"clang/test/Sema/bitwise-op-parentheses.c:11:12: warning: \'&\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:19:16: warning: \'&\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:27:12: warning: \'^\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:35:16: warning: \'^\' within \'|\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:43:12: warning: \'&\' within \'^\' [-Wbitwise-op-parentheses]","clang/test/Sema/bitwise-op-parentheses.c:51:16: warning: \'&\' within \'^\' [-Wbitwise-op-parentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_block_capture_autoreleasing"]={ | ["warn_block_capture_autoreleasing"]={ | ||
[ | [m]={"block-capture-autoreleasing"}, | ||
[l]="block-capture-autoreleasing", | |||
[ | |||
[e]="block captures an autoreleasing out-parameter, which may result in use-after-free bugs", | [e]="block captures an autoreleasing out-parameter, which may result in use-after-free bugs", | ||
[ | [a]=n, | ||
[b]="block captures an autoreleasing out\\-parameter, which may result in use\\-after\\-free bugs", | [b]="block captures an autoreleasing out\\-parameter, which may result in use\\-after\\-free bugs", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wblock\\-capture\\-autoreleasing[^\\]]*\\]", | ||
[ | [d]=lc, | ||
[ | [f]={"c81708e6ecf0",1477345554,"[Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured\nby blocks.\n\nAdd a new warni...","[Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured\nby blocks.\n\nAdd a new warning \"-Wblock-capture-autoreleasing\". The warning warns\nabout implicitly autoreleasing out-parameters captured by blocks which\ncan introduce use-after-free bugs that are hard to debug.\n\nrdar://problem/15377548\n\nDifferential Revision: https://reviews.llvm.org/D25844\n\nllvm-svn: 285031"}, | ||
[ | [g]={{v,19261,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // ...\n // Warn about implicitly autoreleasing indirect parameters captured by blocks.\n if (const auto *PT = CaptureType->getAs<PointerType>()) {\n // ...\n if (!Invalid && PointeeTy->getAs<ObjCObjectPointerType>() && PointeeTy.getObjCLifetime() == Qualifiers::OCL_Autoreleasing && !S.Context.hasDirectOwnershipQualifier(PointeeTy)) {\n if (BuildAndDiagnose) {\n // ...\n S.Diag(Loc, diag::warn_block_capture_autoreleasing);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:829:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:830:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:832:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:835:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:836:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:838:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]"} | ["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:829:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:830:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:832:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:835:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:836:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]","clang/test/SemaObjC/arc.m:838:12: warning: block captures an autoreleasing out-parameter, which may result in use-after-free bugs [-Wblock-capture-autoreleasing]"} | ||
} | } | ||
}, | }, | ||
["warn_block_literal_attributes_on_omitted_return_type"]={ | ["warn_block_literal_attributes_on_omitted_return_type"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="attribute %0 ignored, because it cannot be applied to omitted return type", | [e]="attribute %0 ignored, because it cannot be applied to omitted return type", | ||
[ | [a]=n, | ||
[b]="attribute (.*?) ignored, because it cannot be applied to omitted return type", | [b]="attribute (.*?) ignored, because it cannot be applied to omitted return type", | ||
[ | [c]=C, | ||
[ | [d]=j, | ||
[ | [f]={"99d133482f7c",1461004851,"Block: Fix a crash when we have type attributes or qualifiers with omitted\nreturn type.\n\nEmit a warn...","Block: Fix a crash when we have type attributes or qualifiers with omitted\nreturn type.\n\nEmit a warning instead of crashing in IR generation.\n\nrdar://22762981\n\nDifferential Revision: http://reviews.llvm.org/D18567\n\nllvm-svn: 266648"}, | ||
[ | [g]={{W,817,"/// Return true if this is omitted block return type. Also check type\n/// attributes and type qualifiers when returning true.\nstatic bool checkOmittedBlockReturnType(Sema &S, Declarator &declarator, QualType Result) {\n // ...\n for (ParsedAttr &AL : declarator.getMutableDeclSpec().getAttributes()) {\n // ...\n S.Diag(AL.getLoc(), diag::warn_block_literal_attributes_on_omitted_return_type) << AL;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/block-omitted-return-type.m"]={"clang/test/SemaObjC/block-omitted-return-type.m:13:33: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:19:34: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:32:34: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:32:77: warning: attribute \'_Nullable\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:38:69: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]"} | ["clang/test/SemaObjC/block-omitted-return-type.m"]={"clang/test/SemaObjC/block-omitted-return-type.m:13:33: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:19:34: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:32:34: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:32:77: warning: attribute \'_Nullable\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]","clang/test/SemaObjC/block-omitted-return-type.m:38:69: warning: attribute \'_Nonnull\' ignored, because it cannot be applied to omitted return type [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_block_literal_qualifiers_on_omitted_return_type"]={ | ["warn_block_literal_qualifiers_on_omitted_return_type"]={ | ||
[ | [m]={j,O,Jc,"ignored-qualifiers"}, | ||
[l]="ignored-qualifiers", | |||
[ | |||
[e]="\'%0\' qualifier on omitted return type %1 has no effect", | [e]="\'%0\' qualifier on omitted return type %1 has no effect", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' qualifier on omitted return type (.*?) has no effect", | [b]="\'(.*?)\' qualifier on omitted return type (.*?) has no effect", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wignored\\-qualifiers[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"99d133482f7c",1461004851,"Block: Fix a crash when we have type attributes or qualifiers with omitted\nreturn type.\n\nEmit a warn...","Block: Fix a crash when we have type attributes or qualifiers with omitted\nreturn type.\n\nEmit a warning instead of crashing in IR generation.\n\nrdar://22762981\n\nDifferential Revision: http://reviews.llvm.org/D18567\n\nllvm-svn: 266648"}, | ||
[ | [g]={{W,829,"/// Return true if this is omitted block return type. Also check type\n/// attributes and type qualifiers when returning true.\nstatic bool checkOmittedBlockReturnType(Sema &S, Declarator &declarator, QualType Result) {\n // ...\n diagnoseAndRemoveTypeQualifiers(S, DS, TypeQuals, Result, (unsigned)-1, diag::warn_block_literal_qualifiers_on_omitted_return_type);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/block-omitted-return-type.m"]={"clang/test/SemaObjC/block-omitted-return-type.m:23:34: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]","clang/test/SemaObjC/block-omitted-return-type.m:29:34: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]","clang/test/SemaObjC/block-omitted-return-type.m:32:87: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]","clang/test/SemaObjC/block-omitted-return-type.m:38:78: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]"} | ["clang/test/SemaObjC/block-omitted-return-type.m"]={"clang/test/SemaObjC/block-omitted-return-type.m:23:34: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]","clang/test/SemaObjC/block-omitted-return-type.m:29:34: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]","clang/test/SemaObjC/block-omitted-return-type.m:32:87: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]","clang/test/SemaObjC/block-omitted-return-type.m:38:78: warning: \'const\' qualifier on omitted return type \'<dependent type>\' has no effect [-Wignored-qualifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_bool_switch_condition"]={ | ["warn_bool_switch_condition"]={ | ||
[ | [m]={O,V,"switch-bool"}, | ||
[l]="switch-bool", | |||
[ | |||
[e]="switch condition has boolean value", | [e]="switch condition has boolean value", | ||
[ | [a]=n, | ||
[b]="switch condition has boolean value", | [b]="switch condition has boolean value", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wswitch\\-bool[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"93135aad2926",1255807974,"Fix for PR5190, Credit to Zhanyong Wan.\n\nllvm-svn: 84346","Fix for PR5190, Credit to Zhanyong Wan.\n\nllvm-svn: 84346"}, | ||
[ | [g]={{J,1111,"StmtResult Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc) {\n // ...\n if (CondExpr && !CondExpr->isTypeDependent()) {\n // ...\n if (CondExpr->isKnownToHaveBooleanValue()) {\n // ...\n Diag(SwitchLoc, diag::warn_bool_switch_condition) << CondExpr->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/decomposed-condition.cpp"]={"clang/test/Parser/decomposed-condition.cpp:81:3: warning: switch condition has boolean value [-Wswitch-bool]"} | ["clang/test/Parser/decomposed-condition.cpp"]={"clang/test/Parser/decomposed-condition.cpp:81:3: warning: switch condition has boolean value [-Wswitch-bool]"} | ||
} | } | ||
}, | }, | ||
["warn_braces_around_init"]={ | ["warn_braces_around_init"]={ | ||
[ | [m]={"braced-scalar-init"}, | ||
[l]="braced-scalar-init", | |||
[ | |||
[e]="braces around %select{scalar |}0initializer", | [e]="braces around %select{scalar |}0initializer", | ||
[ | [a]=n, | ||
[b]="braces around (?:scalar |)initializer", | [b]="braces around (?:scalar |)initializer", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbraced\\-scalar\\-init[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{Q,1191,"/// Warn that \\p Entity was of scalar type and was initialized by a\n/// single-element braced initializer list.\nstatic void warnBracedScalarInit(Sema &S, const InitializedEntity &Entity, SourceRange Braces) {\n // ...\n case InitializedEntity::EK_VectorElement:\n case InitializedEntity::EK_ComplexElement:\n case InitializedEntity::EK_ArrayElement:\n case InitializedEntity::EK_Parameter:\n case InitializedEntity::EK_Parameter_CF_Audited:\n case InitializedEntity::EK_TemplateParameter:\n case InitializedEntity::EK_Result:\n case InitializedEntity::EK_ParenAggInitMember:\n // ...\n DiagID = diag::warn_braces_around_init;"},{Q,1198,"/// Warn that \\p Entity was of scalar type and was initialized by a\n/// single-element braced initializer list.\nstatic void warnBracedScalarInit(Sema &S, const InitializedEntity &Entity, SourceRange Braces) {\n // ...\n case InitializedEntity::EK_Member:\n // Warn on aggregate initialization but not on ctor init list or\n // default member initializer.\n if (Entity.getParent())\n DiagID = diag::warn_braces_around_init;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:61:7: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:62:7: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:62:12: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:63:10: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:64:10: warning: braces around scalar initializer [-Wbraced-scalar-init]"} | ["clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp"]={"clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:61:7: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:62:7: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:62:12: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:63:10: warning: braces around scalar initializer [-Wbraced-scalar-init]","clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p5-0x.cpp:64:10: warning: braces around scalar initializer [-Wbraced-scalar-init]"} | ||
} | } | ||
}, | }, | ||
["warn_break_binds_to_switch"]={ | ["warn_break_binds_to_switch"]={ | ||
[ | [m]={fc}, | ||
[l]=fc, | |||
[ | |||
[e]="\'break\' is bound to loop, GCC binds it to switch", | [e]="\'break\' is bound to loop, GCC binds it to switch", | ||
[ | [a]=n, | ||
[b]="\'break\' is bound to loop, GCC binds it to switch", | [b]="\'break\' is bound to loop, GCC binds it to switch", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"09f9924acf1a",1390489500,"Fix to PR8880 (clang dies processing a for loop)\n\nDue to statement expressions supported as GCC exte...","Fix to PR8880 (clang dies processing a for loop)\n\nDue to statement expressions supported as GCC extension, it is possible\nto put \'break\' or \'continue\' into a loop/switch statement but outside\nits body, for example:\n\n for ( ; ({ if (first) { first = 0; continue; } 0; }); )\n\nThis code is rejected by GCC if compiled in C mode but is accepted in C++\ncode. GCC bug 44715 tracks this discrepancy. Clang used code generation\nthat differs from GCC in both modes: only statement of the third\nexpression of \'for\' behaves as if it was inside loop body.\n\nThis change makes code generation more close to GCC, considering \'break\'\nor \'continue\' statement in condition and increment expressions of a\nloop as it was inside the loop body. It also adds error for the cases\nwhen \'break\'/\'continue\' appear outside loop due to this syntax. If\ncode generation differ from GCC, warning is issued.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2518\n\nllvm-svn: 199897"}, | ||
[ | [g]={{J,2121,"void Sema::CheckBreakContinueBinding(Expr *E) {\n // ...\n if (BCFinder.BreakFound() && BreakParent) {\n if (BreakParent->getFlags() & Scope::SwitchScope) {\n Diag(BCFinder.GetBreakLoc(), diag::warn_break_binds_to_switch);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/loop-control.c"]={"clang/test/Sema/loop-control.c:98:20: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:105:26: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:112:29: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:119:21: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:146:29: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]"} | ["clang/test/Sema/loop-control.c"]={"clang/test/Sema/loop-control.c:98:20: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:105:26: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:112:29: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:119:21: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]","clang/test/Sema/loop-control.c:146:29: warning: \'break\' is bound to loop, GCC binds it to switch [-Wgcc-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_builtin_chk_overflow"]={ | ["warn_builtin_chk_overflow"]={ | ||
[ | [m]={"builtin-memcpy-chk-size"}, | ||
[l]="builtin-memcpy-chk-size", | |||
[ | |||
[e]="\'%0\' will always overflow; destination buffer has size %1, but size argument is %2", | [e]="\'%0\' will always overflow; destination buffer has size %1, but size argument is %2", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' will always overflow; destination buffer has size (.*?), but size argument is (.*?)", | [b]="\'(.*?)\' will always overflow; destination buffer has size (.*?), but size argument is (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wbuiltin\\-memcpy\\-chk\\-size[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"b6e16ea006a2",1552937025,"[Sema] Add some compile time _FORTIFY_SOURCE diagnostics\n\nThese diagnose overflowing calls to subset...","[Sema] Add some compile time _FORTIFY_SOURCE diagnostics\n\nThese diagnose overflowing calls to subset of fortifiable functions. Some\nfunctions, like sprintf or strcpy aren\'t supported right not, but we should\nprobably support these in the future. We previously supported this kind of\nfunctionality with -Wbuiltin-memcpy-chk-size, but that diagnostic doesn\'t work\nwith _FORTIFY implementations that use wrapper functions. Also unlike that\ndiagnostic, we emit these warnings regardless of whether _FORTIFY_SOURCE is\nactually enabled, which is nice for programs that don\'t enable the runtime\nchecks.\n\nWhy not just use diagnose_if, like Bionic does? We can get better diagnostics in\nthe compiler (i.e. mention the sizes), and we have the potential to diagnose\nsprintf and strcpy which is impossible with diagnose_if (at least, in languages\nthat don\'t support C++14 constexpr). This approach also saves standard libraries\nfrom having to add diagnose_if.\n\nrdar://48006655\n\nDifferential revision: https://reviews.llvm.org/D58797\n\nllvm-svn: 356397"}, | ||
[ | [g]={{y,1276,"void Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, CallExpr *TheCall) {\n // ...\n case Builtin::BI__builtin___memcpy_chk:\n case Builtin::BI__builtin___memmove_chk:\n case Builtin::BI__builtin___memset_chk:\n case Builtin::BI__builtin___strlcat_chk:\n case Builtin::BI__builtin___strlcpy_chk:\n case Builtin::BI__builtin___strncat_chk:\n case Builtin::BI__builtin___strncpy_chk:\n case Builtin::BI__builtin___stpncpy_chk:\n case Builtin::BI__builtin___memccpy_chk:\n case Builtin::BI__builtin___mempcpy_chk: {\n DiagID = diag::warn_builtin_chk_overflow;"},{y,1286,"void Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, CallExpr *TheCall) {\n // ...\n case Builtin::BI__builtin___snprintf_chk:\n case Builtin::BI__builtin___vsnprintf_chk: {\n DiagID = diag::warn_builtin_chk_overflow;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/builtins.c"]={"clang/test/Sema/builtins.c:231:9: warning: \'strlcpy\' will always overflow; destination buffer has size 20, but size argument is 40 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:238:9: warning: \'strlcat\' will always overflow; destination buffer has size 20, but size argument is 40 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:248:5: warning: \'memcpy\' will always overflow; destination buffer has size 4, but size argument is 5 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:256:5: warning: \'memcpy\' will always overflow; destination buffer has size 4, but size argument is 5 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:354:3: warning: \'memcpy\' will always overflow; destination buffer has size 10, but size argument is 11 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:355:3: warning: \'memcpy\' will always overflow; destination buffer has size 10, but size argument is 11 [-Wbuiltin-memcpy-chk-size]"} | ["clang/test/Sema/builtins.c"]={"clang/test/Sema/builtins.c:231:9: warning: \'strlcpy\' will always overflow; destination buffer has size 20, but size argument is 40 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:238:9: warning: \'strlcat\' will always overflow; destination buffer has size 20, but size argument is 40 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:248:5: warning: \'memcpy\' will always overflow; destination buffer has size 4, but size argument is 5 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:256:5: warning: \'memcpy\' will always overflow; destination buffer has size 4, but size argument is 5 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:354:3: warning: \'memcpy\' will always overflow; destination buffer has size 10, but size argument is 11 [-Wbuiltin-memcpy-chk-size]","clang/test/Sema/builtins.c:355:3: warning: \'memcpy\' will always overflow; destination buffer has size 10, but size argument is 11 [-Wbuiltin-memcpy-chk-size]"} | ||
} | } | ||
}, | }, | ||
["warn_builtin_unknown"]={ | ["warn_builtin_unknown"]={ | ||
[ | [m]={O,V,"implicit","implicit-function-declaration",eb}, | ||
[l]="implicit-function-declaration", | |||
[ | |||
[e]="use of unknown builtin %0", | [e]="use of unknown builtin %0", | ||
[ | [a]=Ac, | ||
[b]="use of unknown builtin (.*?)", | [b]="use of unknown builtin (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Wimplicit\\-function\\-declaration[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"56fbc37bbba3",1254172459,"Provide a custom diagnostic when code tries to use an unknown builtin\n\nllvm-svn: 83014","Provide a custom diagnostic when code tries to use an unknown builtin\n\nllvm-svn: 83014"}, | ||
[ | [g]={{p,16050,"/// 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 diag_id = diag::warn_builtin_unknown;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/builtins-x86_64.c"]={"clang/test/Sema/builtins-x86_64.c:17:9: error: use of unknown builtin \'__builtin_ia32_readeflags_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:18:9: error: use of unknown builtin \'__builtin_ia32_writeeflags_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:19:9: error: use of unknown builtin \'__builtin_ia32_cvtss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:20:9: error: use of unknown builtin \'__builtin_ia32_cvttss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:21:9: error: use of unknown builtin \'__builtin_ia32_cvtsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:22:9: error: use of unknown builtin \'__builtin_ia32_cvttsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:23:9: error: use of unknown builtin \'__builtin_ia32_crc32di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:24:9: error: use of unknown builtin \'__builtin_ia32_rdfsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:25:9: error: use of unknown builtin \'__builtin_ia32_rdgsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:26:9: error: use of unknown builtin \'__builtin_ia32_wrfsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:27:9: error: use of unknown builtin \'__builtin_ia32_wrgsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:28:9: error: use of unknown builtin \'__builtin_ia32_fxrstor64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:29:9: error: use of unknown builtin \'__builtin_ia32_fxsave64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:30:9: error: use of unknown builtin \'__builtin_ia32_xsave64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:31:9: error: use of unknown builtin \'__builtin_ia32_xrstor64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:32:9: error: use of unknown builtin \'__builtin_ia32_xsaveopt64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:33:9: error: use of unknown builtin \'__builtin_ia32_xrstors64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:34:9: error: use of unknown builtin \'__builtin_ia32_xsavec64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:35:9: error: use of unknown builtin \'__builtin_ia32_xsaves64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:36:9: error: use of unknown builtin \'__builtin_ia32_addcarryx_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:37:9: error: use of unknown builtin \'__builtin_ia32_addcarry_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:38:9: error: use of unknown builtin \'__builtin_ia32_subborrow_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:39:9: error: use of unknown builtin \'__builtin_ia32_rdseed64_step\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:40:9: error: use of unknown builtin \'__builtin_ia32_bextr_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:41:9: error: use of unknown builtin \'__builtin_ia32_bzhi_di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:42:9: error: use of unknown builtin \'__builtin_ia32_pdep_di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:43:9: error: use of unknown builtin \'__builtin_ia32_pext_di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:44:9: error: use of unknown builtin \'__builtin_ia32_bextri_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:45:9: error: use of unknown builtin \'__builtin_ia32_pbroadcastq512_gpr_mask\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:46:9: error: use of unknown builtin \'__builtin_ia32_pbroadcastq128_gpr_mask\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:47:9: error: use of unknown builtin \'__builtin_ia32_pbroadcastq256_gpr_mask\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:48:9: error: use of unknown builtin \'__builtin_ia32_vcvtsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:49:9: error: use of unknown builtin \'__builtin_ia32_vcvtsd2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:50:9: error: use of unknown builtin \'__builtin_ia32_vcvtss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:51:9: error: use of unknown builtin \'__builtin_ia32_vcvtss2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:52:9: error: use of unknown builtin \'__builtin_ia32_vcvttsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:53:9: error: use of unknown builtin \'__builtin_ia32_vcvttsd2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:54:9: error: use of unknown builtin \'__builtin_ia32_vcvttss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:55:9: error: use of unknown builtin \'__builtin_ia32_vcvttss2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:56:9: error: use of unknown builtin \'__builtin_ia32_cvtsi2sd64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:57:9: error: use of unknown builtin \'__builtin_ia32_cvtsi2ss64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:58:9: error: use of unknown builtin \'__builtin_ia32_cvtusi2sd64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:59:9: error: use of unknown builtin \'__builtin_ia32_cvtusi2ss64\' [-Wimplicit-function-declaration]"} | ["clang/test/Sema/builtins-x86_64.c"]={"clang/test/Sema/builtins-x86_64.c:17:9: error: use of unknown builtin \'__builtin_ia32_readeflags_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:18:9: error: use of unknown builtin \'__builtin_ia32_writeeflags_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:19:9: error: use of unknown builtin \'__builtin_ia32_cvtss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:20:9: error: use of unknown builtin \'__builtin_ia32_cvttss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:21:9: error: use of unknown builtin \'__builtin_ia32_cvtsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:22:9: error: use of unknown builtin \'__builtin_ia32_cvttsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:23:9: error: use of unknown builtin \'__builtin_ia32_crc32di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:24:9: error: use of unknown builtin \'__builtin_ia32_rdfsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:25:9: error: use of unknown builtin \'__builtin_ia32_rdgsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:26:9: error: use of unknown builtin \'__builtin_ia32_wrfsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:27:9: error: use of unknown builtin \'__builtin_ia32_wrgsbase64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:28:9: error: use of unknown builtin \'__builtin_ia32_fxrstor64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:29:9: error: use of unknown builtin \'__builtin_ia32_fxsave64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:30:9: error: use of unknown builtin \'__builtin_ia32_xsave64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:31:9: error: use of unknown builtin \'__builtin_ia32_xrstor64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:32:9: error: use of unknown builtin \'__builtin_ia32_xsaveopt64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:33:9: error: use of unknown builtin \'__builtin_ia32_xrstors64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:34:9: error: use of unknown builtin \'__builtin_ia32_xsavec64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:35:9: error: use of unknown builtin \'__builtin_ia32_xsaves64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:36:9: error: use of unknown builtin \'__builtin_ia32_addcarryx_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:37:9: error: use of unknown builtin \'__builtin_ia32_addcarry_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:38:9: error: use of unknown builtin \'__builtin_ia32_subborrow_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:39:9: error: use of unknown builtin \'__builtin_ia32_rdseed64_step\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:40:9: error: use of unknown builtin \'__builtin_ia32_bextr_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:41:9: error: use of unknown builtin \'__builtin_ia32_bzhi_di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:42:9: error: use of unknown builtin \'__builtin_ia32_pdep_di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:43:9: error: use of unknown builtin \'__builtin_ia32_pext_di\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:44:9: error: use of unknown builtin \'__builtin_ia32_bextri_u64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:45:9: error: use of unknown builtin \'__builtin_ia32_pbroadcastq512_gpr_mask\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:46:9: error: use of unknown builtin \'__builtin_ia32_pbroadcastq128_gpr_mask\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:47:9: error: use of unknown builtin \'__builtin_ia32_pbroadcastq256_gpr_mask\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:48:9: error: use of unknown builtin \'__builtin_ia32_vcvtsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:49:9: error: use of unknown builtin \'__builtin_ia32_vcvtsd2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:50:9: error: use of unknown builtin \'__builtin_ia32_vcvtss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:51:9: error: use of unknown builtin \'__builtin_ia32_vcvtss2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:52:9: error: use of unknown builtin \'__builtin_ia32_vcvttsd2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:53:9: error: use of unknown builtin \'__builtin_ia32_vcvttsd2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:54:9: error: use of unknown builtin \'__builtin_ia32_vcvttss2si64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:55:9: error: use of unknown builtin \'__builtin_ia32_vcvttss2usi64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:56:9: error: use of unknown builtin \'__builtin_ia32_cvtsi2sd64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:57:9: error: use of unknown builtin \'__builtin_ia32_cvtsi2ss64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:58:9: error: use of unknown builtin \'__builtin_ia32_cvtusi2sd64\' [-Wimplicit-function-declaration]","clang/test/Sema/builtins-x86_64.c:59:9: error: use of unknown builtin \'__builtin_ia32_cvtusi2ss64\' [-Wimplicit-function-declaration]"} | ||
} | } | ||
}, | }, | ||
["warn_c17_compat_ellipsis_only_parameter"]={ | ["warn_c17_compat_ellipsis_only_parameter"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="\'...\' as the only parameter of a function is incompatible with C standards before C2x", | [e]="\'...\' as the only parameter of a function is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="\'\\.\\.\\.\' as the only parameter of a function is incompatible with C standards before C2x", | [b]="\'\\.\\.\\.\' as the only parameter of a function is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{W,5445,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // We allow a zero-parameter variadic function in C if the\n // function is marked with the \"overloadable\" attribute. Scan\n // for this attribute now. We also allow it in C2x per WG14 N2975.\n if (!FTI.NumParams && FTI.isVariadic && !LangOpts.CPlusPlus) {\n if (LangOpts.C2x)\n S.Diag(FTI.getEllipsisLoc(), diag::warn_c17_compat_ellipsis_only_parameter);"}}, | ||
[ | [h]={ | ||
["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:11:11: warning: \'...\' as the only parameter of a function is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2975.c:35:20: warning: \'...\' as the only parameter of a function is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/C/C2x/n2975.c"]={"clang/test/C/C2x/n2975.c:11:11: warning: \'...\' as the only parameter of a function is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2975.c:35:20: warning: \'...\' as the only parameter of a function is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c17_compat_static_assert_no_message"]={ | ["warn_c17_compat_static_assert_no_message"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="\'_Static_assert\' with no message is incompatible with C standards before C2x", | [e]="\'_Static_assert\' with no message is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="\'_Static_assert\' with no message is incompatible with C standards before C2x", | [b]="\'_Static_assert\' with no message is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=K, | ||
[ | [f]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recog...","[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"}, | ||
[ | [g]={{"clang/lib/Parse/ParseDeclCXX.cpp",1009,"/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration.\n///\n/// [C++0x] static_assert-declaration:\n/// static_assert ( constant-expression , string-literal ) ;\n///\n/// [C11] static_assert-declaration:\n/// _Static_assert ( constant-expression , string-literal ) ;\n///\nDecl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {\n // ...\n if (Tok.is(tok::r_paren)) {\n // ...\n if (getLangOpts().CPlusPlus17)\n // ...\n else if (getLangOpts().CPlusPlus)\n // ...\n else if (getLangOpts().C2x)\n DiagVal = diag::warn_c17_compat_static_assert_no_message;"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/static_assert.c"]={"clang/test/Parser/static_assert.c:39:17: warning: \'_Static_assert\' with no message is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Parser/static_assert.c"]={"clang/test/Parser/static_assert.c:39:17: warning: \'_Static_assert\' with no message is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_bitint_suffix"]={ | ["warn_c2x_compat_bitint_suffix"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="\'_BitInt\' suffix for literals is incompatible with C standards before C2x", | [e]="\'_BitInt\' suffix for literals is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="\'_BitInt\' suffix for literals is incompatible with C standards before C2x", | [b]="\'_BitInt\' suffix for literals is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=j, | ||
[ | [f]={"8cba72177dcd",1647264157,"Implement literal suffixes for _BitInt\n\nWG14 adopted N2775 (http://www.open-std.org/jtc1/sc22/wg14/w...","Implement literal suffixes for _BitInt\n\nWG14 adopted N2775 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2775.pdf)\nat our Feb 2022 meeting. This paper adds a literal suffix for\nbit-precise types that automatically sizes the bit-precise type to be\nthe smallest possible legal _BitInt type that can represent the literal\nvalue. The suffix chosen is wb (for a signed bit-precise type) which\ncan be combined with the u suffix (for an unsigned bit-precise type).\n\nThe preprocessor continues to operate as-if all integer types were\nintmax_t/uintmax_t, including bit-precise integer types. It is a\nconstraint violation if the bit-precise literal is too large to fit\nwithin that type in the context of the preprocessor (when still using\na pp-number preprocessing token), but it is not a constraint violation\nin other circumstances. This allows you to make bit-precise integer\nliterals that are wider than what the preprocessor currently supports\nin order to initialize variables, etc."}, | ||
[ | [g]={{"clang/lib/Lex/PPExpressions.cpp",340,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // \'wb/uwb\' literals are a C2x feature. We explicitly do not support the\n // suffix in C++ as an extension because a library-based UDL that resolves\n // to a library type may be more appropriate there.\n if (Literal.isBitInt)\n PP.Diag(PeekTok, PP.getLangOpts().C2x ? diag::warn_c2x_compat_bitint_suffix : diag::ext_c2x_bitint_suffix);"},{v,4068,"ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {\n // ...\n if (Literal.isFixedPointLiteral()) {\n // ...\n } else if (Literal.isFloatingLiteral()) {\n // ...\n } else if (!Literal.isIntegerLiteral()) {\n // ...\n } else {\n // ...\n // \'wb/uwb\' literals are a C2x feature. We support _BitInt as a type in C++,\n // but we do not currently support the suffix in C++ mode because it\'s not\n // entirely clear whether WG21 will prefer this suffix to return a library\n // type such as std::bit_int instead of returning a _BitInt.\n if (Literal.isBitInt && !getLangOpts().CPlusPlus)\n PP.Diag(Tok.getLocation(), getLangOpts().C2x ? diag::warn_c2x_compat_bitint_suffix : diag::ext_c2x_bitint_suffix);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/bitint-constants-compat.c"]={"clang/test/Lexer/bitint-constants-compat.c:5:5: warning: \'_BitInt\' suffix for literals is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Lexer/bitint-constants-compat.c:11:3: warning: \'_BitInt\' suffix for literals is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Lexer/bitint-constants-compat.c"]={"clang/test/Lexer/bitint-constants-compat.c:5:5: warning: \'_BitInt\' suffix for literals is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Lexer/bitint-constants-compat.c:11:3: warning: \'_BitInt\' suffix for literals is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_digit_separator"]={ | ["warn_c2x_compat_digit_separator"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="digit separators are incompatible with C standards before C2x", | [e]="digit separators are incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="digit separators are incompatible with C standards before C2x", | [b]="digit separators are incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=z, | ||
[ | [f]={"e44831005905",1615551663,"Add support for digit separators in C2x.\n\nWG14 adopted N2626 at the meetings this week. This commit ...","Add support for digit separators in C2x.\n\nWG14 adopted N2626 at the meetings this week. This commit adds support\nfor using \' as a digit separator in a numeric literal which is\ncompatible with the C++ feature."}, | ||
[ | [g]={{cb,1963,"/// LexNumericConstant - Lex the remainder of a integer or floating point\n/// constant. From[-1] is the first character lexed. Return the end of the\n/// constant.\nbool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) {\n // ...\n // If we have a digit separator, continue.\n if (C == \'\\\'\' && (LangOpts.CPlusPlus14 || LangOpts.C2x)) {\n // ...\n if (isAsciiIdentifierContinue(Next)) {\n if (!isLexingRawMode())\n Diag(CurPtr, LangOpts.CPlusPlus ? diag::warn_cxx11_compat_digit_separator : diag::warn_c2x_compat_digit_separator);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/pre-c2x-compat.c"]={"clang/test/Sema/pre-c2x-compat.c:3:21: warning: digit separators are incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Sema/pre-c2x-compat.c"]={"clang/test/Sema/pre-c2x-compat.c:3:21: warning: digit separators are incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_empty_initializer"]={ | ["warn_c2x_compat_empty_initializer"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="use of an empty initializer is incompatible with C standards before C2x", | [e]="use of an empty initializer is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="use of an empty initializer is incompatible with C standards before C2x", | [b]="use of an empty initializer is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=K, | ||
[ | [f]={"5d8aaad4452f",1680549555,"[C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)\n\nThis implements ...","[C2x] Implement support for empty brace initialization (WG14 N2900 and WG14 N3011)\n\nThis implements support for allowing {} to consistently zero initialize\nobjects. We already supported most of this work as a GNU extension, but\nthe C2x feature goes beyond what the GNU extension allowed.\n\nThe changes in this patch are:\n\n* Removed the -Wgnu-empty-initializer warning group. The extension is\n now a C2x extension warning instead. Note that use of\n `-Wno-gnu-empty-initializer seems` to be quite low in the wild\n(https://sourcegraph.com/search?q=context%3Aglobal+-file%3A.*test.*+%22-Wno-gnu-empty-initializer%22&patternType=standard&sm=1&groupBy=repo\n which currently only gives 8 hits total), so this is not expected to\n be an overly disruptive change. But I\'m adding the clang vendors\n review group just in case this expectation is wrong.\n* Reworded the diagnostic wording to be about a C2x extension, added a\n pre-C2x compat warning.\n* Allow {} to zero initialize a VLA\n\nThis functionality is exposed as an extension in all older C modes\n(same as the GNU extension was), but does *not* allow the extension for\nVLA initialization in C++ due to concern about handling non-trivially\nconstructible types.\n\nDifferential Revision: https://reviews.llvm.org/D147349"}, | ||
[ | [g]={{"clang/lib/Parse/ParseInit.cpp",456,"/// ParseBraceInitializer - Called when parsing an initializer that has a\n/// leading open brace.\n///\n/// initializer: [C99 6.7.8]\n/// \'{\' initializer-list \'}\'\n/// \'{\' initializer-list \',\' \'}\'\n/// [C2x] \'{\' \'}\'\n///\n/// initializer-list:\n/// designation[opt] initializer ...[opt]\n/// initializer-list \',\' designation[opt] initializer ...[opt]\n///\nExprResult Parser::ParseBraceInitializer() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // Empty initializers are a C++ feature and a GNU extension to C before C2x.\n if (!getLangOpts().CPlusPlus) {\n Diag(LBraceLoc, getLangOpts().C2x ? diag::warn_c2x_compat_empty_initializer : diag::ext_c_empty_initializer);"}}, | ||
[ | [h]={ | ||
["clang/test/C/C2x/n2900_n3011.c"]={"clang/test/C/C2x/n2900_n3011.c:12:30: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:14:11: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:16:16: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:25:24: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:28:16: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:30:39: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:36:15: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:41:10: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:47:10: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:49:5: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:56:23: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/C/C2x/n2900_n3011.c"]={"clang/test/C/C2x/n2900_n3011.c:12:30: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:14:11: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:16:16: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:25:24: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:28:16: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:30:39: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:36:15: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:41:10: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:47:10: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:49:5: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2900_n3011.c:56:23: warning: use of an empty initializer is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_keyword"]={ | ["warn_c2x_compat_keyword"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="\'%0\' is incompatible with C standards before C2x", | [e]="\'%0\' is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' is incompatible with C standards before C2x", | [b]="\'(.*?)\' is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=K, | ||
[ | [f]={"06174134e418",1677335266,"[C2x] Implement support for revised spelling of keywords\n\nThis implements WG14 N2934\n(https://www.op...","[C2x] Implement support for revised spelling of keywords\n\nThis implements WG14 N2934\n(https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2934.pdf), which\nadds keywords for alignas, alignof, bool, static_assert, and\nthread_local in C, as aliases for _Alignas, _Alignof, _Bool,\n_Static_assert, and _Thread_local. We already supported the keywords in\nC2x mode, but this completes support by adding pre-C2x compat warnings\nand updates the stdalign.h header in freestanding mode."}, | ||
[ | [g]={{Yb,4001,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_thread_local:\n if (getLangOpts().C2x)\n Diag(Tok, diag::warn_c2x_compat_keyword) << Tok.getName();"},{Yb,4245,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::kw_bool:\n if (getLangOpts().C2x)\n Diag(Tok, diag::warn_c2x_compat_keyword) << Tok.getName();"},{Yb,7760,"/// [GNU] typeof-specifier:\n/// typeof ( expressions )\n/// typeof ( type-name )\n/// [GNU/C++] typeof unary-expression\n/// [C2x] typeof-specifier:\n/// typeof \'(\' typeof-specifier-argument \')\'\n/// typeof_unqual \'(\' typeof-specifier-argument \')\'\n///\n/// typeof-specifier-argument:\n/// expression\n/// type-name\n///\nvoid Parser::ParseTypeofSpecifier(DeclSpec &DS) {\n // ...\n if (getLangOpts().C2x && !II->getName().startswith(\"__\"))\n Diag(Tok.getLocation(), diag::warn_c2x_compat_keyword) << Tok.getName();"},{Yb,7960,"void Parser::DiagnoseBitIntUse(const Token &Tok) {\n // ...\n if (Tok.is(tok::kw__ExtInt)) {\n // ...\n } else {\n // In C2x mode, diagnose that the use is not compatible with pre-C2x modes.\n // Otherwise, diagnose that the use is a Clang extension.\n if (getLangOpts().C2x)\n Diag(Loc, diag::warn_c2x_compat_keyword) << Tok.getName();"},{"clang/lib/Parse/ParseDeclCXX.cpp",976,"/// 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 Diag(Tok, diag::warn_c2x_compat_keyword) << Tok.getName();"},{"clang/lib/Parse/ParseDeclCXX.cpp",4504,"/// Parse a C++11 or C2x attribute-specifier.\n///\n/// [C++11] attribute-specifier:\n/// \'[\' \'[\' attribute-list \']\' \']\'\n/// alignment-specifier\n///\n/// [C++11] attribute-list:\n/// attribute[opt]\n/// attribute-list \',\' attribute[opt]\n/// attribute \'...\'\n/// attribute-list \',\' attribute \'...\'\n///\n/// [C++11] attribute:\n/// attribute-token attribute-argument-clause[opt]\n///\n/// [C++11] attribute-token:\n/// identifier\n/// attribute-scoped-token\n///\n/// [C++11] attribute-scoped-token:\n/// attribute-namespace \'::\' identifier\n///\n/// [C++11] attribute-namespace:\n/// identifier\nvoid Parser::ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs, CachedTokens &OpenMPTokens, SourceLocation *EndLoc) {\n if (Tok.is(tok::kw_alignas)) {\n if (getLangOpts().C2x)\n Diag(Tok, diag::warn_c2x_compat_keyword) << Tok.getName();"},{Bc,1014,"/// Parse a cast-expression, or, if \\pisUnaryExpression is true, parse\n/// a unary-expression.\n///\n/// \\p isAddressOfOperand exists because an id-expression that is the operand\n/// of address-of gets special treatment due to member pointers. NotCastExpr\n/// is set to true if the token is not the start of a cast-expression, and no\n/// diagnostic is emitted in this case and no tokens are consumed.\n///\n/// \\verbatim\n/// cast-expression: [C99 6.5.4]\n/// unary-expression\n/// \'(\' type-name \')\' cast-expression\n///\n/// unary-expression: [C99 6.5.3]\n/// postfix-expression\n/// \'++\' unary-expression\n/// \'--\' unary-expression\n/// [Coro] \'co_await\' cast-expression\n/// unary-operator cast-expression\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// [GNU] \'&&\' identifier\n/// [C++11] \'noexcept\' \'(\' expression \')\' [C++11 5.3.7]\n/// [C++] new-expression\n/// [C++] delete-expression\n///\n/// unary-operator: one of\n/// \'&\' \'*\' \'+\' \'-\' \'~\' \'!\'\n/// [GNU] \'__extension__\' \'__real\' \'__imag\'\n///\n/// primary-expression: [C99 6.5.1]\n/// [C99] identifier\n/// [C++] id-expression\n/// constant\n/// string-literal\n/// [C++] boolean-literal [C++ 2.13.5]\n/// [C++11] \'nullptr\' [C++11 2.14.7]\n/// [C++11] user-defined-literal\n/// \'(\' expression \')\'\n/// [C11] generic-selection\n/// [C++2a] requires-expression\n/// \'__func__\' [C99 6.4.2.2]\n/// [GNU] \'__FUNCTION__\'\n/// [MS] \'__FUNCDNAME__\'\n/// [MS] \'L__FUNCTION__\'\n/// [MS] \'__FUNCSIG__\'\n/// [MS] \'L__FUNCSIG__\'\n/// [GNU] \'__PRETTY_FUNCTION__\'\n/// [GNU] \'(\' compound-statement \')\'\n/// [GNU] \'__builtin_va_arg\' \'(\' assignment-expression \',\' type-name \')\'\n/// [GNU] \'__builtin_offsetof\' \'(\' type-name \',\' offsetof-member-designator\')\'\n/// [GNU] \'__builtin_choose_expr\' \'(\' assign-expr \',\' assign-expr \',\'\n/// assign-expr \')\'\n/// [GNU] \'__builtin_FILE\' \'(\' \')\'\n/// [CLANG] \'__builtin_FILE_NAME\' \'(\' \')\'\n/// [GNU] \'__builtin_FUNCTION\' \'(\' \')\'\n/// [MS] \'__builtin_FUNCSIG\' \'(\' \')\'\n/// [GNU] \'__builtin_LINE\' \'(\' \')\'\n/// [CLANG] \'__builtin_COLUMN\' \'(\' \')\'\n/// [GNU] \'__builtin_source_location\' \'(\' \')\'\n/// [GNU] \'__builtin_types_compatible_p\' \'(\' type-name \',\' type-name \')\'\n/// [GNU] \'__null\'\n/// [OBJC] \'[\' objc-message-expr \']\'\n/// [OBJC] \'\\@selector\' \'(\' objc-selector-arg \')\'\n/// [OBJC] \'\\@protocol\' \'(\' identifier \')\'\n/// [OBJC] \'\\@encode\' \'(\' type-name \')\'\n/// [OBJC] objc-string-literal\n/// [C++] simple-type-specifier \'(\' expression-list[opt] \')\' [C++ 5.2.3]\n/// [C++11] simple-type-specifier braced-init-list [C++11 5.2.3]\n/// [C++] typename-specifier \'(\' expression-list[opt] \')\' [C++ 5.2.3]\n/// [C++11] typename-specifier braced-init-list [C++11 5.2.3]\n/// [C++] \'const_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'dynamic_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'reinterpret_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'static_cast\' \'<\' type-name \'>\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'typeid\' \'(\' expression \')\' [C++ 5.2p1]\n/// [C++] \'typeid\' \'(\' type-id \')\' [C++ 5.2p1]\n/// [C++] \'this\' [C++ 9.3.2]\n/// [G++] unary-type-trait \'(\' type-id \')\'\n/// [G++] binary-type-trait \'(\' type-id \',\' type-id \')\' [TODO]\n/// [EMBT] array-type-trait \'(\' type-id \',\' integer \')\'\n/// [clang] \'^\' block-literal\n///\n/// constant: [C99 6.4.4]\n/// integer-constant\n/// floating-constant\n/// enumeration-constant -> identifier\n/// character-constant\n///\n/// id-expression: [C++ 5.1]\n/// unqualified-id\n/// qualified-id\n///\n/// unqualified-id: [C++ 5.1]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// \'~\' class-name\n/// template-id\n///\n/// new-expression: [C++ 5.3.4]\n/// \'::\'[opt] \'new\' new-placement[opt] new-type-id\n/// new-initializer[opt]\n/// \'::\'[opt] \'new\' new-placement[opt] \'(\' type-id \')\'\n/// new-initializer[opt]\n///\n/// delete-expression: [C++ 5.3.5]\n/// \'::\'[opt] \'delete\' cast-expression\n/// \'::\'[opt] \'delete\' \'[\' \']\' cast-expression\n///\n/// [GNU/Embarcadero] unary-type-trait:\n/// \'__is_arithmetic\'\n/// \'__is_floating_point\'\n/// \'__is_integral\'\n/// \'__is_lvalue_expr\'\n/// \'__is_rvalue_expr\'\n/// \'__is_complete_type\'\n/// \'__is_void\'\n/// \'__is_array\'\n/// \'__is_function\'\n/// \'__is_reference\'\n/// \'__is_lvalue_reference\'\n/// \'__is_rvalue_reference\'\n/// \'__is_fundamental\'\n/// \'__is_object\'\n/// \'__is_scalar\'\n/// \'__is_compound\'\n/// \'__is_pointer\'\n/// \'__is_member_object_pointer\'\n/// \'__is_member_function_pointer\'\n/// \'__is_member_pointer\'\n/// \'__is_const\'\n/// \'__is_volatile\'\n/// \'__is_trivial\'\n/// \'__is_standard_layout\'\n/// \'__is_signed\'\n/// \'__is_unsigned\'\n///\n/// [GNU] unary-type-trait:\n/// \'__has_nothrow_assign\'\n/// \'__has_nothrow_copy\'\n/// \'__has_nothrow_constructor\'\n/// \'__has_trivial_assign\' [TODO]\n/// \'__has_trivial_copy\' [TODO]\n/// \'__has_trivial_constructor\'\n/// \'__has_trivial_destructor\'\n/// \'__has_virtual_destructor\'\n/// \'__is_abstract\' [TODO]\n/// \'__is_class\'\n/// \'__is_empty\' [TODO]\n/// \'__is_enum\'\n/// \'__is_final\'\n/// \'__is_pod\'\n/// \'__is_polymorphic\'\n/// \'__is_sealed\' [MS]\n/// \'__is_trivial\'\n/// \'__is_union\'\n/// \'__has_unique_object_representations\'\n///\n/// [Clang] unary-type-trait:\n/// \'__is_aggregate\'\n/// \'__trivially_copyable\'\n///\n/// binary-type-trait:\n/// [GNU] \'__is_base_of\'\n/// [MS] \'__is_convertible_to\'\n/// \'__is_convertible\'\n/// \'__is_same\'\n///\n/// [Embarcadero] array-type-trait:\n/// \'__array_rank\'\n/// \'__array_extent\'\n///\n/// [Embarcadero] expression-trait:\n/// \'__is_lvalue_expr\'\n/// \'__is_rvalue_expr\'\n/// \\endverbatim\n///\nExprResult Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, bool &NotCastExpr, TypeCastState isTypeCast, bool isVectorLiteral, bool *NotPrimaryExpression) {\n // ...\n case tok::kw_nullptr:\n if (getLangOpts().CPlusPlus)\n // ...\n else\n Diag(Tok, getLangOpts().C2x ? diag::warn_c2x_compat_keyword : diag::ext_c_nullptr) << Tok.getName();"},{Bc,2497,"/// Parse a sizeof or alignof expression.\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// \\endverbatim\nExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {\n // ...\n if (getLangOpts().CPlusPlus && OpTok.isOneOf(tok::kw_alignof, tok::kw__Alignof))\n // ...\n else if (getLangOpts().C2x && OpTok.is(tok::kw_alignof))\n Diag(OpTok, diag::warn_c2x_compat_keyword) << OpTok.getName();"}}, | ||
[ | [h]={ | ||
["clang/test/C/C2x/n2934.c"]={"clang/test/C/C2x/n2934.c:8:1: warning: \'thread_local\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:8:21: warning: \'alignas\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:15:3: warning: \'bool\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:18:1: warning: \'static_assert\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:18:15: warning: \'alignof\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:18:36: warning: \'alignof\' is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/C/C2x/n2934.c"]={"clang/test/C/C2x/n2934.c:8:1: warning: \'thread_local\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:8:21: warning: \'alignas\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:15:3: warning: \'bool\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:18:1: warning: \'static_assert\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:18:15: warning: \'alignof\' is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/C/C2x/n2934.c:18:36: warning: \'alignof\' is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_label_end_of_compound_statement"]={ | ["warn_c2x_compat_label_end_of_compound_statement"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="label at end of compound statement is incompatible with C standards before C2x", | [e]="label at end of compound statement is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="label at end of compound statement is incompatible with C standards before C2x", | [b]="label at end of compound statement is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=K, | ||
[ | [f]={"782ac2182c2b",1657907157,"[HLSL] Support cbuffer/tbuffer for hlsl.\n\nThis is first part for support cbuffer/tbuffer.\n\nThe forma...","[HLSL] Support cbuffer/tbuffer for hlsl.\n\nThis is first part for support cbuffer/tbuffer.\n\nThe format for cbuffer/tbuffer is\nBufferType [Name] [: register(b#)] { VariableDeclaration [: packoffset(c#.xyzw)]; ... };\n\nMore details at https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-constants\n\nNew keyword \'cbuffer\' and \'tbuffer\' are added.\nNew AST node HLSLBufferDecl is added.\nBuild AST for simple cbuffer/tbuffer without attribute support.\n\nThe special thing is variables declared inside cbuffer is exposed into global scope.\nSo isTransparentContext should return true for HLSLBuffer.\n\nReviewed By: aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D129883"}, | ||
[ | [g]={{"clang/lib/Parse/ParseStmt.cpp",1080,"void Parser::DiagnoseLabelAtEndOfCompoundStatement() {\n if (getLangOpts().CPlusPlus) {\n // ...\n } else {\n Diag(Tok, getLangOpts().C2x ? diag::warn_c2x_compat_label_end_of_compound_statement : diag::ext_c_label_end_of_compound_statement);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/c2x-label.c"]={"clang/test/Parser/c2x-label.c:9:1: warning: label at end of compound statement is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Parser/c2x-label.c:19:5: warning: label at end of compound statement is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Parser/c2x-label.c:26:5: warning: label at end of compound statement is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Parser/c2x-label.c"]={"clang/test/Parser/c2x-label.c:9:1: warning: label at end of compound statement is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Parser/c2x-label.c:19:5: warning: label at end of compound statement is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Parser/c2x-label.c:26:5: warning: label at end of compound statement is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_literal_ucn_control_character"]={ | ["warn_c2x_compat_literal_ucn_control_character"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="universal character name referring to a control character is incompatible with C standards before C2x", | [e]="universal character name referring to a control character is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="universal character name referring to a control character is incompatible with C standards before C2x", | [b]="universal character name referring to a control character is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=z, | ||
[ | [f]={"304e97469455",1687518157,"[Clang] Correctly handle $, @, and ` when represented as UCN\n\nThis covers\n * P2558R2 (C++, wg21.link...","[Clang] Correctly handle $, @, and ` when represented as UCN\n\nThis covers\n * P2558R2 (C++, wg21.link/P2558)\n * N2701 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2701.htm)\n * N3124 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3124.pdf)\n\nThis patch\n * Disallow representing $ as a UCN in all language mode, which did not\n properly work (see GH62133), and which in made ill-formed in\n C++ and C by P2558 and N3124 respectively\n * Allow a UCN for any character in C2X, in string and character\n literals\n\nFixes #62133\n\nReviewed By: #clang-language-wg, tahonermann\n\nDifferential Revision: https://reviews.llvm.org/D153621"}, | ||
[ | [g]={{Rc,687,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n // C2x and C++11 allow UCNs that refer to control characters\n // and basic source characters inside character and string literals\n if (UcnVal < 0xa0 &&\n // ...\n if (Diags) {\n // ...\n if (UcnVal >= 0x20 && UcnVal < 0x7f)\n // ...\n else\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, IsError ? diag::err_ucn_control_character : Features.CPlusPlus ? diag::warn_cxx98_compat_literal_ucn_control_character : diag::warn_c2x_compat_literal_ucn_control_character);"}} | ||
}, | }, | ||
["warn_c2x_compat_literal_ucn_escape_basic_scs"]={ | ["warn_c2x_compat_literal_ucn_escape_basic_scs"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="specifying character \'%0\' with a universal character name is incompatible with C standards before C2x", | [e]="specifying character \'%0\' with a universal character name is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="specifying character \'(.*?)\' with a universal character name is incompatible with C standards before C2x", | [b]="specifying character \'(.*?)\' with a universal character name is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=z, | ||
[ | [f]={"304e97469455",1687518157,"[Clang] Correctly handle $, @, and ` when represented as UCN\n\nThis covers\n * P2558R2 (C++, wg21.link...","[Clang] Correctly handle $, @, and ` when represented as UCN\n\nThis covers\n * P2558R2 (C++, wg21.link/P2558)\n * N2701 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2701.htm)\n * N3124 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3124.pdf)\n\nThis patch\n * Disallow representing $ as a UCN in all language mode, which did not\n properly work (see GH62133), and which in made ill-formed in\n C++ and C by P2558 and N3124 respectively\n * Allow a UCN for any character in C2X, in string and character\n literals\n\nFixes #62133\n\nReviewed By: #clang-language-wg, tahonermann\n\nDifferential Revision: https://reviews.llvm.org/D153621"}, | ||
[ | [g]={{Rc,680,"/// ProcessUCNEscape - Read the Universal Character Name, check constraints and\n/// return the UTF32.\nstatic bool ProcessUCNEscape(const char *ThisTokBegin, const char *&ThisTokBuf, const char *ThisTokEnd, uint32_t &UcnVal, unsigned short &UcnLen, FullSourceLoc Loc, DiagnosticsEngine *Diags, const LangOptions &Features, bool in_char_string_literal = false) {\n // ...\n // C2x and C++11 allow UCNs that refer to control characters\n // and basic source characters inside character and string literals\n if (UcnVal < 0xa0 &&\n // ...\n if (Diags) {\n // ...\n if (UcnVal >= 0x20 && UcnVal < 0x7f)\n Diag(Diags, Features, Loc, ThisTokBegin, UcnBegin, ThisTokBuf, IsError ? diag::err_ucn_escape_basic_scs : Features.CPlusPlus ? diag::warn_cxx98_compat_literal_ucn_escape_basic_scs : diag::warn_c2x_compat_literal_ucn_escape_basic_scs) << StringRef(&BasicSCSChar, 1);"}} | ||
}, | }, | ||
["warn_c2x_compat_pp_directive"]={ | ["warn_c2x_compat_pp_directive"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="use of a \'#%select{<BUG IF SEEN>|elifdef|elifndef}0\' directive is incompatible with C standards before C2x", | [e]="use of a \'#%select{<BUG IF SEEN>|elifdef|elifndef}0\' directive is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="use of a \'\\#(?:elifdef|elifndef)\' directive is incompatible with C standards before C2x", | [b]="use of a \'\\#(?:elifdef|elifndef)\' directive is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{N,771,"/// SkipExcludedConditionalBlock - We just read a \\#if or related directive and\n/// decided that the subsequent tokens are in the \\#if\'d out portion of the\n/// file. Lex the rest of the file, until we see an \\#endif. If\n/// FoundNonSkipPortion is true, then we have already emitted code for part of\n/// this \\#if directive, so \\#else/\\#elif blocks should never be entered.\n/// If ElseOk is true, then \\#else directives are ok, if not, then we have\n/// already seen one so a \\#else directive is a duplicate. When this returns,\n/// the caller can lex the first valid token.\nvoid Preprocessor::SkipExcludedConditionalBlock(SourceLocation HashTokenLoc, SourceLocation IfTokenLoc, bool FoundNonSkipPortion, bool FoundElse, SourceLocation ElseLoc) {\n // ...\n while (true) {\n // ...\n if (Directive.startswith(\"if\")) {\n // ...\n } else if (Directive[0] == \'e\') {\n // ...\n if (Sub == \"ndif\") { // \"endif\"\n // ...\n } else if (Sub == \"lse\") { // \"else\".\n // ...\n } else if (Sub == \"lif\") { // \"elif\".\n // ...\n } else if (Sub == \"lifdef\" || // \"elifdef\"\n // ...\n if (LangOpts.CPlusPlus)\n // ...\n else\n DiagID = LangOpts.C2x ? diag::warn_c2x_compat_pp_directive : diag::ext_c2x_pp_directive;"},{N,3457,"/// Implements the \\#elif, \\#elifdef, and \\#elifndef directives.\nvoid Preprocessor::HandleElifFamilyDirective(Token &ElifToken, const Token &HashToken, tok::PPKeywordKind Kind) {\n // ...\n case PED_Elifdef:\n case PED_Elifndef:\n // ...\n if (LangOpts.CPlusPlus)\n // ...\n else\n DiagID = LangOpts.C2x ? diag::warn_c2x_compat_pp_directive : diag::ext_c2x_pp_directive;"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:18:2: warning: use of a \'#elifdef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Preprocessor/ext-pp-directive.c:29:2: warning: use of a \'#elifndef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Preprocessor/ext-pp-directive.c:40:2: warning: use of a \'#elifdef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Preprocessor/ext-pp-directive.c:51:2: warning: use of a \'#elifndef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:18:2: warning: use of a \'#elifdef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Preprocessor/ext-pp-directive.c:29:2: warning: use of a \'#elifndef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Preprocessor/ext-pp-directive.c:40:2: warning: use of a \'#elifdef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]","clang/test/Preprocessor/ext-pp-directive.c:51:2: warning: use of a \'#elifndef\' directive is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_compat_warning_directive"]={ | ["warn_c2x_compat_warning_directive"]={ | ||
[ | [m]={P,sb}, | ||
[l]=P, | |||
[ | |||
[e]="#warning is incompatible with C standards before C2x", | [e]="#warning is incompatible with C standards before C2x", | ||
[ | [a]=n, | ||
[b]="\\#warning is incompatible with C standards before C2x", | [b]="\\#warning is incompatible with C standards before C2x", | ||
[ | [c]=ob, | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{N,1281,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n default:\n // ...\n case tok::pp_warning:\n if (LangOpts.CPlusPlus)\n // ...\n else\n Diag(Result, LangOpts.C2x ? diag::warn_c2x_compat_warning_directive : diag::ext_pp_warning_directive) << /*C2x*/ 0;"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:61:2: warning: #warning is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ["clang/test/Preprocessor/ext-pp-directive.c"]={"clang/test/Preprocessor/ext-pp-directive.c:61:2: warning: #warning is incompatible with C standards before C2x [-Wpre-c2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c2x_keyword"]={ | ["warn_c2x_keyword"]={ | ||
[ | [m]={"c2x-compat"}, | ||
[l]="c2x-compat", | |||
[ | |||
[e]="\'%0\' is a keyword in C2x", | [e]="\'%0\' is a keyword in C2x", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' is a keyword in C2x", | [b]="\'(.*?)\' is a keyword in C2x", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc2x\\-compat[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{"clang/lib/Basic/IdentifierTable.cpp",919,"#include \"clang/Basic/TokenKinds.def\"\n // ...\n if (LangOpts.CPlusPlus) {\n // ...\n } else {\n // ...\n if ((Flags & KEYC2X) == KEYC2X)\n return diag::warn_c2x_keyword;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/nullptr-prec2x.c"]={"clang/test/Sema/nullptr-prec2x.c:5:5: warning: \'nullptr\' is a keyword in C2x [-Wc2x-compat]"} | ["clang/test/Sema/nullptr-prec2x.c"]={"clang/test/Sema/nullptr-prec2x.c:5:5: warning: \'nullptr\' is a keyword in C2x [-Wc2x-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c99_compat_unicode_id"]={ | ["warn_c99_compat_unicode_id"]={ | ||
[ | [m]={sc}, | ||
[l]=sc, | |||
[ | |||
[e]="%select{using this character in an identifier|starting an identifier with this character}0 is incompatible with C99", | [e]="%select{using this character in an identifier|starting an identifier with this character}0 is incompatible with C99", | ||
[ | [a]=n, | ||
[b]="(?:using this character in an identifier|starting an identifier with this character) is incompatible with C99", | [b]="(?:using this character in an identifier|starting an identifier with this character) is incompatible with C99", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc99\\-compat[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"58c61e006f4d",1360372225,"Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).\n\nAdd warnings under -...","Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).\n\nAdd warnings under -Wc++11-compat, -Wc++98-compat, and -Wc99-compat when a\nparticular UCN is incompatible with a different standard, and -Wunicode when\na UCN refers to a surrogate character in C++03.\n\nllvm-svn: 174788"}, | ||
[ | [g]={{cb,1569,"static void maybeDiagnoseIDCharCompat(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range, bool IsFirst) {\n // ...\n if (!Diags.isIgnored(diag::warn_c99_compat_unicode_id, Range.getBegin())) {"},{cb,1580,"static void maybeDiagnoseIDCharCompat(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range, bool IsFirst) {\n // Check C99 compatibility.\n if (!Diags.isIgnored(diag::warn_c99_compat_unicode_id, Range.getBegin())) {\n // ...\n if (!C99AllowedIDChars.contains(C)) {\n Diags.Report(Range.getBegin(), diag::warn_c99_compat_unicode_id) << Range << CannotAppearInIdentifier;"},{cb,1584,"static void maybeDiagnoseIDCharCompat(DiagnosticsEngine &Diags, uint32_t C, CharSourceRange Range, bool IsFirst) {\n // Check C99 compatibility.\n if (!Diags.isIgnored(diag::warn_c99_compat_unicode_id, Range.getBegin())) {\n // ...\n if (!C99AllowedIDChars.contains(C)) {\n // ...\n } else if (IsFirst && C99DisallowedInitialIDChars.contains(C)) {\n Diags.Report(Range.getBegin(), diag::warn_c99_compat_unicode_id) << Range << CannotStartIdentifier;"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/utf8-allowed-chars.c"]={"clang/test/Preprocessor/utf8-allowed-chars.c:9:14: warning: using this character in an identifier is incompatible with C99 [-Wc99-compat]","clang/test/Preprocessor/utf8-allowed-chars.c:11:14: warning: using this character in an identifier is incompatible with C99 [-Wc99-compat]","clang/test/Preprocessor/utf8-allowed-chars.c:14:14: warning: using this character in an identifier is incompatible with C99 [-Wc99-compat]","clang/test/Preprocessor/utf8-allowed-chars.c:20:13: warning: starting an identifier with this character is incompatible with C99 [-Wc99-compat]"} | ["clang/test/Preprocessor/utf8-allowed-chars.c"]={"clang/test/Preprocessor/utf8-allowed-chars.c:9:14: warning: using this character in an identifier is incompatible with C99 [-Wc99-compat]","clang/test/Preprocessor/utf8-allowed-chars.c:11:14: warning: using this character in an identifier is incompatible with C99 [-Wc99-compat]","clang/test/Preprocessor/utf8-allowed-chars.c:14:14: warning: using this character in an identifier is incompatible with C99 [-Wc99-compat]","clang/test/Preprocessor/utf8-allowed-chars.c:20:13: warning: starting an identifier with this character is incompatible with C99 [-Wc99-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c99_compat_unicode_literal"]={ | ["warn_c99_compat_unicode_literal"]={ | ||
[ | [m]={sc}, | ||
[l]=sc, | |||
[ | |||
[e]="unicode literals are incompatible with C99", | [e]="unicode literals are incompatible with C99", | ||
[ | [a]=n, | ||
[b]="unicode literals are incompatible with C99", | [b]="unicode literals are incompatible with C99", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc99\\-compat[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={"06d274fdb7c8",1363024902,"Add -Wc99-compat warning for C11 unicode string and character literals.\n\nllvm-svn: 176817","Add -Wc99-compat warning for C11 unicode string and character literals.\n\nllvm-svn: 176817"}, | ||
[ | [g]={{cb,2088,"/// 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 if (!isLexingRawMode() && (Kind == tok::utf8_string_literal || Kind == tok::utf16_string_literal || Kind == tok::utf32_string_literal))\n Diag(BufferPtr, LangOpts.CPlusPlus ? diag::warn_cxx98_compat_unicode_literal : diag::warn_c99_compat_unicode_literal);"},{cb,2304,"/// LexCharConstant - Lex the remainder of a character constant, after having\n/// lexed either \' or L\' or u8\' or u\' or U\'.\nbool Lexer::LexCharConstant(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n // ...\n if (!isLexingRawMode()) {\n if (Kind == tok::utf16_char_constant || Kind == tok::utf32_char_constant)\n Diag(BufferPtr, LangOpts.CPlusPlus ? diag::warn_cxx98_compat_unicode_literal : diag::warn_c99_compat_unicode_literal);"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/unicode-strings.c"]={"clang/test/Lexer/unicode-strings.c:16:17: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:17:21: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:18:21: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:20:14: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:21:14: warning: unicode literals are incompatible with C99 [-Wc99-compat]"} | ["clang/test/Lexer/unicode-strings.c"]={"clang/test/Lexer/unicode-strings.c:16:17: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:17:21: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:18:21: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:20:14: warning: unicode literals are incompatible with C99 [-Wc99-compat]","clang/test/Lexer/unicode-strings.c:21:14: warning: unicode literals are incompatible with C99 [-Wc99-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c99_keyword"]={ | ["warn_c99_keyword"]={ | ||
[ | [m]={sc}, | ||
[l]=sc, | |||
[ | |||
[e]="\'%0\' is a keyword in C99", | [e]="\'%0\' is a keyword in C99", | ||
[ | [a]=n, | ||
[b]="\'(.*?)\' is a keyword in C99", | [b]="\'(.*?)\' is a keyword in C99", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wc99\\-compat[^\\]]*\\]", | ||
[ | [d]=z, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{"clang/lib/Basic/IdentifierTable.cpp",917,"#include \"clang/Basic/TokenKinds.def\"\n // ...\n if (LangOpts.CPlusPlus) {\n // ...\n } else {\n if ((Flags & KEYC99) == KEYC99)\n return diag::warn_c99_keyword;"}}, | ||
[ | [h]={ | ||
["clang/test/Lexer/keywords_test.c"]={"clang/test/Lexer/keywords_test.c:93:7: warning: \'restrict\' is a keyword in C99 [-Wc99-compat]","clang/test/Lexer/keywords_test.c:94:7: warning: \'inline\' is a keyword in C99 [-Wc99-compat]"} | ["clang/test/Lexer/keywords_test.c"]={"clang/test/Lexer/keywords_test.c:93:7: warning: \'restrict\' is a keyword in C99 [-Wc99-compat]","clang/test/Lexer/keywords_test.c:94:7: warning: \'inline\' is a keyword in C99 [-Wc99-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_c_kext"]={ | ["warn_c_kext"]={ | ||
[e]="ignoring -fapple-kext which is valid for C++ and Objective-C++ only", | [e]="ignoring -fapple-kext which is valid for C++ and Objective-C++ only", | ||
[ | [a]=n, | ||
[b]="ignoring \\-fapple\\-kext which is valid for C\\+\\+ and Objective\\-C\\+\\+ only", | [b]="ignoring \\-fapple\\-kext which is valid for C\\+\\+ and Objective\\-C\\+\\+ only", | ||
[ | [c]=lb, | ||
[ | [d]=j, | ||
[ | [f]={"f7f04458b3d1",1296777684,"-fapple-kext cannot have \'weak\' visibility in this\nabi.\n\nllvm-svn: 124834","-fapple-kext cannot have \'weak\' visibility in this\nabi.\n\nllvm-svn: 124834"}, | ||
[ | [g]={{"clang/lib/Frontend/CompilerInvocation.cpp",498,"static bool FixupInvocation(CompilerInvocation &Invocation, DiagnosticsEngine &Diags, const ArgList &Args, InputKind IK) {\n // ...\n if (LangOpts.AppleKext && !LangOpts.CPlusPlus)\n Diags.Report(diag::warn_c_kext);"}} | ||
}, | }, | ||
["warn_call_to_pure_virtual_member_function_from_ctor_dtor"]={ | ["warn_call_to_pure_virtual_member_function_from_ctor_dtor"]={ | ||
[ | [m]={"call-to-pure-virtual-from-ctor-dtor"}, | ||
[l]="call-to-pure-virtual-from-ctor-dtor", | |||
[ | |||
[e]="call to pure virtual member function %0 has undefined behavior; overrides of %0 in subclasses are not available in the %select{constructor|destructor}1 of %2", | [e]="call to pure virtual member function %0 has undefined behavior; overrides of %0 in subclasses are not available in the %select{constructor|destructor}1 of %2", | ||
[ | [a]=n, | ||
[b]="call to pure virtual member function (.*?) has undefined behavior; overrides of (.*?) in subclasses are not available in the (?:constructor|destructor) of (.*?)", | [b]="call to pure virtual member function (.*?) has undefined behavior; overrides of (.*?) in subclasses are not available in the (?:constructor|destructor) of (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcall\\-to\\-pure\\-virtual\\-from\\-ctor\\-dtor[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"47061ee5bc64",1304691931,"Warn when trying to call a pure virtual member function in a class from the class constructor/destru...","Warn when trying to call a pure virtual member function in a class from the class constructor/destructor. Fixes PR7966.\n\nllvm-svn: 130982"}, | ||
[ | [g]={{w,14920,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if ((isa<CXXConstructorDecl>(CurContext) || isa<CXXDestructorDecl>(CurContext)) && TheCall->getMethodDecl()->isPure()) {\n // ...\n if (isa<CXXThisExpr>(MemExpr->getBase()->IgnoreParenCasts()) && MemExpr->performsVirtualDispatch(getLangOpts())) {\n Diag(MemExpr->getBeginLoc(), diag::warn_call_to_pure_virtual_member_function_from_ctor_dtor) << MD->getDeclName() << isa<CXXDestructorDecl>(CurContext) << MD->getParent();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-pure-virtual-kext.cpp"]={"clang/test/SemaCXX/warn-pure-virtual-kext.cpp:6:9: warning: call to pure virtual member function \'f\' has undefined behavior; overrides of \'f\' in subclasses are not available in the constructor of \'A\' [-Wcall-to-pure-virtual-from-ctor-dtor]","clang/test/SemaCXX/warn-pure-virtual-kext.cpp:13:10: warning: call to pure virtual member function \'f\' has undefined behavior; overrides of \'f\' in subclasses are not available in the constructor of \'TA<int>\' [-Wcall-to-pure-virtual-from-ctor-dtor]"} | ["clang/test/SemaCXX/warn-pure-virtual-kext.cpp"]={"clang/test/SemaCXX/warn-pure-virtual-kext.cpp:6:9: warning: call to pure virtual member function \'f\' has undefined behavior; overrides of \'f\' in subclasses are not available in the constructor of \'A\' [-Wcall-to-pure-virtual-from-ctor-dtor]","clang/test/SemaCXX/warn-pure-virtual-kext.cpp:13:10: warning: call to pure virtual member function \'f\' has undefined behavior; overrides of \'f\' in subclasses are not available in the constructor of \'TA<int>\' [-Wcall-to-pure-virtual-from-ctor-dtor]"} | ||
} | } | ||
}, | }, | ||
["warn_call_wrong_number_of_arguments"]={ | ["warn_call_wrong_number_of_arguments"]={ | ||
[e]="too %select{few|many}0 arguments in call to %1", | [e]="too %select{few|many}0 arguments in call to %1", | ||
[ | [a]=n, | ||
[b]="too (?:few|many) arguments in call to (.*?)", | [b]="too (?:few|many) arguments in call to (.*?)", | ||
[ | [c]=lb, | ||
[ | [d]=i, | ||
[ | [f]={"d8e97def584d",1238686630,"When calling a function without a prototype for which we have a\ndefinition, warn if there are too ma...","When calling a function without a prototype for which we have a\ndefinition, warn if there are too many/too few function call\narguments.\n\nllvm-svn: 68318"}, | ||
[ | [g]={{v,7555,"/// 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 if (Proto) {\n // ...\n } else {\n // ...\n if (FDecl) {\n // ...\n if (FDecl->hasBody(Def) && Args.size() != Def->param_size()) {\n // ...\n if (!Proto || !(Proto->isVariadic() && Args.size() >= Def->param_size()))\n Diag(RParenLoc, diag::warn_call_wrong_number_of_arguments) << (Args.size() > Def->param_size()) << FDecl << Fn->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/knr-def-call.c"]={"clang/test/Sema/knr-def-call.c:6:7: warning: too few arguments in call to \'f0\'","clang/test/Sema/knr-def-call.c:11:13: warning: too many arguments in call to \'f1\'"} | ["clang/test/Sema/knr-def-call.c"]={"clang/test/Sema/knr-def-call.c:6:7: warning: too few arguments in call to \'f0\'","clang/test/Sema/knr-def-call.c:11:13: warning: too many arguments in call to \'f1\'"} | ||
} | } | ||
}, | }, | ||
["warn_called_once_gets_called_twice"]={ | ["warn_called_once_gets_called_twice"]={ | ||
[ | [m]={Gb}, | ||
[l]=Gb, | |||
[ | |||
[e]="%0 parameter marked \'called_once\' is called twice", | [e]="%0 parameter marked \'called_once\' is called twice", | ||
[ | [a]=n, | ||
[b]="(.*?) parameter marked \'called_once\' is called twice", | [b]="(.*?) parameter marked \'called_once\' is called twice", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcalled\\-once\\-parameter[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{D,1690,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleDoubleCall(const ParmVarDecl *Parameter, const Expr *Call, const Expr *PrevCall, bool IsCompletionHandler, bool Poised) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_called_twice : diag::warn_called_once_gets_called_twice;"},{D,1752,"constexpr unsigned CalledOnceWarnings[] = {diag::warn_called_once_never_called, diag::warn_called_once_never_called_when, diag::warn_called_once_gets_called_twice};"}}, | ||
[ | [h]={ | ||
[ | [qc]={"clang/test/SemaObjC/warn-called-once.m:54:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:59:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:64:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:69:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:78:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:87:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:95:5: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:119:5: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:128:5: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:183:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:191:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:203:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:225:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:243:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:259:5: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:281:5: warning: \'inner\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:284:3: warning: \'outer\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:309:5: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:539:7: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:793:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:799:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:865:3: warning: \'callback\' parameter marked \'called_once\' is called twice [-Wcalled-once-parameter]"} | ||
} | } | ||
}, | }, | ||
["warn_called_once_never_called"]={ | ["warn_called_once_never_called"]={ | ||
[ | [m]={Gb}, | ||
[l]=Gb, | |||
[ | |||
[e]="%select{|captured }1%0 parameter marked \'called_once\' is never called", | [e]="%select{|captured }1%0 parameter marked \'called_once\' is never called", | ||
[ | [a]=n, | ||
[b]="(?:|captured )(.*?) parameter marked \'called_once\' is never called", | [b]="(?:|captured )(.*?) parameter marked \'called_once\' is never called", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcalled\\-once\\-parameter[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{D,1700,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleNeverCalled(const ParmVarDecl *Parameter, bool IsCompletionHandler) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_never_called : diag::warn_called_once_never_called;"},{D,1730,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleCapturedNeverCalled(const ParmVarDecl *Parameter, const Decl *Where, bool IsCompletionHandler) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_never_called : diag::warn_called_once_never_called;"},{D,1750,"constexpr unsigned CalledOnceWarnings[] = {diag::warn_called_once_never_called, diag::warn_called_once_never_called_when, diag::warn_called_once_gets_called_twice};"}}, | ||
[ | [h]={ | ||
[ | [qc]={"clang/test/SemaObjC/warn-called-once.m:133:27: warning: \'callback\' parameter marked \'called_once\' is never called [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:137:35: warning: \'callback\' parameter marked \'called_once\' is never called [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:273:5: warning: \'inner\' parameter marked \'called_once\' is never called [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:527:40: warning: \'callback\' parameter marked \'called_once\' is never called [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:718:49: warning: \'callback\' parameter marked \'called_once\' is never called [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:838:31: warning: \'callback\' parameter marked \'called_once\' is never called [-Wcalled-once-parameter]"} | ||
} | } | ||
}, | }, | ||
["warn_called_once_never_called_when"]={ | ["warn_called_once_never_called_when"]={ | ||
[ | [m]={Gb}, | ||
[l]=Gb, | |||
[ | |||
[e]="%0 parameter marked \'called_once\' is never %select{used|called}1 when %select{taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches}2", | [e]="%0 parameter marked \'called_once\' is never %select{used|called}1 when %select{taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches}2", | ||
[ | [a]=n, | ||
[b]="(.*?) parameter marked \'called_once\' is never (?:used|called) when (?:taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches)", | [b]="(.*?) parameter marked \'called_once\' is never (?:used|called) when (?:taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcalled\\-once\\-parameter[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{D,1711,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleNeverCalled(const ParmVarDecl *Parameter, const Decl *Function, const Stmt *Where, NeverCalledReason Reason, bool IsCalledDirectly, bool IsCompletionHandler) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_never_called_when : diag::warn_called_once_never_called_when;"},{D,1751,"constexpr unsigned CalledOnceWarnings[] = {diag::warn_called_once_never_called, diag::warn_called_once_never_called_when, diag::warn_called_once_gets_called_twice};"}}, | ||
[ | [h]={ | ||
[ | [qc]={"clang/test/SemaObjC/warn-called-once.m:174:3: warning: \'callback\' parameter marked \'called_once\' is never used when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:265:5: warning: \'callback\' parameter marked \'called_once\' is never used when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:289:5: warning: \'callback\' parameter marked \'called_once\' is never called when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:314:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking true branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:321:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking true branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:328:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking true branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:338:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:345:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:352:5: warning: \'callback\' parameter marked \'called_once\' is never called when taking true branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:351:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:360:10: warning: \'callback\' parameter marked \'called_once\' is never called when taking true branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:366:3: warning: \'callback\' parameter marked \'called_once\' is never called when skipping the loop [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:374:3: warning: \'callback\' parameter marked \'called_once\' is never called when entering the loop [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:382:3: warning: \'callback\' parameter marked \'called_once\' is never called when skipping the loop [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:389:3: warning: \'callback\' parameter marked \'called_once\' is never called when entering the loop [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:403:3: warning: \'callback\' parameter marked \'called_once\' is never called when handling this case [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:419:3: warning: \'callback\' parameter marked \'called_once\' is never called when handling this case [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:428:3: warning: \'callback\' parameter marked \'called_once\' is never called when handling this case [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:426:3: warning: \'callback\' parameter marked \'called_once\' is never called when handling this case [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:437:3: warning: \'callback\' parameter marked \'called_once\' is never called when none of the cases applies [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:737:3: warning: \'callback\' parameter marked \'called_once\' is never called when taking true branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:762:3: warning: \'callback\' parameter marked \'called_once\' is never used when taking false branch [-Wcalled-once-parameter]","clang/test/SemaObjC/warn-called-once.m:871:15: warning: \'callback\' parameter marked \'called_once\' is never used when taking false branch [-Wcalled-once-parameter]"} | ||
} | } | ||
}, | }, | ||
["warn_cannot_pass_non_pod_arg_to_vararg"]={ | ["warn_cannot_pass_non_pod_arg_to_vararg"]={ | ||
[ | [m]={"class-varargs","non-pod-varargs"}, | ||
[l]="non-pod-varargs", | |||
[ | |||
[e]="cannot pass object of %select{non-POD|non-trivial}0 type %1 through variadic %select{function|block|method|constructor}2; call will abort at runtime", | [e]="cannot pass object of %select{non-POD|non-trivial}0 type %1 through variadic %select{function|block|method|constructor}2; call will abort at runtime", | ||
[ | [a]=Ac, | ||
[b]="cannot pass object of (?:non\\-POD|non\\-trivial) type (.*?) through variadic (?:function|block|method|constructor); call will abort at runtime", | [b]="cannot pass object of (?:non\\-POD|non\\-trivial) type (.*?) through variadic (?:function|block|method|constructor); call will abort at runtime", | ||
[ | [c]=" \\[[^\\]]*\\-Wnon\\-pod\\-varargs[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{v,1013,"void Sema::checkVariadicArgument(const Expr *E, VariadicCallType CT) {\n // ...\n case VAK_Undefined:\n case VAK_MSVCUndefined:\n DiagRuntimeBehavior(E->getBeginLoc(), nullptr, PDiag(diag::warn_cannot_pass_non_pod_arg_to_vararg) << getLangOpts().CPlusPlus11 << Ty << CT);"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/expr/expr.post/expr.call/p7-0x.cpp"]={"clang/test/CXX/expr/expr.post/expr.call/p7-0x.cpp:27:10: error: cannot pass object of non-trivial type \'X2\' through variadic function; call will abort at runtime [-Wnon-pod-varargs]","clang/test/CXX/expr/expr.post/expr.call/p7-0x.cpp:29:10: error: cannot pass object of non-trivial type \'X4\' through variadic function; call will abort at runtime [-Wnon-pod-varargs]"} | ["clang/test/CXX/expr/expr.post/expr.call/p7-0x.cpp"]={"clang/test/CXX/expr/expr.post/expr.call/p7-0x.cpp:27:10: error: cannot pass object of non-trivial type \'X2\' through variadic function; call will abort at runtime [-Wnon-pod-varargs]","clang/test/CXX/expr/expr.post/expr.call/p7-0x.cpp:29:10: error: cannot pass object of non-trivial type \'X4\' through variadic function; call will abort at runtime [-Wnon-pod-varargs]"} | ||
} | } | ||
}, | }, | ||
["warn_cannot_resolve_lock"]={ | ["warn_cannot_resolve_lock"]={ | ||
[ | [m]={"thread-safety",jc}, | ||
[l]=jc, | |||
[ | |||
[e]="cannot resolve lock expression", | [e]="cannot resolve lock expression", | ||
[ | [a]=n, | ||
[b]="cannot resolve lock expression", | [b]="cannot resolve lock expression", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wthread\\-safety\\-analysis[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"ff2f3f810525",1315585315,"Thread safety: This patch deals with previously unhandled cases when building lock expressions. We n...","Thread safety: This patch deals with previously unhandled cases when building lock expressions. We now resolve this expressions, avoid crashing when encountering cast expressions, and have a diagnostic for unresolved lock expressions\n\nllvm-svn: 139370"}, | ||
[ | [g]={{D,1864,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleInvalidLockExp(SourceLocation Loc) override {\n PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_cannot_resolve_lock) << Loc);"}} | ||
}, | }, | ||
["warn_case_empty_range"]={ | ["warn_case_empty_range"]={ | ||
[e]="empty case range specified", | [e]="empty case range specified", | ||
[ | [a]=n, | ||
[b]="empty case range specified", | [b]="empty case range specified", | ||
[ | [c]=lb, | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{J,1420,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n // Detect duplicate case ranges, which usually don\'t exist at all in\n // the first place.\n if (!CaseRanges.empty()) {\n // ...\n for (unsigned i = 0, e = CaseRanges.size(); i != e; ++i) {\n // ...\n // If the low value is bigger than the high value, the case is empty.\n if (LoVal > HiVal) {\n Diag(CR->getLHS()->getBeginLoc(), diag::warn_case_empty_range) << SourceRange(CR->getLHS()->getBeginLoc(), Hi->getEndLoc());"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:15:8: warning: empty case range specified"} | ["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:15:8: warning: empty case range specified"} | ||
} | } | ||
}, | }, | ||
["warn_case_value_overflow"]={ | ["warn_case_value_overflow"]={ | ||
[ | [m]={O,V,"switch"}, | ||
[l]="switch", | |||
[ | |||
[e]="overflow converting case value to switch condition type (%0 to %1)", | [e]="overflow converting case value to switch condition type (%0 to %1)", | ||
[ | [a]=n, | ||
[b]="overflow converting case value to switch condition type \\((.*?) to (.*?)\\)", | [b]="overflow converting case value to switch condition type \\((.*?) to (.*?)\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wswitch[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{J,1149,"/// Check the specified case value is in range for the given unpromoted switch\n/// type.\nstatic void checkCaseValue(Sema &S, SourceLocation Loc, const llvm::APSInt &Val, unsigned UnpromotedWidth, bool UnpromotedSign) {\n // ...\n // If the case value was signed and negative and the switch expression is\n // unsigned, don\'t bother to warn: this is implementation-defined behavior.\n // FIXME: Introduce a second, default-ignored warning for this case?\n if (UnpromotedWidth < Val.getBitWidth()) {\n // ...\n // FIXME: Use different diagnostics for overflow in conversion to promoted\n // type versus \"switch expression cannot have this value\". Use proper\n // IntRange checking rather than just looking at the unpromoted type here.\n if (ConvVal != Val)\n S.Diag(Loc, diag::warn_case_value_overflow) << toString(Val, 10) << toString(ConvVal, 10);"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:11:8: warning: overflow converting case value to switch condition type (5000000000 to 705032704) [-Wswitch]","clang/test/Sema/switch.c:79:10: warning: overflow converting case value to switch condition type (1234 to -46) [-Wswitch]","clang/test/Sema/switch.c:393:27: warning: overflow converting case value to switch condition type (257 to 1) [-Wswitch]","clang/test/Sema/switch.c:395:19: warning: overflow converting case value to switch condition type (4294967297 to 1) [-Wswitch]","clang/test/Sema/switch.c:396:25: warning: overflow converting case value to switch condition type (4294967297 to 1) [-Wswitch]"} | ["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:11:8: warning: overflow converting case value to switch condition type (5000000000 to 705032704) [-Wswitch]","clang/test/Sema/switch.c:79:10: warning: overflow converting case value to switch condition type (1234 to -46) [-Wswitch]","clang/test/Sema/switch.c:393:27: warning: overflow converting case value to switch condition type (257 to 1) [-Wswitch]","clang/test/Sema/switch.c:395:19: warning: overflow converting case value to switch condition type (4294967297 to 1) [-Wswitch]","clang/test/Sema/switch.c:396:25: warning: overflow converting case value to switch condition type (4294967297 to 1) [-Wswitch]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_align"]={ | ["warn_cast_align"]={ | ||
[ | [m]={"cast-align"}, | ||
[l]="cast-align", | |||
[ | |||
[e]="cast from %0 to %1 increases required alignment from %2 to %3", | [e]="cast from %0 to %1 increases required alignment from %2 to %3", | ||
[ | [a]=n, | ||
[b]="cast from (.*?) to (.*?) increases required alignment from (.*?) to (.*?)", | [b]="cast from (.*?) to (.*?) increases required alignment from (.*?) to (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-align[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"2b5c1b2516ca",1281649497,"Implement -Wcast-align. The initial design of this diagnostic diverges \nfrom GCC\'s in that we w...","Implement -Wcast-align. The initial design of this diagnostic diverges \nfrom GCC\'s in that we warn on *any* increase in alignment requirements, not\njust those that are enforced by hardware. Please let us know if this causes\nmajor problems for you (which it shouldn\'t, since it\'s an optional warning).\n\nllvm-svn: 110959"}, | ||
[ | [g]={{y,16961,"/// CheckCastAlign - Implements -Wcast-align, which warns when a\n/// pointer cast increases the alignment requirements.\nvoid Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) {\n // ...\n if (getDiagnostics().isIgnored(diag::warn_cast_align, TRange.getBegin()))"},{y,16993,"/// CheckCastAlign - Implements -Wcast-align, which warns when a\n/// pointer cast increases the alignment requirements.\nvoid Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) {\n // ...\n Diag(TRange.getBegin(), diag::warn_cast_align) << Op->getType() << T << static_cast<unsigned>(SrcAlign.getQuantity()) << static_cast<unsigned>(DestAlign.getQuantity()) << TRange << Op->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-cast-align.c"]={"clang/test/Sema/warn-cast-align.c:6:14: warning: cast from \'char *\' to \'short *\' increases required alignment from 1 to 2 [-Wcast-align]","clang/test/Sema/warn-cast-align.c:7:14: warning: cast from \'char *\' to \'int *\' increases required alignment from 1 to 4 [-Wcast-align]","clang/test/Sema/warn-cast-align.c:35:17: warning: cast from \'char *\' to \'struct A *\' increases required alignment from 1 to 16 [-Wcast-align]","clang/test/Sema/warn-cast-align.c:76:18: warning: cast from \'int *\' to \'void **\' increases required alignment from 4 to 8 [-Wcast-align]"} | ["clang/test/Sema/warn-cast-align.c"]={"clang/test/Sema/warn-cast-align.c:6:14: warning: cast from \'char *\' to \'short *\' increases required alignment from 1 to 2 [-Wcast-align]","clang/test/Sema/warn-cast-align.c:7:14: warning: cast from \'char *\' to \'int *\' increases required alignment from 1 to 4 [-Wcast-align]","clang/test/Sema/warn-cast-align.c:35:17: warning: cast from \'char *\' to \'struct A *\' increases required alignment from 1 to 16 [-Wcast-align]","clang/test/Sema/warn-cast-align.c:76:18: warning: cast from \'int *\' to \'void **\' increases required alignment from 4 to 8 [-Wcast-align]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_calling_conv"]={ | ["warn_cast_calling_conv"]={ | ||
[ | [m]={"cast-calling-convention"}, | ||
[l]="cast-calling-convention", | |||
[ | |||
[e]="cast between incompatible calling conventions \'%0\' and \'%1\'; calls through this pointer may abort at runtime", | [e]="cast between incompatible calling conventions \'%0\' and \'%1\'; calls through this pointer may abort at runtime", | ||
[ | [a]=n, | ||
[b]="cast between incompatible calling conventions \'(.*?)\' and \'(.*?)\'; calls through this pointer may abort at runtime", | [b]="cast between incompatible calling conventions \'(.*?)\' and \'(.*?)\'; calls through this pointer may abort at runtime", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-calling\\-convention[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"9f49733c65b0",1462914003,"Add -Wcast-calling-convention to warn when casting away calling conventions\n\nSummary:\nThis only warn...","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"}, | ||
[ | [g]={{db,2146,"/// 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(OpRange.getBegin(), diag::warn_cast_calling_conv) << SrcCCName << DstCCName << OpRange;"},{db,2152,"/// 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 if (Self.Diags.isIgnored(diag::warn_cast_calling_conv, OpRange.getBegin()))"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/callingconv-cast.c"]={"clang/test/Sema/callingconv-cast.c:34:17: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:37:25: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:41:14: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:47:14: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:58:17: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:60:17: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]"} | ["clang/test/Sema/callingconv-cast.c"]={"clang/test/Sema/callingconv-cast.c:34:17: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:37:25: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:41:14: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:47:14: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:58:17: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]","clang/test/Sema/callingconv-cast.c:60:17: warning: cast between incompatible calling conventions \'cdecl\' and \'stdcall\'; calls through this pointer may abort at runtime [-Wcast-calling-convention]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_function_type"]={ | ["warn_cast_function_type"]={ | ||
[ | [m]={"cast-function-type"}, | ||
[l]="cast-function-type", | |||
[ | |||
[e]="cast %diff{from $ to $ |}0,1converts to incompatible function type", | [e]="cast %diff{from $ to $ |}0,1converts to incompatible function type", | ||
[ | [a]=n, | ||
[b]="cast (?:from (.*?) to (.*?) |)converts to incompatible function type", | [b]="cast (?:from (.*?) to (.*?) |)converts to incompatible function type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-function\\-type[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{db,1099,"static unsigned int checkCastFunctionType(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n const unsigned int DiagList[] = {diag::warn_cast_function_type_strict, diag::warn_cast_function_type};"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-cast-function-type.cpp"]={"clang/test/SemaCXX/warn-cast-function-type.cpp:32:7: warning: cast from \'int (*)(long)\' to \'f2 *\' (aka \'int (*)(void *)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:33:7: warning: cast from \'int (*)(long)\' to \'f2 *\' (aka \'int (*)(void *)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:35:7: warning: cast from \'int (*)(long)\' to \'f4 *\' (aka \'void (*)(...)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:37:7: warning: cast from \'int (*)(long)\' to \'f6 *\' (aka \'int (*)(long, int)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:40:11: warning: cast from \'void (S::*)(int *)\' to \'mf\' (aka \'void (S::*)(int)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:42:11: warning: cast from \'int (long)\' to \'f8\' (aka \'int (&)(long, int)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:46:7: warning: cast from \'int (^)(long)\' to \'f6 *\' (aka \'int (*)(long, int)\') converts to incompatible function type [-Wcast-function-type]"} | ["clang/test/SemaCXX/warn-cast-function-type.cpp"]={"clang/test/SemaCXX/warn-cast-function-type.cpp:32:7: warning: cast from \'int (*)(long)\' to \'f2 *\' (aka \'int (*)(void *)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:33:7: warning: cast from \'int (*)(long)\' to \'f2 *\' (aka \'int (*)(void *)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:35:7: warning: cast from \'int (*)(long)\' to \'f4 *\' (aka \'void (*)(...)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:37:7: warning: cast from \'int (*)(long)\' to \'f6 *\' (aka \'int (*)(long, int)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:40:11: warning: cast from \'void (S::*)(int *)\' to \'mf\' (aka \'void (S::*)(int)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:42:11: warning: cast from \'int (long)\' to \'f8\' (aka \'int (&)(long, int)\') converts to incompatible function type [-Wcast-function-type]","clang/test/SemaCXX/warn-cast-function-type.cpp:46:7: warning: cast from \'int (^)(long)\' to \'f6 *\' (aka \'int (*)(long, int)\') converts to incompatible function type [-Wcast-function-type]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_function_type_strict"]={ | ["warn_cast_function_type_strict"]={ | ||
[ | [m]={"cast-function-type","cast-function-type-strict"}, | ||
[l]="cast-function-type-strict", | |||
[ | |||
[e]="cast %diff{from $ to $ |}0,1converts to incompatible function type", | [e]="cast %diff{from $ to $ |}0,1converts to incompatible function type", | ||
[ | [a]=n, | ||
[b]="cast (?:from (.*?) to (.*?) |)converts to incompatible function type", | [b]="cast (?:from (.*?) to (.*?) |)converts to incompatible function type", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-function\\-type\\-strict[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={T,1625925174,U,S}, | ||
[ | [g]={{db,1098,"static unsigned int checkCastFunctionType(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n const unsigned int DiagList[] = {diag::warn_cast_function_type_strict, diag::warn_cast_function_type};"},{db,1130,"static unsigned int checkCastFunctionType(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n if (DiagID == diag::warn_cast_function_type_strict)"}} | ||
}, | }, | ||
["warn_cast_nonnull_to_bool"]={ | ["warn_cast_nonnull_to_bool"]={ | ||
[ | [m]={"address","bool-conversion","bool-conversions",Eb,Ib,"pointer-bool-conversion"}, | ||
[l]="pointer-bool-conversion", | |||
[ | |||
[e]="nonnull %select{function call|parameter}0 \'%1\' will evaluate to \'true\' on first encounter", | [e]="nonnull %select{function call|parameter}0 \'%1\' will evaluate to \'true\' on first encounter", | ||
[ | [a]=n, | ||
[b]="nonnull (?:function call|parameter) \'(.*?)\' will evaluate to \'true\' on first encounter", | [b]="nonnull (?:function call|parameter) \'(.*?)\' will evaluate to \'true\' on first encounter", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wpointer\\-bool\\-conversion[^\\]]*\\]", | ||
[ | [d]=gc, | ||
[ | [f]={"4c8cb14c1ab0",1414090810,"patch to issue warning on comparing parameters with\nnonnull attribute when comparison is always\ntrue...","patch to issue warning on comparing parameters with\nnonnull attribute when comparison is always\ntrue/false. Patch by Steven Wu with few fixes and minor\nrefactoring and adding tests by me. rdar://18712242\n\nllvm-svn: 220496"}, | ||
[ | [g]={{y,15490,"/// Diagnose pointers that are always non-null.\n/// \\param E the expression containing the pointer\n/// \\param NullKind NPCK_NotNull if E is a cast to bool, otherwise, E is\n/// compared to a null pointer\n/// \\param IsEqual True when the comparison is equal to a null pointer\n/// \\param Range Extra SourceRange to highlight in the diagnostic\nvoid Sema::DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullKind, bool IsEqual, SourceRange Range) {\n // ...\n auto ComplainAboutNonnullParamOrCall = [&](const Attr *NonnullAttr) {\n // ...\n unsigned DiagID = IsCompare ? diag::warn_nonnull_expr_compare : diag::warn_cast_nonnull_to_bool;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:139:8: warning: nonnull parameter \'pointer\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:149:7: warning: nonnull parameter \'p\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:168:7: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:169:8: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:171:20: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:172:16: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]"} | ["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:139:8: warning: nonnull parameter \'pointer\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:149:7: warning: nonnull parameter \'p\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:168:7: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:169:8: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:171:20: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]","clang/test/Sema/nonnull.c:172:16: warning: nonnull function call \'returns_nonnull_whee()\' will evaluate to \'true\' on first encounter [-Wpointer-bool-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_pointer_from_sel"]={ | ["warn_cast_pointer_from_sel"]={ | ||
[ | [m]={O,V,"cast-of-sel-type",eb}, | ||
[l]="cast-of-sel-type", | |||
[ | |||
[e]="cast of type %0 to %1 is deprecated; use sel_getName instead", | [e]="cast of type %0 to %1 is deprecated; use sel_getName instead", | ||
[ | [a]=n, | ||
[b]="cast of type (.*?) to (.*?) is deprecated; use sel_getName instead", | [b]="cast of type (.*?) to (.*?) is deprecated; use sel_getName instead", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-of\\-sel\\-type[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"5ad9659688e8",1345142027,"objective-C: deprecate casts of ObjC\'s SEL\nexpressions except to void, void * and their\nqualified ve...","objective-C: deprecate casts of ObjC\'s SEL\nexpressions except to void, void * and their\nqualified versions. // rdar://12107381\n\nllvm-svn: 162036"}, | ||
[ | [g]={{db,2097,"static void DiagnoseCastOfObjCSEL(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n if (const PointerType *SrcPtrTy = SrcType->getAs<PointerType>())\n if (SrcPtrTy->isObjCSelType()) {\n // ...\n if (!DT.getUnqualifiedType()->isVoidType())\n Self.Diag(SrcExpr.get()->getExprLoc(), diag::warn_cast_pointer_from_sel) << SrcType << DestType << SrcExpr.get()->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/warn-cast-of-sel-expr.m"]={"clang/test/SemaObjC/warn-cast-of-sel-expr.m:10:9: warning: cast of type \'SEL\' to \'char *\' is deprecated; use sel_getName instead [-Wcast-of-sel-type]","clang/test/SemaObjC/warn-cast-of-sel-expr.m:12:15: warning: cast of type \'SEL\' to \'const char *\' is deprecated; use sel_getName instead [-Wcast-of-sel-type]"} | ["clang/test/SemaObjC/warn-cast-of-sel-expr.m"]={"clang/test/SemaObjC/warn-cast-of-sel-expr.m:10:9: warning: cast of type \'SEL\' to \'char *\' is deprecated; use sel_getName instead [-Wcast-of-sel-type]","clang/test/SemaObjC/warn-cast-of-sel-expr.m:12:15: warning: cast of type \'SEL\' to \'const char *\' is deprecated; use sel_getName instead [-Wcast-of-sel-type]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_qual"]={ | ["warn_cast_qual"]={ | ||
[ | [m]={"cast-qual"}, | ||
[l]="cast-qual", | |||
[ | |||
[e]="cast from %0 to %1 drops %select{const and volatile qualifiers|const qualifier|volatile qualifier}2", | [e]="cast from %0 to %1 drops %select{const and volatile qualifiers|const qualifier|volatile qualifier}2", | ||
[ | [a]=n, | ||
[b]="cast from (.*?) to (.*?) drops (?:const and volatile qualifiers|const qualifier|volatile qualifier)", | [b]="cast from (.*?) to (.*?) drops (?:const and volatile qualifiers|const qualifier|volatile qualifier)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-qual[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d5178014938d",1416603790,"Implement -Wcast-qual, fixing #13772.\n\nMany thanks to dblaikie for his advices and suggestions!\n\nllv...","Implement -Wcast-qual, fixing #13772.\n\nMany thanks to dblaikie for his advices and suggestions!\n\nllvm-svn: 222568"}, | ||
[ | [g]={{db,3328,"/// DiagnoseCastQual - Warn whenever casts discards a qualifiers, be it either\n/// const, volatile or both.\nstatic void DiagnoseCastQual(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n // This is a variant of int **x; const int **y = (const int **)x;\n if (qualifiers == -1)\n // ...\n else\n Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual) << TheOffendingSrcType << TheOffendingDestType << qualifiers;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-cast-qual.cpp"]={"clang/test/SemaCXX/warn-cast-qual.cpp:19:21: warning: cast from \'const void *\' to \'void *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:21:21: warning: cast from \'const char *\' to \'char *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:30:20: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:31:26: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:32:20: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:33:28: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:34:34: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:35:26: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:36:40: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:45:20: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:46:29: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:47:20: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:48:28: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:49:37: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:50:29: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:51:46: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:60:20: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:61:35: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:62:20: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:63:28: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:64:43: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:65:35: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:66:58: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:73:22: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:74:31: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:79:43: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:87:22: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:88:31: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:93:43: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:106:9: warning: cast from \'const C\' to \'C &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:107:9: warning: cast from \'const C\' to \'C &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:109:9: warning: cast from \'const C *\' to \'C *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:110:9: warning: cast from \'const C *\' to \'C *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:125:12: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:128:13: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:134:12: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:135:12: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:137:13: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:138:13: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]"} | ["clang/test/SemaCXX/warn-cast-qual.cpp"]={"clang/test/SemaCXX/warn-cast-qual.cpp:19:21: warning: cast from \'const void *\' to \'void *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:21:21: warning: cast from \'const char *\' to \'char *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:30:20: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:31:26: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:32:20: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:33:28: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:34:34: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:35:26: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:36:40: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:45:20: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:46:29: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:47:20: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:48:28: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:49:37: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:50:29: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:51:46: warning: cast from \'volatile int\' to \'int &\' drops volatile qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:60:20: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:61:35: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:62:20: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:63:28: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:64:43: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:65:35: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:66:58: warning: cast from \'const volatile int\' to \'int &\' drops const and volatile qualifiers [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:73:22: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:74:31: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:79:43: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:87:22: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:88:31: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:93:43: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:106:9: warning: cast from \'const C\' to \'C &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:107:9: warning: cast from \'const C\' to \'C &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:109:9: warning: cast from \'const C *\' to \'C *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:110:9: warning: cast from \'const C *\' to \'C *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:125:12: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:128:13: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:134:12: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:135:12: warning: cast from \'const int\' to \'int &\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:137:13: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:138:13: warning: cast from \'const int *\' to \'int *\' drops const qualifier [-Wcast-qual]"} | ||
} | } | ||
}, | }, | ||
["warn_cast_qual2"]={ | ["warn_cast_qual2"]={ | ||
[ | [m]={"cast-qual"}, | ||
[l]="cast-qual", | |||
[ | |||
[e]="cast from %0 to %1 must have all intermediate pointers const qualified to be safe", | [e]="cast from %0 to %1 must have all intermediate pointers const qualified to be safe", | ||
[ | [a]=n, | ||
[b]="cast from (.*?) to (.*?) must have all intermediate pointers const qualified to be safe", | [b]="cast from (.*?) to (.*?) must have all intermediate pointers const qualified to be safe", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcast\\-qual[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d5178014938d",1416603790,"Implement -Wcast-qual, fixing #13772.\n\nMany thanks to dblaikie for his advices and suggestions!\n\nllv...","Implement -Wcast-qual, fixing #13772.\n\nMany thanks to dblaikie for his advices and suggestions!\n\nllvm-svn: 222568"}, | ||
[ | [g]={{db,3325,"/// DiagnoseCastQual - Warn whenever casts discards a qualifiers, be it either\n/// const, volatile or both.\nstatic void DiagnoseCastQual(Sema &Self, const ExprResult &SrcExpr, QualType DestType) {\n // ...\n // This is a variant of int **x; const int **y = (const int **)x;\n if (qualifiers == -1)\n Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual2) << SrcType << DestType;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-cast-qual.cpp"]={"clang/test/SemaCXX/warn-cast-qual.cpp:79:34: warning: cast from \'int **\' to \'const int **\' must have all intermediate pointers const qualified to be safe [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:93:34: warning: cast from \'int *\' to \'const int *&\' must have all intermediate pointers const qualified to be safe [-Wcast-qual]"} | ["clang/test/SemaCXX/warn-cast-qual.cpp"]={"clang/test/SemaCXX/warn-cast-qual.cpp:79:34: warning: cast from \'int **\' to \'const int **\' must have all intermediate pointers const qualified to be safe [-Wcast-qual]","clang/test/SemaCXX/warn-cast-qual.cpp:93:34: warning: cast from \'int *\' to \'const int *&\' must have all intermediate pointers const qualified to be safe [-Wcast-qual]"} | ||
} | } | ||
}, | }, | ||
["warn_category_method_impl_match"]={ | ["warn_category_method_impl_match"]={ | ||
[ | [m]={"objc-protocol-method-implementation"}, | ||
[l]="objc-protocol-method-implementation", | |||
[ | |||
[e]="category is implementing a method which will also be implemented by its primary class", | [e]="category is implementing a method which will also be implemented by its primary class", | ||
[ | [a]=n, | ||
[b]="category is implementing a method which will also be implemented by its primary class", | [b]="category is implementing a method which will also be implemented by its primary class", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-protocol\\-method\\-implementation[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"9f8b19e9aea9",1311895190,"objective-c: warn if implementation of a method in category\nmasks an existing method in its primary ...","objective-c: warn if implementation of a method in category\nmasks an existing method in its primary class, class extensions,\nand primary class\'s non-optional protocol methods; as primary\nclass, or one of its subclass\'s will implement this method.\nThis warning has potential of being noisy so it has its own\ngroup. // rdar://7020493\n\nllvm-svn: 136426"}, | ||
[ | [g]={{u,2665,"/// WarnExactTypedMethods - This routine issues a warning if method\n/// implementation declaration matches exactly that of its declaration.\nvoid Sema::WarnExactTypedMethods(ObjCMethodDecl *ImpMethodDecl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl) {\n // ...\n if (match) {\n Diag(ImpMethodDecl->getLocation(), diag::warn_category_method_impl_match);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/protocol-implementing-class-methods.m"]={"clang/test/SemaObjC/protocol-implementing-class-methods.m:24:1: warning: category is implementing a method which will also be implemented by its primary class [-Wobjc-protocol-method-implementation]","clang/test/SemaObjC/protocol-implementing-class-methods.m:27:1: warning: category is implementing a method which will also be implemented by its primary class [-Wobjc-protocol-method-implementation]","clang/test/SemaObjC/protocol-implementing-class-methods.m:26:1: warning: category is implementing a method which will also be implemented by its primary class [-Wobjc-protocol-method-implementation]"} | ["clang/test/SemaObjC/protocol-implementing-class-methods.m"]={"clang/test/SemaObjC/protocol-implementing-class-methods.m:24:1: warning: category is implementing a method which will also be implemented by its primary class [-Wobjc-protocol-method-implementation]","clang/test/SemaObjC/protocol-implementing-class-methods.m:27:1: warning: category is implementing a method which will also be implemented by its primary class [-Wobjc-protocol-method-implementation]","clang/test/SemaObjC/protocol-implementing-class-methods.m:26:1: warning: category is implementing a method which will also be implemented by its primary class [-Wobjc-protocol-method-implementation]"} | ||
} | } | ||
}, | }, | ||
["warn_cconv_knr"]={ | ["warn_cconv_knr"]={ | ||
[ | [m]={"missing-prototype-for-cc"}, | ||
[l]="missing-prototype-for-cc", | |||
[ | |||
[e]="function with no prototype cannot use the %0 calling convention", | [e]="function with no prototype cannot use the %0 calling convention", | ||
[ | [a]=n, | ||
[b]="function with no prototype cannot use the (.*?) calling convention", | [b]="function with no prototype cannot use the (.*?) calling convention", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmissing\\-prototype\\-for\\-cc[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d191063c6c50",1411168032,"Follow-up to r214408: Warn on other callee-cleanup functions without prototype too.\n\nAccording to lo...","Follow-up to r214408: Warn on other callee-cleanup functions without prototype too.\n\nAccording to lore, we used to verifier-fail on:\n\n void __thiscall f();\n int main() { f(1); }\n\nSo that\'s fixed now. System headers use prototype-less __stdcall functions,\nso make that a warning that\'s DefaultError -- then it fires on regular code\nbut is suppressed in system headers.\n\nSince it\'s used in system headers, we have codegen tests for this; massage\nthem slightly so that they still compile.\n\nllvm-svn: 218166"}, | ||
[ | [g]={{p,10321,"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 (isa<FunctionNoProtoType>(FT) && !D.isFunctionDefinition()) {\n // ...\n if (!supportsVariadicCall(CC)) {\n // ...\n int DiagID = CC == CC_X86StdCall ? diag::warn_cconv_knr : diag::err_cconv_knr;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/decl-microsoft-call-conv.c"]={"clang/test/Sema/decl-microsoft-call-conv.c:23:16: warning: function with no prototype cannot use the stdcall calling convention [-Wmissing-prototype-for-cc]"} | ["clang/test/Sema/decl-microsoft-call-conv.c"]={"clang/test/Sema/decl-microsoft-call-conv.c:23:16: warning: function with no prototype cannot use the stdcall calling convention [-Wmissing-prototype-for-cc]"} | ||
} | } | ||
}, | }, | ||
["warn_cconv_unsupported"]={ | ["warn_cconv_unsupported"]={ | ||
[ | [m]={E,t}, | ||
[l]=t, | |||
[ | |||
[e]="%0 calling convention is not supported %select{for this target|on variadic function|on constructor/destructor|on builtin function}1", | [e]="%0 calling convention is not supported %select{for this target|on variadic function|on constructor/destructor|on builtin function}1", | ||
[ | [a]=n, | ||
[b]="(.*?) calling convention is not supported (?:for this target|on variadic function|on constructor\\/destructor|on builtin function)", | [b]="(.*?) calling convention is not supported (?:for this target|on variadic function|on constructor\\/destructor|on builtin function)", | ||
[ | [c]=C, | ||
[ | [d]=i, | ||
[ | [f]={"85d667fcb6f3",1563396086,"Renamed and changed the wording of warn_cconv_ignored\n\nAs discussed in D64780 the wording of this wa...","Renamed and changed the wording of warn_cconv_ignored\n\nAs discussed in D64780 the wording of this warning message is being\nchanged to say \'is not supported\' instead of \'ignored\', and the\ndiag ID itself is being changed to warn_cconv_not_supported.\n\nllvm-svn: 366368"}, | ||
[ | [g]={{p,3801,"/// 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 (OldTypeInfo.getCC() != NewTypeInfo.getCC()) {\n // ...\n if (!NewCCExplicit) {\n // ...\n } else if (Old->getBuiltinID()) {\n // ...\n Diag(New->getLocation(), diag::warn_cconv_unsupported) << FunctionType::getNameForCallConv(NewTypeInfo.getCC()) << (int)CallingConventionIgnoredReason::BuiltinFunction;"},{o,5453,"bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, const FunctionDecl *FD) {\n // ...\n case TargetInfo::CCCR_Warning: {\n Diag(Attrs.getLoc(), diag::warn_cconv_unsupported) << Attrs << (int)CallingConventionIgnoredReason::ForThisTarget;"},{W,7994,"/// Process an individual function attribute. Returns true to\n/// indicate that the attribute was handled, false if it wasn\'t.\nstatic bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n // Diagnose use of variadic functions with calling conventions that\n // don\'t support them (e.g. because they\'re callee-cleanup).\n // We delay warning about this on unprototyped function declarations\n // until after redeclaration checking, just in case we pick up a\n // prototype that way. And apparently we also \"delay\" warning about\n // unprototyped function types in general, despite not necessarily having\n // much ability to diagnose it later.\n if (!supportsVariadicCall(CC)) {\n // ...\n if (FnP && FnP->isVariadic()) {\n // stdcall and fastcall are ignored with a warning for GCC and MS\n // compatibility.\n if (CC == CC_X86StdCall || CC == CC_X86FastCall)\n return S.Diag(attr.getLoc(), diag::warn_cconv_unsupported) << FunctionType::getNameForCallConv(CC) << (int)Sema::CallingConventionIgnoredReason::VariadicFunction;"},{W,8060,"void Sema::adjustMemberFunctionCC(QualType &T, bool IsStatic, bool IsCtorOrDtor, SourceLocation Loc) {\n // ...\n // MS compiler ignores explicit calling convention attributes on structors. We\n // should do the same.\n if (Context.getTargetInfo().getCXXABI().isMicrosoft() && IsCtorOrDtor) {\n // Issue a warning on ignored calling convention -- except of __stdcall.\n // Again, this is what MS compiler does.\n if (CurCC != CC_X86StdCall)\n Diag(Loc, diag::warn_cconv_unsupported) << FunctionType::getNameForCallConv(CurCC) << (int)Sema::CallingConventionIgnoredReason::ConstructorDestructor;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/stdcall-fastcall-x64.c"]={"clang/test/Sema/stdcall-fastcall-x64.c:8:21: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:8:30: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:9:21: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:10:21: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:13:51: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:14:51: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:14:61: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:15:51: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:16:51: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:17:51: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:17:60: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:18:58: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:19:58: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:20:63: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]"} | ["clang/test/Sema/stdcall-fastcall-x64.c"]={"clang/test/Sema/stdcall-fastcall-x64.c:8:21: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:8:30: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:9:21: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:10:21: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:13:51: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:14:51: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:14:61: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:15:51: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:16:51: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:17:51: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:17:60: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:18:58: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:19:58: warning: \'stdcall\' calling convention is not supported for this target [-Wignored-attributes]","clang/test/Sema/stdcall-fastcall-x64.c:20:63: warning: \'fastcall\' calling convention is not supported for this target [-Wignored-attributes]"} | ||
} | } | ||
}, | }, | ||
["warn_cdtor_function_try_handler_mem_expr"]={ | ["warn_cdtor_function_try_handler_mem_expr"]={ | ||
[ | [m]={"exceptions"}, | ||
[l]="exceptions", | |||
[ | |||
[e]="cannot refer to a non-static member from the handler of a %select{constructor|destructor}0 function try block", | [e]="cannot refer to a non-static member from the handler of a %select{constructor|destructor}0 function try block", | ||
[ | [a]=n, | ||
[b]="cannot refer to a non\\-static member from the handler of a (?:constructor|destructor) function try block", | [b]="cannot refer to a non\\-static member from the handler of a (?:constructor|destructor) function try block", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wexceptions[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"6924dcdf6f73",1441118964,"Add a new frontend warning for referencing members from the handler of a constructor or destructor f...","Add a new frontend warning for referencing members from the handler of a constructor or destructor function-try-block, which is UB in C++.\n\nThis corresponds to the CERT secure coding rule ERR53-CPP.\n\nllvm-svn: 246548"}, | ||
[ | [g]={{"clang/lib/Sema/SemaExprMember.cpp",995,"ExprResult Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, SourceLocation OpLoc, bool IsArrow, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, bool SuppressQualifierCheck, ActOnMemberAccessExtraArgs *ExtraArgs) {\n // ...\n if (S && BaseExpr && FD && (isa<CXXDestructorDecl>(FD) || isa<CXXConstructorDecl>(FD)) && isa<CXXThisExpr>(BaseExpr->IgnoreImpCasts()) && IsInFnTryBlockHandler(S))\n Diag(MemberLoc, diag::warn_cdtor_function_try_handler_mem_expr) << isa<CXXDestructorDecl>(FD);"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cdtor-fn-try-block.cpp"]={"clang/test/SemaCXX/cdtor-fn-try-block.cpp:10:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:11:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:27:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:28:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:52:5: warning: cannot refer to a non-static member from the handler of a destructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:53:5: warning: cannot refer to a non-static member from the handler of a destructor function try block [-Wexceptions]"} | ["clang/test/SemaCXX/cdtor-fn-try-block.cpp"]={"clang/test/SemaCXX/cdtor-fn-try-block.cpp:10:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:11:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:27:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:28:5: warning: cannot refer to a non-static member from the handler of a constructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:52:5: warning: cannot refer to a non-static member from the handler of a destructor function try block [-Wexceptions]","clang/test/SemaCXX/cdtor-fn-try-block.cpp:53:5: warning: cannot refer to a non-static member from the handler of a destructor function try block [-Wexceptions]"} | ||
} | } | ||
}, | }, | ||
["warn_cfstring_truncated"]={ | ["warn_cfstring_truncated"]={ | ||
[ | [m]={"CFString-literal"}, | ||
[l]="CFString-literal", | |||
[ | |||
[e]="input conversion stopped due to an input byte that does not belong to the input codeset UTF-8", | [e]="input conversion stopped due to an input byte that does not belong to the input codeset UTF-8", | ||
[ | [a]=n, | ||
[b]="input conversion stopped due to an input byte that does not belong to the input codeset UTF\\-8", | [b]="input conversion stopped due to an input byte that does not belong to the input codeset UTF\\-8", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-WCFString\\-literal[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"56603ef7b279",1283888293,"Have Sema check for validity of CGString literal\ninstead of asserting in IRGen. Fixes radar 8390459....","Have Sema check for validity of CGString literal\ninstead of asserting in IRGen. Fixes radar 8390459.\n\nllvm-svn: 113253"}, | ||
[ | [g]={{y,7995,"/// CheckObjCString - Checks that the argument to the builtin\n/// CFString constructor is correct\n/// Note: It might also make sense to do the UTF-16 conversion here (would\n/// simplify the backend).\nbool Sema::CheckObjCString(Expr *Arg) {\n // ...\n if (Literal->containsNonAsciiOrNull()) {\n // ...\n // Check for conversion failure.\n if (Result != llvm::conversionOK)\n Diag(Arg->getBeginLoc(), diag::warn_cfstring_truncated) << Arg->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenObjC/illegal-UTF8.m"]={"clang/test/CodeGenObjC/illegal-UTF8.m:6:16: warning: input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 [-WCFString-literal]"} | ["clang/test/CodeGenObjC/illegal-UTF8.m"]={"clang/test/CodeGenObjC/illegal-UTF8.m:6:16: warning: input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 [-WCFString-literal]"} | ||
} | } | ||
}, | }, | ||
["warn_char_constant_too_large"]={ | ["warn_char_constant_too_large"]={ | ||
[e]="character constant too long for its type", | [e]="character constant too long for its type", | ||
[ | [a]=n, | ||
[b]="character constant too long for its type", | [b]="character constant too long for its type", | ||
[ | [c]=lb, | ||
[ | [d]=z, | ||
[ | [f]={H,1236199783,G,F}, | ||
[ | [g]={{Rc,1827,"/// \\verbatim\n/// user-defined-character-literal: [C++11 lex.ext]\n/// character-literal ud-suffix\n/// ud-suffix:\n/// identifier\n/// character-literal: [C++11 lex.ccon]\n/// \' c-char-sequence \'\n/// u\' c-char-sequence \'\n/// U\' c-char-sequence \'\n/// L\' c-char-sequence \'\n/// u8\' c-char-sequence \' [C++1z lex.ccon]\n/// c-char-sequence:\n/// c-char\n/// c-char-sequence c-char\n/// c-char:\n/// any member of the source character set except the single-quote \',\n/// backslash \\, or new-line character\n/// escape-sequence\n/// universal-character-name\n/// escape-sequence:\n/// simple-escape-sequence\n/// octal-escape-sequence\n/// hexadecimal-escape-sequence\n/// simple-escape-sequence:\n/// one of \\\' \\\" \\? \\\\ \\a \\b \\f \\n \\r \\t \\v\n/// octal-escape-sequence:\n/// \\ octal-digit\n/// \\ octal-digit octal-digit\n/// \\ octal-digit octal-digit octal-digit\n/// hexadecimal-escape-sequence:\n/// \\x hexadecimal-digit\n/// hexadecimal-escape-sequence hexadecimal-digit\n/// universal-character-name: [C++11 lex.charset]\n/// \\u hex-quad\n/// \\U hex-quad hex-quad\n/// hex-quad:\n/// hex-digit hex-digit hex-digit hex-digit\n/// \\endverbatim\n///\nCharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) {\n // ...\n if (!HadError && multi_char_too_long) {\n PP.Diag(Loc, diag::warn_char_constant_too_large);"}}, | ||
[ | [h]={ | ||
["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:32:5: warning: character constant too long for its type"} | ["clang/test/Preprocessor/if_warning.c"]={"clang/test/Preprocessor/if_warning.c:32:5: warning: character constant too long for its type"} | ||
} | } | ||
}, | }, | ||
["warn_class_method_not_found"]={ | ["warn_class_method_not_found"]={ | ||
[ | [m]={"objc-method-access"}, | ||
[l]="objc-method-access", | |||
[ | |||
[e]="class method %objcclass0 not found (return type defaults to \'id\')", | [e]="class method %objcclass0 not found (return type defaults to \'id\')", | ||
[ | [a]=n, | ||
[b]="class method (.*?) not found \\(return type defaults to \'id\'\\)", | [b]="class method (.*?) not found \\(return type defaults to \'id\'\\)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-method\\-access[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{fb,1745,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n // ...\n if (!Method) {\n // ...\n if (getLangOpts().ObjCAutoRefCount)\n // ...\n else\n DiagID = isClassMessage ? diag::warn_class_method_not_found : diag::warn_inst_method_not_found;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/method-lookup.m"]={"clang/test/SemaObjC/method-lookup.m:25:54: warning: class method \'+completionItems\' not found (return type defaults to \'id\') [-Wobjc-method-access]"} | ["clang/test/SemaObjC/method-lookup.m"]={"clang/test/SemaObjC/method-lookup.m:25:54: warning: class method \'+completionItems\' not found (return type defaults to \'id\') [-Wobjc-method-access]"} | ||
} | } | ||
}, | }, | ||
["warn_class_method_not_found_with_typo"]={ | ["warn_class_method_not_found_with_typo"]={ | ||
[ | [m]={"objc-method-access"}, | ||
[l]="objc-method-access", | |||
[ | |||
[e]="class method %objcclass0 not found (return type defaults to \'id\'); did you mean %objcclass2?", | [e]="class method %objcclass0 not found (return type defaults to \'id\'); did you mean %objcclass2?", | ||
[ | [a]=n, | ||
[b]="class method (.*?) not found \\(return type defaults to \'id\'\\); did you mean (.*?)\\?", | [b]="class method (.*?) not found \\(return type defaults to \'id\'\\); did you mean (.*?)\\?", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-method\\-access[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"4cc5552b9b94",1371569496,"Objective-C [qoi]: privide typo correction for selectors\nin addition of receiver having static type,...","Objective-C [qoi]: privide typo correction for selectors\nin addition of receiver having static type, but also when\nreceiver has dynamic type (of \'id\' variety) as well as when\nreceiver is of \'Class\' type vareity. // rdar://7853549\n\nllvm-svn: 184195"}, | ||
[ | [g]={{fb,1753,"bool Sema::CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK) {\n // ...\n if (!Method) {\n // ...\n if (!getLangOpts().DebuggerSupport) {\n // ...\n if (OMD && !OMD->isInvalidDecl()) {\n if (getLangOpts().ObjCAutoRefCount)\n // ...\n else\n DiagID = isClassMessage ? diag::warn_class_method_not_found_with_typo : diag::warn_instance_method_not_found_with_typo;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/call-super-2.m"]={"clang/test/SemaObjC/call-super-2.m:38:26: warning: class method \'+class_func0\' not found (return type defaults to \'id\'); did you mean \'+class_func5\'? [-Wobjc-method-access]"} | ["clang/test/SemaObjC/call-super-2.m"]={"clang/test/SemaObjC/call-super-2.m:38:26: warning: class method \'+class_func0\' not found (return type defaults to \'id\'); did you mean \'+class_func5\'? [-Wobjc-method-access]"} | ||
} | } | ||
}, | }, | ||
["warn_clause_expected_string"]={ | ["warn_clause_expected_string"]={ | ||
[ | [m]={"ignored-pragmas","pragmas"}, | ||
[l]="ignored-pragmas", | |||
[ | |||
[e]="expected string literal in \'clause %0\' - ignoring", | [e]="expected string literal in \'clause %0\' - ignoring", | ||
[ | [a]=n, | ||
[b]="expected string literal in \'clause (.*?)\' \\- ignoring", | [b]="expected string literal in \'clause (.*?)\' \\- ignoring", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wignored\\-pragmas[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"9d90cf2fca44",1668751380,"[OPENMP5.1] Initial support for message clause.","[OPENMP5.1] Initial support for message clause."}, | ||
[ | [g]={{q,16939,"OMPClause *Sema::ActOnOpenMPMessageClause(Expr *ME, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) {\n // ...\n if (!isa<StringLiteral>(ME)) {\n Diag(ME->getBeginLoc(), diag::warn_clause_expected_string) << getOpenMPClauseName(OMPC_message);"}}, | ||
[ | [h]={ | ||
["clang/test/OpenMP/error_message.cpp"]={"clang/test/OpenMP/error_message.cpp:114:27: warning: expected string literal in \'clause message\' - ignoring [-Wignored-pragmas]"} | ["clang/test/OpenMP/error_message.cpp"]={"clang/test/OpenMP/error_message.cpp:114:27: warning: expected string literal in \'clause message\' - ignoring [-Wignored-pragmas]"} | ||
} | } | ||
}, | }, | ||
["warn_cleanup_ext"]={ | ["warn_cleanup_ext"]={ | ||
[ | [m]={fc}, | ||
[l]=fc, | |||
[ | |||
[e]="GCC does not allow the \'cleanup\' attribute argument to be anything other than a simple identifier", | [e]="GCC does not allow the \'cleanup\' attribute argument to be anything other than a simple identifier", | ||
[ | [a]=n, | ||
[b]="GCC does not allow the \'cleanup\' attribute argument to be anything other than a simple identifier", | [b]="GCC does not allow the \'cleanup\' attribute argument to be anything other than a simple identifier", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wgcc\\-compat[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"c12aaff2cbe5",1378863461,"The cleanup attribute no longer uses an unresolved, simple identifier as its argument. Instead, it ...","The cleanup attribute no longer uses an unresolved, simple identifier as its argument. Instead, it takes an expression that is fully resolved.\n\nllvm-svn: 190476"}, | ||
[ | [g]={{o,3706,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // gcc only allows for simple identifiers. Since we support more than gcc, we\n // will warn the user.\n if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {\n if (DRE->hasQualifier())\n S.Diag(Loc, diag::warn_cleanup_ext);"},{o,3716,"static void handleCleanupAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // gcc only allows for simple identifiers. Since we support more than gcc, we\n // will warn the user.\n if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {\n // ...\n } else if (auto *ULE = dyn_cast<UnresolvedLookupExpr>(E)) {\n if (ULE->hasExplicitTemplateArgs())\n S.Diag(Loc, diag::warn_cleanup_ext);"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenCXX/attr-cleanup.cpp"]={"clang/test/CodeGenCXX/attr-cleanup.cpp:9:35: warning: GCC does not allow the \'cleanup\' attribute argument to be anything other than a simple identifier [-Wgcc-compat]"} | ["clang/test/CodeGenCXX/attr-cleanup.cpp"]={"clang/test/CodeGenCXX/attr-cleanup.cpp:9:35: warning: GCC does not allow the \'cleanup\' attribute argument to be anything other than a simple identifier [-Wgcc-compat]"} | ||
} | } | ||
}, | }, | ||
["warn_cmse_nonsecure_union"]={ | ["warn_cmse_nonsecure_union"]={ | ||
[ | [m]={"cmse-union-leak"}, | ||
[l]="cmse-union-leak", | |||
[ | |||
[e]="passing union across security boundary via %select{parameter %1|return value}0 may leak information", | [e]="passing union across security boundary via %select{parameter %1|return value}0 may leak information", | ||
[ | [a]=n, | ||
[b]="passing union across security boundary via (?:parameter (.*?)|return value) may leak information", | [b]="passing union across security boundary via (?:parameter (.*?)|return value) may leak information", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcmse\\-union\\-leak[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={ub,1576908663,tb,rb}, | ||
[ | [g]={{v,7655,"/// 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 // Warn for unions passing across security boundary (CMSE).\n if (FuncT != nullptr && FuncT->getCmseNSCallAttr()) {\n for (unsigned i = 0, e = Args.size(); i != e; i++) {\n if (const auto *RT = dyn_cast<RecordType>(Args[i]->getType().getCanonicalType())) {\n if (RT->getDecl()->isOrContainsUnion())\n Diag(Args[i]->getBeginLoc(), diag::warn_cmse_nonsecure_union) << 0 << i;"},{J,3970,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (const FunctionDecl *FD = getCurFunctionDecl()) {\n // ...\n if (FD->hasAttr<CmseNSEntryAttr>() && RetValExp) {\n if (const auto *RT = dyn_cast<RecordType>(FnRetType.getCanonicalType())) {\n if (RT->getDecl()->isOrContainsUnion())\n Diag(RetValExp->getBeginLoc(), diag::warn_cmse_nonsecure_union) << 1;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/arm-cmse.c"]={"clang/test/Sema/arm-cmse.c:35:10: warning: passing union across security boundary via return value may leak information [-Wcmse-union-leak]","clang/test/Sema/arm-cmse.c:51:7: warning: passing union across security boundary via parameter 1 may leak information [-Wcmse-union-leak]","clang/test/Sema/arm-cmse.c:54:8: warning: passing union across security boundary via parameter 0 may leak information [-Wcmse-union-leak]","clang/test/Sema/arm-cmse.c:56:8: warning: passing union across security boundary via parameter 2 may leak information [-Wcmse-union-leak]"} | ["clang/test/Sema/arm-cmse.c"]={"clang/test/Sema/arm-cmse.c:35:10: warning: passing union across security boundary via return value may leak information [-Wcmse-union-leak]","clang/test/Sema/arm-cmse.c:51:7: warning: passing union across security boundary via parameter 1 may leak information [-Wcmse-union-leak]","clang/test/Sema/arm-cmse.c:54:8: warning: passing union across security boundary via parameter 0 may leak information [-Wcmse-union-leak]","clang/test/Sema/arm-cmse.c:56:8: warning: passing union across security boundary via parameter 2 may leak information [-Wcmse-union-leak]"} | ||
} | } | ||
}, | }, | ||
["warn_cocoa_naming_owned_rule"]={ | ["warn_cocoa_naming_owned_rule"]={ | ||
[ | [m]={"objc-property-matches-cocoa-ownership-rule"}, | ||
[l]="objc-property-matches-cocoa-ownership-rule", | |||
[ | |||
[e]="property follows Cocoa naming convention for returning \'owned\' objects", | [e]="property follows Cocoa naming convention for returning \'owned\' objects", | ||
[ | [a]=n, | ||
[b]="property follows Cocoa naming convention for returning \'owned\' objects", | [b]="property follows Cocoa naming convention for returning \'owned\' objects", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-property\\-matches\\-cocoa\\-ownership\\-rule[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"65b13779118c",1389315228,"ObjectiveC. 1) Warn when @dynamic (as well as synthesize) \nproperty has the naming convention that i...","ObjectiveC. 1) Warn when @dynamic (as well as synthesize) \nproperty has the naming convention that implies \'ownership\'.\n2) improve on diagnostic and make it property specific.\n3) fix the line number in the case of default property\nsynthesis. // rdar://15757510\n\nllvm-svn: 198905"}, | ||
[ | [g]={{x,2277,"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 if (getLangOpts().ObjCAutoRefCount)\n // ...\n else\n Diag(PD->getLocation(), diag::warn_cocoa_naming_owned_rule);"}} | ||
}, | }, | ||
["warn_collection_expr_type"]={ | ["warn_collection_expr_type"]={ | ||
[e]="collection expression type %0 may not respond to %1", | [e]="collection expression type %0 may not respond to %1", | ||
[ | [a]=n, | ||
[b]="collection expression type (.*?) may not respond to (.*?)", | [b]="collection expression type (.*?) may not respond to (.*?)", | ||
[ | [c]=lb, | ||
[ | [d]=i, | ||
[ | [f]={"68e69ca9f9e0",1281651942,"Patch to issue warning when colllection expresion\'s type\ndoes not implement \'countByEnumeratingWithS...","Patch to issue warning when colllection expresion\'s type\ndoes not implement \'countByEnumeratingWithState\' API.\nImplements radar 7634669.\n\nllvm-svn: 110964"}, | ||
[ | [g]={{J,2271,"ExprResult Sema::CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection) {\n // ...\n // If we have a forward-declared type, we can\'t do this check.\n // Under ARC, it is an error not to have a forward-declared class.\n if (iface && (getLangOpts().ObjCAutoRefCount ? RequireCompleteType(forLoc, QualType(objectType, 0), diag::err_arc_collection_forward, collection) : !isCompleteType(forLoc, QualType(objectType, 0)))) {\n // ...\n } else if (iface || !objectType->qual_empty()) {\n // ...\n // If we didn\'t find it anywhere, give up.\n if (!method) {\n Diag(forLoc, diag::warn_collection_expr_type) << collection->getType() << selector << collection->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/AST/foreachtemplatized.mm"]={"clang/test/AST/foreachtemplatized.mm:10:3: warning: collection expression type \'I *\' may not respond to \'countByEnumeratingWithState:objects:count:\'","clang/test/AST/foreachtemplatized.mm:10:3: warning: collection expression type \'I *\' may not respond to \'countByEnumeratingWithState:objects:count:\'"} | ["clang/test/AST/foreachtemplatized.mm"]={"clang/test/AST/foreachtemplatized.mm:10:3: warning: collection expression type \'I *\' may not respond to \'countByEnumeratingWithState:objects:count:\'","clang/test/AST/foreachtemplatized.mm:10:3: warning: collection expression type \'I *\' may not respond to \'countByEnumeratingWithState:objects:count:\'"} | ||
} | } | ||
}, | }, | ||
["warn_comma_operator"]={ | ["warn_comma_operator"]={ | ||
[ | [m]={"comma"}, | ||
[l]="comma", | |||
[ | |||
[e]="possible misuse of comma operator here", | [e]="possible misuse of comma operator here", | ||
[ | [a]=n, | ||
[b]="possible misuse of comma operator here", | [b]="possible misuse of comma operator here", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcomma[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"faca2d83b13e",1455839920,"Add -Wcomma warning to Clang.\n\n-Wcomma will detect and warn on most uses of the builtin comma operat...","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"}, | ||
[ | [g]={{v,14632,"// 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(Loc, diag::warn_comma_operator);"},{v,14698,"// C99 6.5.17\nstatic QualType CheckCommaOperands(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc) {\n // ...\n if (!S.getDiagnostics().isIgnored(diag::warn_comma_operator, Loc))"},{J,898,"StmtResult Sema::ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *thenStmt, SourceLocation ElseLoc, Stmt *elseStmt) {\n // ...\n if (CondExpr && (getLangOpts().C99 || getLangOpts().CPlusPlus) && !Diags.isIgnored(diag::warn_comma_operator, CondExpr->getExprLoc()))"},{J,1697,"StmtResult Sema::ActOnWhileStmt(SourceLocation WhileLoc, SourceLocation LParenLoc, ConditionResult Cond, SourceLocation RParenLoc, Stmt *Body) {\n // ...\n if (CondVal.second && !Diags.isIgnored(diag::warn_comma_operator, CondVal.second->getExprLoc()))"},{J,1726,"StmtResult Sema::ActOnDoStmt(SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen) {\n // ...\n if (Cond && !getLangOpts().C99 && !getLangOpts().CPlusPlus && !Diags.isIgnored(diag::warn_comma_operator, Cond->getExprLoc()))"},{J,2177,"StmtResult Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, ConditionResult Second, FullExprArg third, SourceLocation RParenLoc, Stmt *Body) {\n // ...\n if (Second.get().second && !Diags.isIgnored(diag::warn_comma_operator, Second.get().second->getExprLoc()))"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/warn-comma-operator.cpp"]={"clang/test/SemaCXX/warn-comma-operator.cpp:46:20: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:57:23: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:69:28: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:75:30: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:84:6: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:93:21: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:99:25: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:105:23: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:111:23: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:117:20: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:123:30: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:132:16: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:132:31: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:132:46: warning: possible misuse of comma operator here [-Wcomma]"} | ["clang/test/SemaCXX/warn-comma-operator.cpp"]={"clang/test/SemaCXX/warn-comma-operator.cpp:46:20: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:57:23: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:69:28: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:75:30: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:84:6: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:93:21: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:99:25: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:105:23: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:111:23: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:117:20: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:123:30: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:132:16: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:132:31: warning: possible misuse of comma operator here [-Wcomma]","clang/test/SemaCXX/warn-comma-operator.cpp:132:46: warning: possible misuse of comma operator here [-Wcomma]"} | ||
} | } | ||
}, | }, | ||
["warn_comparison_always"]={ | ["warn_comparison_always"]={ | ||
[ | [m]={O,V,eb,bc}, | ||
[l]=bc, | |||
[ | |||
[e]="%select{self-|array }0comparison always evaluates to %select{a constant|true|false|\'std::strong_ordering::equal\'}1", | [e]="%select{self-|array }0comparison always evaluates to %select{a constant|true|false|\'std::strong_ordering::equal\'}1", | ||
[ | [a]=n, | ||
[b]="(?:self\\-|array )comparison always evaluates to (?:a constant|true|false|\'std\\:\\:strong_ordering\\:\\:equal\')", | [b]="(?:self\\-|array )comparison always evaluates to (?:a constant|true|false|\'std\\:\\:strong_ordering\\:\\:equal\')", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-compare[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"ec170db73d50",1276026634,"Warn about comparisons between arrays and improve self-comparison\nwarnings, from Troy Straszheim! Fi...","Warn about comparisons between arrays and improve self-comparison\nwarnings, from Troy Straszheim! Fixes PR6163.\n\nllvm-svn: 105631"}, | ||
[ | [g]={{v,12673,"/// Diagnose some forms of syntactically-obvious tautological comparison.\nstatic void diagnoseTautologicalComparison(Sema &S, SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opc) {\n // ...\n if (!LHS->getBeginLoc().isMacroID() && !RHS->getBeginLoc().isMacroID()) {\n if (Expr::isSameComparisonOperand(LHS, RHS)) {\n // ...\n S.DiagRuntimeBehavior(Loc, nullptr,\n S.PDiag(diag::warn_comparison_always) << 0 /*self-comparison*/"},{v,12703,"/// Diagnose some forms of syntactically-obvious tautological comparison.\nstatic void diagnoseTautologicalComparison(Sema &S, SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opc) {\n // ...\n if (!LHS->getBeginLoc().isMacroID() && !RHS->getBeginLoc().isMacroID()) {\n if (Expr::isSameComparisonOperand(LHS, RHS)) {\n // ...\n } else if (checkForArray(LHSStripped) && checkForArray(RHSStripped)) {\n // ...\n S.DiagRuntimeBehavior(Loc, nullptr,\n S.PDiag(diag::warn_comparison_always) << 1 /*array comparison*/"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/self-comparison.m"]={"clang/test/SemaObjC/self-comparison.m:10:14: warning: self-comparison always evaluates to true [-Wtautological-compare]"} | ["clang/test/SemaObjC/self-comparison.m"]={"clang/test/SemaObjC/self-comparison.m:10:14: warning: self-comparison always evaluates to true [-Wtautological-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_comparison_bitwise_always"]={ | ["warn_comparison_bitwise_always"]={ | ||
[ | [m]={O,V,eb,"tautological-bitwise-compare",bc}, | ||
[l]="tautological-bitwise-compare", | |||
[ | |||
[e]="bitwise comparison always evaluates to %select{false|true}0", | [e]="bitwise comparison always evaluates to %select{false|true}0", | ||
[ | [a]=n, | ||
[b]="bitwise comparison always evaluates to (?:false|true)", | [b]="bitwise comparison always evaluates to (?:false|true)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-bitwise\\-compare[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"7afd71e4ff5d",1400607071,"Add a check for tautological bitwise comparisons to -Wtautological-compare.\n\nThis catches issues lik...","Add a check for tautological bitwise comparisons to -Wtautological-compare.\n\nThis catches issues like:\n\nif ((x & 8) == 4) { ... }\nif ((x | 4) != 3) { ... }\n\nPatch by Anders Rönnholm!\n\nllvm-svn: 209221"}, | ||
[ | [g]={{D,177,"/// Warn on logical operator errors in CFGBuilder\nclass LogicalErrorHandler : public CFGCallback {\n // ...\n void compareBitwiseEquality(const BinaryOperator *B, bool isAlwaysTrue) override {\n // ...\n S.Diag(B->getExprLoc(), diag::warn_comparison_bitwise_always) << DiagRange << isAlwaysTrue;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-bitwise-compare.c"]={"clang/test/Sema/warn-bitwise-compare.c:95:9: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:53:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:52:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:50:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:49:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:47:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:46:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:45:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:43:17: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:42:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:41:17: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:40:20: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:38:19: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:37:18: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:35:20: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:34:18: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:32:20: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:31:18: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:29:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:28:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:27:16: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:25:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:24:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:23:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:21:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:20:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:19:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:18:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:16:16: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:15:16: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:14:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:13:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]"} | ["clang/test/Sema/warn-bitwise-compare.c"]={"clang/test/Sema/warn-bitwise-compare.c:95:9: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:53:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:52:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:50:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:49:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:47:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:46:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:45:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:43:17: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:42:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:41:17: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:40:20: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:38:19: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:37:18: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:35:20: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:34:18: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:32:20: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:31:18: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:29:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:28:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:27:16: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:25:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:24:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:23:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:21:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:20:16: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:19:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:18:15: warning: bitwise comparison always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:16:16: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:15:16: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:14:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:13:15: warning: bitwise comparison always evaluates to false [-Wtautological-bitwise-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_comparison_bitwise_or"]={ | ["warn_comparison_bitwise_or"]={ | ||
[ | [m]={O,V,eb,"tautological-bitwise-compare",bc}, | ||
[l]="tautological-bitwise-compare", | |||
[ | |||
[e]="bitwise or with non-zero value always evaluates to true", | [e]="bitwise or with non-zero value always evaluates to true", | ||
[ | [a]=n, | ||
[b]="bitwise or with non\\-zero value always evaluates to true", | [b]="bitwise or with non\\-zero value always evaluates to true", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wtautological\\-bitwise\\-compare[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{D,186,"/// Warn on logical operator errors in CFGBuilder\nclass LogicalErrorHandler : public CFGCallback {\n // ...\n void compareBitwiseOr(const BinaryOperator *B) override {\n // ...\n S.Diag(B->getExprLoc(), diag::warn_comparison_bitwise_or) << DiagRange;"},{D,192,"/// Warn on logical operator errors in CFGBuilder\nclass LogicalErrorHandler : public CFGCallback {\n // ...\n static bool hasActiveDiagnostics(DiagnosticsEngine &Diags, SourceLocation Loc) { return !Diags.isIgnored(diag::warn_tautological_overlap_comparison, Loc) || !Diags.isIgnored(diag::warn_comparison_bitwise_or, Loc); }"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/warn-bitwise-compare.c"]={"clang/test/Sema/warn-bitwise-compare.c:104:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:103:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:101:12: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:100:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:99:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]"} | ["clang/test/Sema/warn-bitwise-compare.c"]={"clang/test/Sema/warn-bitwise-compare.c:104:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:103:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:101:12: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:100:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]","clang/test/Sema/warn-bitwise-compare.c:99:9: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_comparison_mixed_enum_types"]={ | ["warn_comparison_mixed_enum_types"]={ | ||
[ | [m]={"enum-compare"}, | ||
[l]="enum-compare", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wenum\\-compare[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1529,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n } else if (ACK == Sema::ACK_Conditional) {\n // ...\n } else if (ACK == Sema::ACK_Comparison) {\n // ...\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_comparison_mixed_enum_types_cxx20 : diag::warn_comparison_mixed_enum_types;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeGenObjC/objc-fixed-enum.m"]={"clang/test/CodeGenObjC/objc-fixed-enum.m:47:13: warning: comparison of different enumeration types (\'Enum0\' and \'Enum1\' (aka \'enum Enum1\')) [-Wenum-compare]","clang/test/CodeGenObjC/objc-fixed-enum.m:47:25: warning: comparison of different enumeration types (\'Enum1\' (aka \'enum Enum1\') and \'Enum2\') [-Wenum-compare]"} | ["clang/test/CodeGenObjC/objc-fixed-enum.m"]={"clang/test/CodeGenObjC/objc-fixed-enum.m:47:13: warning: comparison of different enumeration types (\'Enum0\' and \'Enum1\' (aka \'enum Enum1\')) [-Wenum-compare]","clang/test/CodeGenObjC/objc-fixed-enum.m:47:25: warning: comparison of different enumeration types (\'Enum1\' (aka \'enum Enum1\') and \'Enum2\') [-Wenum-compare]"} | ||
} | } | ||
}, | }, | ||
["warn_comparison_mixed_enum_types_cxx20"]={ | ["warn_comparison_mixed_enum_types_cxx20"]={ | ||
[ | [m]={zb,"deprecated-enum-compare","enum-compare"}, | ||
[l]="deprecated-enum-compare", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-enum\\-compare[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1528,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n } else if (ACK == Sema::ACK_Conditional) {\n // ...\n } else if (ACK == Sema::ACK_Comparison) {\n // ...\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_comparison_mixed_enum_types_cxx20 : diag::warn_comparison_mixed_enum_types;"}}, | ||
[ | [h]={ | ||
[ | [yc]={"clang/test/CXX/expr/expr.arith.conv/p2.cpp:29:11: warning: comparison of different enumeration types (\'enum E1\' and \'enum E2\') is deprecated [-Wdeprecated-enum-compare]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:34:11: warning: comparison of different enumeration types (\'enum E1\' and \'enum E2\') is deprecated [-Wdeprecated-enum-compare]","clang/test/CXX/expr/expr.arith.conv/p2.cpp:39:10: warning: conditional expression between different enumeration types (\'enum E1\' and \'enum E2\') is deprecated [-Wdeprecated-enum-compare-conditional]"} | ||
} | } | ||
}, | }, | ||
["warn_comparison_of_mixed_enum_types_switch"]={ | ["warn_comparison_of_mixed_enum_types_switch"]={ | ||
[ | [m]={"enum-compare","enum-compare-switch"}, | ||
[l]="enum-compare-switch", | |||
[ | |||
[e]="comparison of different enumeration types in switch statement%diff{ ($ and $)|}0,1", | [e]="comparison of different enumeration types in switch statement%diff{ ($ and $)|}0,1", | ||
[ | [a]=n, | ||
[b]="comparison of different enumeration types in switch statement(?: \\((.*?) and (.*?)\\)|)", | [b]="comparison of different enumeration types in switch statement(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wenum\\-compare\\-switch[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"0284a20fbafa",1502312203,"[Sema] Assign new flag -Wenum-compare-switch to switch-related parts of -Wenum-compare\n\nPatch by: Re...","[Sema] Assign new flag -Wenum-compare-switch to switch-related parts of -Wenum-compare\n\nPatch by: Reka Nikolett Kovacs\n\nDifferential Revision: https://reviews.llvm.org/D36526\n\nllvm-svn: 310521"}, | ||
[ | [g]={{J,1211,"static void checkEnumTypesInSwitchStmt(Sema &S, const Expr *Cond, const Expr *Case) {\n // ...\n S.Diag(Case->getExprLoc(), diag::warn_comparison_of_mixed_enum_types_switch) << CondType << CaseType << Cond->getSourceRange() << Case->getSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:385:8: warning: comparison of different enumeration types in switch statement (\'enum ExtendedEnum1\' and \'enum ExtendedEnum1_unrelated\') [-Wenum-compare-switch]"} | ["clang/test/Sema/switch.c"]={"clang/test/Sema/switch.c:385:8: warning: comparison of different enumeration types in switch statement (\'enum ExtendedEnum1\' and \'enum ExtendedEnum1_unrelated\') [-Wenum-compare-switch]"} | ||
} | } | ||
}, | }, | ||
["warn_completion_handler_called_twice"]={ | ["warn_completion_handler_called_twice"]={ | ||
[ | [m]={Gb,tc}, | ||
[l]=tc, | |||
[ | |||
[e]="completion handler is called twice", | [e]="completion handler is called twice", | ||
[ | [a]=n, | ||
[b]="completion handler is called twice", | [b]="completion handler is called twice", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcompletion\\-handler[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{D,1689,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleDoubleCall(const ParmVarDecl *Parameter, const Expr *Call, const Expr *PrevCall, bool IsCompletionHandler, bool Poised) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_called_twice : diag::warn_called_once_gets_called_twice;"},{D,1757,"constexpr unsigned CompletionHandlerWarnings[]{diag::warn_completion_handler_never_called, diag::warn_completion_handler_never_called_when, diag::warn_completion_handler_called_twice};"}}, | ||
[ | [h]={ | ||
[ | [qc]={"clang/test/SemaObjC/warn-called-once.m:806:3: warning: completion handler is called twice [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:813:3: warning: completion handler is called twice [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:820:3: warning: completion handler is called twice [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:827:3: warning: completion handler is called twice [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:834:3: warning: completion handler is called twice [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1123:5: warning: completion handler is called twice [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1236:3: warning: completion handler is called twice [-Wcompletion-handler]"} | ||
} | } | ||
}, | }, | ||
["warn_completion_handler_never_called"]={ | ["warn_completion_handler_never_called"]={ | ||
[ | [m]={Gb,tc}, | ||
[l]=tc, | |||
[ | |||
[e]="%select{|captured }1completion handler is never called", | [e]="%select{|captured }1completion handler is never called", | ||
[ | [a]=n, | ||
[b]="(?:|captured )completion handler is never called", | [b]="(?:|captured )completion handler is never called", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcompletion\\-handler[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{D,1699,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleNeverCalled(const ParmVarDecl *Parameter, bool IsCompletionHandler) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_never_called : diag::warn_called_once_never_called;"},{D,1729,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleCapturedNeverCalled(const ParmVarDecl *Parameter, const Decl *Where, bool IsCompletionHandler) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_never_called : diag::warn_called_once_never_called;"},{D,1755,"constexpr unsigned CompletionHandlerWarnings[]{diag::warn_completion_handler_never_called, diag::warn_completion_handler_never_called_when, diag::warn_completion_handler_called_twice};"}}, | ||
[ | [h]={ | ||
[ | [qc]={"clang/test/SemaObjC/warn-called-once.m:672:26: warning: completion handler is never called [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:676:26: warning: completion handler is never called [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:680:39: warning: completion handler is never called [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:899:28: warning: completion handler is never called [-Wcompletion-handler]"} | ||
} | } | ||
}, | }, | ||
["warn_completion_handler_never_called_when"]={ | ["warn_completion_handler_never_called_when"]={ | ||
[ | [m]={Gb,tc}, | ||
[l]=tc, | |||
[ | |||
[e]="completion handler is never %select{used|called}1 when %select{taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches}2", | [e]="completion handler is never %select{used|called}1 when %select{taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches}2", | ||
[ | [a]=n, | ||
[b]="completion handler is never (?:used|called) when (?:taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches)", | [b]="completion handler is never (?:used|called) when (?:taking true branch|taking false branch|handling this case|none of the cases applies|entering the loop|skipping the loop|taking one of the branches)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcompletion\\-handler[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={hb,1590001902,jb,kb}, | ||
[ | [g]={{D,1710,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleNeverCalled(const ParmVarDecl *Parameter, const Decl *Function, const Stmt *Where, NeverCalledReason Reason, bool IsCalledDirectly, bool IsCompletionHandler) override {\n auto DiagToReport = IsCompletionHandler ? diag::warn_completion_handler_never_called_when : diag::warn_called_once_never_called_when;"},{D,1756,"constexpr unsigned CompletionHandlerWarnings[]{diag::warn_completion_handler_never_called, diag::warn_completion_handler_never_called_when, diag::warn_completion_handler_called_twice};"}}, | ||
[ | [h]={ | ||
[ | [qc]={"clang/test/SemaObjC/warn-called-once.m:726:3: warning: completion handler is never called when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:882:15: warning: completion handler is never used when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:892:15: warning: completion handler is never used when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:910:3: warning: completion handler is never called when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:939:3: warning: completion handler is never used when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:949:3: warning: completion handler is never called when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:958:3: warning: completion handler is never used when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:967:3: warning: completion handler is never called when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:983:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:976:3: warning: completion handler is never called when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1044:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1053:3: warning: completion handler is never called when taking true branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1062:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1069:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1076:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1083:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]","clang/test/SemaObjC/warn-called-once.m:1108:3: warning: completion handler is never called when taking false branch [-Wcompletion-handler]"} | ||
} | } | ||
}, | }, | ||
["warn_compound_token_split_by_macro"]={ | ["warn_compound_token_split_by_macro"]={ | ||
[ | [m]={"compound-token-split","compound-token-split-by-macro"}, | ||
[l]="compound-token-split-by-macro", | |||
[ | |||
[e]="%select{%1 and |}0%2 tokens %select{introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type}3 appear in different macro expansion contexts", | [e]="%select{%1 and |}0%2 tokens %select{introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type}3 appear in different macro expansion contexts", | ||
[ | [a]=n, | ||
[b]="(?:(.*?) and |)(.*?) tokens (?:introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type) appear in different macro expansion contexts", | [b]="(?:(.*?) and |)(.*?) tokens (?:introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type) appear in different macro expansion contexts", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcompound\\-token\\-split\\-by\\-macro[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare va...","[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"}, | ||
[ | [g]={{"clang/lib/Parse/Parser.cpp",243,"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 Diag(FirstTokLoc, diag::warn_compound_token_split_by_macro) << (FirstTokKind == Tok.getKind()) << FirstTokKind << Tok.getKind() << static_cast<int>(Op) << SourceRange(FirstTokLoc);"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/compound-token-split.cpp"]={"clang/test/Parser/compound-token-split.cpp:15:3: warning: \'(\' and \'{\' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]","clang/test/Parser/compound-token-split.cpp:15:16: warning: \'}\' and \')\' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]","clang/test/Parser/compound-token-split.cpp:29:17: warning: \'}\' and \')\' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]"} | ["clang/test/Parser/compound-token-split.cpp"]={"clang/test/Parser/compound-token-split.cpp:15:3: warning: \'(\' and \'{\' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]","clang/test/Parser/compound-token-split.cpp:15:16: warning: \'}\' and \')\' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]","clang/test/Parser/compound-token-split.cpp:29:17: warning: \'}\' and \')\' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]"} | ||
} | } | ||
}, | }, | ||
["warn_compound_token_split_by_whitespace"]={ | ["warn_compound_token_split_by_whitespace"]={ | ||
[ | [m]={"compound-token-split","compound-token-split-by-space"}, | ||
[l]="compound-token-split-by-space", | |||
[ | |||
[e]="%select{%1 and |}0%2 tokens %select{introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type}3 are separated by whitespace", | [e]="%select{%1 and |}0%2 tokens %select{introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type}3 are separated by whitespace", | ||
[ | [a]=n, | ||
[b]="(?:(.*?) and |)(.*?) tokens (?:introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type) are separated by whitespace", | [b]="(?:(.*?) and |)(.*?) tokens (?:introducing statement expression|terminating statement expression|introducing attribute|terminating attribute|forming pointer to member type) are separated by whitespace", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wcompound\\-token\\-split\\-by\\-space[^\\]]*\\]", | ||
[ | [d]=K, | ||
[ | [f]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare va...","[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"}, | ||
[ | [g]={{"clang/lib/Parse/Parser.cpp",257,"void Parser::checkCompoundToken(SourceLocation FirstTokLoc, tok::TokenKind FirstTokKind, CompoundToken Op) {\n // ...\n // We expect the tokens to abut.\n if (Tok.hasLeadingSpace() || Tok.isAtStartOfLine()) {\n // ...\n Diag(SpaceLoc, diag::warn_compound_token_split_by_whitespace) << (FirstTokKind == Tok.getKind()) << FirstTokKind << Tok.getKind() << static_cast<int>(Op) << SourceRange(FirstTokLoc, SecondTokLoc);"}} | ||
}, | }, | ||
["warn_concatenated_literal_array_init"]={ | ["warn_concatenated_literal_array_init"]={ | ||
[ | [m]={j,O,Jc,"string-concatenation"}, | ||
[l]="string-concatenation", | |||
[ | |||
[e]="suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma?", | [e]="suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma?", | ||
[ | [a]=n, | ||
[b]="suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma\\?", | [b]="suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma\\?", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wstring\\-concatenation[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={X,1582847864,ab,Y}, | ||
[ | [g]={{p,14154,"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->getStrTokenLoc(1), diag::warn_concatenated_literal_array_init) << Hints;"}}, | ||
[ | [h]={ | ||
["clang/test/Sema/string-concat.c"]={"clang/test/Sema/string-concat.c:11:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:22:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:30:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:36:33: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:40:24: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:43:81: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:50:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:53:50: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:66:36: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]"} | ["clang/test/Sema/string-concat.c"]={"clang/test/Sema/string-concat.c:11:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:22:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:30:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:36:33: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:40:24: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:43:81: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:50:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:53:50: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]","clang/test/Sema/string-concat.c:66:36: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]"} | ||
} | } | ||
}, | }, | ||
["warn_concatenated_nsarray_literal"]={ | ["warn_concatenated_nsarray_literal"]={ | ||
[ | [m]={"objc-string-concatenation"}, | ||
[l]="objc-string-concatenation", | |||
[ | |||
[e]="concatenated NSString literal for an NSArray expression - possibly missing a comma", | [e]="concatenated NSString literal for an NSArray expression - possibly missing a comma", | ||
[ | [a]=n, | ||
[b]="concatenated NSString literal for an NSArray expression \\- possibly missing a comma", | [b]="concatenated NSString literal for an NSArray expression \\- possibly missing a comma", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wobjc\\-string\\-concatenation[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"a802c3526bc8",1376437495,"ObjectiveC [QoI] issue warning if an element of an nsarray\nexpresison is a concatenated nsstring ele...","ObjectiveC [QoI] issue warning if an element of an nsarray\nexpresison is a concatenated nsstring element.\n// rdar://14303083\n\nllvm-svn: 188332"}, | ||
[ | [g]={{fb,488,"/// Check that the given expression is a valid element of an Objective-C\n/// collection literal.\nstatic ExprResult CheckObjCCollectionLiteralElement(Sema &S, Expr *Element, QualType T, bool ArrayLiteral = false) {\n // ...\n if (ArrayLiteral)\n if (ObjCStringLiteral *getString = dyn_cast<ObjCStringLiteral>(OrigElement)) {\n if (StringLiteral *SL = getString->getString()) {\n // ...\n if (numConcat > 1) {\n // ...\n if (!hasMacro)\n S.Diag(Element->getBeginLoc(), diag::warn_concatenated_nsarray_literal) << Element->getType();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/objc-array-literal.m"]={"clang/test/SemaObjC/objc-array-literal.m:60:19: warning: concatenated NSString literal for an NSArray expression - possibly missing a comma [-Wobjc-string-concatenation]","clang/test/SemaObjC/objc-array-literal.m:67:20: warning: concatenated NSString literal for an NSArray expression - possibly missing a comma [-Wobjc-string-concatenation]"} | ["clang/test/SemaObjC/objc-array-literal.m"]={"clang/test/SemaObjC/objc-array-literal.m:60:19: warning: concatenated NSString literal for an NSArray expression - possibly missing a comma [-Wobjc-string-concatenation]","clang/test/SemaObjC/objc-array-literal.m:67:20: warning: concatenated NSString literal for an NSArray expression - possibly missing a comma [-Wobjc-string-concatenation]"} | ||
} | } | ||
}, | }, | ||
["warn_condition_is_assignment"]={ | ["warn_condition_is_assignment"]={ | ||
[ | [m]={O,V,"parentheses"}, | ||
[l]="parentheses", | |||
[ | |||
[e]="using the result of an assignment as a condition without parentheses", | [e]="using the result of an assignment as a condition without parentheses", | ||
[ | [a]=n, | ||
[b]="using the result of an assignment as a condition without parentheses", | [b]="using the result of an assignment as a condition without parentheses", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wparentheses[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d5707abdfdd5",1255384747,"Implement -Wparentheses: warn about using assignments in contexts that require\nconditions. Add a f...","Implement -Wparentheses: warn about using assignments in contexts that require\nconditions. Add a fixit to insert the parentheses. Also fix a very minor\npossible memory leak in \'for\' conditions.\n\nFixes PR 4876 and rdar://problem/7289172\n\nllvm-svn: 83907"}, | ||
[ | [g]={{v,20853,"// 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 unsigned diagnostic = diag::warn_condition_is_assignment;"}}, | ||
[ | [h]={ | ||
["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]"} | ["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]"} | ||
} | } | ||
}, | }, | ||
["warn_condition_is_idiomatic_assignment"]={ | ["warn_condition_is_idiomatic_assignment"]={ | ||
[ | [m]={"idiomatic-parentheses"}, | ||
[l]="idiomatic-parentheses", | |||
[ | |||
[e]="using the result of an assignment as a condition without parentheses", | [e]="using the result of an assignment as a condition without parentheses", | ||
[ | [a]=n, | ||
[b]="using the result of an assignment as a condition without parentheses", | [b]="using the result of an assignment as a condition without parentheses", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Widiomatic\\-parentheses[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"b0e419e34dc0",1257984365,"Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category,\nand give that category an ex...","Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category,\nand give that category an explicit test. Generalize the internal diagnostic\nname.\n\nllvm-svn: 86905"}, | ||
[ | [g]={{v,20857,"// 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 (BinaryOperator *Op = dyn_cast<BinaryOperator>(E)) {\n // ...\n // Greylist some idioms by putting them into a warning subcategory.\n if (ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(Op->getRHS()->IgnoreParenCasts())) {\n // ...\n // self = [<foo> init...]\n if (isSelfExpr(Op->getLHS()) && ME->getMethodFamily() == OMF_init)\n diagnostic = diag::warn_condition_is_idiomatic_assignment;"},{v,20878,"// 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 (BinaryOperator *Op = dyn_cast<BinaryOperator>(E)) {\n // ...\n // Greylist some idioms by putting them into a warning subcategory.\n if (ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(Op->getRHS()->IgnoreParenCasts())) {\n // ...\n // self = [<foo> init...]\n if (isSelfExpr(Op->getLHS()) && ME->getMethodFamily() == OMF_init)\n // ...\n // <foo> = [<bar> nextObject]\n else if (Sel.isUnarySelector() && Sel.getNameForSlot(0) == \"nextObject\")\n diagnostic = diag::warn_condition_is_idiomatic_assignment;"}} | ||
}, | }, | ||
["warn_conditional_mixed_enum_types"]={ | ["warn_conditional_mixed_enum_types"]={ | ||
[ | [m]={Eb,"enum-compare-conditional",pc,Ib}, | ||
[l]="enum-compare-conditional", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wenum\\-compare\\-conditional[^\\]]*\\]", | ||
[ | [d]=gc, | ||
[ | [f]={Sb,1567434909,Pb,Ob}, | ||
[ | [g]={{v,1523,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n } else if (ACK == Sema::ACK_Conditional) {\n // ...\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_conditional_mixed_enum_types_cxx20 : diag::warn_conditional_mixed_enum_types;"}} | ||
}, | }, | ||
["warn_conditional_mixed_enum_types_cxx20"]={ | ["warn_conditional_mixed_enum_types_cxx20"]={ | ||
[ | [m]={Eb,zb,"deprecated-enum-compare-conditional","enum-compare-conditional",pc,Ib}, | ||
[l]="deprecated-enum-compare-conditional", | |||
[ | |||
[e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | [e]="%select{arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of}0 different enumeration types%diff{ ($ and $)|}1,2 is deprecated", | ||
[ | [a]=n, | ||
[b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | [b]="(?:arithmetic between|bitwise operation between|comparison of|conditional expression between|compound assignment of) different enumeration types(?: \\((.*?) and (.*?)\\)|) is deprecated", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdeprecated\\-enum\\-compare\\-conditional[^\\]]*\\]", | ||
[ | [d]=Ub, | ||
[ | [f]={xb,1575504770,wb,Ab}, | ||
[ | [g]={{v,1522,"/// Check that the usual arithmetic conversions can be performed on this pair of\n/// expressions that might be of enumeration type.\nstatic void checkEnumArithmeticConversions(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc, Sema::ArithConvKind ACK) {\n // ...\n if ((!IsCompAssign && LEnum && R->isFloatingType()) || (REnum && L->isFloatingType())) {\n // ...\n } else if (!IsCompAssign && LEnum && REnum && !S.Context.hasSameUnqualifiedType(L, R)) {\n // ...\n if (!L->castAs<EnumType>()->getDecl()->hasNameForLinkage() || !R->castAs<EnumType>()->getDecl()->hasNameForLinkage()) {\n // ...\n } else if (ACK == Sema::ACK_Conditional) {\n // ...\n DiagID = S.getLangOpts().CPlusPlus20 ? diag::warn_conditional_mixed_enum_types_cxx20 : diag::warn_conditional_mixed_enum_types;"}} | ||
}, | }, | ||
["warn_conflicting_nullability_attr_overriding_param_types"]={ | ["warn_conflicting_nullability_attr_overriding_param_types"]={ | ||
[ | [m]={"nullability"}, | ||
[l]="nullability", | |||
[ | |||
[e]="conflicting nullability specifier on parameter types, %0 conflicts with existing specifier %1", | [e]="conflicting nullability specifier on parameter types, %0 conflicts with existing specifier %1", | ||
[ | [a]=n, | ||
[b]="conflicting nullability specifier on parameter types, (.*?) conflicts with existing specifier (.*?)", | [b]="conflicting nullability specifier on parameter types, (.*?) conflicts with existing specifier (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnullability[^\\]]*\\]", | ||
[ | [d]="Nullability Issue", | ||
[ | [f]={"813a066f16df",1434737678,"Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nu...","Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nullability specifiers\n(nonnull, nullable, null_unspecified) for Objective-C method return\ntypes, method parameter types, and properties.\n\nIntroduce Objective-C-specific semantics, including computation of the\nnullability of the result of a message send, merging of nullability\ninformation from the @interface of a class into its @implementation,\netc .\n\nThis is the Objective-C part of rdar://problem/18868820.\n\nllvm-svn: 240154"}, | ||
[ | [g]={{u,2460,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n if (Warn && IsOverridingMode && !isa<ObjCImplementationDecl>(MethodImpl->getDeclContext()) && !S.Context.hasSameNullabilityTypeQualifier(ImplTy, IfaceTy, true)) {\n S.Diag(ImplVar->getLocation(), diag::warn_conflicting_nullability_attr_overriding_param_types) << DiagNullabilityKind(*ImplTy->getNullability(), ((ImplVar->getObjCDeclQualifier() & Decl::OBJC_TQ_CSNullability) != 0)) << DiagNullabilityKind(*IfaceTy->getNullability(), ((IfaceVar->getObjCDeclQualifier() & Decl::OBJC_TQ_CSNullability) != 0));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/override-nullability.m"]={"clang/test/SemaObjC/override-nullability.m:12:32: warning: conflicting nullability specifier on parameter types, \'nonnull\' conflicts with existing specifier \'nullable\' [-Wnullability]"} | ["clang/test/SemaObjC/override-nullability.m"]={"clang/test/SemaObjC/override-nullability.m:12:32: warning: conflicting nullability specifier on parameter types, \'nonnull\' conflicts with existing specifier \'nullable\' [-Wnullability]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_nullability_attr_overriding_ret_types"]={ | ["warn_conflicting_nullability_attr_overriding_ret_types"]={ | ||
[ | [m]={"nullability"}, | ||
[l]="nullability", | |||
[ | |||
[e]="conflicting nullability specifier on return types, %0 conflicts with existing specifier %1", | [e]="conflicting nullability specifier on return types, %0 conflicts with existing specifier %1", | ||
[ | [a]=n, | ||
[b]="conflicting nullability specifier on return types, (.*?) conflicts with existing specifier (.*?)", | [b]="conflicting nullability specifier on return types, (.*?) conflicts with existing specifier (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wnullability[^\\]]*\\]", | ||
[ | [d]="Nullability Issue", | ||
[ | [f]={"813a066f16df",1434737678,"Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nu...","Extend type nullability qualifiers for Objective-C.\n\nIntroduce context-sensitive, non-underscored nullability specifiers\n(nonnull, nullable, null_unspecified) for Objective-C method return\ntypes, method parameter types, and properties.\n\nIntroduce Objective-C-specific semantics, including computation of the\nnullability of the result of a message send, merging of nullability\ninformation from the @interface of a class into its @implementation,\netc .\n\nThis is the Objective-C part of rdar://problem/18868820.\n\nllvm-svn: 240154"}, | ||
[ | [g]={{u,2376,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n if (Warn && IsOverridingMode && !isa<ObjCImplementationDecl>(MethodImpl->getDeclContext()) && !S.Context.hasSameNullabilityTypeQualifier(MethodImpl->getReturnType(), MethodDecl->getReturnType(), false)) {\n // ...\n S.Diag(MethodImpl->getLocation(), diag::warn_conflicting_nullability_attr_overriding_ret_types) << DiagNullabilityKind(nullabilityMethodImpl, ((MethodImpl->getObjCDeclQualifier() & Decl::OBJC_TQ_CSNullability) != 0)) << DiagNullabilityKind(nullabilityMethodDecl, ((MethodDecl->getObjCDeclQualifier() & Decl::OBJC_TQ_CSNullability) != 0));"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/override-nullability.m"]={"clang/test/SemaObjC/override-nullability.m:12:1: warning: conflicting nullability specifier on return types, \'nullable\' conflicts with existing specifier \'nonnull\' [-Wnullability]"} | ["clang/test/SemaObjC/override-nullability.m"]={"clang/test/SemaObjC/override-nullability.m:12:1: warning: conflicting nullability specifier on return types, \'nullable\' conflicts with existing specifier \'nonnull\' [-Wnullability]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_overriding_param_modifiers"]={ | ["warn_conflicting_overriding_param_modifiers"]={ | ||
[ | [m]={yb}, | ||
[l]=yb, | |||
[ | |||
[e]="conflicting distributed object modifiers on parameter type in declaration of %0", | [e]="conflicting distributed object modifiers on parameter type in declaration of %0", | ||
[ | [a]=n, | ||
[b]="conflicting distributed object modifiers on parameter type in declaration of (.*?)", | [b]="conflicting distributed object modifiers on parameter type in declaration of (.*?)", | ||
[ | [c]=Qc, | ||
[ | [d]=i, | ||
[ | [f]={Oc,1312996590,Gc,wc}, | ||
[ | [g]={{u,2440,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n if (IsProtocolMethodDecl && objcModifiersConflict(ImplVar->getObjCDeclQualifier(), IfaceVar->getObjCDeclQualifier())) {\n if (Warn) {\n if (IsOverridingMode)\n S.Diag(ImplVar->getLocation(), diag::warn_conflicting_overriding_param_modifiers) << getTypeRange(ImplVar->getTypeSourceInfo()) << MethodImpl->getDeclName();"}} | ||
}, | }, | ||
["warn_conflicting_overriding_param_types"]={ | ["warn_conflicting_overriding_param_types"]={ | ||
[ | [m]={yb}, | ||
[l]=yb, | |||
[ | |||
[e]="conflicting parameter types in declaration of %0%diff{: $ vs $|}1,2", | [e]="conflicting parameter types in declaration of %0%diff{: $ vs $|}1,2", | ||
[ | [a]=n, | ||
[b]="conflicting parameter types in declaration of (.*?)(?:\\: (.*?) vs (.*?)|)", | [b]="conflicting parameter types in declaration of (.*?)(?:\\: (.*?) vs (.*?)|)", | ||
[ | [c]=Qc, | ||
[ | [d]=i, | ||
[ | [f]={Oc,1312996590,Gc,wc}, | ||
[ | [g]={{u,2475,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n unsigned DiagID = IsOverridingMode ? diag::warn_conflicting_overriding_param_types : diag::warn_conflicting_param_types;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/qualified-protocol-method-conflicts.m"]={"clang/test/SemaObjC/qualified-protocol-method-conflicts.m:18:21: warning: conflicting parameter types in declaration of \'setX:\': \'float\' vs \'int\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:26:23: warning: conflicting parameter types in declaration of \'setX:\': \'int\' vs \'float\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:37:21: warning: conflicting parameter types in declaration of \'setX:\': \'float\' vs \'int\' [-Woverriding-method-mismatch]"} | ["clang/test/SemaObjC/qualified-protocol-method-conflicts.m"]={"clang/test/SemaObjC/qualified-protocol-method-conflicts.m:18:21: warning: conflicting parameter types in declaration of \'setX:\': \'float\' vs \'int\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:26:23: warning: conflicting parameter types in declaration of \'setX:\': \'int\' vs \'float\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:37:21: warning: conflicting parameter types in declaration of \'setX:\': \'float\' vs \'int\' [-Woverriding-method-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_overriding_ret_type_modifiers"]={ | ["warn_conflicting_overriding_ret_type_modifiers"]={ | ||
[ | [m]={yb}, | ||
[l]=yb, | |||
[ | |||
[e]="conflicting distributed object modifiers on return type in declaration of %0", | [e]="conflicting distributed object modifiers on return type in declaration of %0", | ||
[ | [a]=n, | ||
[b]="conflicting distributed object modifiers on return type in declaration of (.*?)", | [b]="conflicting distributed object modifiers on return type in declaration of (.*?)", | ||
[ | [c]=Qc, | ||
[ | [d]=i, | ||
[ | [f]={Oc,1312996590,Gc,wc}, | ||
[ | [g]={{u,2358,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n if (IsProtocolMethodDecl && objcModifiersConflict(MethodDecl->getObjCDeclQualifier(), MethodImpl->getObjCDeclQualifier())) {\n if (Warn) {\n S.Diag(MethodImpl->getLocation(), (IsOverridingMode ? diag::warn_conflicting_overriding_ret_type_modifiers : diag::warn_conflicting_ret_type_modifiers)) << MethodImpl->getDeclName() << MethodImpl->getReturnTypeSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/class-protocol-method-match.m"]={"clang/test/SemaObjC/class-protocol-method-match.m:26:1: warning: conflicting distributed object modifiers on return type in declaration of \'bud\' [-Woverriding-method-mismatch]"} | ["clang/test/SemaObjC/class-protocol-method-match.m"]={"clang/test/SemaObjC/class-protocol-method-match.m:26:1: warning: conflicting distributed object modifiers on return type in declaration of \'bud\' [-Woverriding-method-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_overriding_ret_types"]={ | ["warn_conflicting_overriding_ret_types"]={ | ||
[ | [m]={yb}, | ||
[l]=yb, | |||
[ | |||
[e]="conflicting return type in declaration of %0%diff{: $ vs $|}1,2", | [e]="conflicting return type in declaration of %0%diff{: $ vs $|}1,2", | ||
[ | [a]=n, | ||
[b]="conflicting return type in declaration of (.*?)(?:\\: (.*?) vs (.*?)|)", | [b]="conflicting return type in declaration of (.*?)(?:\\: (.*?) vs (.*?)|)", | ||
[ | [c]=Qc, | ||
[ | [d]=i, | ||
[ | [f]={Oc,1312996590,Gc,wc}, | ||
[ | [g]={{u,2393,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n unsigned DiagID = IsOverridingMode ? diag::warn_conflicting_overriding_ret_types : diag::warn_conflicting_ret_types;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/qualified-protocol-method-conflicts.m"]={"clang/test/SemaObjC/qualified-protocol-method-conflicts.m:19:1: warning: conflicting return type in declaration of \'C\': \'float\' vs \'int\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:27:1: warning: conflicting return type in declaration of \'C\': \'int\' vs \'float\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:38:1: warning: conflicting return type in declaration of \'C\': \'float\' vs \'int\' [-Woverriding-method-mismatch]"} | ["clang/test/SemaObjC/qualified-protocol-method-conflicts.m"]={"clang/test/SemaObjC/qualified-protocol-method-conflicts.m:19:1: warning: conflicting return type in declaration of \'C\': \'float\' vs \'int\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:27:1: warning: conflicting return type in declaration of \'C\': \'int\' vs \'float\' [-Woverriding-method-mismatch]","clang/test/SemaObjC/qualified-protocol-method-conflicts.m:38:1: warning: conflicting return type in declaration of \'C\': \'float\' vs \'int\' [-Woverriding-method-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_overriding_variadic"]={ | ["warn_conflicting_overriding_variadic"]={ | ||
[ | [m]={yb}, | ||
[l]=yb, | |||
[e]="conflicting variadic declaration of method and its implementation", | |||
[a]=n, | |||
[b]="conflicting variadic declaration of method and its implementation", | |||
[ | [c]=Qc, | ||
[e]= | [d]=i, | ||
[ | [f]={Oc,1312996590,Gc,wc}, | ||
[b]= | [g]={{u,2623,"void Sema::CheckConflictingOverridingMethod(ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl) {\n // ...\n if (Method->isVariadic() != Overridden->isVariadic()) {\n Diag(Method->getLocation(), diag::warn_conflicting_overriding_variadic);"}} | ||
[ | |||
[ | |||
[ | |||
[ | |||
}, | }, | ||
["warn_conflicting_param_modifiers"]={ | ["warn_conflicting_param_modifiers"]={ | ||
[ | [m]={"distributed-object-modifiers"}, | ||
[l]="distributed-object-modifiers", | |||
[ | |||
[e]="conflicting distributed object modifiers on parameter type in implementation of %0", | [e]="conflicting distributed object modifiers on parameter type in implementation of %0", | ||
[ | [a]=n, | ||
[b]="conflicting distributed object modifiers on parameter type in implementation of (.*?)", | [b]="conflicting distributed object modifiers on parameter type in implementation of (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdistributed\\-object\\-modifiers[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d7b0cb538813",1298332155,"Warn when type modifiers on objc method declarations in\nprotocols do not match with method implement...","Warn when type modifiers on objc method declarations in\nprotocols do not match with method implementation.\n// rdar://7076235\n\nllvm-svn: 126162"}, | ||
[ | [g]={{u,2444,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n if (IsProtocolMethodDecl && objcModifiersConflict(ImplVar->getObjCDeclQualifier(), IfaceVar->getObjCDeclQualifier())) {\n if (Warn) {\n if (IsOverridingMode)\n // ...\n else\n S.Diag(ImplVar->getLocation(), diag::warn_conflicting_param_modifiers) << getTypeRange(ImplVar->getTypeSourceInfo()) << MethodImpl->getDeclName();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/dist-object-modifiers.m"]={"clang/test/SemaObjC/dist-object-modifiers.m:17:21: warning: conflicting distributed object modifiers on parameter type in implementation of \'doStuff:\' [-Wdistributed-object-modifiers]","clang/test/SemaObjC/dist-object-modifiers.m:19:24: warning: conflicting distributed object modifiers on parameter type in implementation of \'stillMore::\' [-Wdistributed-object-modifiers]","clang/test/SemaObjC/dist-object-modifiers.m:19:42: warning: conflicting distributed object modifiers on parameter type in implementation of \'stillMore::\' [-Wdistributed-object-modifiers]"} | ["clang/test/SemaObjC/dist-object-modifiers.m"]={"clang/test/SemaObjC/dist-object-modifiers.m:17:21: warning: conflicting distributed object modifiers on parameter type in implementation of \'doStuff:\' [-Wdistributed-object-modifiers]","clang/test/SemaObjC/dist-object-modifiers.m:19:24: warning: conflicting distributed object modifiers on parameter type in implementation of \'stillMore::\' [-Wdistributed-object-modifiers]","clang/test/SemaObjC/dist-object-modifiers.m:19:42: warning: conflicting distributed object modifiers on parameter type in implementation of \'stillMore::\' [-Wdistributed-object-modifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_param_types"]={ | ["warn_conflicting_param_types"]={ | ||
[ | [m]={"mismatched-parameter-types"}, | ||
[l]="mismatched-parameter-types", | |||
[ | |||
[e]="conflicting parameter types in implementation of %0%diff{: $ vs $|}1,2", | [e]="conflicting parameter types in implementation of %0%diff{: $ vs $|}1,2", | ||
[ | [a]=n, | ||
[b]="conflicting parameter types in implementation of (.*?)(?:\\: (.*?) vs (.*?)|)", | [b]="conflicting parameter types in implementation of (.*?)(?:\\: (.*?) vs (.*?)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmismatched\\-parameter\\-types[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"67f35b051b60",1239479922,"improve the \'conflicting types\' diagnostics to include correct location info, now\nthat it is plumbed...","improve the \'conflicting types\' diagnostics to include correct location info, now\nthat it is plumbed through Sema. On a file from growl, we used to emit:\n\nt.mi:107059:1: warning: conflicting types for \'removePluginHandler:forPluginTypes:\'\n- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {\n^\nt.mi:105280:1: note: previous definition is here\n- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;\n^\n\nnow we produce:\n\nt.mi:107059:55: warning: conflicting parameter types in implementation of \'removePluginHandler:forPluginTypes:\': \'id<NSObject>\' vs \'id<GrowlPluginHandler>\'\n- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {\n ^\nt.mi:105280:45: note: previous definition is here\n- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;\n ^\n\nWe still don\'t have proper loc info for properties, hence the FIXME.\n\nrdar://6782494\n\nllvm-svn: 68879"}, | ||
[ | [g]={{u,2476,"static bool CheckMethodOverrideParam(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, ParmVarDecl *ImplVar, ParmVarDecl *IfaceVar, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n unsigned DiagID = IsOverridingMode ? diag::warn_conflicting_overriding_param_types : diag::warn_conflicting_param_types;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/method-typecheck-1.m"]={"clang/test/SemaObjC/method-typecheck-1.m:10:25: warning: conflicting parameter types in implementation of \'setMoo:\': \'int\' vs \'float\' [-Wmismatched-parameter-types]","clang/test/SemaObjC/method-typecheck-1.m:23:12: warning: conflicting parameter types in implementation of \'cMoo:\': \'int\' vs \'float\' [-Wmismatched-parameter-types]","clang/test/SemaObjC/method-typecheck-1.m:34:9: warning: conflicting parameter types in implementation of \'setCat:\': \'int\' vs \'float\' [-Wmismatched-parameter-types]"} | ["clang/test/SemaObjC/method-typecheck-1.m"]={"clang/test/SemaObjC/method-typecheck-1.m:10:25: warning: conflicting parameter types in implementation of \'setMoo:\': \'int\' vs \'float\' [-Wmismatched-parameter-types]","clang/test/SemaObjC/method-typecheck-1.m:23:12: warning: conflicting parameter types in implementation of \'cMoo:\': \'int\' vs \'float\' [-Wmismatched-parameter-types]","clang/test/SemaObjC/method-typecheck-1.m:34:9: warning: conflicting parameter types in implementation of \'setCat:\': \'int\' vs \'float\' [-Wmismatched-parameter-types]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_ret_type_modifiers"]={ | ["warn_conflicting_ret_type_modifiers"]={ | ||
[ | [m]={"distributed-object-modifiers"}, | ||
[l]="distributed-object-modifiers", | |||
[ | |||
[e]="conflicting distributed object modifiers on return type in implementation of %0", | [e]="conflicting distributed object modifiers on return type in implementation of %0", | ||
[ | [a]=n, | ||
[b]="conflicting distributed object modifiers on return type in implementation of (.*?)", | [b]="conflicting distributed object modifiers on return type in implementation of (.*?)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wdistributed\\-object\\-modifiers[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"d7b0cb538813",1298332155,"Warn when type modifiers on objc method declarations in\nprotocols do not match with method implement...","Warn when type modifiers on objc method declarations in\nprotocols do not match with method implementation.\n// rdar://7076235\n\nllvm-svn: 126162"}, | ||
[ | [g]={{u,2359,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n if (IsProtocolMethodDecl && objcModifiersConflict(MethodDecl->getObjCDeclQualifier(), MethodImpl->getObjCDeclQualifier())) {\n if (Warn) {\n S.Diag(MethodImpl->getLocation(), (IsOverridingMode ? diag::warn_conflicting_overriding_ret_type_modifiers : diag::warn_conflicting_ret_type_modifiers)) << MethodImpl->getDeclName() << MethodImpl->getReturnTypeSourceRange();"}}, | ||
[ | [h]={ | ||
["clang/test/SemaObjC/dist-object-modifiers.m"]={"clang/test/SemaObjC/dist-object-modifiers.m:16:1: warning: conflicting distributed object modifiers on return type in implementation of \'serverPID\' [-Wdistributed-object-modifiers]","clang/test/SemaObjC/dist-object-modifiers.m:19:1: warning: conflicting distributed object modifiers on return type in implementation of \'stillMore::\' [-Wdistributed-object-modifiers]"} | ["clang/test/SemaObjC/dist-object-modifiers.m"]={"clang/test/SemaObjC/dist-object-modifiers.m:16:1: warning: conflicting distributed object modifiers on return type in implementation of \'serverPID\' [-Wdistributed-object-modifiers]","clang/test/SemaObjC/dist-object-modifiers.m:19:1: warning: conflicting distributed object modifiers on return type in implementation of \'stillMore::\' [-Wdistributed-object-modifiers]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_ret_types"]={ | ["warn_conflicting_ret_types"]={ | ||
[ | [m]={"mismatched-return-types"}, | ||
[l]="mismatched-return-types", | |||
[ | |||
[e]="conflicting return type in implementation of %0%diff{: $ vs $|}1,2", | [e]="conflicting return type in implementation of %0%diff{: $ vs $|}1,2", | ||
[ | [a]=n, | ||
[b]="conflicting return type in implementation of (.*?)(?:\\: (.*?) vs (.*?)|)", | [b]="conflicting return type in implementation of (.*?)(?:\\: (.*?) vs (.*?)|)", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wmismatched\\-return\\-types[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={"67f35b051b60",1239479922,"improve the \'conflicting types\' diagnostics to include correct location info, now\nthat it is plumbed...","improve the \'conflicting types\' diagnostics to include correct location info, now\nthat it is plumbed through Sema. On a file from growl, we used to emit:\n\nt.mi:107059:1: warning: conflicting types for \'removePluginHandler:forPluginTypes:\'\n- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {\n^\nt.mi:105280:1: note: previous definition is here\n- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;\n^\n\nnow we produce:\n\nt.mi:107059:55: warning: conflicting parameter types in implementation of \'removePluginHandler:forPluginTypes:\': \'id<NSObject>\' vs \'id<GrowlPluginHandler>\'\n- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {\n ^\nt.mi:105280:45: note: previous definition is here\n- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;\n ^\n\nWe still don\'t have proper loc info for properties, hence the FIXME.\n\nrdar://6782494\n\nllvm-svn: 68879"}, | ||
[ | [g]={{u,2394,"static bool CheckMethodOverrideReturn(Sema &S, ObjCMethodDecl *MethodImpl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl, bool IsOverridingMode, bool Warn) {\n // ...\n unsigned DiagID = IsOverridingMode ? diag::warn_conflicting_overriding_ret_types : diag::warn_conflicting_ret_types;"}}, | ||
[ | [h]={ | ||
["clang/test/Parser/objc-recover.mm"]={"clang/test/Parser/objc-recover.mm:23:1: warning: conflicting return type in implementation of \'foo\': \'void\' vs \'id\' [-Wmismatched-return-types]","clang/test/Parser/objc-recover.mm:25:1: warning: conflicting return type in implementation of \'bar\': \'void\' vs \'id\' [-Wmismatched-return-types]","clang/test/Parser/objc-recover.mm:44:1: warning: conflicting return type in implementation of \'test\': \'id\' vs \'void\' [-Wmismatched-return-types]","clang/test/Parser/objc-recover.mm:63:1: warning: conflicting return type in implementation of \'PWEN_foo\': \'void\' vs \'id\' [-Wmismatched-return-types]"} | ["clang/test/Parser/objc-recover.mm"]={"clang/test/Parser/objc-recover.mm:23:1: warning: conflicting return type in implementation of \'foo\': \'void\' vs \'id\' [-Wmismatched-return-types]","clang/test/Parser/objc-recover.mm:25:1: warning: conflicting return type in implementation of \'bar\': \'void\' vs \'id\' [-Wmismatched-return-types]","clang/test/Parser/objc-recover.mm:44:1: warning: conflicting return type in implementation of \'test\': \'id\' vs \'void\' [-Wmismatched-return-types]","clang/test/Parser/objc-recover.mm:63:1: warning: conflicting return type in implementation of \'PWEN_foo\': \'void\' vs \'id\' [-Wmismatched-return-types]"} | ||
} | } | ||
}, | }, | ||
["warn_conflicting_variadic"]={ | ["warn_conflicting_variadic"]={ | ||
[e]="conflicting variadic declaration of method and its implementation", | |||
[a]=n, | |||
[b]="conflicting variadic declaration of method and its implementation", | |||
[e]= | [c]=lb, | ||
[ | [d]=i, | ||
[b]= | [f]={"5981b04718ca",1274484538,"Clang missing warning about conflicting declaration vs. definition \nfor variable arguments list meth...","Clang missing warning about conflicting declaration vs. definition \nfor variable arguments list methods. (radar 8006060).\n\nllvm-svn: 104407"}, | ||
[ | [g]={{u,2600,"void Sema::WarnConflictingTypedMethods(ObjCMethodDecl *ImpMethodDecl, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl) {\n // ...\n if (ImpMethodDecl->isVariadic() != MethodDecl->isVariadic()) {\n Diag(ImpMethodDecl->getLocation(), diag::warn_conflicting_variadic);"}}, | ||
[ | [h]={ | ||
[ | |||
[ | |||
[ | |||
["clang/test/SemaObjC/class-protocol-method-match.m"]={"clang/test/SemaObjC/class-protocol-method-match.m:32:1: warning: conflicting variadic declaration of method and its implementation [-Woverriding-method-mismatch]"} | ["clang/test/SemaObjC/class-protocol-method-match.m"]={"clang/test/SemaObjC/class-protocol-method-match.m:32:1: warning: conflicting variadic declaration of method and its implementation [-Woverriding-method-mismatch]"} | ||
} | } | ||
}, | }, | ||
["warn_consteval_if_always_true"]={ | ["warn_consteval_if_always_true"]={ | ||
[ | [m]={"redundant-consteval-if"}, | ||
[l]="redundant-consteval-if", | |||
[ | |||
[e]="consteval if is always true in an %select{unevaluated|immediate}0 context", | [e]="consteval if is always true in an %select{unevaluated|immediate}0 context", | ||
[ | [a]=n, | ||
[b]="consteval if is always true in an (?:unevaluated|immediate) context", | [b]="consteval if is always true in an (?:unevaluated|immediate) context", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wredundant\\-consteval\\-if[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={Bb,1615397021,Db,Jb}, | ||
[ | [g]={{J,946,"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) {\n // ...\n if (isUnevaluatedContext() || Immediate)\n Diags.Report(IfLoc, diag::warn_consteval_if_always_true) << Immediate;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx2b-consteval-if.cpp"]={"clang/test/SemaCXX/cxx2b-consteval-if.cpp:21:5: warning: consteval if is always true in an immediate context [-Wredundant-consteval-if]"} | ["clang/test/SemaCXX/cxx2b-consteval-if.cpp"]={"clang/test/SemaCXX/cxx2b-consteval-if.cpp:21:5: warning: consteval if is always true in an immediate context [-Wredundant-consteval-if]"} | ||
} | } | ||
}, | }, | ||
["warn_constexpr_unscoped_enum_out_of_range"]={ | ["warn_constexpr_unscoped_enum_out_of_range"]={ | ||
[ | [m]={"enum-constexpr-conversion"}, | ||
[l]="enum-constexpr-conversion", | |||
[ | |||
[e]="integer value %0 is outside the valid range of values [%1, %2] for the enumeration type %3", | [e]="integer value %0 is outside the valid range of values [%1, %2] for the enumeration type %3", | ||
[ | [a]=Ac, | ||
[b]="integer value (.*?) is outside the valid range of values \\[(.*?), (.*?)\\] for the enumeration type (.*?)", | [b]="integer value (.*?) is outside the valid range of values \\[(.*?), (.*?)\\] for the enumeration type (.*?)", | ||
[ | [c]=" \\[[^\\]]*\\-Wenum\\-constexpr\\-conversion[^\\]]*\\]", | ||
[ | [d]=j, | ||
[ | [f]={"ec273d3e3a8c",1643408541,"Add a warning for not packing non-POD members in packed structs\n\nDifferential Revision: https://revi...","Add a warning for not packing non-POD members in packed structs\n\nDifferential Revision: https://reviews.llvm.org/D118511"}, | ||
[ | [g]={{"clang/lib/AST/ExprConstant.cpp",13778,"/// 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_IntegralCast: {\n // ...\n if (Info.Ctx.getLangOpts().CPlusPlus && Info.InConstantContext && Info.EvalMode == EvalInfo::EM_ConstantExpression && DestType->isEnumeralType()) {\n // ...\n // Check that the value is within the range of the enumeration values.\n //\n // This corressponds to [expr.static.cast]p10 which says:\n // A value of integral or enumeration type can be explicitly converted\n // to a complete enumeration type ... If the enumeration type does not\n // have a fixed underlying type, the value is unchanged if the original\n // value is within the range of the enumeration values ([dcl.enum]), and\n // otherwise, the behavior is undefined.\n //\n // This was resolved as part of DR2338 which has CD5 status.\n if (!ED->isFixed()) {\n // ...\n if (ED->getNumNegativeBits() && ConstexprVar && (Max.slt(Result.getInt().getSExtValue()) || Min.sgt(Result.getInt().getSExtValue())))\n Info.Ctx.getDiagnostics().Report(E->getExprLoc(), diag::warn_constexpr_unscoped_enum_out_of_range) << llvm::toString(Result.getInt(), 10) << Min.getSExtValue() << Max.getSExtValue() << ED;"},{"clang/lib/AST/ExprConstant.cpp",13784,"/// 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_IntegralCast: {\n // ...\n if (Info.Ctx.getLangOpts().CPlusPlus && Info.InConstantContext && Info.EvalMode == EvalInfo::EM_ConstantExpression && DestType->isEnumeralType()) {\n // ...\n // Check that the value is within the range of the enumeration values.\n //\n // This corressponds to [expr.static.cast]p10 which says:\n // A value of integral or enumeration type can be explicitly converted\n // to a complete enumeration type ... If the enumeration type does not\n // have a fixed underlying type, the value is unchanged if the original\n // value is within the range of the enumeration values ([dcl.enum]), and\n // otherwise, the behavior is undefined.\n //\n // This was resolved as part of DR2338 which has CD5 status.\n if (!ED->isFixed()) {\n // ...\n if (ED->getNumNegativeBits() && ConstexprVar && (Max.slt(Result.getInt().getSExtValue()) || Min.sgt(Result.getInt().getSExtValue())))\n // ...\n else if (!ED->getNumNegativeBits() && ConstexprVar && Max.ult(Result.getInt().getZExtValue()))\n Info.Ctx.getDiagnostics().Report(E->getExprLoc(), diag::warn_constexpr_unscoped_enum_out_of_range) << llvm::toString(Result.getInt(), 10) << Min.getZExtValue() << Max.getZExtValue() << ED;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:902:49: error: integer value -1 is outside the valid range of values [0, 1] for the enumeration type \'E\' [-Wenum-constexpr-conversion]"} | ["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:902:49: error: integer value -1 is outside the valid range of values [0, 1] for the enumeration type \'E\' [-Wenum-constexpr-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_conv_to_base_not_used"]={ | ["warn_conv_to_base_not_used"]={ | ||
[ | [m]={"class-conversion"}, | ||
[l]="class-conversion", | |||
[ | |||
[e]="conversion function converting %0 to its base class %1 will never be used", | [e]="conversion function converting %0 to its base class %1 will never be used", | ||
[ | [a]=n, | ||
[b]="conversion function converting (.*?) to its base class (.*?) will never be used", | [b]="conversion function converting (.*?) to its base class (.*?) will never be used", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wclass\\-conversion[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{s,11177,"/// ActOnConversionDeclarator - Called by ActOnDeclarator to complete\n/// the declaration of the given C++ conversion function. This routine\n/// is responsible for recording the conversion function in the C++\n/// class, if possible.\nDecl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {\n // ...\n if (Conversion->getTemplateSpecializationKind() != TSK_Undeclared && Conversion->getTemplateSpecializationKind() != TSK_ExplicitSpecialization)\n // ...\n else if (Conversion->size_overridden_methods() != 0)\n // ...\n else if (ConvType->isRecordType()) {\n // ...\n if (ConvType == ClassType)\n // ...\n else if (IsDerivedFrom(Conversion->getLocation(), ClassType, ConvType))\n Diag(Conversion->getLocation(), diag::warn_conv_to_base_not_used) << ClassType << ConvType;"}}, | ||
[ | [h]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp:30:5: warning: conversion function converting \'PR6066::A\' to its base class \'PR6066::B\' will never be used [-Wclass-conversion]"} | ["clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5.cpp:30:5: warning: conversion function converting \'PR6066::A\' to its base class \'PR6066::B\' will never be used [-Wclass-conversion]"} | ||
} | } | ||
}, | }, | ||
["warn_conv_to_self_not_used"]={ | ["warn_conv_to_self_not_used"]={ | ||
[ | [m]={"class-conversion"}, | ||
[l]="class-conversion", | |||
[ | |||
[e]="conversion function converting %0 to itself will never be used", | [e]="conversion function converting %0 to itself will never be used", | ||
[ | [a]=n, | ||
[b]="conversion function converting (.*?) to itself will never be used", | [b]="conversion function converting (.*?) to itself will never be used", | ||
[ | [c]=" \\[(?:\\-Werror,)?\\-Wclass\\-conversion[^\\]]*\\]", | ||
[ | [d]=i, | ||
[ | [f]={R,1237025389,A,A}, | ||
[ | [g]={{s,11174,"/// ActOnConversionDeclarator - Called by ActOnDeclarator to complete\n/// the declaration of the given C++ conversion function. This routine\n/// is responsible for recording the conversion function in the C++\n/// class, if possible.\nDecl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {\n // ...\n if (Conversion->getTemplateSpecializationKind() != TSK_Undeclared && Conversion->getTemplateSpecializationKind() != TSK_ExplicitSpecialization)\n // ...\n else if (Conversion->size_overridden_methods() != 0)\n // ...\n else if (ConvType->isRecordType()) {\n // ...\n if (ConvType == ClassType)\n Diag(Conversion->getLocation(), diag::warn_conv_to_self_not_used) << ClassType;"}}, | ||
[ | [h]={ | ||
["clang/test/SemaCXX/conversion-function.cpp"]={"clang/test/SemaCXX/conversion-function.cpp:63:3: warning: conversion function converting \'B\' to itself will never be used [-Wclass-conversion]","clang/test/SemaCXX/conversion-function.cpp:80:11: warning: conversion function converting \'DerivedB\' to itself will never be used [-Wclass-conversion]"} | ["clang/test/SemaCXX/conversion-function.cpp"]={"clang/test/SemaCXX/conversion-function.cpp:63:3: warning: conversion function converting \'B\' to itself will never be used [-Wclass-conversion]","clang/test/SemaCXX/conversion-function.cpp:80:11: warning: conversion function converting \'DerivedB\' to itself will never be used [-Wclass-conversion]"} | ||
} | } | ||
} | } | ||
}; | }; |
edits