Bots, Bureaucrats, Interface administrators, smwadministrator, smwcurator, smweditor, Administrators
2,557
edits
Timo.stripf (talk | contribs) No edit summary |
Timo.stripf (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local a=""; | local a=""; | ||
local b=" | local b="message"; | ||
local c=" | local c="note\\: "; | ||
local d=" | local d="regex1"; | ||
local e=" | local e="regex2"; | ||
local f=" | local f="regex3"; | ||
local g=" | local g="category"; | ||
local h="commit"; | local h="commit"; | ||
local i="source"; | local i="source"; | ||
Line 12: | Line 12: | ||
local l="clang/lib/AST/ExprConstant.cpp"; | local l="clang/lib/AST/ExprConstant.cpp"; | ||
local m="clang/lib/Sema/SemaDeclCXX.cpp"; | local m="clang/lib/Sema/SemaDeclCXX.cpp"; | ||
local n="clang/lib/Sema/SemaExpr.cpp"; | local n="10.0"; | ||
local | local o="clang/lib/Sema/SemaExpr.cpp"; | ||
local | local p="clang/lib/Sema/SemaExprObjC.cpp"; | ||
local | local q="clang/lib/Sema/SemaDecl.cpp"; | ||
local | local r="9.0"; | ||
local | local s="clang/lib/Sema/SemaTemplate.cpp"; | ||
local | local t="clang/test/SemaObjC/non-trivial-c-union.m:7:13: note: f1 has type \'__weak id\' that is non-trivial to destruct"; | ||
local | local u="clang/test/SemaObjC/non-trivial-c-union.m:5:9: note: \'U0\' has subobjects that are non-trivial to destruct"; | ||
local | local v="clang/test/SemaObjC/non-trivial-c-union.m:6:6: note: f0 has type \'__strong id\' that is non-trivial to destruct"; | ||
local | local w="clang/lib/AST/ASTStructuralEquivalence.cpp"; | ||
local | local x="clang/lib/AST/Interp/Interp.cpp"; | ||
local | local y="clang/lib/Sema/JumpDiagnostics.cpp"; | ||
local | local z="8.0"; | ||
local | local A="clang/test/SemaObjC/non-trivial-c-union.m:7:13: note: f1 has type \'__weak id\' that is non-trivial to copy"; | ||
local | local B="clang/test/SemaObjC/non-trivial-c-union.m:5:9: note: \'U0\' has subobjects that are non-trivial to copy"; | ||
local | local C="clang/lib/Sema/SemaChecking.cpp"; | ||
local | local D="clang/test/SemaObjC/non-trivial-c-union.m:6:6: note: f0 has type \'__strong id\' that is non-trivial to copy"; | ||
local | local E="clang/lib/Sema/SemaTemplateInstantiate.cpp"; | ||
local | local F="16.0"; | ||
local | local G="clang/lib/Sema/SemaStmt.cpp"; | ||
local | local H="clang/lib/Sema/SemaType.cpp"; | ||
local | local I="12.0"; | ||
local | local J="clang/lib/Sema/SemaOpenMP.cpp"; | ||
local | local K="11.0"; | ||
local | local L="7.0"; | ||
local | local M="13.0"; | ||
local | local N="clang/lib/Sema/SemaInit.cpp"; | ||
local | local O="15.0"; | ||
local | local P="clang/lib/Sema/SemaDeclObjC.cpp"; | ||
local | local Q="clang/lib/AST/ODRDiagsEmitter.cpp"; | ||
local | local R="clang/lib/AST/ASTImporter.cpp"; | ||
local | local S="clang/lib/Driver/Driver.cpp"; | ||
local | local T="clang/lib/Sema/SemaDeclAttr.cpp"; | ||
local | local U="5.0"; | ||
local | local V="6.0"; | ||
local | local W="da1b4347e41a"; | ||
local | local X="For P0784R7: Add support for dynamic allocation with new / delete during\nconstant evaluation.\n\nllvm-svn: 373036"; | ||
local | local Y="clang/lib/Sema/SemaExprCXX.cpp"; | ||
local | local Z="For P0784R7: Add support for dynamic allocation with new / delete during"; | ||
local ab="clang/lib/Sema/SemaCoroutine.cpp"; | |||
local bb="clang/test/CXX/expr/expr.const/p2-0x.cpp"; | |||
local cb="clang/lib/Sema/SemaObjCProperty.cpp"; | |||
local db="clang/test/SemaCXX/constant-expression-cxx2a.cpp"; | |||
local eb="clang/lib/Sema/SemaConcept.cpp"; | |||
local | local fb="clang/lib/Sema/SemaOverload.cpp"; | ||
local | local gb="Parse Issue"; | ||
local hb="Lexical or Preprocessor Issue"; | |||
local ib="clang/test/SemaObjC/non-trivial-c-union.m:7:13: note: f1 has type \'__weak id\' that is non-trivial to default-initialize"; | |||
local jb="clang/test/SemaObjC/non-trivial-c-union.m:6:6: note: f0 has type \'__strong id\' that is non-trivial to default-initialize"; | |||
local kb="clang/test/SemaObjC/non-trivial-c-union.m:5:9: note: \'U0\' has subobjects that are non-trivial to default-initialize"; | |||
local lb="clang/lib/Sema/AnalysisBasedWarnings.cpp"; | |||
local mb="14f6bfcb52e7"; | |||
local nb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata"; | |||
local ob="When checking scopes for indirect goto, be more permissive (but still safe)\nabout the permitted scopes. Specifically:\n 1) Permit labels and gotos to appear after a prologue of variable initializations.\n 2) Permit indirect gotos to jump out of scopes that don\'t require cleanup.\n 3) Diagnose possible attempts to indirect-jump out of scopes that do require\n cleanup.\nThis requires a substantial reinvention of the algorithm for checking indirect\ngoto. The current algorithm is Omega(M*N), with M = the number of unique\nscopes being jumped from and N = the number of unique scopes being jumped to,\nwith an additional factor that is probably (worst-case) linear in the depth\nof scopes. Thus the entire thing is likely cubic given some truly bizarre\nill-formed code; on well-formed code the additional factor collapses to\nan amortized constant (when amortized over the entire function) and so\nthe algorithm is quadratic. Even this requires every label to appear in\nits own scope, which would be very unusual for indirect-goto code (and\nextremely unlikely for well-formed code); it is far more likely that\nall labels will be in the same scope and so the algorithm becomes linear.\nFor such a marginal feature, I am fairly happy with this result.\n\n(this is using JumpDiagnostic\'s definition of scope, where successive\nvariables in a block appear in their own scope)\n\nllvm-svn: 103536"; | local ob="When checking scopes for indirect goto, be more permissive (but still safe)\nabout the permitted scopes. Specifically:\n 1) Permit labels and gotos to appear after a prologue of variable initializations.\n 2) Permit indirect gotos to jump out of scopes that don\'t require cleanup.\n 3) Diagnose possible attempts to indirect-jump out of scopes that do require\n cleanup.\nThis requires a substantial reinvention of the algorithm for checking indirect\ngoto. The current algorithm is Omega(M*N), with M = the number of unique\nscopes being jumped from and N = the number of unique scopes being jumped to,\nwith an additional factor that is probably (worst-case) linear in the depth\nof scopes. Thus the entire thing is likely cubic given some truly bizarre\nill-formed code; on well-formed code the additional factor collapses to\nan amortized constant (when amortized over the entire function) and so\nthe algorithm is quadratic. Even this requires every label to appear in\nits own scope, which would be very unusual for indirect-goto code (and\nextremely unlikely for well-formed code); it is far more likely that\nall labels will be in the same scope and so the algorithm becomes linear.\nFor such a marginal feature, I am fairly happy with this result.\n\n(this is using JumpDiagnostic\'s definition of scope, where successive\nvariables in a block appear in their own scope)\n\nllvm-svn: 103536"; | ||
local pb=" | local pb="61d065e21ff3"; | ||
local qb=" | local qb="95f50964fbf5"; | ||
local rb=" | local rb="6d485ff455ea"; | ||
local sb="Improve static checks for sprintf and __builtin___sprintf_chk"; | |||
local | local tb="Improve static checks for sprintf and __builtin___sprintf_chk\n\nImplement a pessimistic evaluator of the minimal required size for a buffer\nbased on the format string, and couple that with the fortified version to emit a\nwarning when the buffer size is lower than the lower bound computed from the\nformat string.\n\nDifferential Revision: https://reviews.llvm.org/D71566"; | ||
local | local ub="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 vb="Let clang atomic builtins fetch add/sub support floating point types"; | ||
local | local wb="Implement P2361 Unevaluated string literals"; | ||
local xb="clang/lib/Sema/SemaModule.cpp"; | |||
local | local yb="clang/lib/Sema/SemaAvailability.cpp"; | ||
local | local zb="14.0"; | ||
local Ab="When checking scopes for indirect goto, be more permissive (but still safe)"; | |||
local Bb="cf819ab38311"; | |||
local Cb="[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 Db="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 Eb="clang/test/SemaCXX/constexpr-string.cpp"; | |||
local Fb="[Clang] Implement P2738R1 - constexpr cast from void*"; | |||
local Gb="[Clang] Implement P2738R1 - constexpr cast from void*\n\nReviewed By: #clang-language-wg, erichkeane\n\nDifferential Revision: https://reviews.llvm.org/D153702"; | |||
local Hb="5253d9138eb3"; | |||
local Ib="clang/lib/Lex/PPMacroExpansion.cpp"; | |||
local | local Jb="f27afedc6c86"; | ||
local | local Kb="[c++20] Determine whether a defaulted comparison should be deleted or"; | ||
local | local Lb="constexpr: semantic checking for constexpr functions and constructors. Based in\npart on patches by Peter Collingbourne.\n\nWe diverge from the C++11 standard in a few areas, mostly related to checking\nconstexpr function declarations, and not just definitions. See WG21 paper\nN3308=11-0078 for details.\n\nFunction invocation substitution is not available in this patch; constexpr\nfunctions cannot yet be used from within constant expressions.\n\nllvm-svn: 140926"; | ||
local Mb="[c++20] Determine whether a defaulted comparison should be deleted or\nconstexpr."; | |||
local Nb="constexpr: semantic checking for constexpr functions and constructors. Based in"; | |||
local Ob="clang/lib/Lex/ModuleMap.cpp"; | |||
local | local Pb="clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp"; | ||
local | local Qb="eb3c10c248ac"; | ||
local | local Rb="Documentation Issue"; | ||
local | local Sb="Properly compute triviality for explicitly-defaulted or deleted special members."; | ||
local Tb="92f241f18812"; | |||
local Ub="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 Vb="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; | ||
local | local Wb="b1c4d5507fad"; | ||
local | local Xb="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"; | ||
local | local Yb="clang/lib/AST/CommentSema.cpp"; | ||
local | local Zb="ec273d3e3a8c"; | ||
local | local ac="clang/test/Sema/flexible-array-init.c:20:7: note: initialized flexible array member \'y\' is here"; | ||
local bc="Add a warning for not packing non-POD members in packed structs"; | |||
local | local cc="Add a warning for not packing non-POD members in packed structs\n\nDifferential Revision: https://reviews.llvm.org/D118511"; | ||
local dc="C++1y: support simple variable assignments in constexpr functions.\n\nllvm-svn: 180603"; | |||
local | local ec="C++1y: support simple variable assignments in constexpr functions."; | ||
local | local fc="3da88fac5416"; | ||
local | local gc="clang/test/SemaSYCL/zero-length-arrays.cpp:25:10: note: field of illegal type \'double[0]\' declared here"; | ||
local | local hc="clang/test/SemaCXX/constant-expression-cxx11.cpp"; | ||
local ic="When AST merging for record declarations fails, warn about the\nincompatibility and show where the structural differences are. For\nexample:\n\nstruct1.c:36:8: warning: type \'struct S7\' has incompatible definitions\nin different translation units\nstruct S7 { int i : 8; unsigned j : 8; } x7;\n ^\nstruct1.c:36:33: note: bit-field \'j\' with type \'unsigned int\' and length 8 here\nstruct S7 { int i : 8; unsigned j : 8; } x7;\n ^\nstruct2.c:33:33: note: bit-field \'j\' with type \'unsigned int\' and length 16 here\nstruct S7 { int i : 8; unsigned j : 16; } x7;\n ^\n\nThere are a few changes to make this work:\n - ASTImporter now has only a single Diagnostic object, not multiple\n diagnostic objects. Otherwise, having a warning/error printed via\n one Diagnostic and its note printed on the other Diagnostic could\n cause the note to be suppressed.\n - Implemented import functionality for IntegerLiteral (along with\n general support for statements and expressions)\n\nllvm-svn: 95900"; | |||
local jc="When AST merging for record declarations fails, warn about the"; | |||
local kc="7eeb59752a60"; | |||
local lc="clang/lib/Sema/SemaLookup.cpp"; | |||
local | local mc="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 nc="Automatic Reference Counting."; | ||
local | local oc="31168b077c36"; | ||
local pc="[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 qc="[clang] New __attribute__((__clang_arm_mve_alias))."; | |||
local rc="7c11da0cfd33"; | |||
local sc="357362d00b04"; | |||
local tc="Add checks and diagnostics for many of the cases which C++11 considers to not"; | |||
local uc="Add checks and diagnostics for many of the cases which C++11 considers to not\nbe constant expressions.\n\nllvm-svn: 146479"; | |||
local vc="clang/lib/Parse/ParseObjc.cpp"; | |||
local wc="PR10217: Provide diagnostics explaining why an implicitly-deleted special"; | |||
local xc="PR10217: Provide diagnostics explaining why an implicitly-deleted special\nmember function is deleted.\n\nllvm-svn: 153773"; | |||
local yc="852265ff1c19"; | |||
local zc="objc-arc: Diagnose when captured variable in block literals"; | |||
local Ac="clang/test/SemaObjC/strong-in-c-struct.m"; | |||
local | local Bc="[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"; | ||
local | local Cc="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 | local Dc="931fcd3ba011"; | ||
local | local Ec="clang/test/CXX/class/class.union/p1.cpp"; | ||
local | local Fc="clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:5:8: note: defaulted \'operator<=>\' is implicitly deleted because class \'A1\' has a reference member"; | ||
local | local Gc="[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 | local Hc="Reland [clang] Check unsupported types in expressions"; | ||
local | local Ic="3dbcea8b957a"; | ||
local Jc="clang/lib/Serialization/ASTReader.cpp"; | |||
local Kc="AST Deserialization Issue"; | |||
local Lc="clang/test/Sema/nonnull.c:161:16: note: declared \'returns_nonnull\' here"; | |||
local Mc="clang/lib/Sema/SemaTemplateInstantiateDecl.cpp"; | |||
local Nc="Lambda Issue"; | |||
local | local Oc="clang/test/Modules/odr_hash.cpp"; | ||
local | local Pc="clang/test/SemaObjC/attr-designated-init.m:38:1: note: method marked as designated initializer of the class here"; | ||
local | local Qc="objc-arc: Diagnose when captured variable in block literals\nrequire destruction and there is possibility of that without\nconstruction. Thanks Johnm for review and suggestions offline.\n// rdar://9535237.\n\nllvm-svn: 134906"; | ||
local | local Rc="clang/test/CXX/basic/basic.types/p10.cpp"; | ||
local | local Sc="256d39d47d27"; | ||
local | local Tc="[clang] Add no_builtin attribute"; | ||
local | local Uc="[WebAssembly] Improve clang diagnostics for wasm attributes"; | ||
local | local Vc="Modules Issue"; | ||
local | local Wc="Coroutines Issue"; | ||
local | local Xc="bd8791610948"; | ||
local | local Yc="clang/lib/Sema/SemaStmtAsm.cpp"; | ||
local | local Zc="clang/lib/Frontend/CompilerInvocation.cpp"; | ||
local | local ad="ARC Casting Rules"; | ||
local | local bd="clang/test/SemaObjC/dictionary-literal-duplicates.m:33:5: note: previous equal key is here"; | ||
local | local cd="clang/lib/Sema/SemaCXXScopeSpec.cpp"; | ||
local dd="Introduce -Wreserved-identifier\ | local dd="Introduce -Wreserved-identifier"; | ||
local | local ed="Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"; | ||
local fd="clang/test/Sema/attr-read-only-placement.cpp:17:23: note: type was declared read-only here"; | |||
local gd="Refine r251469 to give better (and more localizable) diagnostics"; | local gd="Refine r251469 to give better (and more localizable) diagnostics"; | ||
local hd="b83b23275b74"; | local hd="b83b23275b74"; | ||
local id=" | local id="c6af8c606dae"; | ||
local jd="[AST] Improve overflow diagnostics for fixed-point constant evaluation."; | local jd="eee944e7f9e6"; | ||
local | local kd="[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast"; | ||
local ld="clang/test/SemaSYCL/zero-length-arrays.cpp:21:12: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here"; | |||
local md="[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"; | |||
local nd="clang/test/CXX/expr/expr.const/p5-0x.cpp:29:22: note: conversion to integral type \'int\' declared here"; | |||
local od="clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression"; | |||
local pd="[AST] Improve overflow diagnostics for fixed-point constant evaluation."; | |||
local qd="474177c05381"; | |||
local rd="[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast\n\nThis commit adds a new builtin, __builtin_bit_cast(T, v), which performs a\nbit_cast from a value v to a type T. This expression can be evaluated at\ncompile time under specific circumstances.\n\nThe compile time evaluation currently doesn\'t support bit-fields, but I\'m\nplanning on fixing this in a follow up (some of the logic for figuring this out\nis in CodeGen). I\'m also planning follow-ups for supporting some more esoteric\ntypes that the constexpr evaluator supports, as well as extending\n__builtin_memcpy constexpr evaluation to use the same infrastructure.\n\nrdar://44987528\n\nDifferential revision: https://reviews.llvm.org/D62825\n\nllvm-svn: 364954"; | |||
local sd="clang/test/CXX/expr/expr.const/p5-0x.cpp:33:13: note: conversion to integral type \'int\' declared here"; | |||
local td="clang/lib/CodeGen/CodeGenAction.cpp"; | |||
local ud="clang/test/CXX/expr/expr.const/p5-0x.cpp:34:13: note: conversion to integral type \'long\' declared here"; | |||
local vd="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"; | |||
local wd="ARC Restrictions"; | |||
return { | return { | ||
["note_access_protected_restricted_noobject"]={ | ["note_access_protected_restricted_noobject"]={ | ||
[ | [b]="must name member using the type of the current context %0", | ||
[ | [d]=c, | ||
[ | [e]="must name member using the type of the current context (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | [h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | ||
[i]={{"clang/lib/Sema/SemaAccess.cpp",1079,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n // If we don\'t have an instance context, [class.protected] says the\n // naming class has to equal the context class.\n if (!Target.hasInstanceContext()) {\n // ...\n S.Diag(D->getLocation(), diag::note_access_protected_restricted_noobject) << S.Context.getTypeDeclType(ECRecord);"}}, | [i]={{"clang/lib/Sema/SemaAccess.cpp",1079,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n // If we don\'t have an instance context, [class.protected] says the\n // naming class has to equal the context class.\n if (!Target.hasInstanceContext()) {\n // ...\n S.Diag(D->getLocation(), diag::note_access_protected_restricted_noobject) << S.Context.getTypeDeclType(ECRecord);"}}, | ||
Line 181: | Line 193: | ||
}, | }, | ||
["note_access_protected_restricted_object"]={ | ["note_access_protected_restricted_object"]={ | ||
[ | [b]="can only access this member on an object of type %0", | ||
[ | [d]=c, | ||
[ | [e]="can only access this member on an object of type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | [h]={"5dadb65e0722",1333767860,"Fix several problems with protected access control:","Fix several problems with protected access control:\n - The [class.protected] restriction is non-trivial for any instance\n member, even if the access lacks an object (for example, if it\'s\n a pointer-to-member constant). In this case, it is equivalent to\n requiring the naming class to equal the context class.\n - The [class.protected] restriction applies to accesses to constructors\n and destructors. A protected constructor or destructor can only be\n used to create or destroy a base subobject, as a direct result.\n - Several places were dropping or misapplying object information.\n\nThe standard could really be much clearer about what the object type is\nsupposed to be in some of these accesses. Usually it\'s easy enough to\nfind a reasonable answer, but still, the standard makes a very confident\nstatement about accesses to instance members only being possible in\neither pointer-to-member literals or member access expressions, which\njust completely ignores concepts like constructor and destructor\ncalls, using declarations, unevaluated field references, etc.\n\nllvm-svn: 154248"}, | ||
[i]={{"clang/lib/Sema/SemaAccess.cpp",1108,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n return S.Diag(D->getLocation(), diag::note_access_protected_restricted_object) << S.Context.getTypeDeclType(ECRecord);"}}, | [i]={{"clang/lib/Sema/SemaAccess.cpp",1108,"/// Given that an entity has protected natural access, check whether\n/// access might be denied because of the protected member access\n/// restriction.\n///\n/// \\return true if a note was emitted\nstatic bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC, AccessTarget &Target) {\n // ...\n for (EffectiveContext::record_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {\n // ...\n return S.Diag(D->getLocation(), diag::note_access_protected_restricted_object) << S.Context.getTypeDeclType(ECRecord);"}}, | ||
Line 193: | Line 205: | ||
}, | }, | ||
["note_add_deprecation_attr"]={ | ["note_add_deprecation_attr"]={ | ||
[ | [b]="add a deprecation attribute to the declaration to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="add a deprecation attribute to the declaration to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"1da888691587",1348350470,"Comment sema: warn when comment has \\deprecated but declaration does not have a","Comment sema: warn when comment has \\deprecated but declaration does not have a\ndeprecation attribute (\'deprecated\', \'availability\' or \'unavailable\').\n\nThis warning is under a separate flag, -Wdocumentation-deprecated-sync, so it\ncan be turned off easily while leaving other -Wdocumentation warnings on.\n\nllvm-svn: 164467"}, | [h]={"1da888691587",1348350470,"Comment sema: warn when comment has \\deprecated but declaration does not have a","Comment sema: warn when comment has \\deprecated but declaration does not have a\ndeprecation attribute (\'deprecated\', \'availability\' or \'unavailable\').\n\nThis warning is under a separate flag, -Wdocumentation-deprecated-sync, so it\ncan be turned off easily while leaving other -Wdocumentation warnings on.\n\nllvm-svn: 164467"}, | ||
[i]={{ | [i]={{Yb,700,"void Sema::checkDeprecatedCommand(const BlockCommandComment *Command) {\n // ...\n // Try to emit a fixit with a deprecation attribute.\n if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n Diag(Loc, diag::note_add_deprecation_attr) << FixItHint::CreateInsertion(Loc, TextToInsert);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-documentation-fixits.c"]={"clang/test/Sema/warn-documentation-fixits.c:7:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:11:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:17:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:24:1: note: add a deprecation attribute to the declaration to silence this warning"} | ["clang/test/Sema/warn-documentation-fixits.c"]={"clang/test/Sema/warn-documentation-fixits.c:7:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:11:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:17:1: note: add a deprecation attribute to the declaration to silence this warning","clang/test/Sema/warn-documentation-fixits.c:24:1: note: add a deprecation attribute to the declaration to silence this warning"} | ||
Line 205: | Line 217: | ||
}, | }, | ||
["note_add_synthesize_directive"]={ | ["note_add_synthesize_directive"]={ | ||
[ | [b]={{nil,U,"add a \'@synthesize\' directive"}}, | ||
[ | [d]=c, | ||
[ | [e]="add a \'@synthesize\' directive", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6c9af50cc815",1499076744,"Add a fixit for -Wobjc-protocol-property-synthesis","Add a fixit for -Wobjc-protocol-property-synthesis\n\nrdar://32132756\n\nDifferential Revision: https://reviews.llvm.org/D34886\n\nllvm-svn: 307014"}, | [h]={"6c9af50cc815",1499076744,"Add a fixit for -Wobjc-protocol-property-synthesis","Add a fixit for -Wobjc-protocol-property-synthesis\n\nrdar://32132756\n\nDifferential Revision: https://reviews.llvm.org/D34886\n\nllvm-svn: 307014"}, | ||
[i]={{ | [i]={{cb,1940,"/// Default synthesizes all properties which must be synthesized\n/// in class\'s \\@implementation.\nvoid Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd) {\n // ...\n for (const auto &PropEntry : PropMap) {\n // ...\n if (ObjCProtocolDecl *Proto = dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) {\n // We won\'t auto-synthesize properties declared in protocols.\n // Suppress the warning if class\'s superclass implements property\'s\n // getter and implements property\'s setter (if readwrite property).\n // Or, if property is going to be implemented in its super class.\n if (!SuperClassImplementsProperty(IDecl, Prop) && !PropInSuperClass) {\n // ...\n Diag(AtEnd, diag::note_add_synthesize_directive) << FixItHint::CreateInsertion(AtEnd, FixIt);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:140:1: note: add a \'@synthesize\' directive"} | ["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:140:1: note: add a \'@synthesize\' directive"} | ||
Line 217: | Line 229: | ||
}, | }, | ||
["note_additional_parens_for_variable_declaration"]={ | ["note_additional_parens_for_variable_declaration"]={ | ||
[ | [b]="add a pair of parentheses to declare a variable", | ||
[ | [d]=c, | ||
[ | [e]="add a pair of parentheses to declare a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"943c44045551",1343683852,"Improvements to vexing-parse warnings. Make the no-parameters case more","Improvements to vexing-parse warnings. Make the no-parameters case more\naccurate by asking the parser whether there was an ambiguity rather than trying\nto reverse-engineer it from the DeclSpec. Make the with-parameters case have\nbetter diagnostics by using semantic information to drive the warning,\nimproving the diagnostics and adding a fixit.\n\nPatch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for\ndeclarations of the form \'T (*x)(...)\', which seem to have a very high false\npositive rate, and to reduce indentation in \'warnAboutAmbiguousFunction\'.\n\nllvm-svn: 160998"}, | [h]={"943c44045551",1343683852,"Improvements to vexing-parse warnings. Make the no-parameters case more","Improvements to vexing-parse warnings. Make the no-parameters case more\naccurate by asking the parser whether there was an ambiguity rather than trying\nto reverse-engineer it from the DeclSpec. Make the with-parameters case have\nbetter diagnostics by using semantic information to drive the warning,\nimproving the diagnostics and adding a fixit.\n\nPatch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for\ndeclarations of the form \'T (*x)(...)\', which seem to have a very high false\npositive rate, and to reduce indentation in \'warnAboutAmbiguousFunction\'.\n\nllvm-svn: 160998"}, | ||
[i]={{ | [i]={{H,3893,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n if (FTI.NumParams > 0) {\n // ...\n S.Diag(B, diag::note_additional_parens_for_variable_declaration) << FixItHint::CreateInsertion(B, \"(\") << FixItHint::CreateInsertion(E, \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:7: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:18:8: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:73:9: note: add a pair of parentheses to declare a variable"} | ["clang/test/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:16:7: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:18:8: note: add a pair of parentheses to declare a variable","clang/test/SemaCXX/dcl_ambig_res.cpp:73:9: note: add a pair of parentheses to declare a variable"} | ||
Line 229: | Line 241: | ||
}, | }, | ||
["note_addrof_ovl_candidate_disabled_by_enable_if_attr"]={ | ["note_addrof_ovl_candidate_disabled_by_enable_if_attr"]={ | ||
[ | [b]="candidate function made ineligible by enable_if", | ||
[ | [d]=c, | ||
[ | [e]="candidate function made ineligible by enable_if", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang.","Add the `pass_object_size` attribute to clang.\n\n`pass_object_size` is our way of enabling `__builtin_object_size` to\nproduce high quality results without requiring inlining to happen\neverywhere.\n\nA link to the design doc for this attribute is available at the\nDifferential review link below.\n\nDifferential Revision: http://reviews.llvm.org/D13263\n\nllvm-svn: 254554"}, | [h]={"3e3bb95b6951",1449093488,"Add the `pass_object_size` attribute to clang.","Add the `pass_object_size` attribute to clang.\n\n`pass_object_size` is our way of enabling `__builtin_object_size` to\nproduce high quality results without requiring inlining to happen\neverywhere.\n\nA link to the design doc for this attribute is available at the\nDifferential review link below.\n\nDifferential Revision: http://reviews.llvm.org/D13263\n\nllvm-svn: 254554"}, | ||
[i]={{ | [i]={{fb,10561,"/// Returns true if we can take the address of the function.\n///\n/// \\param Complain - If true, we\'ll emit a diagnostic\n/// \\param InOverloadResolution - For the purposes of emitting a diagnostic, are\n/// we in overload resolution?\n/// \\param Loc - The location of the statement we\'re complaining about. Ignored\n/// if we\'re not complaining, or if we\'re in overload resolution.\nstatic bool checkAddressOfFunctionIsAvailable(Sema &S, const FunctionDecl *FD, bool Complain, bool InOverloadResolution, SourceLocation Loc) {\n if (!isFunctionAlwaysEnabled(S.Context, FD)) {\n if (Complain) {\n if (InOverloadResolution)\n S.Diag(FD->getBeginLoc(), diag::note_addrof_ovl_candidate_disabled_by_enable_if_attr);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if"} | ["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:129:3: note: candidate function made ineligible by enable_if","clang/test/Sema/overloadable.c:128:3: note: candidate function made ineligible by enable_if"} | ||
Line 241: | Line 253: | ||
}, | }, | ||
["note_alias_mangled_name_alternative"]={ | ["note_alias_mangled_name_alternative"]={ | ||
[ | [b]="function by that name is mangled as \"%0\"", | ||
[ | [d]=c, | ||
[ | [e]="function by that name is mangled as \"(.*?)\"", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks","[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the use of `-Rmodule-build` and `-Rmodule-import` only\nproduces diagnostics for modules built or imported by non-system code.\n\nFor example, if a project source file requires the Foundation module to be\nbuilt, then `-Rmodule-build` will show a single diagnostic for Foundation, but\nnot in turn for any of Foundation\'s (direct or indirect) dependencies. This is\nbecause the locations of those transitive module builds are initiated from\nsystem headers, which are ignored by default. When wanting to observe module\nbuilding/importing, the system modules can represent a significant amount of\nmodule diagnostics, and I think should be shown by default when\n`-Rmodule-build` and `-Rmodule-import` are specified.\n\nI noticed some other remarks use `ShowInSystemHeader`.\n\nDifferential Revision: https://reviews.llvm.org/D139653"}, | [h]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks","[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the use of `-Rmodule-build` and `-Rmodule-import` only\nproduces diagnostics for modules built or imported by non-system code.\n\nFor example, if a project source file requires the Foundation module to be\nbuilt, then `-Rmodule-build` will show a single diagnostic for Foundation, but\nnot in turn for any of Foundation\'s (direct or indirect) dependencies. This is\nbecause the locations of those transitive module builds are initiated from\nsystem headers, which are ignored by default. When wanting to observe module\nbuilding/importing, the system modules can represent a significant amount of\nmodule diagnostics, and I think should be shown by default when\n`-Rmodule-build` and `-Rmodule-import` are specified.\n\nI noticed some other remarks use `ShowInSystemHeader`.\n\nDifferential Revision: https://reviews.llvm.org/D139653"}, | ||
[i]={{"clang/lib/CodeGen/CodeGenModule.cpp",586,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n // ...\n if (GV->isDeclaration()) {\n // ...\n // Provide a note if the given function is not found and exists as a\n // mangled name.\n for (const auto &[Decl, Name] : MangledDeclNames) {\n if (const auto *ND = dyn_cast<NamedDecl>(Decl.getDecl())) {\n if (ND->getName() == GV->getName()) {\n Diags.Report(Location, diag::note_alias_mangled_name_alternative) << Name << FixItHint::CreateReplacement(AliasRange, (Twine(IsIFunc ? \"ifunc\" : \"alias\") + \"(\\\"\" + Name + \"\\\")\").str());"}}, | [i]={{"clang/lib/CodeGen/CodeGenModule.cpp",586,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n // ...\n if (GV->isDeclaration()) {\n // ...\n // Provide a note if the given function is not found and exists as a\n // mangled name.\n for (const auto &[Decl, Name] : MangledDeclNames) {\n if (const auto *ND = dyn_cast<NamedDecl>(Decl.getDecl())) {\n if (ND->getName() == GV->getName()) {\n Diags.Report(Location, diag::note_alias_mangled_name_alternative) << Name << FixItHint::CreateReplacement(AliasRange, (Twine(IsIFunc ? \"ifunc\" : \"alias\") + \"(\\\"\" + Name + \"\\\")\").str());"}}, | ||
Line 253: | Line 265: | ||
}, | }, | ||
["note_alias_requires_mangled_name"]={ | ["note_alias_requires_mangled_name"]={ | ||
[ | [b]="the %select{function or variable|function}0 specified in an %select{alias|ifunc}1 must refer to its mangled name", | ||
[ | [d]=c, | ||
[ | [e]="the (?:function or variable|function) specified in an (?:alias|ifunc) must refer to its mangled name", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks","[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the use of `-Rmodule-build` and `-Rmodule-import` only\nproduces diagnostics for modules built or imported by non-system code.\n\nFor example, if a project source file requires the Foundation module to be\nbuilt, then `-Rmodule-build` will show a single diagnostic for Foundation, but\nnot in turn for any of Foundation\'s (direct or indirect) dependencies. This is\nbecause the locations of those transitive module builds are initiated from\nsystem headers, which are ignored by default. When wanting to observe module\nbuilding/importing, the system modules can represent a significant amount of\nmodule diagnostics, and I think should be shown by default when\n`-Rmodule-build` and `-Rmodule-import` are specified.\n\nI noticed some other remarks use `ShowInSystemHeader`.\n\nDifferential Revision: https://reviews.llvm.org/D139653"}, | [h]={"ba6e747f9b05",1670524276,"[clang] Set ShowInSystemHeader for module-build and module-import remarks","[clang] Set ShowInSystemHeader for module-build and module-import remarks\n\nWithout this change, the use of `-Rmodule-build` and `-Rmodule-import` only\nproduces diagnostics for modules built or imported by non-system code.\n\nFor example, if a project source file requires the Foundation module to be\nbuilt, then `-Rmodule-build` will show a single diagnostic for Foundation, but\nnot in turn for any of Foundation\'s (direct or indirect) dependencies. This is\nbecause the locations of those transitive module builds are initiated from\nsystem headers, which are ignored by default. When wanting to observe module\nbuilding/importing, the system modules can represent a significant amount of\nmodule diagnostics, and I think should be shown by default when\n`-Rmodule-build` and `-Rmodule-import` are specified.\n\nI noticed some other remarks use `ShowInSystemHeader`.\n\nDifferential Revision: https://reviews.llvm.org/D139653"}, | ||
[i]={{"clang/lib/CodeGen/CodeGenModule.cpp",579,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n // ...\n if (GV->isDeclaration()) {\n // ...\n Diags.Report(Location, diag::note_alias_requires_mangled_name) << IsIFunc << IsIFunc;"}}, | [i]={{"clang/lib/CodeGen/CodeGenModule.cpp",579,"static bool checkAliasedGlobal(DiagnosticsEngine &Diags, SourceLocation Location, bool IsIFunc, const llvm::GlobalValue *Alias, const llvm::GlobalValue *&GV, const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames, SourceRange AliasRange) {\n // ...\n if (GV->isDeclaration()) {\n // ...\n Diags.Report(Location, diag::note_alias_requires_mangled_name) << IsIFunc << IsIFunc;"}}, | ||
Line 265: | Line 277: | ||
}, | }, | ||
["note_alignas_on_declaration"]={ | ["note_alignas_on_declaration"]={ | ||
[ | [b]="declared with %0 attribute here", | ||
[ | [d]=c, | ||
[ | [e]="declared with (.*?) attribute here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of","Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of\nthe normal attribute-merging path, because we can\'t merge alignment attributes\nwithout knowing the complete set of alignment attributes which apply to a\nparticular declaration.\n\nllvm-svn: 175861"}, | [h]={"bc8caaf05f09",1361508939,"Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of","Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of\nthe normal attribute-merging path, because we can\'t merge alignment attributes\nwithout knowing the complete set of alignment attributes which apply to a\nparticular declaration.\n\nllvm-svn: 175861"}, | ||
[i]={{ | [i]={{q,2859,"/// Merge alignment attributes from \\p Old to \\p New, taking into account the\n/// special semantics of C11\'s _Alignas specifier and C++11\'s alignas attribute.\n///\n/// \\return \\c true if any attributes were added to \\p New.\nstatic bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {\n // ...\n if (OldAlignasAttr && !NewAlignasAttr && isAttributeTargetADefinition(New)) {\n // ...\n S.Diag(OldAlignasAttr->getLocation(), diag::note_alignas_on_declaration) << OldAlignasAttr;"},{q,3087,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n // ...\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n // ...\n if (isa<C11NoReturnAttr>(NewAttribute)) {\n // ...\n } else if (isa<UuidAttr>(NewAttribute)) {\n // ...\n } else if (const AlignedAttr *AA = dyn_cast<AlignedAttr>(NewAttribute)) {\n if (AA->isAlignas()) {\n // ...\n S.Diag(NewAttribute->getLocation(), diag::note_alignas_on_declaration) << AA;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:19:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:24:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:28:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:31:8: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:44:8: note: declared with \'alignas\' attribute here"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:19:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:24:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:28:1: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:31:8: note: declared with \'alignas\' attribute here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p6.cpp:44:8: note: declared with \'alignas\' attribute here"} | ||
Line 277: | Line 289: | ||
}, | }, | ||
["note_allocated_here"]={ | ["note_allocated_here"]={ | ||
[ | [b]="allocated with \'new%select{[]|}0\' here", | ||
[ | [d]=c, | ||
[ | [e]="allocated with \'new(?:\\[\\]|)\' here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"538ef53c139d",1431620097,"Detect uses of mismatching forms of \'new\' and \'delete\'","Detect uses of mismatching forms of \'new\' and \'delete\'\n\nEmit warning when operand to `delete` is allocated with `new[]` or\noperand to `delete[]` is allocated with `new`.\n\nReviewers: rtrieu, jordan_rose, rsmith\n\nSubscribers: majnemer, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4661\n\nllvm-svn: 237368"}, | [h]={"538ef53c139d",1431620097,"Detect uses of mismatching forms of \'new\' and \'delete\'","Detect uses of mismatching forms of \'new\' and \'delete\'\n\nEmit warning when operand to `delete` is allocated with `new[]` or\noperand to `delete[]` is allocated with `new`.\n\nReviewers: rtrieu, jordan_rose, rsmith\n\nSubscribers: majnemer, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4661\n\nllvm-svn: 237368"}, | ||
[i]={{ | [i]={{Y,3541,"static void DiagnoseMismatchedNewDelete(Sema &SemaRef, SourceLocation DeleteLoc, const MismatchingNewDeleteDetector &Detector) {\n // ...\n for (const auto *NE : Detector.NewExprs)\n SemaRef.Diag(NE->getExprLoc(), diag::note_allocated_here) << Detector.IsArrayForm;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/default-arguments.cpp"]={"clang/test/CodeGenCXX/default-arguments.cpp:63:10: note: allocated with \'new[]\' here"} | ["clang/test/CodeGenCXX/default-arguments.cpp"]={"clang/test/CodeGenCXX/default-arguments.cpp:63:10: note: allocated with \'new[]\' here"} | ||
Line 289: | Line 301: | ||
}, | }, | ||
["note_also_found"]={ | ["note_also_found"]={ | ||
[ | [b]="also found", | ||
[ | [d]=c, | ||
[ | [e]="also found", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow","Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename note_using_decl to note_using, which is possibly less confusing.\nAdd a test for non-class-scope using decl collisions and be sure to note the case\nwe can\'t diagnose yet.\n\nllvm-svn: 91057"}, | [h]={"e29c5cd2398c",1260474663,"Improve the diagnostic when a new declaration conflicts with a using shadow","Improve the diagnostic when a new declaration conflicts with a using shadow\ndeclaration. Rename note_using_decl to note_using, which is possibly less confusing.\nAdd a test for non-class-scope using decl collisions and be sure to note the case\nwe can\'t diagnose yet.\n\nllvm-svn: 91057"}, | ||
[i]={{ | [i]={{P,3645,"void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl *> &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass) {\n // ...\n if (issueDiagnostic) {\n // ...\n for (unsigned I = 1, N = Methods.size(); I != N; ++I) {\n Diag(Methods[I]->getBeginLoc(), diag::note_also_found) << Methods[I]->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:22:1: note: also found","clang/test/SemaObjC/selector-overload.m:28:1: note: also found","clang/test/SemaObjC/selector-overload.m:34:1: note: also found","clang/test/SemaObjC/selector-overload.m:40:1: note: also found"} | ["clang/test/SemaObjC/selector-overload.m"]={"clang/test/SemaObjC/selector-overload.m:22:1: note: also found","clang/test/SemaObjC/selector-overload.m:28:1: note: also found","clang/test/SemaObjC/selector-overload.m:34:1: note: also found","clang/test/SemaObjC/selector-overload.m:40:1: note: also found"} | ||
Line 301: | Line 313: | ||
}, | }, | ||
["note_ambig_member_ref_object_type"]={ | ["note_ambig_member_ref_object_type"]={ | ||
[ | [b]="lookup in the object type %0 refers here", | ||
[ | [d]=c, | ||
[ | [e]="lookup in the object type (.*?) refers here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b7bfe794129f",1251932376,"Rewrite of our handling of name lookup in C++ member access expressions, e.g.,","Rewrite of our handling of name lookup in C++ member access expressions, e.g.,\n\n x->Base::f\n\nWe no longer try to \"enter\" the context of the type that \"x\" points\nto. Instead, we drag that object type through the parser and pass it\ninto the Sema routines that need to know how to perform lookup within\nmember access expressions.\n\nWe now implement most of the crazy name lookup rules in C++\n[basic.lookup.classref] for non-templated code, including performing\nlookup both in the context of the type referred to by the member\naccess and in the scope of the member access itself and then detecting\nambiguities when the two lookups collide (p1 and p4; p3 and p7 are\nstill TODO). This change also corrects our handling of name lookup\nwithin template arguments of template-ids inside the\nnested-name-specifier (p6; we used to look into the scope of the\nobject expression for them) and fixes PR4703.\n\nI have disabled some tests that involve member access expressions\nwhere the object expression has dependent type, because we don\'t yet\nhave the ability to describe dependent nested-name-specifiers starting\nwith an identifier.\n\nllvm-svn: 80843"}, | [h]={"b7bfe794129f",1251932376,"Rewrite of our handling of name lookup in C++ member access expressions, e.g.,","Rewrite of our handling of name lookup in C++ member access expressions, e.g.,\n\n x->Base::f\n\nWe no longer try to \"enter\" the context of the type that \"x\" points\nto. Instead, we drag that object type through the parser and pass it\ninto the Sema routines that need to know how to perform lookup within\nmember access expressions.\n\nWe now implement most of the crazy name lookup rules in C++\n[basic.lookup.classref] for non-templated code, including performing\nlookup both in the context of the type referred to by the member\naccess and in the scope of the member access itself and then detecting\nambiguities when the two lookups collide (p1 and p4; p3 and p7 are\nstill TODO). This change also corrects our handling of name lookup\nwithin template arguments of template-ids inside the\nnested-name-specifier (p6; we used to look into the scope of the\nobject expression for them) and fixes PR4703.\n\nI have disabled some tests that involve member access expressions\nwhere the object expression has dependent type, because we don\'t yet\nhave the ability to describe dependent nested-name-specifiers starting\nwith an identifier.\n\nllvm-svn: 80843"}, | ||
[i]={{ | [i]={{cd,684,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (AcceptSpec) {\n if (!ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (isAcceptableNestedNameSpecifier(OuterDecl) && OuterDecl->getCanonicalDecl() != SD->getCanonicalDecl() && (!isa<TypeDecl>(OuterDecl) || !isa<TypeDecl>(SD) || !Context.hasSameType(Context.getTypeDeclType(cast<TypeDecl>(OuterDecl)), Context.getTypeDeclType(cast<TypeDecl>(SD))))) {\n // ...\n Diag(SD->getLocation(), diag::note_ambig_member_ref_object_type) << ObjectType;"},{s,609,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (FoundOuter.empty()) {\n // ...\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n // ...\n } else if (!Found.isSuppressingDiagnostics()) {\n // - if the name found is a class template, it must refer to the same\n // entity as the one found in the class of the object expression,\n // otherwise the program is ill-formed.\n if (!Found.isSingleResult() || getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != OuterTemplate->getCanonicalDecl()) {\n // ...\n Diag(Found.getRepresentativeDecl()->getLocation(), diag::note_ambig_member_ref_object_type) << ObjectType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:9:16: note: lookup in the object type \'A::sub\' refers here"} | ["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:9:16: note: lookup in the object type \'A::sub\' refers here"} | ||
Line 313: | Line 325: | ||
}, | }, | ||
["note_ambig_member_ref_scope"]={ | ["note_ambig_member_ref_scope"]={ | ||
[ | [b]="lookup from the current scope refers here", | ||
[ | [d]=c, | ||
[ | [e]="lookup from the current scope refers here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b7bfe794129f",1251932376,"Rewrite of our handling of name lookup in C++ member access expressions, e.g.,","Rewrite of our handling of name lookup in C++ member access expressions, e.g.,\n\n x->Base::f\n\nWe no longer try to \"enter\" the context of the type that \"x\" points\nto. Instead, we drag that object type through the parser and pass it\ninto the Sema routines that need to know how to perform lookup within\nmember access expressions.\n\nWe now implement most of the crazy name lookup rules in C++\n[basic.lookup.classref] for non-templated code, including performing\nlookup both in the context of the type referred to by the member\naccess and in the scope of the member access itself and then detecting\nambiguities when the two lookups collide (p1 and p4; p3 and p7 are\nstill TODO). This change also corrects our handling of name lookup\nwithin template arguments of template-ids inside the\nnested-name-specifier (p6; we used to look into the scope of the\nobject expression for them) and fixes PR4703.\n\nI have disabled some tests that involve member access expressions\nwhere the object expression has dependent type, because we don\'t yet\nhave the ability to describe dependent nested-name-specifiers starting\nwith an identifier.\n\nllvm-svn: 80843"}, | [h]={"b7bfe794129f",1251932376,"Rewrite of our handling of name lookup in C++ member access expressions, e.g.,","Rewrite of our handling of name lookup in C++ member access expressions, e.g.,\n\n x->Base::f\n\nWe no longer try to \"enter\" the context of the type that \"x\" points\nto. Instead, we drag that object type through the parser and pass it\ninto the Sema routines that need to know how to perform lookup within\nmember access expressions.\n\nWe now implement most of the crazy name lookup rules in C++\n[basic.lookup.classref] for non-templated code, including performing\nlookup both in the context of the type referred to by the member\naccess and in the scope of the member access itself and then detecting\nambiguities when the two lookups collide (p1 and p4; p3 and p7 are\nstill TODO). This change also corrects our handling of name lookup\nwithin template arguments of template-ids inside the\nnested-name-specifier (p6; we used to look into the scope of the\nobject expression for them) and fixes PR4703.\n\nI have disabled some tests that involve member access expressions\nwhere the object expression has dependent type, because we don\'t yet\nhave the ability to describe dependent nested-name-specifiers starting\nwith an identifier.\n\nllvm-svn: 80843"}, | ||
[i]={{ | [i]={{cd,686,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (AcceptSpec) {\n if (!ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (isAcceptableNestedNameSpecifier(OuterDecl) && OuterDecl->getCanonicalDecl() != SD->getCanonicalDecl() && (!isa<TypeDecl>(OuterDecl) || !isa<TypeDecl>(SD) || !Context.hasSameType(Context.getTypeDeclType(cast<TypeDecl>(OuterDecl)), Context.getTypeDeclType(cast<TypeDecl>(SD))))) {\n // ...\n Diag(OuterDecl->getLocation(), diag::note_ambig_member_ref_scope);"},{s,612,"bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate, AssumedTemplateKind *ATK, bool AllowTypoCorrection) {\n // ...\n if (S && !ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (FoundOuter.empty()) {\n // ...\n } else if (FoundOuter.isAmbiguous() || !FoundOuter.isSingleResult() || !(OuterTemplate = getAsTemplateNameDecl(FoundOuter.getFoundDecl()))) {\n // ...\n } else if (!Found.isSuppressingDiagnostics()) {\n // - if the name found is a class template, it must refer to the same\n // entity as the one found in the class of the object expression,\n // otherwise the program is ill-formed.\n if (!Found.isSingleResult() || getAsTemplateNameDecl(Found.getFoundDecl())->getCanonicalDecl() != OuterTemplate->getCanonicalDecl()) {\n // ...\n Diag(FoundOuter.getFoundDecl()->getLocation(), diag::note_ambig_member_ref_scope);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:94:25: note: lookup from the current scope refers here"} | ["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:94:25: note: lookup from the current scope refers here"} | ||
Line 325: | Line 337: | ||
}, | }, | ||
["note_ambiguous_atomic_constraints"]={ | ["note_ambiguous_atomic_constraints"]={ | ||
[ | [b]={{nil,n,"similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"}}, | ||
[ | [d]=c, | ||
[ | [e]="similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | [h]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | ||
[i]={{ | [i]={{eb,1579,"bool Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef<const Expr *> AC1, NamedDecl *D2, ArrayRef<const Expr *> AC2) {\n // ...\n Diag(AmbiguousAtomic1->getBeginLoc(), diag::note_ambiguous_atomic_constraints) << AmbiguousAtomic1->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:3:32: note: similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"} | ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:3:32: note: similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"} | ||
Line 337: | Line 349: | ||
}, | }, | ||
["note_ambiguous_atomic_constraints_similar_expression"]={ | ["note_ambiguous_atomic_constraints_similar_expression"]={ | ||
[ | [b]={{nil,n,"similar constraint expression here"}}, | ||
[ | [d]=c, | ||
[ | [e]="similar constraint expression here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | [h]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | ||
[i]={{ | [i]={{eb,1,"bool Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef<const Expr *> AC1, NamedDecl *D2, ArrayRef<const Expr *> AC2) {\n // ...\n Diag(AmbiguousAtomic2->getBeginLoc(), diag::note_ambiguous_atomic_constraints_similar_expression) << AmbiguousAtomic2->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:7:32: note: similar constraint expression here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:7:32: note: similar constraint expression here"} | ||
Line 349: | Line 361: | ||
}, | }, | ||
["note_ambiguous_candidate"]={ | ["note_ambiguous_candidate"]={ | ||
[ | [b]="candidate found by name lookup is %q0", | ||
[ | [d]=c, | ||
[ | [e]="candidate found by name lookup is (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | [h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | ||
[i]={{ | [i]={{lc,2866,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousReference: {\n // ...\n for (auto *D : Result)\n Diag(D->getLocation(), diag::note_ambiguous_candidate) << D;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:14:10: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:4:10: note: candidate found by name lookup is \'A::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:15:9: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:5:7: note: candidate found by name lookup is \'A::x\'"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:14:10: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:4:10: note: candidate found by name lookup is \'A::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:15:9: note: candidate found by name lookup is \'B::x\'","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:5:7: note: candidate found by name lookup is \'A::x\'"} | ||
Line 361: | Line 373: | ||
}, | }, | ||
["note_ambiguous_inherited_constructor_using"]={ | ["note_ambiguous_inherited_constructor_using"]={ | ||
[ | [b]="inherited from base class %0 here", | ||
[ | [d]=c, | ||
[ | [e]="inherited from base class (.*?) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | [h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | ||
[i]={{m,7305,"class Sema::InheritedConstructorInfo {\n // ...\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // ...\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // ...\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n // ...\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n if (!DiagnosedMultipleConstructedBases) {\n // ...\n S.Diag(ConstructedBaseIntroducer->getLocation(), diag::note_ambiguous_inherited_constructor_using) << ConstructedBase;"},{m,7310,"class Sema::InheritedConstructorInfo {\n // ...\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // ...\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // ...\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n // ...\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n // ...\n S.Diag(D->getIntroducer()->getLocation(), diag::note_ambiguous_inherited_constructor_using) << DConstructedBase;"}}, | [i]={{m,7305,"class Sema::InheritedConstructorInfo {\n // ...\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // ...\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // ...\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n // ...\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n if (!DiagnosedMultipleConstructedBases) {\n // ...\n S.Diag(ConstructedBaseIntroducer->getLocation(), diag::note_ambiguous_inherited_constructor_using) << ConstructedBase;"},{m,7310,"class Sema::InheritedConstructorInfo {\n // ...\n InheritedConstructorInfo(Sema &S, SourceLocation UseLoc, ConstructorUsingShadowDecl *Shadow) : S(S), UseLoc(UseLoc) {\n // ...\n // Find the set of such base class subobjects and check that there\'s a\n // unique constructed subobject.\n for (auto *D : Shadow->redecls()) {\n // ...\n // [class.inhctor.init]p2:\n // If the constructor was inherited from multiple base class subobjects\n // of type B, the program is ill-formed.\n if (!ConstructedBase) {\n // ...\n } else if (ConstructedBase != DConstructedBase && !Shadow->isInvalidDecl()) {\n // ...\n S.Diag(D->getIntroducer()->getLocation(), diag::note_ambiguous_inherited_constructor_using) << DConstructedBase;"}}, | ||
Line 373: | Line 385: | ||
}, | }, | ||
["note_ambiguous_member_found"]={ | ["note_ambiguous_member_found"]={ | ||
[ | [b]="member found by ambiguous name lookup", | ||
[ | [d]=c, | ||
[ | [e]="member found by ambiguous name lookup", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | [h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | ||
[i]={{ | [i]={{lc,2807,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjects: {\n // ...\n Diag((*Found)->getLocation(), diag::note_ambiguous_member_found);"},{lc,2831,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n // ...\n for (CXXBasePaths::paths_iterator Path = Paths->begin(), PathEnd = Paths->end(); Path != PathEnd; ++Path) {\n // ...\n if (DeclsPrinted.insert(D).second) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D->getUnderlyingDecl()))\n // ...\n else if (const auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))\n // ...\n else\n Diag(D->getLocation(), diag::note_ambiguous_member_found);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:30:30: note: member found by ambiguous name lookup","clang/test/SemaCXX/lookup-member.cpp:36:30: note: member found by ambiguous name lookup"} | ["clang/test/SemaCXX/lookup-member.cpp"]={"clang/test/SemaCXX/lookup-member.cpp:30:30: note: member found by ambiguous name lookup","clang/test/SemaCXX/lookup-member.cpp:36:30: note: member found by ambiguous name lookup"} | ||
Line 385: | Line 397: | ||
}, | }, | ||
["note_ambiguous_member_type_found"]={ | ["note_ambiguous_member_type_found"]={ | ||
[ | [b]={{nil,I,"member type %0 found by ambiguous name lookup"}}, | ||
[ | [d]=c, | ||
[ | [e]="member type (.*?) found by ambiguous name lookup", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{lc,2825,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n // ...\n for (CXXBasePaths::paths_iterator Path = Paths->begin(), PathEnd = Paths->end(); Path != PathEnd; ++Path) {\n // ...\n if (DeclsPrinted.insert(D).second) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D->getUnderlyingDecl()))\n Diag(D->getLocation(), diag::note_ambiguous_member_type_found) << TD->getUnderlyingType();"},{lc,2828,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousBaseSubobjectTypes: {\n // ...\n for (CXXBasePaths::paths_iterator Path = Paths->begin(), PathEnd = Paths->end(); Path != PathEnd; ++Path) {\n // ...\n if (DeclsPrinted.insert(D).second) {\n if (const auto *TD = dyn_cast<TypedefNameDecl>(D->getUnderlyingDecl()))\n // ...\n else if (const auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))\n Diag(D->getLocation(), diag::note_ambiguous_member_type_found) << Context.getTypeDeclType(TD);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/member-name-lookup.cpp"]={"clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:135:10: note: member type \'HasMemberType1::type\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:139:10: note: member type \'HasMemberType2::type\' found by ambiguous name lookup"} | ["clang/test/SemaCXX/member-name-lookup.cpp"]={"clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:23:8: note: member type \'B::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:30:8: note: member type \'C::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:74:8: note: member type \'B2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:81:8: note: member type \'C2::E3\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:135:10: note: member type \'HasMemberType1::type\' found by ambiguous name lookup","clang/test/SemaCXX/member-name-lookup.cpp:139:10: note: member type \'HasMemberType2::type\' found by ambiguous name lookup"} | ||
Line 397: | Line 409: | ||
}, | }, | ||
["note_ambiguous_type_conversion"]={ | ["note_ambiguous_type_conversion"]={ | ||
[ | [b]="because of ambiguity in conversion %diff{of $ to $|between types}0,1", | ||
[ | [d]=c, | ||
[ | [e]="because of ambiguity in conversion (?:of (.*?) to (.*?)|between types)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"574de2c5a4f0",1255369879,"If built-in operators could not be selected because of ambiguity in","If built-in operators could not be selected because of ambiguity in\nuser-defined type conversions, issue list of ambiguites in addition \nto the diagnostic. So, clang now issues the following:\n\nb.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is \'struct C1\'\n int i = c1->*pmf;\n ~~^\nb.cpp:19:19: note: because of ambiguity in conversion of \'struct C1\' to \'struct E *\'\nb.cpp:5:5: note: candidate function\n operator E*();\n ^\nb.cpp:11:5: note: candidate function\n operator E*();\n ^\n\nllvm-svn: 83862"}, | [h]={"574de2c5a4f0",1255369879,"If built-in operators could not be selected because of ambiguity in","If built-in operators could not be selected because of ambiguity in\nuser-defined type conversions, issue list of ambiguites in addition \nto the diagnostic. So, clang now issues the following:\n\nb.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is \'struct C1\'\n int i = c1->*pmf;\n ~~^\nb.cpp:19:19: note: because of ambiguity in conversion of \'struct C1\' to \'struct E *\'\nb.cpp:5:5: note: candidate function\n operator E*();\n ^\nb.cpp:11:5: note: candidate function\n operator E*();\n ^\n\nllvm-svn: 83862"}, | ||
[i]={{ | [i]={{fb,11697,"static void NoteAmbiguousUserConversions(Sema &S, SourceLocation OpLoc, OverloadCandidate *Cand) {\n for (const ImplicitConversionSequence &ICS : Cand->Conversions) {\n // ...\n ICS.DiagnoseAmbiguousConversion(S, OpLoc, S.PDiag(diag::note_ambiguous_type_conversion));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: because of ambiguity in conversion of \'C1\' to \'E *\'"} | ["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: note: because of ambiguity in conversion of \'C1\' to \'E *\'"} | ||
Line 409: | Line 421: | ||
}, | }, | ||
["note_anonymous_namespace"]={ | ["note_anonymous_namespace"]={ | ||
[ | [b]={{nil,r,"anonymous namespace begins here"}}, | ||
[ | [d]=c, | ||
[ | [e]="anonymous namespace begins here", | ||
[ | [f]=a, | ||
[ | [g]=Vc, | ||
[h]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, | [h]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, | ||
[i]={{ | [i]={{xb,790,"/// We have parsed the start of an export declaration, including the \'{\'\n/// (if present).\nDecl *Sema::ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc) {\n // ...\n for (const DeclContext *DC = CurContext; DC; DC = DC->getLexicalParent()) {\n if (const auto *ND = dyn_cast<NamespaceDecl>(DC)) {\n // An export-declaration shall not appear directly or indirectly within\n // an unnamed namespace [...]\n if (ND->isAnonymousNamespace()) {\n // ...\n Diag(ND->getLocation(), diag::note_anonymous_namespace);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:50:11: note: anonymous namespace begins here"} | ["clang/test/CXX/module/module.interface/p3.cpp"]={"clang/test/CXX/module/module.interface/p3.cpp:50:11: note: anonymous namespace begins here"} | ||
Line 421: | Line 433: | ||
}, | }, | ||
["note_arc_bridge"]={ | ["note_arc_bridge"]={ | ||
[ | [b]="use __bridge to convert directly (no change in ownership)", | ||
[ | [d]=c, | ||
[ | [e]="use __bridge to convert directly \\(no change in ownership\\)", | ||
[ | [f]=a, | ||
[ | [g]=ad, | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{p,3933,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"},{p,3974,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"},{p,4672,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n case OBC_BridgeRetained: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge) << FixItHint::CreateReplacement(BridgeKeywordLoc, \"__bridge\");"},{p,4716,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n } else if (T->isCARCBridgableType() && FromType->isObjCARCBridgableType()) {\n // ...\n case OBC_BridgeTransfer: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge) << FixItHint::CreateReplacement(BridgeKeywordLoc, \"__bridge \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:8: note: use __bridge to convert directly (no change in ownership)"} | ["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:8: note: use __bridge to convert directly (no change in ownership)"} | ||
Line 433: | Line 445: | ||
}, | }, | ||
["note_arc_bridge_retained"]={ | ["note_arc_bridge_retained"]={ | ||
[ | [b]="use %select{__bridge_retained|CFBridgingRetain call}1 to make an ARC object available as a +1 %0", | ||
[ | [d]=c, | ||
[ | [e]="use (?:__bridge_retained|CFBridgingRetain call) to make an ARC object available as a \\+1 (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=ad, | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{p,3986,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_retained) << castType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_retained) << castType << br;"},{p,4718,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n } else if (T->isCARCBridgableType() && FromType->isObjCARCBridgableType()) {\n // ...\n case OBC_BridgeTransfer: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge_retained) << T << br << FixItHint::CreateReplacement(BridgeKeywordLoc, br ? \"CFBridgingRetain \" : \"__bridge_retained\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ARCMT/nonobjc-to-objc-cast-2.m"]={"clang/test/ARCMT/nonobjc-to-objc-cast-2.m:41:14: note: use CFBridgingRetain call to make an ARC object available as a +1 \'void *\'","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:46:23: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:61:29: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')"} | ["clang/test/ARCMT/nonobjc-to-objc-cast-2.m"]={"clang/test/ARCMT/nonobjc-to-objc-cast-2.m:41:14: note: use CFBridgingRetain call to make an ARC object available as a +1 \'void *\'","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:46:23: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')","clang/test/ARCMT/nonobjc-to-objc-cast-2.m:61:29: note: use CFBridgingRetain call to make an ARC object available as a +1 \'CFStringRef\' (aka \'const struct __CFString *\')"} | ||
Line 445: | Line 457: | ||
}, | }, | ||
["note_arc_bridge_transfer"]={ | ["note_arc_bridge_transfer"]={ | ||
[ | [b]="use %select{__bridge_transfer|CFBridgingRelease call}1 to transfer ownership of a +1 %0 into ARC", | ||
[ | [d]=c, | ||
[ | [e]="use (?:__bridge_transfer|CFBridgingRelease call) to transfer ownership of a \\+1 (.*?) into ARC", | ||
[ | [f]=a, | ||
[ | [g]=ad, | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{p,3946,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_transfer) << castExprType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_transfer) << castExprType << br;"},{p,4674,"ExprResult Sema::BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr) {\n // ...\n if (T->isDependentType() || SubExpr->isTypeDependent()) {\n // ...\n } else if (T->isObjCARCBridgableType() && FromType->isCARCBridgableType()) {\n // ...\n case OBC_BridgeRetained: {\n // ...\n Diag(BridgeKeywordLoc, diag::note_arc_bridge_transfer) << FromType << br << FixItHint::CreateReplacement(BridgeKeywordLoc, br ? \"CFBridgingRelease \" : \"__bridge_transfer \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:19:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:27:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:45:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:46:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC"} | ["clang/test/SemaObjC/arc-cf.m"]={"clang/test/SemaObjC/arc-cf.m:18:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:19:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:27:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:45:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC","clang/test/SemaObjC/arc-cf.m:46:12: note: use CFBridgingRelease call to transfer ownership of a +1 \'CFStringRef\' (aka \'const struct __CFString *\') into ARC"} | ||
Line 457: | Line 469: | ||
}, | }, | ||
["note_arc_cstyle_bridge"]={ | ["note_arc_cstyle_bridge"]={ | ||
[ | [b]="use __bridge with C-style cast to convert directly (no change in ownership)", | ||
[ | [d]=c, | ||
[ | [e]="use __bridge with C\\-style cast to convert directly \\(no change in ownership\\)", | ||
[ | [f]=a, | ||
[ | [g]=ad, | ||
[h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | [h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | ||
[i]={{ | [i]={{p,3934,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"},{p,3975,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusOne) {\n auto DiagB = (CCK != Sema::CCK_OtherCast) ? S.Diag(noteLoc, diag::note_arc_bridge) : S.Diag(noteLoc, diag::note_arc_cstyle_bridge);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge with C-style cast to convert directly (no change in ownership)"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge with C-style cast to convert directly (no change in ownership)","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge with C-style cast to convert directly (no change in ownership)"} | ||
Line 469: | Line 481: | ||
}, | }, | ||
["note_arc_cstyle_bridge_retained"]={ | ["note_arc_cstyle_bridge_retained"]={ | ||
[ | [b]="use __bridge_retained with C-style cast to make an ARC object available as a +1 %0", | ||
[ | [d]=c, | ||
[ | [e]="use __bridge_retained with C\\-style cast to make an ARC object available as a \\+1 (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=ad, | ||
[h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | [h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | ||
[i]={{ | [i]={{p,3983,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from a CF type to an ARC type.\n if (exprACTC == ACTC_retainable && isAnyRetainable(castACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_retained) << castType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_retained) << castType << br;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:70:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:73:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:81:31: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:121:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:124:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:127:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:130:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')","clang/test/SemaObjCXX/objcbridge-static-cast.mm:133:30: note: use __bridge_retained with C-style cast to make an ARC object available as a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\')"} | ||
Line 481: | Line 493: | ||
}, | }, | ||
["note_arc_cstyle_bridge_transfer"]={ | ["note_arc_cstyle_bridge_transfer"]={ | ||
[ | [b]="use __bridge_transfer with C-style cast to transfer ownership of a +1 %0 into ARC", | ||
[ | [d]=c, | ||
[ | [e]="use __bridge_transfer with C\\-style cast to transfer ownership of a \\+1 (.*?) into ARC", | ||
[ | [f]=a, | ||
[ | [g]=ad, | ||
[h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | [h]={"ac2d082f58e6",1361496168,"objective-C arc: Diagnostic can not say to use bridge","objective-C arc: Diagnostic can not say to use bridge\ncasts with c++ named casts. Change notes to say use\nbridge with c-style cast instead. // rdar://12788838\n\nllvm-svn: 175850"}, | ||
[i]={{ | [i]={{p,3943,"static void diagnoseObjCARCConversion(Sema &S, SourceRange castRange, QualType castType, ARCConversionTypeClass castACTC, Expr *castExpr, Expr *realCast, ARCConversionTypeClass exprACTC, Sema::CheckedConversionKind CCK) {\n // ...\n // Bridge from an ARC type to a CF type.\n if (castACTC == ACTC_retainable && isAnyRetainable(exprACTC)) {\n // ...\n if (CreateRule != ACC_plusZero) {\n auto DiagB = (CCK == Sema::CCK_OtherCast && !br) ? S.Diag(noteLoc, diag::note_arc_cstyle_bridge_transfer) << castExprType : S.Diag(br ? castExpr->getExprLoc() : noteLoc, diag::note_arc_bridge_transfer) << castExprType << br;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFTestingRef\' (aka \'__CFError *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFUColor2Ref\' (aka \'__CFUPrimeColor *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC"} | ["clang/test/SemaObjCXX/objcbridge-static-cast.mm"]={"clang/test/SemaObjCXX/objcbridge-static-cast.mm:30:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFTestingRef\' (aka \'__CFError *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:56:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:60:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:63:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:67:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFUColor2Ref\' (aka \'__CFUPrimeColor *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:77:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef2\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:89:20: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:92:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:95:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFErrorRef\' (aka \'__CFErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:102:21: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:105:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:108:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:111:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC","clang/test/SemaObjCXX/objcbridge-static-cast.mm:114:19: note: use __bridge_transfer with C-style cast to transfer ownership of a +1 \'CFMyErrorRef\' (aka \'__CFMyErrorRef *\') into ARC"} | ||
Line 493: | Line 505: | ||
}, | }, | ||
["note_arc_field_with_ownership"]={ | ["note_arc_field_with_ownership"]={ | ||
[ | [b]="field has non-trivial ownership qualification", | ||
[ | [d]=c, | ||
[ | [e]="field has non\\-trivial ownership qualification", | ||
[ | [f]=a, | ||
[ | [g]=wd, | ||
[h]={ | [h]={id,1446008599,gd,ed}, | ||
[i]={{ | [i]={{yb,492,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ARCFieldWithOwnership:\n // ...\n diag_available_here = diag::note_arc_field_with_ownership;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/arc-system-header.mm"]={"clang/test/SemaObjCXX/Inputs/arc-system-header.h:10:7: note: field has non-trivial ownership qualification"} | ["clang/test/SemaObjCXX/arc-system-header.mm"]={"clang/test/SemaObjCXX/Inputs/arc-system-header.h:10:7: note: field has non-trivial ownership qualification"} | ||
Line 505: | Line 517: | ||
}, | }, | ||
["note_arc_forbidden_type"]={ | ["note_arc_forbidden_type"]={ | ||
[ | [b]="declaration uses type that is ill-formed in ARC", | ||
[ | [d]=c, | ||
[ | [e]="declaration uses type that is ill\\-formed in ARC", | ||
[ | [f]=a, | ||
[ | [g]=wd, | ||
[h]={ | [h]={id,1446008599,gd,ed}, | ||
[i]={{ | [i]={{yb,470,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ARCForbiddenType:\n // ...\n diag_available_here = diag::note_arc_forbidden_type;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-unavailable-system-function.m"]={"/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:1:6: note: declaration uses type that is ill-formed in ARC"} | ["clang/test/SemaObjC/arc-unavailable-system-function.m"]={"/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:1:6: note: declaration uses type that is ill-formed in ARC"} | ||
Line 517: | Line 529: | ||
}, | }, | ||
["note_arc_gained_method_convention"]={ | ["note_arc_gained_method_convention"]={ | ||
[ | [b]="declaration in interface is not in the \'%select{alloc|copy|init|new}0\' family because %select{its result type is not an object pointer|its result type is unrelated to its receiver type}1", | ||
[ | [d]=c, | ||
[ | [e]="declaration in interface is not in the \'(?:alloc|copy|init|new)\' family because (?:its result type is not an object pointer|its result type is unrelated to its receiver type)", | ||
[ | [f]=a, | ||
[ | [g]="ARC Semantic Issue", | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{P,2531,"/// In ARC, check whether the conventional meanings of the two methods\n/// match. If they don\'t, it\'s a hard error.\nstatic bool checkMethodFamilyMismatch(Sema &S, ObjCMethodDecl *impl, ObjCMethodDecl *decl) {\n // ...\n if (declFamily == OMF_None) {\n // ...\n noteID = diag::note_arc_gained_method_convention;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:202:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:205:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:206:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer"} | ["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:202:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:205:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer","clang/test/ARCMT/checking.m:206:1: note: declaration in interface is not in the \'init\' family because its result type is not an object pointer"} | ||
Line 529: | Line 541: | ||
}, | }, | ||
["note_arc_init_returns_unrelated"]={ | ["note_arc_init_returns_unrelated"]={ | ||
[ | [b]="init method must return a type related to its receiver type", | ||
[ | [d]=c, | ||
[ | [e]="init method must return a type related to its receiver type", | ||
[ | [f]=a, | ||
[ | [g]=wd, | ||
[h]={ | [h]={id,1446008599,gd,ed}, | ||
[i]={{ | [i]={{yb,487,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ARCInitReturnsUnrelated:\n // ...\n diag_available_here = diag::note_arc_init_returns_unrelated;"}} | ||
}, | }, | ||
["note_arc_lost_method_convention"]={ | ["note_arc_lost_method_convention"]={ | ||
[ | [b]="declaration in interface", | ||
[ | [d]=c, | ||
[ | [e]="declaration in interface", | ||
[ | [f]=a, | ||
[ | [g]="ARC Semantic Issue", | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{P,2526,"/// In ARC, check whether the conventional meanings of the two methods\n/// match. If they don\'t, it\'s a hard error.\nstatic bool checkMethodFamilyMismatch(Sema &S, ObjCMethodDecl *impl, ObjCMethodDecl *decl) {\n // ...\n unsigned noteID = diag::note_arc_lost_method_convention;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:196:1: note: declaration in interface","clang/test/ARCMT/checking.m:211:1: note: declaration in interface","clang/test/ARCMT/checking.m:218:1: note: declaration in interface","clang/test/ARCMT/checking.m:225:1: note: declaration in interface"} | ["clang/test/ARCMT/checking.m"]={"clang/test/ARCMT/checking.m:196:1: note: declaration in interface","clang/test/ARCMT/checking.m:211:1: note: declaration in interface","clang/test/ARCMT/checking.m:218:1: note: declaration in interface","clang/test/ARCMT/checking.m:225:1: note: declaration in interface"} | ||
Line 550: | Line 562: | ||
}, | }, | ||
["note_arc_retain_cycle_owner"]={ | ["note_arc_retain_cycle_owner"]={ | ||
[ | [b]="block will be retained by %select{the captured object|an object strongly retained by the captured object}0", | ||
[ | [d]=c, | ||
[ | [e]="block will be retained by (?:the captured object|an object strongly retained by the captured object)", | ||
[ | [f]=a, | ||
[ | [g]="ARC Retain Cycle", | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{C,17475,"static void diagnoseRetainCycle(Sema &S, Expr *capturer, RetainCycleOwner &owner) {\n // ...\n S.Diag(owner.Loc, diag::note_arc_retain_cycle_owner) << owner.Indirect << owner.Range;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:11:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:13:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:16:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:31:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:48:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:49:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:63:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:69:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:71:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:73:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:81:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:93:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:124:4: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:148:19: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:153:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:169:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:173:4: note: block will be retained by the captured object"} | ["clang/test/SemaObjC/warn-retain-cycle.m"]={"clang/test/SemaObjC/warn-retain-cycle.m:11:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:13:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:16:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:31:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:48:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:49:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:63:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:69:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:71:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:73:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:81:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:93:3: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:124:4: note: block will be retained by an object strongly retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:148:19: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:153:3: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:169:4: note: block will be retained by the captured object","clang/test/SemaObjC/warn-retain-cycle.m:173:4: note: block will be retained by the captured object"} | ||
Line 562: | Line 574: | ||
}, | }, | ||
["note_arc_weak_also_accessed_here"]={ | ["note_arc_weak_also_accessed_here"]={ | ||
[ | [b]="also accessed here", | ||
[ | [d]=c, | ||
[ | [e]="also accessed here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"d393458c3316",1348870890,"Add a warning (off by default) for repeated use of the same weak property.","Add a warning (off by default) for repeated use of the same weak property.\n\nThe motivating example:\n\nif (self.weakProp)\n use(self.weakProp);\n\nAs with any non-atomic test-then-use, it is possible a weak property to be\nnon-nil at the \'if\', but be deallocated by the time it is used. The correct\nway to write this example is as follows:\n\nid tmp = self.weakProp;\nif (tmp)\n use(tmp);\n\nThe warning is controlled by -Warc-repeated-use-of-receiver, and uses the\nproperty name and base to determine if the same property on the same object\nis being accessed multiple times. In cases where the base is more\ncomplicated than just a single Decl (e.g. \'foo.bar.weakProp\'), it picks a\nDecl for some degree of uniquing and reports the problem under a subflag,\n-Warc-maybe-repeated-use-of-receiver. This gives a way to tune the\naggressiveness of the warning for a particular project.\n\nThe warning is not on by default because it is not flow-sensitive and thus\nmay have a higher-than-acceptable rate of false positives, though it is\nless noisy than -Wreceiver-is-weak. On the other hand, it will not warn\nabout some cases that may be legitimate issues that -Wreceiver-is-weak\nwill catch, and it does not attempt to reason about methods returning weak\nvalues.\n\nEven though this is not a real \"analysis-based\" check I\'ve put the bug\nemission code in AnalysisBasedWarnings for two reasons: (1) to run on\nevery kind of code body (function, method, block, or lambda), and (2) to\nsuggest that it may be enhanced by flow-sensitive analysis in the future.\n\nThe second (smaller) half of this work is to extend it to weak locals\nand weak ivars. This should use most of the same infrastructure.\n\nPart of <rdar://problem/12280249>\n\nllvm-svn: 164854"}, | [h]={"d393458c3316",1348870890,"Add a warning (off by default) for repeated use of the same weak property.","Add a warning (off by default) for repeated use of the same weak property.\n\nThe motivating example:\n\nif (self.weakProp)\n use(self.weakProp);\n\nAs with any non-atomic test-then-use, it is possible a weak property to be\nnon-nil at the \'if\', but be deallocated by the time it is used. The correct\nway to write this example is as follows:\n\nid tmp = self.weakProp;\nif (tmp)\n use(tmp);\n\nThe warning is controlled by -Warc-repeated-use-of-receiver, and uses the\nproperty name and base to determine if the same property on the same object\nis being accessed multiple times. In cases where the base is more\ncomplicated than just a single Decl (e.g. \'foo.bar.weakProp\'), it picks a\nDecl for some degree of uniquing and reports the problem under a subflag,\n-Warc-maybe-repeated-use-of-receiver. This gives a way to tune the\naggressiveness of the warning for a particular project.\n\nThe warning is not on by default because it is not flow-sensitive and thus\nmay have a higher-than-acceptable rate of false positives, though it is\nless noisy than -Wreceiver-is-weak. On the other hand, it will not warn\nabout some cases that may be legitimate issues that -Wreceiver-is-weak\nwill catch, and it does not attempt to reason about methods returning weak\nvalues.\n\nEven though this is not a real \"analysis-based\" check I\'ve put the bug\nemission code in AnalysisBasedWarnings for two reasons: (1) to run on\nevery kind of code body (function, method, block, or lambda), and (2) to\nsuggest that it may be enhanced by flow-sensitive analysis in the future.\n\nThe second (smaller) half of this work is to extend it to weak locals\nand weak ivars. This should use most of the same infrastructure.\n\nPart of <rdar://problem/12280249>\n\nllvm-svn: 164854"}, | ||
[i]={{ | [i]={{lb,1512,"static void diagnoseRepeatedUseOfWeak(Sema &S, const sema::FunctionScopeInfo *CurFn, const Decl *D, const ParentMap &PM) {\n // ...\n // Iterate through the sorted problems and emit warnings for each.\n for (const auto &P : UsesByStmt) {\n // ...\n // Print all the other accesses as notes.\n for (const auto &Use : Uses) {\n // ...\n S.Diag(Use.getUseExpr()->getBeginLoc(), diag::note_arc_weak_also_accessed_here) << Use.getUseExpr()->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:24:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:29:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:57:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:68:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:73:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:78:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:83:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:94:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:100:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:105:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:114:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:120:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:123:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:128:12: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:134:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:139:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:145:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:170:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:211:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:213:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:220:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:221:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:227:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:228:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:234:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:235:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:241:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:242:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:249:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:250:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:312:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:317:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:322:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:325:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:328:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:376:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:387:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:400:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:409:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:414:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:421:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:472:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:476:7: note: also accessed here"} | ["clang/test/SemaObjC/arc-repeated-weak.mm"]={"clang/test/SemaObjC/arc-repeated-weak.mm:24:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:29:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:57:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:68:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:73:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:78:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:83:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:94:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:100:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:105:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:114:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:120:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:123:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:128:12: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:134:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:139:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:145:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:170:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:211:3: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:213:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:220:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:221:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:227:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:228:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:234:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:235:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:241:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:242:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:249:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:250:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:312:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:317:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:322:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:325:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:328:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:376:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:387:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:400:5: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:409:9: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:414:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:421:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:472:7: note: also accessed here","clang/test/SemaObjC/arc-repeated-weak.mm:476:7: note: also accessed here"} | ||
Line 574: | Line 586: | ||
}, | }, | ||
["note_arc_weak_disabled"]={ | ["note_arc_weak_disabled"]={ | ||
[ | [b]="declaration uses __weak, but ARC is disabled", | ||
[ | [d]=c, | ||
[ | [e]="declaration uses __weak, but ARC is disabled", | ||
[ | [f]=a, | ||
[ | [g]=wd, | ||
[h]={ | [h]={id,1446008599,gd,ed}, | ||
[i]={{ | [i]={{yb,475,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ForbiddenWeak:\n if (S.getLangOpts().ObjCWeakRuntime)\n diag_available_here = diag::note_arc_weak_disabled;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/mrc-no-weak.m"]={"clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled","clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled"} | ["clang/test/SemaObjC/mrc-no-weak.m"]={"clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled","clang/test/SemaObjC/mrc-no-weak.m:39:13: note: declaration uses __weak, but ARC is disabled"} | ||
Line 586: | Line 598: | ||
}, | }, | ||
["note_arc_weak_no_runtime"]={ | ["note_arc_weak_no_runtime"]={ | ||
[ | [b]="declaration uses __weak, which the current deployment target does not support", | ||
[ | [d]=c, | ||
[ | [e]="declaration uses __weak, which the current deployment target does not support", | ||
[ | [f]=a, | ||
[ | [g]=wd, | ||
[h]={ | [h]={id,1446008599,gd,ed}, | ||
[i]={{ | [i]={{yb,477,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n // ...\n if (auto AL = OffendingDecl->getAttr<UnavailableAttr>()) {\n if (AL->isImplicit() && AL->getImplicitReason()) {\n // ...\n case UnavailableAttr::IR_ForbiddenWeak:\n if (S.getLangOpts().ObjCWeakRuntime)\n // ...\n else\n diag_available_here = diag::note_arc_weak_no_runtime;"}} | ||
}, | }, | ||
["note_array_declared_here"]={ | ["note_array_declared_here"]={ | ||
[ | [b]={{nil,n,"array %0 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="array (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{ | [i]={{C,17103,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (IsUnboundedArray) {\n // ...\n if (index.isUnsigned() || !index.isNegative()) {\n // ...\n if (ND)\n DiagRuntimeBehavior(ND->getBeginLoc(), BaseExpr, PDiag(diag::note_array_declared_here) << ND);"},{C,17200,"void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr, const ArraySubscriptExpr *ASE, bool AllowOnePastEnd, bool IndexNegated) {\n // ...\n if (ND)\n DiagRuntimeBehavior(ND->getBeginLoc(), BaseExpr, PDiag(diag::note_array_declared_here) << ND);"},{o,11333,"static void DiagnoseDivisionSizeofPointerOrArray(Sema &S, Expr *LHS, Expr *RHS, SourceLocation Loc) {\n // ...\n if (LHSTy->isPointerType() && !RHSTy->isPointerType()) {\n // ...\n } else if (const auto *ArrayTy = S.Context.getAsArrayType(LHSTy)) {\n // ...\n if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSArg)) {\n if (const ValueDecl *LHSArgDecl = DRE->getDecl())\n S.Diag(LHSArgDecl->getLocation(), diag::note_array_declared_here) << LHSArgDecl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/array-bounds-system-header.cpp"]={"clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here","clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here"} | ["clang/test/SemaCXX/array-bounds-system-header.cpp"]={"clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here","clang/test/SemaCXX/array-bounds-system-header.cpp:5:3: note: array \'a\' declared here"} | ||
Line 607: | Line 619: | ||
}, | }, | ||
["note_array_init_plain_string_into_char8_t"]={ | ["note_array_init_plain_string_into_char8_t"]={ | ||
[ | [b]={{nil,L,"add \'u8\' prefix to form a \'char8_t\' string literal"}}, | ||
[ | [d]=c, | ||
[ | [e]="add \'u8\' prefix to form a \'char8_t\' string literal", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type.","Implement P0482R2, support for char8_t type.\n\nThis is not yet part of any C++ working draft, and so is controlled by the flag\n-fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a\nflag with the same name.)\n\nThis implementation is experimental, and will be removed or revised\nsubstantially to match the proposal as it makes its way through the C++\ncommittee.\n\nllvm-svn: 331244"}, | [h]={"3a8244df6fb8",1525150965,"Implement P0482R2, support for char8_t type.","Implement P0482R2, support for char8_t type.\n\nThis is not yet part of any C++ working draft, and so is controlled by the flag\n-fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a\nflag with the same name.)\n\nThis implementation is experimental, and will be removed or revised\nsubstantially to match the proposal as it makes its way through the C++\ncommittee.\n\nllvm-svn: 331244"}, | ||
[i]={{ | [i]={{N,9600,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_PlainStringIntoUTF8Char:\n // ...\n S.Diag(Args.front()->getBeginLoc(), diag::note_array_init_plain_string_into_char8_t) << FixItHint::CreateInsertion(Args.front()->getBeginLoc(), \"u8\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/char8_t.cpp"]={"clang/test/SemaCXX/char8_t.cpp:9:15: note: add \'u8\' prefix to form a \'char8_t\' string literal"} | ["clang/test/SemaCXX/char8_t.cpp"]={"clang/test/SemaCXX/char8_t.cpp:9:15: note: add \'u8\' prefix to form a \'char8_t\' string literal"} | ||
Line 619: | Line 631: | ||
}, | }, | ||
["note_array_size_conversion"]={ | ["note_array_size_conversion"]={ | ||
[ | [b]="conversion to %select{integral|enumeration}0 type %1 declared here", | ||
[ | [d]=c, | ||
[ | [e]="conversion to (?:integral|enumeration) type (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class","Implement C++ DR299, which allows an implicit conversion from a class\ntype to an integral or enumeration type in the size of an array new\nexpression, e.g.,\n\n new int[ConvertibleToInt(10)];\n\nThis is a GNU and C++0x extension.\n\nllvm-svn: 107229"}, | [h]={"4799d03ce841",1277857243,"Implement C++ DR299, which allows an implicit conversion from a class","Implement C++ DR299, which allows an implicit conversion from a class\ntype to an integral or enumeration type in the size of an array new\nexpression, e.g.,\n\n new int[ConvertibleToInt(10)];\n\nThis is a GNU and C++0x extension.\n\nllvm-svn: 107229"}, | ||
[i]={{ | [i]={{Y,2166,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\n if (getLangOpts().CPlusPlus14) {\n // ...\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_array_size_conversion) << ConvTy->isEnumeralType() << ConvTy; }"},{Y,2177,"ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, std::optional<Expr *> ArraySize, SourceRange DirectInitRange, Expr *Initializer) {\n // ...\n if (ArraySize && *ArraySize && !(*ArraySize)->isTypeDependent()) {\n // ...\n if (getLangOpts().CPlusPlus14) {\n // ...\n } else {\n class SizeConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_array_size_conversion) << ConvTy->isEnumeralType() << ConvTy; }"}} | ||
}, | }, | ||
["note_asm_input_duplicate_first"]={ | ["note_asm_input_duplicate_first"]={ | ||
[ | [b]="constraint \'%0\' is already present here", | ||
[ | [d]=c, | ||
[ | [e]="constraint \'(.*?)\' is already present here", | ||
[ | [f]=a, | ||
[ | [g]="Inline Assembly Issue", | ||
[h]={"8e261be91106",1442846460,"Fix assertion in inline assembler IR gen","Fix assertion in inline assembler IR gen\nSeveral inputs may not refer to one output constraint in inline assembler\ninsertions, clang was failing on assertion on such test case.\n\nllvm-svn: 248158"}, | [h]={"8e261be91106",1442846460,"Fix assertion in inline assembler IR gen","Fix assertion in inline assembler IR gen\nSeveral inputs may not refer to one output constraint in inline assembler\ninsertions, clang was failing on assertion on such test case.\n\nllvm-svn: 248158"}, | ||
[i]={{ | [i]={{Yc,609,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // ...\n for (unsigned i = 0, e = InputConstraintInfos.size(); i != e; ++i) {\n // ...\n if (InputMatchedToOutput[TiedTo] != ~0U) {\n // ...\n targetDiag(NS->getInputExpr(InputMatchedToOutput[TiedTo])->getBeginLoc(), diag::note_asm_input_duplicate_first) << TiedTo;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:291:17: note: constraint \'1\' is already present here"} | ["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:291:17: note: constraint \'1\' is already present here"} | ||
Line 640: | Line 652: | ||
}, | }, | ||
["note_asm_missing_constraint_modifier"]={ | ["note_asm_missing_constraint_modifier"]={ | ||
[ | [b]="use constraint modifier \"%0\"", | ||
[ | [d]=c, | ||
[ | [e]="use constraint modifier \"(.*?)\"", | ||
[ | [f]=a, | ||
[ | [g]="Inline Assembly Issue", | ||
[h]={"987f1864caeb",1408687521,"[AArch64, inline-asm] Improve diagnostic that is printed when the size of a","[AArch64, inline-asm] Improve diagnostic that is printed when the size of a\nvariable that has regiser constraint \"r\" is not 64-bit.\n\nGeneral register operands are output using 64-bit \"x\" register names, regardless\nof the size of the variable, unless the asm operand is prefixed with the \"%w\"\nmodifier. This surprises and confuses many users who aren\'t familiar with\naarch64 inline assembly rules.\n\nWith this commit, a note and fixit hint are printed which tell the users that\nthey need modifier \"%w\" in order to output a \"w\" register instead of an \"x\"\nregister.\n\n<rdar://problem/12764785>\n\nllvm-svn: 216260"}, | [h]={"987f1864caeb",1408687521,"[AArch64, inline-asm] Improve diagnostic that is printed when the size of a","[AArch64, inline-asm] Improve diagnostic that is printed when the size of a\nvariable that has regiser constraint \"r\" is not 64-bit.\n\nGeneral register operands are output using 64-bit \"x\" register names, regardless\nof the size of the variable, unless the asm operand is prefixed with the \"%w\"\nmodifier. This surprises and confuses many users who aren\'t familiar with\naarch64 inline assembly rules.\n\nWith this commit, a note and fixit hint are printed which tell the users that\nthey need modifier \"%w\" in order to output a \"w\" register instead of an \"x\"\nregister.\n\n<rdar://problem/12764785>\n\nllvm-svn: 216260"}, | ||
[i]={{ | [i]={{Yc,554,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // ...\n // Validate constraints and modifiers.\n for (unsigned i = 0, e = Pieces.size(); i != e; ++i) {\n // ...\n if (!Context.getTargetInfo().validateConstraintModifier(Literal->getString(), Piece.getModifier(), Size, SuggestedModifier)) {\n // ...\n if (!SuggestedModifier.empty()) {\n auto B = targetDiag(Piece.getRange().getBegin(), diag::note_asm_missing_constraint_modifier) << SuggestedModifier;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:21: note: use constraint modifier \"w\""} | ["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:21: note: use constraint modifier \"w\""} | ||
Line 652: | Line 664: | ||
}, | }, | ||
["note_assign_lhs_incomplete"]={ | ["note_assign_lhs_incomplete"]={ | ||
[ | [b]="type %0 is incomplete", | ||
[ | [d]=c, | ||
[ | [e]="type (.*?) is incomplete", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"a31efa07ff70",1377722135,"Improve error for assignment to incomplete class.","Improve error for assignment to incomplete class.\n\nPR7681.\n\nllvm-svn: 189510"}, | [h]={"a31efa07ff70",1377722135,"Improve error for assignment to incomplete class.","Improve error for assignment to incomplete class.\n\nPR7681.\n\nllvm-svn: 189510"}, | ||
[i]={{ | [i]={{fb,14260,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (Args[0]->getType()->isRecordType() && Opc >= BO_Assign && Opc <= BO_OrAssign) {\n // ...\n if (Args[0]->getType()->isIncompleteType()) {\n Diag(OpLoc, diag::note_assign_lhs_incomplete) << Args[0]->getType() << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:452:12: note: type \'PointerUnion<int *, float *>\' is incomplete"} | ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:452:12: note: type \'PointerUnion<int *, float *>\' is incomplete"} | ||
Line 664: | Line 676: | ||
}, | }, | ||
["note_atomic_constraint_evaluated_to_false"]={ | ["note_atomic_constraint_evaluated_to_false"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' evaluated to false"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' evaluated to false", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Xc,1569403888,Tc,Bc}, | ||
[i]={{ | [i]={{eb,1134,"static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, Expr *SubstExpr, bool First) {\n // ...\n S.Diag(SubstExpr->getSourceRange().getBegin(), diag::note_atomic_constraint_evaluated_to_false) << (int)First << SubstExpr;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:18:14: note: because \'same_as<int, _Bool>\' evaluated to false","clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:10:19: note: because \'is_same_v<int, _Bool>\' evaluated to false"} | ["clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp"]={"clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:18:14: note: because \'same_as<int, _Bool>\' evaluated to false","clang/test/SemaTemplate/instantiate-expanded-type-constraint.cpp:10:19: note: because \'is_same_v<int, _Bool>\' evaluated to false"} | ||
Line 676: | Line 688: | ||
}, | }, | ||
["note_atomic_constraint_evaluated_to_false_elaborated"]={ | ["note_atomic_constraint_evaluated_to_false_elaborated"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' (%2 %3 %4) evaluated to false"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' \\((.*?) (.*?) (.*?)\\) evaluated to false", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Xc,1569403888,Tc,Bc}, | ||
[i]={{ | [i]={{eb,1078,"static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, Expr *SubstExpr, bool First) {\n // ...\n if (BinaryOperator *BO = dyn_cast<BinaryOperator>(SubstExpr)) {\n // ...\n case BO_GE:\n case BO_LE:\n case BO_GT:\n case BO_LT:\n case BO_EQ:\n case BO_NE:\n if (BO->getLHS()->getType()->isIntegerType() && BO->getRHS()->getType()->isIntegerType()) {\n // ...\n if (!SimplifiedLHS.Diag && !SimplifiedRHS.Diag) {\n S.Diag(SubstExpr->getBeginLoc(), diag::note_atomic_constraint_evaluated_to_false_elaborated) << (int)First << SubstExpr << toString(SimplifiedLHS.Val.getInt(), 10) << BinaryOperator::getOpcodeStr(BO->getOpcode()) << toString(SimplifiedRHS.Val.getInt(), 10);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/concepts-PR54629.cpp"]={"clang/test/SemaTemplate/concepts-PR54629.cpp:31:38: note: because \'sizeof (t) < 4\' (4 < 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:36:38: note: because \'sizeof (t) > 4\' (4 > 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:41:38: note: because \'sizeof (t) > 8\' (4 > 8) evaluated to false"} | ["clang/test/SemaTemplate/concepts-PR54629.cpp"]={"clang/test/SemaTemplate/concepts-PR54629.cpp:31:38: note: because \'sizeof (t) < 4\' (4 < 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:36:38: note: because \'sizeof (t) > 4\' (4 > 4) evaluated to false","clang/test/SemaTemplate/concepts-PR54629.cpp:41:38: note: because \'sizeof (t) > 8\' (4 > 8) evaluated to false"} | ||
Line 688: | Line 700: | ||
}, | }, | ||
["note_atomic_property_fixup_suggest"]={ | ["note_atomic_property_fixup_suggest"]={ | ||
[ | [b]={{nil,F,"setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"},{O,nil,"setter and getter must both be synthesized, or both be user defined,or the property must be nonatomic"}}, | ||
[ | [d]=c, | ||
[ | [e]="setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"9cd57a7061c8",1317944878,"objc: Improve on diagnostic when atomic proeprty is synthesized","objc: Improve on diagnostic when atomic proeprty is synthesized\non one accessor and user-provide with another.\n\nllvm-svn: 141343"}, | [h]={"9cd57a7061c8",1317944878,"objc: Improve on diagnostic when atomic proeprty is synthesized","objc: Improve on diagnostic when atomic proeprty is synthesized\non one accessor and user-provide with another.\n\nllvm-svn: 141343"}, | ||
[i]={{ | [i]={{cb,2240,"void Sema::AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) {\n // ...\n for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); I != E; ++I) {\n // ...\n if (const ObjCPropertyImplDecl *PIDecl = IMPDecl->FindPropertyImplDecl(Property->getIdentifier(), Property->getQueryKind())) {\n // ...\n if ((bool)GetterMethod ^ (bool)SetterMethod) {\n // ...\n // fixit stuff.\n if (Property->getLParenLoc().isValid() && !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {\n // ...\n Diag(Property->getLocation(), diag::note_atomic_property_fixup_suggest) << FixItHint::CreateInsertion(AfterLParen, NonatomicStr);"},{cb,2247,"void Sema::AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) {\n // ...\n for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); I != E; ++I) {\n // ...\n if (const ObjCPropertyImplDecl *PIDecl = IMPDecl->FindPropertyImplDecl(Property->getIdentifier(), Property->getQueryKind())) {\n // ...\n if ((bool)GetterMethod ^ (bool)SetterMethod) {\n // ...\n // fixit stuff.\n if (Property->getLParenLoc().isValid() && !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {\n // ...\n } else if (Property->getLParenLoc().isInvalid()) {\n // ...\n Diag(Property->getLocation(), diag::note_atomic_property_fixup_suggest) << FixItHint::CreateInsertion(startLoc, \"(nonatomic) \");"},{cb,2250,"void Sema::AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl) {\n // ...\n for (ObjCContainerDecl::PropertyMap::iterator I = PM.begin(), E = PM.end(); I != E; ++I) {\n // ...\n if (const ObjCPropertyImplDecl *PIDecl = IMPDecl->FindPropertyImplDecl(Property->getIdentifier(), Property->getQueryKind())) {\n // ...\n if ((bool)GetterMethod ^ (bool)SetterMethod) {\n // ...\n // fixit stuff.\n if (Property->getLParenLoc().isValid() && !(AttributesAsWritten & ObjCPropertyAttribute::kind_atomic)) {\n // ...\n } else if (Property->getLParenLoc().isInvalid()) {\n // ...\n } else\n Diag(MethodLoc, diag::note_atomic_property_fixup_suggest);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/atomic-property-synthesis-rules.m"]={"clang/test/SemaObjC/atomic-property-synthesis-rules.m:110:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:112:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:206:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:208:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:143:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:145:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:217:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:219:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"} | ["clang/test/SemaObjC/atomic-property-synthesis-rules.m"]={"clang/test/SemaObjC/atomic-property-synthesis-rules.m:110:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:112:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:206:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:208:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:143:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:145:15: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:217:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic","clang/test/SemaObjC/atomic-property-synthesis-rules.m:219:26: note: setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"} | ||
Line 700: | Line 712: | ||
}, | }, | ||
["note_attribute"]={ | ["note_attribute"]={ | ||
[ | [b]="attribute is here", | ||
[ | [d]=c, | ||
[ | [e]="attribute is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"078d2f89cd6a",1401382220,"Sema: Check dll attributes on static data members","Sema: Check dll attributes on static data members\n\nRedeclarations cannot add a dll attribute and static data members cannot\nbe defined.\n\nllvm-svn: 209825"}, | [h]={"078d2f89cd6a",1401382220,"Sema: Check dll attributes on static data members","Sema: Check dll attributes on static data members\n\nRedeclarations cannot add a dll attribute and static data members cannot\nbe defined.\n\nllvm-svn: 209825"}, | ||
[i]={{ | [i]={{q,7131,"static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, NamedDecl *NewDecl, bool IsSpecialization, bool IsDefinition) {\n // ...\n if (OldImportAttr && !HasNewAttr && (!IsInline || (IsMicrosoftABI && IsTemplate)) && !IsStaticDataMember && !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) {\n if (IsMicrosoftABI && IsDefinition) {\n if (IsSpecialization) {\n // ...\n S.Diag(OldImportAttr->getLocation(), diag::note_attribute);"},{q,14447,"/// FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform\n/// any semantic actions necessary after any initializer has been attached.\nvoid Sema::FinalizeDeclaration(Decl *ThisDecl) {\n // ...\n // Imported static data members cannot be defined out-of-line.\n if (const auto *IA = dyn_cast_or_null<DLLImportAttr>(DLLAttr)) {\n if (VD->isStaticDataMember() && VD->isOutOfLine() && VD->isThisDeclarationADefinition()) {\n // ...\n Diag(IA->getLocation(), diag::note_attribute);"},{q,15936,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n // Verify and clean out per-function state.\n if (Body && (!FD || !FD->isDefaulted())) {\n // ...\n if (FD && FD->hasAttr<NakedAttr>()) {\n for (const Stmt *S : Body->children()) {\n // ...\n if (!isa<AsmStmt>(S) && !isa<NullStmt>(S)) {\n // ...\n Diag(FD->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);"},{m,6658,"/// Perform propagation of DLL attributes from a derived class to a\n/// templated base class for MS compatibility.\nvoid Sema::propagateDLLAttrToBaseClassTemplate(CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) {\n // ...\n Diag(ClassAttr->getLocation(), diag::note_attribute);"},{Yc,144,"static bool CheckNakedParmReference(Expr *E, Sema &S) {\n // ...\n while (WorkList.size()) {\n // ...\n if (isa<CXXThisExpr>(E)) {\n // ...\n S.Diag(Func->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);"},{Yc,150,"static bool CheckNakedParmReference(Expr *E, Sema &S) {\n // ...\n while (WorkList.size()) {\n // ...\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {\n if (isa<ParmVarDecl>(DRE->getDecl())) {\n // ...\n S.Diag(Func->getAttr<NakedAttr>()->getLocation(), diag::note_attribute);"},{s,9996,"// Explicit instantiation of a class template specialization\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, const ParsedAttributesView &Attr) {\n // ...\n if (TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) {\n // Check for dllexport class template instantiation declarations,\n // except for MinGW mode.\n for (const ParsedAttr &AL : Attr) {\n if (AL.getKind() == ParsedAttr::AT_DLLExport) {\n // ...\n Diag(AL.getLoc(), diag::note_attribute);"},{s,10004,"// Explicit instantiation of a class template specialization\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy TemplateD, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, const ParsedAttributesView &Attr) {\n // ...\n if (TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) {\n // ...\n if (auto *A = ClassTemplate->getTemplatedDecl()->getAttr<DLLExportAttr>()) {\n // ...\n Diag(A->getLocation(), diag::note_attribute);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-naked.c"]={"clang/test/Sema/attr-naked.c:13:16: note: attribute is here","clang/test/Sema/attr-naked.c:38:16: note: attribute is here","clang/test/Sema/attr-naked.c:45:16: note: attribute is here","clang/test/Sema/attr-naked.c:52:16: note: attribute is here","clang/test/Sema/attr-naked.c:56:16: note: attribute is here","clang/test/Sema/attr-naked.c:60:16: note: attribute is here"} | ["clang/test/Sema/attr-naked.c"]={"clang/test/Sema/attr-naked.c:13:16: note: attribute is here","clang/test/Sema/attr-naked.c:38:16: note: attribute is here","clang/test/Sema/attr-naked.c:45:16: note: attribute is here","clang/test/Sema/attr-naked.c:52:16: note: attribute is here","clang/test/Sema/attr-naked.c:56:16: note: attribute is here","clang/test/Sema/attr-naked.c:60:16: note: attribute is here"} | ||
Line 712: | Line 724: | ||
}, | }, | ||
["note_attribute_has_no_effect_on_compile_time_if_here"]={ | ["note_attribute_has_no_effect_on_compile_time_if_here"]={ | ||
[ | [b]={{nil,zb,"annotating the \'if %select{constexpr|consteval}0\' statement here"}}, | ||
[ | [d]=c, | ||
[ | [e]="annotating the \'if (?:constexpr|consteval)\' statement here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Ic,1615397021,Hc,Cc}, | ||
[i]={{ | [i]={{G,912,"StmtResult Sema::ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *thenStmt, SourceLocation ElseLoc, Stmt *elseStmt) {\n // ...\n if (ConstevalOrNegatedConsteval || StatementKind == IfStatementKind::Constexpr) {\n auto DiagnoseLikelihood = [&](const Stmt *S) {\n if (const Attr *A = Stmt::getLikelihoodAttr(S)) {\n // ...\n Diags.Report(IfLoc, diag::note_attribute_has_no_effect_on_compile_time_if_here) << ConstevalOrNegatedConsteval << SourceRange(IfLoc, (ConstevalOrNegatedConsteval ? thenStmt->getBeginLoc() : LParenLoc).getLocWithOffset(-1));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here"} | ["clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp"]={"clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here","clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p4.cpp:40:3: note: annotating the \'if consteval\' statement here"} | ||
Line 724: | Line 736: | ||
}, | }, | ||
["note_attribute_has_no_effect_on_infinite_loop_here"]={ | ["note_attribute_has_no_effect_on_infinite_loop_here"]={ | ||
[ | [b]={{nil,I,"annotating the infinite loop here"}}, | ||
[ | [d]=c, | ||
[ | [e]="annotating the infinite loop here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{"clang/lib/CodeGen/CGStmt.cpp",937,"void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, ArrayRef<const Attr *> WhileAttrs) {\n // ...\n if (EmitBoolCondBranch) {\n // ...\n } else if (const Attr *A = Stmt::getLikelihoodAttr(S.getBody())) {\n // ...\n CGM.getDiags().Report(S.getWhileLoc(), diag::note_attribute_has_no_effect_on_infinite_loop_here) << SourceRange(S.getWhileLoc(), S.getRParenLoc());"}}, | [i]={{"clang/lib/CodeGen/CGStmt.cpp",937,"void CodeGenFunction::EmitWhileStmt(const WhileStmt &S, ArrayRef<const Attr *> WhileAttrs) {\n // ...\n if (EmitBoolCondBranch) {\n // ...\n } else if (const Attr *A = Stmt::getLikelihoodAttr(S.getBody())) {\n // ...\n CGM.getDiags().Report(S.getWhileLoc(), diag::note_attribute_has_no_effect_on_infinite_loop_here) << SourceRange(S.getWhileLoc(), S.getRParenLoc());"}}, | ||
[j]={ | [j]={ | ||
Line 736: | Line 748: | ||
}, | }, | ||
["note_attribute_overloadable_prev_overload"]={ | ["note_attribute_overloadable_prev_overload"]={ | ||
[ | [b]="previous overload of function is here", | ||
[ | [d]=c, | ||
[ | [e]="previous (?:unmarked |)overload of function is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Wb,1236199783,Vb,Ub}, | ||
[i]={{ | [i]={{q,3752,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (!getLangOpts().CPlusPlus) {\n // ...\n if (OldOvl != New->hasAttr<OverloadableAttr>() && !Old->isImplicit()) {\n // ...\n if (DiagOld)\n Diag(DiagOld->getLocation(), diag::note_attribute_overloadable_prev_overload) << OldOvl;"},{q,11889,"/// Perform semantic checking of a new function declaration.\n///\n/// Performs semantic analysis of the new function declaration\n/// NewFD. This routine performs all semantic checking that does not\n/// require the actual declarator involved in the declaration, and is\n/// used both for the declaration of functions as they are parsed\n/// (called via ActOnDeclarator) and for the declaration of functions\n/// that have been instantiated via C++ template instantiation (called\n/// via InstantiateDecl).\n///\n/// \\param IsMemberSpecialization whether this new function declaration is\n/// a member specialization (that replaces any definition provided by the\n/// previous declaration).\n///\n/// This sets NewFD->isInvalidDecl() to true if there was an error.\n///\n/// \\returns true if the function declaration is a redeclaration.\nbool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization, bool DeclIsDefn) {\n // ...\n if (Redeclaration) {\n // ...\n } else if (!getLangOpts().CPlusPlus && MayNeedOverloadableChecks && !NewFD->getAttr<OverloadableAttr>()) {\n // ...\n if (OtherUnmarkedIter != Previous.end()) {\n // ...\n Diag((*OtherUnmarkedIter)->getLocation(), diag::note_attribute_overloadable_prev_overload) << false;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:7:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:78:35: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:180:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:191:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:200:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:204:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:217:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:221:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:230:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:233:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:240:6: note: previous unmarked overload of function is here"} | ["clang/test/Sema/overloadable.c"]={"clang/test/Sema/overloadable.c:7:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:78:35: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:180:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:185:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:191:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:192:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:200:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:204:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:209:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:217:6: note: previous overload of function is here","clang/test/Sema/overloadable.c:221:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:230:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:233:6: note: previous unmarked overload of function is here","clang/test/Sema/overloadable.c:240:6: note: previous unmarked overload of function is here"} | ||
Line 748: | Line 760: | ||
}, | }, | ||
["note_auto_readonly_iboutlet_fixup_suggest"]={ | ["note_auto_readonly_iboutlet_fixup_suggest"]={ | ||
[ | [b]="property should be changed to be readwrite", | ||
[ | [d]=c, | ||
[ | [e]="property should be changed to be readwrite", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"199a9b57a6bb",1337451437,"objective-c: Warn if default synthesizing readonly IBOutlet properties","objective-c: Warn if default synthesizing readonly IBOutlet properties\nand provide a \'fixit\' to change \'readonly\' to \'readwrite\'. \'fixit\'\npart needs little more work. // rdar://11448209\n\nllvm-svn: 157121"}, | [h]={"199a9b57a6bb",1337451437,"objective-c: Warn if default synthesizing readonly IBOutlet properties","objective-c: Warn if default synthesizing readonly IBOutlet properties\nand provide a \'fixit\' to change \'readonly\' to \'readwrite\'. \'fixit\'\npart needs little more work. // rdar://11448209\n\nllvm-svn: 157121"}, | ||
[i]={{ | [i]={{cb,1165,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if ((IC = dyn_cast<ObjCImplementationDecl>(ClassImpDecl))) {\n // ...\n if (Synthesize && (PIkind & ObjCPropertyAttribute::kind_readonly) && property->hasAttr<IBOutletAttr>() && !AtLoc.isValid()) {\n // ...\n if (!ReadWriteProperty) {\n // ...\n if (LocPropertyAttribute(Context, \"readonly\", property->getLParenLoc(), readonlyLoc)) {\n // ...\n Diag(property->getLocation(), diag::note_auto_readonly_iboutlet_fixup_suggest) << FixItHint::CreateReplacement(ReadonlySourceRange, \"readwrite\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/iboutlet.m"]={"clang/test/SemaObjC/iboutlet.m:10:66: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:12:53: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:28:58: note: property should be changed to be readwrite"} | ["clang/test/SemaObjC/iboutlet.m"]={"clang/test/SemaObjC/iboutlet.m:10:66: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:12:53: note: property should be changed to be readwrite","clang/test/SemaObjC/iboutlet.m:28:58: note: property should be changed to be readwrite"} | ||
Line 760: | Line 772: | ||
}, | }, | ||
["note_availability_specified_here"]={ | ["note_availability_specified_here"]={ | ||
[ | [b]={{nil,z,"%0 has been explicitly marked %select{unavailable|deleted|deprecated}1 here"},{"7.1",nil,"%0 has been explicitly marked %select{unavailable|deleted|deprecated|partial}1 here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) has been explicitly marked (?:unavailable|deleted|deprecated) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b79ee57080fa",1387409406,"Implemented delayed processing of \'unavailable\' checking, just like with \'deprecated\'.","Implemented delayed processing of \'unavailable\' checking, just like with \'deprecated\'.\n\nFixes <rdar://problem/15584219> and <rdar://problem/12241361>.\n\nThis change looks large, but all it does is reuse and consolidate\nthe delayed diagnostic logic for deprecation warnings with unavailability\nwarnings. By doing so, it showed various inconsistencies between the\ndiagnostics, which were close, but not consistent. It also revealed\nsome missing \"note:\"\'s in the deprecated diagnostics that were showing\nup in the unavailable diagnostics, etc.\n\nThis change also changes the wording of the core deprecation diagnostics.\nInstead of saying \"function has been explicitly marked deprecated\"\nwe now saw \"\'X\' has been been explicitly marked deprecated\". It\nturns out providing a bit more context is useful, and often we\ngot the actual term wrong or it was not very precise\n (e.g., \"function\" instead of \"destructor\"). By just saying the name\nof the thing that is deprecated/deleted/unavailable we define\nthis issue away. This diagnostic can likely be further wordsmithed\nto be shorter.\n\nllvm-svn: 197627"}, | [h]={"b79ee57080fa",1387409406,"Implemented delayed processing of \'unavailable\' checking, just like with \'deprecated\'.","Implemented delayed processing of \'unavailable\' checking, just like with \'deprecated\'.\n\nFixes <rdar://problem/15584219> and <rdar://problem/12241361>.\n\nThis change looks large, but all it does is reuse and consolidate\nthe delayed diagnostic logic for deprecation warnings with unavailability\nwarnings. By doing so, it showed various inconsistencies between the\ndiagnostics, which were close, but not consistent. It also revealed\nsome missing \"note:\"\'s in the deprecated diagnostics that were showing\nup in the unavailable diagnostics, etc.\n\nThis change also changes the wording of the core deprecation diagnostics.\nInstead of saying \"function has been explicitly marked deprecated\"\nwe now saw \"\'X\' has been been explicitly marked deprecated\". It\nturns out providing a bit more context is useful, and often we\ngot the actual term wrong or it was not very precise\n (e.g., \"function\" instead of \"destructor\"). By just saying the name\nof the thing that is deprecated/deleted/unavailable we define\nthis issue away. This diagnostic can likely be further wordsmithed\nto be shorter.\n\nllvm-svn: 197627"}, | ||
[i]={{ | [i]={{yb,337,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n unsigned diag_available_here = diag::note_availability_specified_here;"},{yb,343,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n // Matches diag::note_availability_specified_here."},{o,135,"/// Emit a note explaining that this function is deleted.\nvoid Sema::NoteDeletedFunction(FunctionDecl *Decl) {\n // ...\n Diag(Decl->getLocation(), diag::note_availability_specified_here) << Decl << 1;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:46:3: note: \'~deleted_dtor\' has been explicitly marked deleted here"} | ["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:46:3: note: \'~deleted_dtor\' has been explicitly marked deleted here"} | ||
Line 772: | Line 784: | ||
}, | }, | ||
["note_await_ready_no_bool_conversion"]={ | ["note_await_ready_no_bool_conversion"]={ | ||
[ | [b]={{nil,U,"return type of \'await_ready\' is required to be contextually convertible to \'bool\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="return type of \'await_ready\' is required to be contextually convertible to \'bool\'", | ||
[ | [f]=a, | ||
[ | [g]=Wc, | ||
[h]={"d978e53c6d70",1495995672,"[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing c...","[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing conversions.\n\nSummary:\nThe expression `await_ready` is required to be contextually convertible to bool and `await_suspend` must be a prvalue of either `void` or `bool`.\nThis patch adds diagnostics for when those requirements are violated.\n\nIt also correctly performs the contextual conversion to bool on the result of `await_ready`\n\n\n\nReviewers: GorNishanov, rsmith\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D33625\n\nllvm-svn: 304094"}, | [h]={"d978e53c6d70",1495995672,"[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing c...","[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing conversions.\n\nSummary:\nThe expression `await_ready` is required to be contextually convertible to bool and `await_suspend` must be a prvalue of either `void` or `bool`.\nThis patch adds diagnostics for when those requirements are violated.\n\nIt also correctly performs the contextual conversion to bool on the result of `await_ready`\n\n\n\nReviewers: GorNishanov, rsmith\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D33625\n\nllvm-svn: 304094"}, | ||
[i]={{ | [i]={{ab,408,"/// Build calls to await_ready, await_suspend, and await_resume for a co_await\n/// expression.\n/// The generated AST tries to clean up temporary objects as early as\n/// possible so that they don\'t live across suspension points if possible.\n/// Having temporary objects living across suspension points unnecessarily can\n/// lead to large frame size, and also lead to memory corruptions if the\n/// coroutine frame is destroyed after coming back from suspension. This is done\n/// by wrapping both the await_ready call and the await_suspend call with\n/// ExprWithCleanups. In the end of this function, we also need to explicitly\n/// set cleanup state so that the CoawaitExpr is also wrapped with an\n/// ExprWithCleanups to clean up the awaiter associated with the co_await\n/// expression.\nstatic ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, SourceLocation Loc, Expr *E) {\n // ...\n if (!AwaitReady->getType()->isDependentType()) {\n // ...\n if (Conv.isInvalid()) {\n S.Diag(AwaitReady->getDirectCallee()->getBeginLoc(), diag::note_await_ready_no_bool_conversion);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:1016:3: note: return type of \'await_ready\' is required to be contextually convertible to \'bool\'"} | ["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:1016:3: note: return type of \'await_ready\' is required to be contextually convertible to \'bool\'"} | ||
Line 784: | Line 796: | ||
}, | }, | ||
["note_bad_memaccess_silence"]={ | ["note_bad_memaccess_silence"]={ | ||
[ | [b]="explicitly cast the pointer to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="explicitly cast the pointer to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ac6872655bc6",1307082237,"Clean up the \"non-POD memaccess\" stuff some. This adds a properly named","Clean up the \"non-POD memaccess\" stuff some. This adds a properly named\ndiagnostic group to cover the cases where we have definitively bad\nbehavior: dynamic classes.\n\nIt also rips out the existing support for POD-based checking. This\ndidn\'t work well, and triggered too many false positives. I\'m looking\ninto a possibly more principled way to warn on the fundamental buggy\nconstruct here. POD-ness isn\'t the critical aspect anyways, so a clean\nslate is better. This also removes some silliness from the code until\nthe new checks arrive.\n\nllvm-svn: 132534"}, | [h]={"ac6872655bc6",1307082237,"Clean up the \"non-POD memaccess\" stuff some. This adds a properly named","Clean up the \"non-POD memaccess\" stuff some. This adds a properly named\ndiagnostic group to cover the cases where we have definitively bad\nbehavior: dynamic classes.\n\nIt also rips out the existing support for POD-based checking. This\ndidn\'t work well, and triggered too many false positives. I\'m looking\ninto a possibly more principled way to warn on the fundamental buggy\nconstruct here. POD-ness isn\'t the critical aspect anyways, so a clean\nslate is better. This also removes some silliness from the code until\nthe new checks arrive.\n\nllvm-svn: 132534"}, | ||
[i]={{ | [i]={{C,12604,"/// Check for dangerous or invalid arguments to memset().\n///\n/// This issues warnings on known problematic, dangerous or unspecified\n/// arguments to the standard \'memset\', \'memcpy\', \'memmove\', and \'memcmp\'\n/// function calls.\n///\n/// \\param Call The call expression to diagnose.\nvoid Sema::CheckMemaccessArguments(const CallExpr *Call, unsigned BId, IdentifierInfo *FnName) {\n // ...\n for (unsigned ArgIdx = 0; ArgIdx != LastArg; ++ArgIdx) {\n // ...\n DiagRuntimeBehavior(Dest->getExprLoc(), Dest, PDiag(diag::note_bad_memaccess_silence) << FixItHint::CreateInsertion(ArgRange.getBegin(), \"(void*)\"));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m"]={"clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:34:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:36:9: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:37:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:38:11: note: explicitly cast the pointer to silence this warning"} | ["clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m"]={"clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:34:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:36:9: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:37:10: note: explicitly cast the pointer to silence this warning","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:38:11: note: explicitly cast the pointer to silence this warning"} | ||
Line 796: | Line 808: | ||
}, | }, | ||
["note_base_class_specified_here"]={ | ["note_base_class_specified_here"]={ | ||
[ | [b]="base class %0 specified here", | ||
[ | [d]=c, | ||
[ | [e]="base class (.*?) specified here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"43a0857631ab",1262823985,"When we typo-correct a base class initializer, point to the base class","When we typo-correct a base class initializer, point to the base class\nspecifier that we corrected to.\n\nllvm-svn: 92878"}, | [h]={"43a0857631ab",1262823985,"When we typo-correct a base class initializer, point to the base class","When we typo-correct a base class initializer, point to the base class\nspecifier that we corrected to.\n\nllvm-svn: 92878"}, | ||
[i]={{m,2759,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // ...\n if ((DerivedCSA || BaseCSA) && (!BaseCSA || !DerivedCSA || BaseCSA->getName() != DerivedCSA->getName())) {\n // ...\n Diag(CXXBaseDecl->getLocation(), diag::note_base_class_specified_here) << CXXBaseDecl;"},{m,4500,"/// Handle a C++ member initializer.\nMemInitResult Sema::BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) {\n // ...\n if (TemplateTypeTy) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype_auto) {\n // ...\n } else {\n // ...\n if (!TyD) {\n // ...\n if (R.empty() && BaseType.isNull() && (Corr = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, &SS, CCC, CTK_ErrorRecovery, ClassDecl))) {\n if (FieldDecl *Member = Corr.getCorrectionDeclAs<FieldDecl>()) {\n // ...\n } else if (TypeDecl *Type = Corr.getCorrectionDeclAs<TypeDecl>()) {\n // ...\n if (FindBaseInitializer(*this, ClassDecl, Context.getTypeDeclType(Type), DirectBaseSpec, VirtualBaseSpec)) {\n // ...\n Diag(BaseSpec->getBeginLoc(), diag::note_base_class_specified_here) << BaseSpec->getType() << BaseSpec->getSourceRange();"}}, | [i]={{m,2759,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // ...\n if ((DerivedCSA || BaseCSA) && (!BaseCSA || !DerivedCSA || BaseCSA->getName() != DerivedCSA->getName())) {\n // ...\n Diag(CXXBaseDecl->getLocation(), diag::note_base_class_specified_here) << CXXBaseDecl;"},{m,4500,"/// Handle a C++ member initializer.\nMemInitResult Sema::BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc) {\n // ...\n if (TemplateTypeTy) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype) {\n // ...\n } else if (DS.getTypeSpecType() == TST_decltype_auto) {\n // ...\n } else {\n // ...\n if (!TyD) {\n // ...\n if (R.empty() && BaseType.isNull() && (Corr = CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), S, &SS, CCC, CTK_ErrorRecovery, ClassDecl))) {\n if (FieldDecl *Member = Corr.getCorrectionDeclAs<FieldDecl>()) {\n // ...\n } else if (TypeDecl *Type = Corr.getCorrectionDeclAs<TypeDecl>()) {\n // ...\n if (FindBaseInitializer(*this, ClassDecl, Context.getTypeDeclType(Type), DirectBaseSpec, VirtualBaseSpec)) {\n // ...\n Diag(BaseSpec->getBeginLoc(), diag::note_base_class_specified_here) << BaseSpec->getType() << BaseSpec->getSourceRange();"}}, | ||
Line 808: | Line 820: | ||
}, | }, | ||
["note_bitfield_decl"]={ | ["note_bitfield_decl"]={ | ||
[ | [b]="bit-field is declared here", | ||
[ | [d]=c, | ||
[ | [e]="bit\\-field is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3e1e52782604",1260399737,"Reimplement reference initialization (C++ [dcl.init.ref]) using the","Reimplement reference initialization (C++ [dcl.init.ref]) using the\nnew notion of an \"initialization sequence\", which encapsulates the\ncomputation of the initialization sequence along with diagnostic\ninformation and the capability to turn the computed sequence into an\nexpression. At present, I\'ve only switched one CheckReferenceInit\ncallers over to this new mechanism; more will follow.\n\nAside from (hopefully) being much more true to the standard, the\ndiagnostics provided by this reference-initialization code are a bit\nbetter than before. Some examples:\n\np5-var.cpp:54:12: error: non-const lvalue reference to type \'struct\nDerived\'\n cannot bind to a value of unrelated type \'struct Base\'\n Derived &dr2 = b; // expected-error{{non-const lvalue reference to\n ...\n ^ ~\np5-var.cpp:55:9: error: binding of reference to type \'struct Base\' to\na value of\n type \'struct Base const\' drops qualifiers\n Base &br3 = bc; // expected-error{{drops qualifiers}}\n ^ ~~\n\np5-var.cpp:57:15: error: ambiguous conversion from derived class\n \'struct Diamond\' to base class \'struct Base\':\n struct Diamond -> struct Derived -> struct Base\n struct Diamond -> struct Derived2 -> struct Base\n Base &br5 = diamond; // expected-error{{ambiguous conversion from\n ...\n ^~~~~~~\np5-var.cpp:59:9: error: non-const lvalue reference to type \'long\'\n cannot bind to\n a value of unrelated type \'int\'\n long &lr = i; // expected-error{{non-const lvalue reference to type\n ...\n ^ ~\n\np5-var.cpp:74:9: error: non-const lvalue reference to type \'struct\nBase\' cannot\n bind to a temporary of type \'struct Base\'\n Base &br1 = Base(); // expected-error{{non-const lvalue reference to\n ...\n ^ ~~~~~~\n\np5-var.cpp:102:9: error: non-const reference cannot bind to bit-field\n\'i\'\n int & ir1 = (ib.i); // expected-error{{non-const reference cannot\n ...\n ^ ~~~~~~\np5-var.cpp:98:7: note: bit-field is declared here\n int i : 17; // expected-note{{bit-field is declared here}}\n ^\n\nllvm-svn: 90992"}, | [h]={"3e1e52782604",1260399737,"Reimplement reference initialization (C++ [dcl.init.ref]) using the","Reimplement reference initialization (C++ [dcl.init.ref]) using the\nnew notion of an \"initialization sequence\", which encapsulates the\ncomputation of the initialization sequence along with diagnostic\ninformation and the capability to turn the computed sequence into an\nexpression. At present, I\'ve only switched one CheckReferenceInit\ncallers over to this new mechanism; more will follow.\n\nAside from (hopefully) being much more true to the standard, the\ndiagnostics provided by this reference-initialization code are a bit\nbetter than before. Some examples:\n\np5-var.cpp:54:12: error: non-const lvalue reference to type \'struct\nDerived\'\n cannot bind to a value of unrelated type \'struct Base\'\n Derived &dr2 = b; // expected-error{{non-const lvalue reference to\n ...\n ^ ~\np5-var.cpp:55:9: error: binding of reference to type \'struct Base\' to\na value of\n type \'struct Base const\' drops qualifiers\n Base &br3 = bc; // expected-error{{drops qualifiers}}\n ^ ~~\n\np5-var.cpp:57:15: error: ambiguous conversion from derived class\n \'struct Diamond\' to base class \'struct Base\':\n struct Diamond -> struct Derived -> struct Base\n struct Diamond -> struct Derived2 -> struct Base\n Base &br5 = diamond; // expected-error{{ambiguous conversion from\n ...\n ^~~~~~~\np5-var.cpp:59:9: error: non-const lvalue reference to type \'long\'\n cannot bind to\n a value of unrelated type \'int\'\n long &lr = i; // expected-error{{non-const lvalue reference to type\n ...\n ^ ~\n\np5-var.cpp:74:9: error: non-const lvalue reference to type \'struct\nBase\' cannot\n bind to a temporary of type \'struct Base\'\n Base &br1 = Base(); // expected-error{{non-const lvalue reference to\n ...\n ^ ~~~~~~\n\np5-var.cpp:102:9: error: non-const reference cannot bind to bit-field\n\'i\'\n int & ir1 = (ib.i); // expected-error{{non-const reference cannot\n ...\n ^ ~~~~~~\np5-var.cpp:98:7: note: bit-field is declared here\n int i : 17; // expected-note{{bit-field is declared here}}\n ^\n\nllvm-svn: 90992"}, | ||
[i]={{ | [i]={{o,16704,"ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef<OffsetOfComponent> Components, SourceLocation RParenLoc) {\n // ...\n for (const OffsetOfComponent &OC : Components) {\n // ...\n // C99 7.17p3:\n // (If the specified member is a bit-field, the behavior is undefined.)\n //\n // We diagnose this as an error.\n if (MemberDecl->isBitField()) {\n // ...\n Diag(MemberDecl->getLocation(), diag::note_bitfield_decl);"},{N,9722,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToBitfield: {\n // ...\n if (BitField)\n S.Diag(BitField->getLocation(), diag::note_bitfield_decl);"},{Yc,956,"StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef<Token> AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef<StringRef> Constraints, ArrayRef<StringRef> Clobbers, ArrayRef<Expr *> Exprs, SourceLocation EndLoc) {\n // ...\n for (uint64_t I = 0; I < NumOutputs + NumInputs; ++I) {\n // ...\n if (E->getType()->isBitIntType()) {\n // ...\n } else if (E->refersToBitField()) {\n // ...\n Diag(BitField->getLocation(), diag::note_bitfield_decl);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:70:12: note: bit-field is declared here"} | ["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:70:12: note: bit-field is declared here"} | ||
Line 820: | Line 832: | ||
}, | }, | ||
["note_block_var_fixit_add_initialization"]={ | ["note_block_var_fixit_add_initialization"]={ | ||
[ | [b]="did you mean to use __block %0?", | ||
[ | [d]=c, | ||
[ | [e]="did you mean to use __block (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"429fadb8e262",1331166170,"improve on diagnostic and provide a fixit hint when","improve on diagnostic and provide a fixit hint when\nan uninitialized block variable is being called inside the\nblock literal. // rdar://10817031\n\nllvm-svn: 152271"}, | [h]={"429fadb8e262",1331166170,"improve on diagnostic and provide a fixit hint when","improve on diagnostic and provide a fixit hint when\nan uninitialized block variable is being called inside the\nblock literal. // rdar://10817031\n\nllvm-svn: 152271"}, | ||
[i]={{ | [i]={{lb,776,"static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) {\n // ...\n if (VariableTy->isBlockPointerType() && !VD->hasAttr<BlocksAttr>()) {\n S.Diag(VD->getLocation(), diag::note_block_var_fixit_add_initialization) << VD->getDeclName() << FixItHint::CreateInsertion(VD->getLocation(), \"__block \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/FixIt/fixit-recursive-block.c"]={"clang/test/FixIt/fixit-recursive-block.c:8:12: note: did you mean to use __block \'arc_fail\'?"} | ["clang/test/FixIt/fixit-recursive-block.c"]={"clang/test/FixIt/fixit-recursive-block.c:8:12: note: did you mean to use __block \'arc_fail\'?"} | ||
Line 832: | Line 844: | ||
}, | }, | ||
["note_bracket_depth"]={ | ["note_bracket_depth"]={ | ||
[ | [b]="use -fbracket-depth=N to increase maximum nesting level", | ||
[ | [d]=c, | ||
[ | [e]="use \\-fbracket\\-depth\\=N to increase maximum nesting level", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"b3a145293dc8",1361498391,"Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,","Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,\nto control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting\nlevels for parentheses, brackets and braces.\n\nSome code with heavy macro use exceeds the default limit of 256, but we don\'t\nwant to increase it generally to avoid stack overflow on stack-constrained\nsystems.\n\nllvm-svn: 175855"}, | [h]={"b3a145293dc8",1361498391,"Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,","Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,\nto control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting\nlevels for parentheses, brackets and braces.\n\nSome code with heavy macro use exceeds the default limit of 256, but we don\'t\nwant to increase it generally to avoid stack overflow on stack-constrained\nsystems.\n\nllvm-svn: 175855"}, | ||
[i]={{"clang/lib/Parse/Parser.cpp",2698,"bool BalancedDelimiterTracker::diagnoseOverflow() {\n // ...\n P.Diag(P.Tok, diag::note_bracket_depth);"}}, | [i]={{"clang/lib/Parse/Parser.cpp",2698,"bool BalancedDelimiterTracker::diagnoseOverflow() {\n // ...\n P.Diag(P.Tok, diag::note_bracket_depth);"}}, | ||
Line 844: | Line 856: | ||
}, | }, | ||
["note_building_builtin_dump_struct_call"]={ | ["note_building_builtin_dump_struct_call"]={ | ||
[ | [b]={{nil,O,"in call to printing function with arguments \'(%0)\' while dumping struct"}}, | ||
[ | [d]=c, | ||
[ | [e]="in call to printing function with arguments \'\\((.*?)\\)\' while dumping struct", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | [h]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | ||
[i]={{ | [i]={{E,1009,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::BuildingBuiltinDumpStructCall:\n Diags.Report(Active->PointOfInstantiation, diag::note_building_builtin_dump_struct_call) << convertCallArgsToString(*this, llvm::ArrayRef(Active->CallArgs, Active->NumCallArgs));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/builtin-dump-struct.c"]={"clang/test/Sema/builtin-dump-struct.c:18:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:19:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:21:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct"} | ["clang/test/Sema/builtin-dump-struct.c"]={"clang/test/Sema/builtin-dump-struct.c:18:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:19:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct","clang/test/Sema/builtin-dump-struct.c:21:3: note: in call to printing function with arguments \'(\"%s\", \"struct A\")\' while dumping struct"} | ||
Line 856: | Line 868: | ||
}, | }, | ||
["note_called_by"]={ | ["note_called_by"]={ | ||
[ | [b]="called by %0", | ||
[ | [d]=c, | ||
[ | [e]="called by (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6c86e9160d9b",1476911701,"[CUDA] When we emit an error that might have been deferred, also print a callstack.","[CUDA] When we emit an error that might have been deferred, also print a callstack.\n\nSummary:\nPreviously, when you did something not allowed in a host+device function\nand then caused it to be codegen\'ed, we would print out an error telling\nyou that you did something bad, but we wouldn\'t tell you how we decided\nthat the function needed to be codegen\'ed.\n\nThis change causes us to print out a callstack when emitting deferred\nerrors. This is immensely helpful when debugging highly-templated code,\nwhere it\'s often unclear how a function became known-emitted.\n\nWe only print the callstack once per function, after we print the all\ndeferred errors.\n\nThis patch also switches all of our hashtables to using canonical\nFunctionDecls instead of regular FunctionDecls. This prevents a number\nof bugs, some of which are caught by tests added here, in which we\nassume that two FDs for the same function have the same pointer value.\n\nReviewers: rnk\n\nSubscribers: cfe-commits, tra\n\nDifferential Revision: https://reviews.llvm.org/D25704\n\nllvm-svn: 284647"}, | [h]={"6c86e9160d9b",1476911701,"[CUDA] When we emit an error that might have been deferred, also print a callstack.","[CUDA] When we emit an error that might have been deferred, also print a callstack.\n\nSummary:\nPreviously, when you did something not allowed in a host+device function\nand then caused it to be codegen\'ed, we would print out an error telling\nyou that you did something bad, but we wouldn\'t tell you how we decided\nthat the function needed to be codegen\'ed.\n\nThis change causes us to print out a callstack when emitting deferred\nerrors. This is immensely helpful when debugging highly-templated code,\nwhere it\'s often unclear how a function became known-emitted.\n\nWe only print the callstack once per function, after we print the all\ndeferred errors.\n\nThis patch also switches all of our hashtables to using canonical\nFunctionDecls instead of regular FunctionDecls. This prevents a number\nof bugs, some of which are caught by tests added here, in which we\nassume that two FDs for the same function have the same pointer value.\n\nReviewers: rnk\n\nSubscribers: cfe-commits, tra\n\nDifferential Revision: https://reviews.llvm.org/D25704\n\nllvm-svn: 284647"}, | ||
[i]={{"clang/lib/Sema/Sema.cpp",1629,"// Print notes showing how we can reach FD starting from an a priori\n// known-callable function.\nstatic void emitCallStackNotes(Sema &S, const FunctionDecl *FD) {\n // ...\n while (FnIt != S.DeviceKnownEmittedFns.end()) {\n // ...\n DiagnosticBuilder Builder(S.Diags.Report(FnIt->second.Loc, diag::note_called_by));"}}, | [i]={{"clang/lib/Sema/Sema.cpp",1629,"// Print notes showing how we can reach FD starting from an a priori\n// known-callable function.\nstatic void emitCallStackNotes(Sema &S, const FunctionDecl *FD) {\n // ...\n while (FnIt != S.DeviceKnownEmittedFns.end()) {\n // ...\n DiagnosticBuilder Builder(S.Diags.Report(FnIt->second.Loc, diag::note_called_by));"}}, | ||
Line 868: | Line 880: | ||
}, | }, | ||
["note_called_once_gets_called_twice"]={ | ["note_called_once_gets_called_twice"]={ | ||
[ | [b]={{nil,I,"previous call is here%select{; set to nil to indicate it cannot be called afterwards|}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="previous call is here(?:; set to nil to indicate it cannot be called afterwards|)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{lb,1692,"class CalledOnceCheckReporter : public CalledOnceCheckHandler {\n // ...\n void handleDoubleCall(const ParmVarDecl *Parameter, const Expr *Call, const Expr *PrevCall, bool IsCompletionHandler, bool Poised) override {\n // ...\n S.Diag(PrevCall->getBeginLoc(), diag::note_called_once_gets_called_twice) << Poised;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-called-once.m"]={"clang/test/SemaObjC/warn-called-once.m:53:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:58:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:63:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:68:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:77:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:83:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:91:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:114:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:128:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:181:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:187:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:195:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:224:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:239:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:257:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:280:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:283:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:306:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:535:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:792:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:797:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:804:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:811:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:818:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:825:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:832:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:862:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:1118:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:1232:5: note: previous call is here"} | ["clang/test/SemaObjC/warn-called-once.m"]={"clang/test/SemaObjC/warn-called-once.m:53:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:58:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:63:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:68:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:77:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:83:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:91:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:114:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:128:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:181:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:187:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:195:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:224:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:239:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:257:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:280:5: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:283:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:306:7: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:535:3: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:792:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:797:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:804:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:811:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:818:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:825:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:832:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:862:3: note: previous call is here","clang/test/SemaObjC/warn-called-once.m:1118:5: note: previous call is here; set to nil to indicate it cannot be called afterwards","clang/test/SemaObjC/warn-called-once.m:1232:5: note: previous call is here"} | ||
Line 880: | Line 892: | ||
}, | }, | ||
["note_callee_decl"]={ | ["note_callee_decl"]={ | ||
[ | [b]="%0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3bc84ca376a2",1311899082,"Fix an inconsistency in Sema::ConvertArgumentsForCall in that","Fix an inconsistency in Sema::ConvertArgumentsForCall in that\nthe callee note diagnostic was not emitted in the case where\nthere were too few arguments.\n\nllvm-svn: 136437"}, | [h]={"3bc84ca376a2",1311899082,"Fix an inconsistency in Sema::ConvertArgumentsForCall in that","Fix an inconsistency in Sema::ConvertArgumentsForCall in that\nthe callee note diagnostic was not emitted in the case where\nthere were too few arguments.\n\nllvm-svn: 136437"}, | ||
[i]={{ | [i]={{o,6496,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too few arguments are available (and we don\'t have default\n // arguments for the remaining parameters), don\'t make the call.\n if (Args.size() < NumParams) {\n if (Args.size() < MinArgs) {\n // ...\n // Emit the location of the prototype.\n if (!TC && FDecl && !FDecl->getBuiltinID() && !IsExecConfig)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl << FDecl->getParametersSourceRange();"},{o,6565,"/// ConvertArgumentsForCall - Converts the arguments specified in\n/// Args/NumArgs to the parameter types of the function FDecl with\n/// function prototype Proto. Call is the call expression itself, and\n/// Fn is the function expression. For a C++ member function, this\n/// routine does not attempt to convert the object argument. Returns\n/// true if the call is ill-formed.\nbool Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef<Expr *> Args, SourceLocation RParenLoc, bool IsExecConfig) {\n // ...\n // If too many are passed and not variadic, error on the extras and drop\n // them.\n if (Args.size() > NumParams) {\n if (!Proto->isVariadic()) {\n // ...\n // Emit the location of the prototype.\n if (!TC && FDecl && !FDecl->getBuiltinID() && !IsExecConfig)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl << FDecl->getParametersSourceRange();"},{o,7363,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n // ...\n // Interrupt handlers don\'t save off the VFP regs automatically on ARM,\n // so there\'s some risk when calling out to non-interrupt handler functions\n // that the callee might not preserve them. This is easy to diagnose here,\n // but can be very challenging to debug.\n // Likewise, X86 interrupt handlers may only call routines with attribute\n // no_caller_saved_registers since there is no efficient way to\n // save and restore the non-GPR state.\n if (auto *Caller = getCurFunctionDecl()) {\n if (Caller->hasAttr<ARMInterruptAttr>()) {\n // ...\n if (VFP && (!FDecl || !FDecl->hasAttr<ARMInterruptAttr>())) {\n // ...\n if (FDecl)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl;"},{o,7402,"/// BuildResolvedCallExpr - Build a call to a resolved expression,\n/// i.e. an expression not of \\p OverloadTy. The expression should\n/// unary-convert to an expression of function-pointer or\n/// block-pointer type.\n///\n/// \\param NDecl the declaration being called, if available\nExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef<Expr *> Args, SourceLocation RParenLoc, Expr *Config, bool IsExecConfig, ADLCallKind UsesADL) {\n // ...\n // Interrupt handlers don\'t save off the VFP regs automatically on ARM,\n // so there\'s some risk when calling out to non-interrupt handler functions\n // that the callee might not preserve them. This is easy to diagnose here,\n // but can be very challenging to debug.\n // Likewise, X86 interrupt handlers may only call routines with attribute\n // no_caller_saved_registers since there is no efficient way to\n // save and restore the non-GPR state.\n if (auto *Caller = getCurFunctionDecl()) {\n // ...\n if (Caller->hasAttr<AnyX86InterruptAttr>() && ((!FDecl || !FDecl->hasAttr<AnyX86NoCallerSavedRegistersAttr>()))) {\n // ...\n if (FDecl)\n Diag(FDecl->getLocation(), diag::note_callee_decl) << FDecl;"},{cb,1549,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (ObjCMethodDecl *setterMethod = property->getSetterMethodDecl()) {\n // ...\n if (getLangOpts().CPlusPlus && Synthesize && !CompleteTypeErr && Ivar->getType()->isRecordType()) {\n // ...\n if (property->getPropertyAttributes() & ObjCPropertyAttribute::kind_atomic) {\n // ...\n if (const CXXOperatorCallExpr *CXXCE = dyn_cast_or_null<CXXOperatorCallExpr>(callExpr))\n if (const FunctionDecl *FuncDecl = CXXCE->getDirectCallee())\n if (!FuncDecl->isTrivial())\n if (property->getType()->isReferenceType()) {\n // ...\n Diag(FuncDecl->getBeginLoc(), diag::note_callee_decl) << FuncDecl;"},{"clang/lib/Sema/SemaTemplateDeduction.cpp",5039,"bool Sema::DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose) {\n // ...\n if (StillUndeduced && Diagnose && !FD->isInvalidDecl()) {\n // ...\n Diag(FD->getLocation(), diag::note_callee_decl) << FD;"}} | ||
}, | }, | ||
["note_callee_static_array"]={ | ["note_callee_static_array"]={ | ||
[ | [b]="callee declares array parameter as static here", | ||
[ | [d]=c, | ||
[ | [e]="callee declares array parameter as static here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5aa6ecb619bc",1318799852,"Add sema checks for calls to functions taking static array parameters","Add sema checks for calls to functions taking static array parameters\n\nllvm-svn: 142157"}, | [h]={"5aa6ecb619bc",1318799852,"Add sema checks for calls to functions taking static array parameters","Add sema checks for calls to functions taking static array parameters\n\nllvm-svn: 142157"}, | ||
[i]={{ | [i]={{o,6683,"static void DiagnoseCalleeStaticArrayParam(Sema &S, ParmVarDecl *PVD) {\n // ...\n if (ArrayTypeLoc ATL = TL.getAs<ArrayTypeLoc>())\n S.Diag(PVD->getLocation(), diag::note_callee_static_array) << ATL.getLocalSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:15: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:8:21: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here"} | ["clang/test/Sema/static-array.c"]={"clang/test/Sema/static-array.c:3:15: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:8:21: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here","clang/test/Sema/static-array.c:6:14: note: callee declares array parameter as static here"} | ||
Line 901: | Line 913: | ||
}, | }, | ||
["note_cannot_use_trivial_abi_reason"]={ | ["note_cannot_use_trivial_abi_reason"]={ | ||
[ | [b]={{nil,K,"\'trivial_abi\' is disallowed on %0 because %select{its copy constructors and move constructors are all deleted|it is polymorphic|it has a base of a non-trivial class type|it has a virtual base|it has a __weak field|it has a field of a non-trivial class type}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="\'trivial_abi\' is disallowed on (.*?) because (?:its copy constructors and move constructors are all deleted|it is polymorphic|it has a base of a non\\-trivial class type|it has a virtual base|it has a __weak field|it has a field of a non\\-trivial class type)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{m,10304,"void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) {\n auto PrintDiagAndRemoveAttr = [&](unsigned N) {\n // No diagnostics if this is a template instantiation.\n if (!isTemplateInstantiation(RD.getTemplateSpecializationKind())) {\n // ...\n Diag(RD.getAttr<TrivialABIAttr>()->getLocation(), diag::note_cannot_use_trivial_abi_reason) << &RD << N;"}}, | [i]={{m,10304,"void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) {\n auto PrintDiagAndRemoveAttr = [&](unsigned N) {\n // No diagnostics if this is a template instantiation.\n if (!isTemplateInstantiation(RD.getTemplateSpecializationKind())) {\n // ...\n Diag(RD.getAttr<TrivialABIAttr>()->getLocation(), diag::note_cannot_use_trivial_abi_reason) << &RD << N;"}}, | ||
[j]={ | [j]={ | ||
Line 913: | Line 925: | ||
}, | }, | ||
["note_carries_dependency_missing_first_decl"]={ | ["note_carries_dependency_missing_first_decl"]={ | ||
[ | [b]="declaration missing \'[[carries_dependency]]\' attribute is here", | ||
[ | [d]=c, | ||
[ | [e]="declaration missing \'\\[\\[carries_dependency\\]\\]\' attribute is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute.","Finish semantic analysis for [[carries_dependency]] attribute.\n\nThis required plumbing through a new flag to determine whether a ParmVarDecl is\nactually a parameter of a function declaration (as opposed to a function\ntypedef etc, where the attribute is prohibited). Weirdly, this attribute (just\nlike [[noreturn]]) cannot be applied to a function type, just to a function\ndeclaration (and its parameters).\n\nllvm-svn: 173726"}, | [h]={"e233fbfc16fe",1359412965,"Finish semantic analysis for [[carries_dependency]] attribute.","Finish semantic analysis for [[carries_dependency]] attribute.\n\nThis required plumbing through a new flag to determine whether a ParmVarDecl is\nactually a parameter of a function declaration (as opposed to a function\ntypedef etc, where the attribute is prohibited). Weirdly, this attribute (just\nlike [[noreturn]]) cannot be applied to a function type, just to a function\ndeclaration (and its parameters).\n\nllvm-svn: 173726"}, | ||
[i]={{ | [i]={{q,3349,"/// mergeParamDeclAttributes - Copy attributes from the old parameter\n/// to the new one.\nstatic void mergeParamDeclAttributes(ParmVarDecl *newDecl, const ParmVarDecl *oldDecl, Sema &S) {\n // ...\n if (CDA && !oldDecl->hasAttr<CarriesDependencyAttr>()) {\n // ...\n S.Diag(FirstVD->getLocation(), diag::note_carries_dependency_missing_first_decl) << 1 /*Param*/;"},{q,4057,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n if (CDA && !Old->hasAttr<CarriesDependencyAttr>()) {\n // ...\n Diag(Old->getFirstDecl()->getLocation(), diag::note_carries_dependency_missing_first_decl) << 0 /*Function*/;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:5: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:10: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:7:5: note: declaration missing \'[[carries_dependency]]\' attribute is here"} | ["clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:5: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:3:10: note: declaration missing \'[[carries_dependency]]\' attribute is here","clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p2.cpp:7:5: note: declaration missing \'[[carries_dependency]]\' attribute is here"} | ||
Line 925: | Line 937: | ||
}, | }, | ||
["note_cast_operand_to_int"]={ | ["note_cast_operand_to_int"]={ | ||
[ | [b]={{nil,zb,"cast one or both operands to int to silence this warning"}}, | ||
[ | [d]=c, | ||
[ | [e]="cast one or both operands to int to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Ic,1615397021,Hc,Cc}, | ||
[i]={{ | [i]={{C,15253,"/// Data recursive variant of AnalyzeImplicitConversions. Subexpressions\n/// that should be visited are added to WorkList.\nstatic void AnalyzeImplicitConversions(Sema &S, AnalyzeImplicitConversionsWorkItem Item, llvm::SmallVectorImpl<AnalyzeImplicitConversionsWorkItem> &WorkList) {\n // ...\n if (const auto *BO = dyn_cast<BinaryOperator>(SourceExpr))\n if ((BO->getOpcode() == BO_And || BO->getOpcode() == BO_Or) && BO->getLHS()->isKnownToHaveBooleanValue() && BO->getRHS()->isKnownToHaveBooleanValue() && BO->getLHS()->HasSideEffects(S.Context) && BO->getRHS()->HasSideEffects(S.Context)) {\n // ...\n S.Diag(BO->getBeginLoc(), diag::note_cast_operand_to_int);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-bitwise-or-bool.c"]={"clang/test/Sema/warn-bitwise-or-bool.c:27:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:32:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:35:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:40:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:48:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:52:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:58:8: note: cast one or both operands to int to silence this warning"} | ["clang/test/Sema/warn-bitwise-or-bool.c"]={"clang/test/Sema/warn-bitwise-or-bool.c:27:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:32:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:35:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:40:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:48:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:52:7: note: cast one or both operands to int to silence this warning","clang/test/Sema/warn-bitwise-or-bool.c:58:8: note: cast one or both operands to int to silence this warning"} | ||
Line 937: | Line 949: | ||
}, | }, | ||
["note_cast_to_void"]={ | ["note_cast_to_void"]={ | ||
[ | [b]="cast expression to void to silence warning", | ||
[ | [d]=c, | ||
[ | [e]="cast expression to void to silence warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"faca2d83b13e",1455839920,"Add -Wcomma warning to Clang.","Add -Wcomma warning to Clang.\n\n-Wcomma will detect and warn on most uses of the builtin comma operator. It\ncurrently whitelists the first and third statements of the for-loop. For other\ncases, the warning can be silenced by casting the first operand of the comma\noperator to void.\n\nDifferential Revision: http://reviews.llvm.org/D3976\n\nllvm-svn: 261278"}, | [h]={"faca2d83b13e",1455839920,"Add -Wcomma warning to Clang.","Add -Wcomma warning to Clang.\n\n-Wcomma will detect and warn on most uses of the builtin comma operator. It\ncurrently whitelists the first and third statements of the for-loop. For other\ncases, the warning can be silenced by casting the first operand of the comma\noperator to void.\n\nDifferential Revision: http://reviews.llvm.org/D3976\n\nllvm-svn: 261278"}, | ||
[i]={{ | [i]={{o,14659,"// Look for instances where it is likely the comma operator is confused with\n// another operator. There is an explicit list of acceptable expressions for\n// the left hand side of the comma operator, otherwise emit a warning.\nvoid Sema::DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc) {\n // ...\n Diag(LHS->getBeginLoc(), diag::note_cast_to_void) << LHS->getSourceRange() << FixItHint::CreateInsertion(LHS->getBeginLoc(), LangOpts.CPlusPlus ? \"static_cast<void>(\" : \"(void)(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(LHS->getEndLoc()), \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-comma-operator.cpp"]={"clang/test/SemaCXX/warn-comma-operator.cpp:46:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:57:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:69:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:75:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:84:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:93:8: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:99:12: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:105:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:111:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:117:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:123:17: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:18: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:33: note: cast expression to void to silence warning"} | ["clang/test/SemaCXX/warn-comma-operator.cpp"]={"clang/test/SemaCXX/warn-comma-operator.cpp:46:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:57:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:69:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:75:15: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:84:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:93:8: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:99:12: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:105:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:111:10: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:117:7: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:123:17: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:3: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:18: note: cast expression to void to silence warning","clang/test/SemaCXX/warn-comma-operator.cpp:132:33: note: cast expression to void to silence warning"} | ||
Line 949: | Line 961: | ||
}, | }, | ||
["note_cat_conform_to_noescape_prot"]={ | ["note_cat_conform_to_noescape_prot"]={ | ||
[ | [b]={{nil,L,"%select{category|class extension}0 conforms to protocol %1 which defines method %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:category|class extension) conforms to protocol (.*?) which defines method (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"a6b5e0036128",1532750773,"[Sema][ObjC] Warn when a method declared in a protocol takes a","[Sema][ObjC] Warn when a method declared in a protocol takes a\nnon-escaping parameter but the implementation\'s method takes an escaping\nparameter.\n\nrdar://problem/39548196\n\nDifferential Revision: https://reviews.llvm.org/D49119\n\nllvm-svn: 338189"}, | [h]={"a6b5e0036128",1532750773,"[Sema][ObjC] Warn when a method declared in a protocol takes a","[Sema][ObjC] Warn when a method declared in a protocol takes a\nnon-escaping parameter but the implementation\'s method takes an escaping\nparameter.\n\nrdar://problem/39548196\n\nDifferential Revision: https://reviews.llvm.org/D49119\n\nllvm-svn: 338189"}, | ||
[i]={{ | [i]={{P,132,"/// Produce additional diagnostics if a category conforms to a protocol that\n/// defines a method taking a non-escaping parameter.\nstatic void diagnoseNoescape(const ParmVarDecl *NewD, const ParmVarDecl *OldD, const ObjCCategoryDecl *CD, const ObjCProtocolDecl *PD, Sema &S) {\n if (!diagnoseNoescape(NewD, OldD, S))\n S.Diag(CD->getLocation(), diag::note_cat_conform_to_noescape_prot) << CD->IsClassExtension() << PD << cast<ObjCMethodDecl>(NewD->getDeclContext());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:119:12: note: class extension conforms to protocol \'NoescapeProt\' which defines method \'m0:\'"} | ["clang/test/SemaObjCXX/noescape.mm"]={"clang/test/SemaObjCXX/noescape.mm:119:12: note: class extension conforms to protocol \'NoescapeProt\' which defines method \'m0:\'"} | ||
Line 961: | Line 973: | ||
}, | }, | ||
["note_cc1_round_trip_generated"]={ | ["note_cc1_round_trip_generated"]={ | ||
[ | [b]={{nil,zb,"generated arguments #%0 in round-trip: %1"},{M,M,"Generated arguments #%0 in round-trip: %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="generated arguments \\#(.*?) in round\\-trip\\: (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, | [h]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, | ||
[i]={{ | [i]={{Zc,756,"#endif\n // ...\n // The first parse on original arguments succeeded, but second parse of\n // generated arguments failed. Something must be wrong with the generator.\n if (!Success2) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{Zc,784,"#endif\n // ...\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{Zc,786,"#endif\n // ...\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 2 << SerializeArgs(ComparisonArgs);"}} | ||
}, | }, | ||
["note_cc1_round_trip_original"]={ | ["note_cc1_round_trip_original"]={ | ||
[ | [b]={{nil,zb,"original arguments in round-trip: %0"},{M,M,"Original arguments in round-trip: %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="original arguments in round\\-trip\\: (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, | [h]={"0175999805cf",1585492323,"[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee","[AMDGPU] Add options -mamdgpu-ieee -mno-amdgpu-ieee\n\nAMDGPU backend need to know whether floating point opcodes that support exception\nflag gathering quiet and propagate signaling NaN inputs per IEEE754-2008, which is\nconveyed by a function attribute \"amdgpu-ieee\". \"amdgpu-ieee\"=\"false\" turns this off.\nWithout this function attribute backend assumes it is on for compute functions.\n\n-mamdgpu-ieee and -mno-amdgpu-ieee are added to Clang to control this function attribute.\nBy default it is on. -mno-amdgpu-ieee requires -fno-honor-nans or equivalent.\n\nReviewed by: Matt Arsenault\n\nDifferential Revision: https://reviews.llvm.org/D77013"}, | ||
[i]={{ | [i]={{Zc,728,"#endif\n // ...\n // Run the first parse on the original arguments with the dummy invocation and\n // diagnostics.\n if (!Parse(DummyInvocation, CommandLineArgs, DummyDiags, Argv0) || DummyDiags.getNumWarnings() != 0) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_original) << SerializeArgs(CommandLineArgs);"}} | ||
}, | }, | ||
["note_change_bitfield_sign"]={ | ["note_change_bitfield_sign"]={ | ||
[ | [b]={{nil,U,"consider making the bitfield type %select{unsigned|signed}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="consider making the bitfield type (?:unsigned|signed)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values","Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion, which warns on implicit\nconversions that happen on bitfield assignment that change the value of\nsome enumerators.\n\nValues of enum type typically take on a very small range of values, so\nthey are frequently stored in bitfields. Unfortunately, there is no\nconvenient way to calculate the minimum number of bits necessary to\nstore all possible values at compile time, so users usually hard code a\nbitwidth that works today and widen it as necessary to pass basic\ntesting and validation. This is very error-prone, and leads to stale\nwidths as enums grow. This warning aims to catch such bugs.\n\nThis would have found two real bugs in clang and two instances of\nquestionable code. See r297680 and r297654 for the full description of\nthe issues.\n\nThis warning is currently disabled by default while we investigate its\nusefulness outside of LLVM.\n\nThe major cause of false positives with this warning is this kind of\nenum:\n enum E { W, X, Y, Z, SENTINEL_LAST };\nThe last enumerator is an invalid value used to validate inputs or size\nan array. Depending on the prevalance of this style of enum across a\ncodebase, this warning may be more or less feasible to deploy. It also\nhas trouble on sentinel values such as ~0U.\n\nReviewers: rsmith, rtrieu, thakis\n\nReviewed By: thakis\n\nSubscribers: hfinkel, voskresensky.vladimir, sashab, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D30923\n\nllvm-svn: 297761"}, | [h]={"329f24d6f6e7",1489514462,"Warn on enum assignment to bitfields that can\'t fit all values","Warn on enum assignment to bitfields that can\'t fit all values\n\nThis adds -Wbitfield-enum-conversion, which warns on implicit\nconversions that happen on bitfield assignment that change the value of\nsome enumerators.\n\nValues of enum type typically take on a very small range of values, so\nthey are frequently stored in bitfields. Unfortunately, there is no\nconvenient way to calculate the minimum number of bits necessary to\nstore all possible values at compile time, so users usually hard code a\nbitwidth that works today and widen it as necessary to pass basic\ntesting and validation. This is very error-prone, and leads to stale\nwidths as enums grow. This warning aims to catch such bugs.\n\nThis would have found two real bugs in clang and two instances of\nquestionable code. See r297680 and r297654 for the full description of\nthe issues.\n\nThis warning is currently disabled by default while we investigate its\nusefulness outside of LLVM.\n\nThe major cause of false positives with this warning is this kind of\nenum:\n enum E { W, X, Y, Z, SENTINEL_LAST };\nThe last enumerator is an invalid value used to validate inputs or size\nan array. Depending on the prevalance of this style of enum across a\ncodebase, this warning may be more or less feasible to deploy. It also\nhas trouble on sentinel values such as ~0U.\n\nReviewers: rsmith, rtrieu, thakis\n\nReviewed By: thakis\n\nSubscribers: hfinkel, voskresensky.vladimir, sashab, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D30923\n\nllvm-svn: 297761"}, | ||
[i]={{ | [i]={{C,14095,"/// Analyzes an attempt to assign the given value to a bitfield.\n///\n/// Returns true if there was something fishy about the attempt.\nstatic bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init, SourceLocation InitLoc) {\n // ...\n if (!OriginalInit->EvaluateAsInt(Result, S.Context, Expr::SE_AllowSideEffects)) {\n // The RHS is not constant. If the RHS has an enum type, make sure the\n // bitfield is wide enough to hold all the values of the enum without\n // truncation.\n if (const auto *EnumTy = OriginalInit->getType()->getAs<EnumType>()) {\n // ...\n if (DiagID) {\n // ...\n S.Diag(Bitfield->getTypeSpecStartLoc(), diag::note_change_bitfield_sign) << SignedEnum << TypeRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:3: note: consider making the bitfield type unsigned","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:14:3: note: consider making the bitfield type unsigned"} | ["clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp"]={"clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:11:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:12:3: note: consider making the bitfield type unsigned","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:13:3: note: consider making the bitfield type signed","clang/test/SemaCXX/warn-bitfield-enum-conversion.cpp:14:3: note: consider making the bitfield type unsigned"} | ||
Line 991: | Line 1,003: | ||
}, | }, | ||
["note_change_calling_conv_fixit"]={ | ["note_change_calling_conv_fixit"]={ | ||
[ | [b]="consider defining %0 with the \'%1\' calling convention", | ||
[ | [d]=c, | ||
[ | [e]="consider defining (.*?) with the \'(.*?)\' calling convention", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"9f49733c65b0",1462914003,"Add -Wcast-calling-convention to warn when casting away calling conventions","Add -Wcast-calling-convention to warn when casting away calling conventions\n\nSummary:\nThis only warns on casts of the address of a function defined in the\ncurrent TU. In this case, the fix is likely to be local and the warning\nuseful.\n\nHere are some things we could experiment with in the future:\n- Fire on declarations as well as definitions\n- Limit the warning to non-void function prototypes\n- Limit the warning to mismatches of caller and callee cleanup CCs\n\nThis warning is currently off by default while we study its usefulness.\n\nReviewers: thakis, rtrieu\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17348\n\nllvm-svn: 269116"}, | [h]={"9f49733c65b0",1462914003,"Add -Wcast-calling-convention to warn when casting away calling conventions","Add -Wcast-calling-convention to warn when casting away calling conventions\n\nSummary:\nThis only warns on casts of the address of a function defined in the\ncurrent TU. In this case, the fix is likely to be local and the warning\nuseful.\n\nHere are some things we could experiment with in the future:\n- Fire on declarations as well as definitions\n- Limit the warning to non-void function prototypes\n- Limit the warning to mismatches of caller and callee cleanup CCs\n\nThis warning is currently off by default while we study its usefulness.\n\nReviewers: thakis, rtrieu\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17348\n\nllvm-svn: 269116"}, | ||
[i]={{"clang/lib/Sema/SemaCast.cpp",2188,"/// Diagnose casts that change the calling convention of a pointer to a function\n/// defined in the current TU.\nstatic void DiagnoseCallingConvCast(Sema &Self, const ExprResult &SrcExpr, QualType DstType, SourceRange OpRange) {\n // ...\n Self.Diag(NameLoc, diag::note_change_calling_conv_fixit) << FD << DstCCName << FixItHint::CreateInsertion(NameLoc, CCAttrText);"}}, | [i]={{"clang/lib/Sema/SemaCast.cpp",2188,"/// Diagnose casts that change the calling convention of a pointer to a function\n/// defined in the current TU.\nstatic void DiagnoseCallingConvCast(Sema &Self, const ExprResult &SrcExpr, QualType DstType, SourceRange OpRange) {\n // ...\n Self.Diag(NameLoc, diag::note_change_calling_conv_fixit) << FD << DstCCName << FixItHint::CreateInsertion(NameLoc, CCAttrText);"}}, | ||
Line 1,003: | Line 1,015: | ||
}, | }, | ||
["note_checking_constraints_for_class_spec_id_here"]={ | ["note_checking_constraints_for_class_spec_id_here"]={ | ||
[ | [b]={{nil,n,"while checking constraint satisfaction for class template partial specialization \'%0\' required here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking constraint satisfaction for class template partial specialization \'(.*?)\' required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Xc,1569403888,Tc,Bc}, | ||
[i]={{ | [i]={{E,1036,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n // ...\n else if (isa<VarTemplatePartialSpecializationDecl>(Active->Entity))\n // ...\n else if (isa<ClassTemplatePartialSpecializationDecl>(Active->Entity))\n DiagID = diag::note_checking_constraints_for_class_spec_id_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int>\' required here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: while checking constraint satisfaction for class template partial specialization \'B<int>\' required here"} | ||
Line 1,015: | Line 1,027: | ||
}, | }, | ||
["note_checking_constraints_for_function_here"]={ | ["note_checking_constraints_for_function_here"]={ | ||
[ | [b]={{nil,n,"while checking constraint satisfaction for function \'%0\' required here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking constraint satisfaction for function \'(.*?)\' required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[i]={{ | [i]={{E,1039,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n // ...\n else if (isa<VarTemplatePartialSpecializationDecl>(Active->Entity))\n // ...\n else if (isa<ClassTemplatePartialSpecializationDecl>(Active->Entity))\n // ...\n else {\n // ...\n DiagID = diag::note_checking_constraints_for_function_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp"]={"clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp:45:20: note: while checking constraint satisfaction for function \'foo\' required here"} | ["clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp"]={"clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp:45:20: note: while checking constraint satisfaction for function \'foo\' required here"} | ||
Line 1,027: | Line 1,039: | ||
}, | }, | ||
["note_checking_constraints_for_template_id_here"]={ | ["note_checking_constraints_for_template_id_here"]={ | ||
[ | [b]={{nil,n,"while checking constraint satisfaction for template \'%0\' required here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking constraint satisfaction for template \'(.*?)\' required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Xc,1569403888,Tc,Bc}, | ||
[i]={{ | [i]={{E,1032,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n DiagID = diag::note_checking_constraints_for_template_id_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:25:3: note: while checking constraint satisfaction for template \'compare<Object *, Object *>\' required here"} | ["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:25:3: note: while checking constraint satisfaction for template \'compare<Object *, Object *>\' required here"} | ||
Line 1,039: | Line 1,051: | ||
}, | }, | ||
["note_checking_constraints_for_var_spec_id_here"]={ | ["note_checking_constraints_for_var_spec_id_here"]={ | ||
[ | [b]={{nil,n,"while checking constraint satisfaction for variable template partial specialization \'%0\' required here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking constraint satisfaction for variable template partial specialization \'(.*?)\' required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Xc,1569403888,Tc,Bc}, | ||
[i]={{ | [i]={{E,1034,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n // ...\n else if (isa<TemplateDecl>(Active->Entity))\n // ...\n else if (isa<VarTemplatePartialSpecializationDecl>(Active->Entity))\n DiagID = diag::note_checking_constraints_for_var_spec_id_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int>\' required here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int *>\' required here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: while checking constraint satisfaction for variable template partial specialization \'v1<int>\' required here"} | ||
Line 1,051: | Line 1,063: | ||
}, | }, | ||
["note_class_declared"]={ | ["note_class_declared"]={ | ||
[ | [b]="class is declared here", | ||
[ | [d]=c, | ||
[ | [e]="class is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1f626d6fd1ca",1309980245,"objc-arc: Support objc_arc_weak_unavailable on those","objc-arc: Support objc_arc_weak_unavailable on those\nclasses which are incompatible with weak references.\n// rdar://9693477\n\nllvm-svn: 134522"}, | [h]={"1f626d6fd1ca",1309980245,"objc-arc: Support objc_arc_weak_unavailable on those","objc-arc: Support objc_arc_weak_unavailable on those\nclasses which are incompatible with weak references.\n// rdar://9693477\n\nllvm-svn: 134522"}, | ||
[i]={{ | [i]={{P,4166,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n if (ObjCInterfaceDecl *IDecl = IC->getClassInterface()) {\n // ...\n if (const ObjCInterfaceDecl *Super = IDecl->getSuperClass()) {\n // An interface can subclass another interface with a\n // objc_subclassing_restricted attribute when it has that attribute as\n // well (because of interfaces imported from Swift). Therefore we have\n // to check if we can subclass in the implementation as well.\n if (IDecl->hasAttr<ObjCSubclassingRestrictedAttr>() && Super->hasAttr<ObjCSubclassingRestrictedAttr>()) {\n // ...\n Diag(Super->getLocation(), diag::note_class_declared);"},{P,4198,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n } else if (ObjCCategoryImplDecl *CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {\n // ...\n } else if (const auto *IntfDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {\n if (const ObjCInterfaceDecl *Super = IntfDecl->getSuperClass()) {\n if (!IntfDecl->hasAttr<ObjCSubclassingRestrictedAttr>() && Super->hasAttr<ObjCSubclassingRestrictedAttr>()) {\n // ...\n Diag(Super->getLocation(), diag::note_class_declared);"},{H,7076,"/// handleObjCOwnershipTypeAttr - Process an objc_ownership\n/// attribute on the specified type.\n///\n/// Returns \'true\' if the attribute was handled.\nstatic bool handleObjCOwnershipTypeAttr(TypeProcessingState &state, ParsedAttr &attr, QualType &type) {\n // ...\n // Forbid __weak for class objects marked as\n // objc_arc_weak_reference_unavailable\n if (lifetime == Qualifiers::OCL_Weak) {\n if (const ObjCObjectPointerType *ObjT = type->getAs<ObjCObjectPointerType>()) {\n if (ObjCInterfaceDecl *Class = ObjT->getInterfaceDecl()) {\n if (Class->isArcWeakrefUnavailable()) {\n // ...\n S.Diag(ObjT->getInterfaceDecl()->getLocation(), diag::note_class_declared);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/objc-weak.mm"]={"clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here","clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here"} | ["clang/test/SemaObjCXX/objc-weak.mm"]={"clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here","clang/test/SemaObjCXX/objc-weak.mm:8:12: note: class is declared here"} | ||
Line 1,063: | Line 1,075: | ||
}, | }, | ||
["note_cocoa_naming_declare_family"]={ | ["note_cocoa_naming_declare_family"]={ | ||
[ | [b]="explicitly declare getter %objcinstance0 with \'%1\' to return an \'unowned\' object", | ||
[ | [d]=c, | ||
[ | [e]="explicitly declare getter (.*?) with \'(.*?)\' to return an \'unowned\' object", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"a34d04d35e72",1421449471,"Suggest objc_method_family(none) for a property named -newFoo or similar.","Suggest objc_method_family(none) for a property named -newFoo or similar.\n\nAs mentioned in the previous commit, if a property (declared with @property)\nhas a name that matches a special Objective-C method family, the getter picks\nup that family despite being declared by the property. The most correct way\nto solve this problem is to add the \'objc_method_family\' attribute to the\ngetter with an argument of \'none\', which unfortunately requires an explicit\ndeclaration of the getter.\n\nThis commit adds a note to the existing error (ARC) or warning (MRR) for\nsuch a poorly-named property that suggests the solution; if there\'s already\na declaration of the getter, it even includes a fix-it.\n\nllvm-svn: 226339"}, | [h]={"a34d04d35e72",1421449471,"Suggest objc_method_family(none) for a property named -newFoo or similar.","Suggest objc_method_family(none) for a property named -newFoo or similar.\n\nAs mentioned in the previous commit, if a property (declared with @property)\nhas a name that matches a special Objective-C method family, the getter picks\nup that family despite being declared by the property. The most correct way\nto solve this problem is to add the \'objc_method_family\' attribute to the\ngetter with an argument of \'none\', which unfortunately requires an explicit\ndeclaration of the getter.\n\nThis commit adds a note to the existing error (ARC) or warning (MRR) for\nsuch a poorly-named property that suggests the solution; if there\'s already\na declaration of the getter, it even includes a fix-it.\n\nllvm-svn: 226339"}, | ||
[i]={{ | [i]={{cb,2304,"void Sema::DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D) {\n // ...\n for (const auto *PID : D->property_impls()) {\n // ...\n if (PD && !PD->hasAttr<NSReturnsNotRetainedAttr>() && !PD->isClassProperty()) {\n // ...\n if (family == OMF_alloc || family == OMF_copy || family == OMF_mutableCopy || family == OMF_new) {\n // ...\n auto noteDiag = Diag(noteLoc, diag::note_cocoa_naming_declare_family) << method->getDeclName() << spelling;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:70:23: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:71:23: note: explicitly declare getter \'-copyBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:72:21: note: explicitly declare getter \'-allocBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:74:23: note: explicitly declare getter \'-newDFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:75:23: note: explicitly declare getter \'-copyDBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:76:21: note: explicitly declare getter \'-allocDBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:103:33: note: explicitly declare getter \'-newGarply\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:94:1: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:97:1: note: explicitly declare getter \'-newBar\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:100:23: note: explicitly declare getter \'-newBaz\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object"} | ["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:70:23: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:71:23: note: explicitly declare getter \'-copyBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:72:21: note: explicitly declare getter \'-allocBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:74:23: note: explicitly declare getter \'-newDFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:75:23: note: explicitly declare getter \'-copyDBar\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:76:21: note: explicitly declare getter \'-allocDBaz\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:103:33: note: explicitly declare getter \'-newGarply\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:94:1: note: explicitly declare getter \'-newFoo\' with \'__attribute__((objc_method_family(none)))\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:97:1: note: explicitly declare getter \'-newBar\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object","clang/test/SemaObjC/arc-decls.m:100:23: note: explicitly declare getter \'-newBaz\' with \'OBJC_METHOD_FAMILY_NONE\' to return an \'unowned\' object"} | ||
Line 1,075: | Line 1,087: | ||
}, | }, | ||
["note_collapse_loop_count"]={ | ["note_collapse_loop_count"]={ | ||
[ | [b]="parameter of the \'collapse\' clause", | ||
[ | [d]=c, | ||
[ | [e]="parameter of the \'collapse\' clause", | ||
[ | [f]=a, | ||
[ | [g]="OpenMP Issue", | ||
[h]={"7b6bc88c5aaf",1448524239,"[OPENMP 4.5] Fixed rules for \'ordered\' clause.","[OPENMP 4.5] Fixed rules for \'ordered\' clause.\nAccording to OpenMP 4.5 the parameter of \'ordered\' clause must be greater than or equal to the parameter of \'collapse\' clause. Patch adds this rule.\n\nllvm-svn: 254141"}, | [h]={"7b6bc88c5aaf",1448524239,"[OPENMP 4.5] Fixed rules for \'ordered\' clause.","[OPENMP 4.5] Fixed rules for \'ordered\' clause.\nAccording to OpenMP 4.5 the parameter of \'ordered\' clause must be greater than or equal to the parameter of \'collapse\' clause. Patch adds this rule.\n\nllvm-svn: 254141"}, | ||
[i]={{ | [i]={{J,9607,"/// Called on a for stmt to check itself and nested loops (if any).\n/// \\return Returns 0 if one of the collapsed stmts is not canonical for loop,\n/// number of collapsed loops otherwise.\nstatic unsigned checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, DSAStackTy &DSA, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, OMPLoopBasedDirective::HelperExprs &Built) {\n // ...\n if (OrderedLoopCountExpr) {\n // ...\n if (!OrderedLoopCountExpr->isValueDependent() && OrderedLoopCountExpr->EvaluateAsInt(EVResult, SemaRef.getASTContext())) {\n // ...\n if (Result.getLimitedValue() < NestedLoopCount) {\n // ...\n SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), diag::note_collapse_loop_count) << CollapseLoopCountExpr->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/OpenMP/for_ordered_clause.cpp"]={"clang/test/OpenMP/for_ordered_clause.cpp:129:37: note: parameter of the \'collapse\' clause","clang/test/OpenMP/for_ordered_clause.cpp:75:37: note: parameter of the \'collapse\' clause"} | ["clang/test/OpenMP/for_ordered_clause.cpp"]={"clang/test/OpenMP/for_ordered_clause.cpp:129:37: note: parameter of the \'collapse\' clause","clang/test/OpenMP/for_ordered_clause.cpp:75:37: note: parameter of the \'collapse\' clause"} | ||
Line 1,087: | Line 1,099: | ||
}, | }, | ||
["note_comparison_synthesized_at"]={ | ["note_comparison_synthesized_at"]={ | ||
[ | [b]={{nil,n,"in defaulted %select{<ERROR>|equality|three-way|equality|relational}0 comparison operator for %1 first required here"}}, | ||
[ | [d]=c, | ||
[ | [e]="in defaulted (?:equality|three\\-way|equality|relational) comparison operator for (.*?) first required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"cafc7416baf7",1575501927,"[c++20] Synthesis of defaulted comparison functions.","[c++20] Synthesis of defaulted comparison functions.\n\nArray members are not yet handled. In addition, defaulted comparisons\ncan\'t yet find comparison operators by unqualified lookup (only by\nmember lookup and ADL). These issues will be fixed in follow-on changes."}, | [h]={"cafc7416baf7",1575501927,"[c++20] Synthesis of defaulted comparison functions.","[c++20] Synthesis of defaulted comparison functions.\n\nArray members are not yet handled. In addition, defaulted comparisons\ncan\'t yet find comparison operators by unqualified lookup (only by\nmember lookup and ADL). These issues will be fixed in follow-on changes."}, | ||
[i]={{ | [i]={{E,984,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::DefiningSynthesizedFunction: {\n // ...\n if (DFK.isSpecialMember()) {\n // ...\n } else if (DFK.isComparison()) {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_comparison_synthesized_at) << (int)DFK.asComparison() << RecordType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx20-default-compare.cpp"]={"clang/test/SemaCXX/cxx20-default-compare.cpp:11:43: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:14:45: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:17:29: note: in defaulted equality comparison operator for \'Foo\' first required here"} | ["clang/test/SemaCXX/cxx20-default-compare.cpp"]={"clang/test/SemaCXX/cxx20-default-compare.cpp:11:43: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:14:45: note: in defaulted equality comparison operator for \'Foo\' first required here","clang/test/SemaCXX/cxx20-default-compare.cpp:17:29: note: in defaulted equality comparison operator for \'Foo\' first required here"} | ||
Line 1,099: | Line 1,111: | ||
}, | }, | ||
["note_compat_assoc"]={ | ["note_compat_assoc"]={ | ||
[ | [b]="compatible type %0 specified here", | ||
[ | [d]=c, | ||
[ | [e]="compatible type (.*?) specified here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"91147596414d",1302827748,"C1X: implement generic selections","C1X: implement generic selections\n\nAs an extension, generic selection support has been added for all\nsupported languages. The syntax is the same as for C1X.\n\nllvm-svn: 129554"}, | [h]={"91147596414d",1302827748,"C1X: implement generic selections","C1X: implement generic selections\n\nAs an extension, generic selection support has been added for all\nsupported languages. The syntax is the same as for C1X.\n\nllvm-svn: 129554"}, | ||
[i]={{ | [i]={{o,1783,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n // ...\n for (unsigned i = 0; i < NumAssocs; ++i) {\n // ...\n if (Types[i]) {\n // ...\n if (Types[i]->getType()->isDependentType()) {\n // ...\n } else {\n // ...\n // C11 6.5.1.1p2 \"No two generic associations in the same generic\n // selection shall specify compatible types.\"\n for (unsigned j = i + 1; j < NumAssocs; ++j)\n if (Types[j] && !Types[j]->getType()->isDependentType() && Context.typesAreCompatible(Types[i]->getType(), Types[j]->getType())) {\n // ...\n Diag(Types[i]->getTypeLoc().getBeginLoc(), diag::note_compat_assoc) << Types[i]->getTypeLoc().getSourceRange() << Types[i]->getType();"},{o,1852,"ExprResult Sema::CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, bool PredicateIsExpr, void *ControllingExprOrType, ArrayRef<TypeSourceInfo *> Types, ArrayRef<Expr *> Exprs) {\n // ...\n // C11 6.5.1.1p2 \"The controlling expression of a generic selection shall have\n // type compatible with at most one of the types named in its generic\n // association list.\"\n if (CompatIndices.size() > 1) {\n // ...\n for (unsigned I : CompatIndices) {\n Diag(Types[I]->getTypeLoc().getBeginLoc(), diag::note_compat_assoc) << Types[I]->getTypeLoc().getSourceRange() << Types[I]->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-btf_type_tag.c"]={"clang/test/Sema/attr-btf_type_tag.c:31:19: note: compatible type \'int __attribute__((btf_type_tag(\"tag1\")))*\' (aka \'int *\') specified here"} | ["clang/test/Sema/attr-btf_type_tag.c"]={"clang/test/Sema/attr-btf_type_tag.c:31:19: note: compatible type \'int __attribute__((btf_type_tag(\"tag1\")))*\' (aka \'int *\') specified here"} | ||
Line 1,111: | Line 1,123: | ||
}, | }, | ||
["note_compound_token_split_second_token_here"]={ | ["note_compound_token_split_second_token_here"]={ | ||
[ | [b]={{nil,I,"%select{|second }0%1 token is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:|second )(.*?) token is here", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)","[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare variant`, OpenMP context selectors can be\nnested. This patch adds initial support for this so we can use it for\ntarget math variants. We should improve the detection of \"equivalent\"\nscores and user conditions, we should also revisit the data structures\nof the OMPTraitInfo object, however, both are not pressing issues right\nnow.\n\nReviewed By: JonChesterfield\n\nDifferential Revision: https://reviews.llvm.org/D85877"}, | [h]={"5c63ae156e96",1597298751,"[OpenMP] Support nested OpenMP context selectors (declare variant)","[OpenMP] Support nested OpenMP context selectors (declare variant)\n\nDue to `omp begin/end declare variant`, OpenMP context selectors can be\nnested. This patch adds initial support for this so we can use it for\ntarget math variants. We should improve the detection of \"equivalent\"\nscores and user conditions, we should also revisit the data structures\nof the OMPTraitInfo object, however, both are not pressing issues right\nnow.\n\nReviewed By: JonChesterfield\n\nDifferential Revision: https://reviews.llvm.org/D85877"}, | ||
[i]={{"clang/lib/Parse/Parser.cpp",246,"void Parser::checkCompoundToken(SourceLocation FirstTokLoc, tok::TokenKind FirstTokKind, CompoundToken Op) {\n // ...\n // If either token is in a macro, we expect both tokens to come from the same\n // macro expansion.\n if ((FirstTokLoc.isMacroID() || SecondTokLoc.isMacroID()) && PP.getSourceManager().getFileID(FirstTokLoc) != PP.getSourceManager().getFileID(SecondTokLoc)) {\n // ...\n Diag(SecondTokLoc, diag::note_compound_token_split_second_token_here) << (FirstTokKind == Tok.getKind()) << Tok.getKind() << SourceRange(SecondTokLoc);"}}, | [i]={{"clang/lib/Parse/Parser.cpp",246,"void Parser::checkCompoundToken(SourceLocation FirstTokLoc, tok::TokenKind FirstTokKind, CompoundToken Op) {\n // ...\n // If either token is in a macro, we expect both tokens to come from the same\n // macro expansion.\n if ((FirstTokLoc.isMacroID() || SecondTokLoc.isMacroID()) && PP.getSourceManager().getFileID(FirstTokLoc) != PP.getSourceManager().getFileID(SecondTokLoc)) {\n // ...\n Diag(SecondTokLoc, diag::note_compound_token_split_second_token_here) << (FirstTokKind == Tok.getKind()) << Tok.getKind() << SourceRange(SecondTokLoc);"}}, | ||
Line 1,123: | Line 1,135: | ||
}, | }, | ||
["note_concatenated_string_literal_silence"]={ | ["note_concatenated_string_literal_silence"]={ | ||
[ | [b]={{nil,I,"place parentheses around the string literal to silence warning"}}, | ||
[ | [d]=c, | ||
[ | [e]="place parentheses around the string literal to silence warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{q,14157,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n if (!var->getType()->isStructureType() && var->hasInit() && isa<InitListExpr>(var->getInit())) {\n // ...\n if (NumInits > 2)\n for (unsigned I = 0; I < NumInits; ++I) {\n // ...\n // Diagnose missing comma in string array initialization.\n // Do not warn when all the elements in the initializer are concatenated\n // together. Do not warn for macros too.\n if (NumConcat == 2 && !SL->getBeginLoc().isMacroID()) {\n // ...\n if (OnlyOneMissingComma) {\n // ...\n Diag(SL->getBeginLoc(), diag::note_concatenated_string_literal_silence);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/string-concat.c"]={"clang/test/Sema/string-concat.c:10:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:21:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:29:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:36:24: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:39:65: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:43:72: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:49:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:53:40: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:66:30: note: place parentheses around the string literal to silence warning"} | ["clang/test/Sema/string-concat.c"]={"clang/test/Sema/string-concat.c:10:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:21:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:29:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:36:24: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:39:65: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:43:72: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:49:5: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:53:40: note: place parentheses around the string literal to silence warning","clang/test/Sema/string-concat.c:66:30: note: place parentheses around the string literal to silence warning"} | ||
Line 1,135: | Line 1,147: | ||
}, | }, | ||
["note_concept_specialization_constraint_evaluated_to_false"]={ | ["note_concept_specialization_constraint_evaluated_to_false"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' evaluated to false"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' evaluated to false", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Xc,1569403888,Tc,Bc}, | ||
[i]={{ | [i]={{eb,1124,"static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, Expr *SubstExpr, bool First) {\n // ...\n if (BinaryOperator *BO = dyn_cast<BinaryOperator>(SubstExpr)) {\n // ...\n } else if (auto *CSE = dyn_cast<ConceptSpecializationExpr>(SubstExpr)) {\n if (CSE->getTemplateArgsAsWritten()->NumTemplateArgs == 1) {\n // ...\n } else {\n S.Diag(SubstExpr->getSourceRange().getBegin(), diag::note_concept_specialization_constraint_evaluated_to_false) << (int)First << CSE;"}} | ||
}, | }, | ||
["note_concept_specialization_here"]={ | ["note_concept_specialization_here"]={ | ||
[ | [b]={{nil,n,"while checking the satisfaction of concept \'%0\' requested here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking the satisfaction of concept \'(.*?)\' requested here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{ | [i]={{E,1030,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (isa<ConceptDecl>(Active->Entity))\n DiagID = diag::note_concept_specialization_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:15:23: note: while checking the satisfaction of concept \'convertible_to<bool, bool>\' requested here"} | ["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:15:23: note: while checking the satisfaction of concept \'convertible_to<bool, bool>\' requested here"} | ||
Line 1,156: | Line 1,168: | ||
}, | }, | ||
["note_condition_assign_silence"]={ | ["note_condition_assign_silence"]={ | ||
[ | [b]="place parentheses around the assignment to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="place parentheses around the assignment to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2bf2d3d0165f",1271261392,"When diagnosing suspicious precedence or assignments, move the fix-it","When diagnosing suspicious precedence or assignments, move the fix-it\nthat adds parentheses from the main diagnostic down to a new\nnote. This way, when the fix-it represents a choice between two\noptions, each of the options is associted with a note. There is no\ndefault option in such cases. For example:\n\n/Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; ==\nwill be\n evaluated first [-Wparentheses]\n if (x & y == 0) {\n ^~~~~~~~\n/Users/dgregor/t.c:2:9: note: place parentheses around the &\nexpression to\n evaluate it first\n if (x & y == 0) {\n ^\n ( )\n/Users/dgregor/t.c:2:9: note: place parentheses around the ==\nexpression to\n silence this warning\n if (x & y == 0) {\n ^\n ( )\n\nllvm-svn: 101249"}, | [h]={"2bf2d3d0165f",1271261392,"When diagnosing suspicious precedence or assignments, move the fix-it","When diagnosing suspicious precedence or assignments, move the fix-it\nthat adds parentheses from the main diagnostic down to a new\nnote. This way, when the fix-it represents a choice between two\noptions, each of the options is associted with a note. There is no\ndefault option in such cases. For example:\n\n/Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; ==\nwill be\n evaluated first [-Wparentheses]\n if (x & y == 0) {\n ^~~~~~~~\n/Users/dgregor/t.c:2:9: note: place parentheses around the &\nexpression to\n evaluate it first\n if (x & y == 0) {\n ^\n ( )\n/Users/dgregor/t.c:2:9: note: place parentheses around the ==\nexpression to\n silence this warning\n if (x & y == 0) {\n ^\n ( )\n\nllvm-svn: 101249"}, | ||
[i]={{ | [i]={{o,20883,"// Diagnose the s/=/==/ and s/\\|=/!=/ typos. Note that adding parentheses\n// will prevent this condition from triggering, which is what we want.\nvoid Sema::DiagnoseAssignmentAsCondition(Expr *E) {\n // ...\n Diag(Loc, diag::note_condition_assign_silence) << FixItHint::CreateInsertion(Open, \"(\") << FixItHint::CreateInsertion(Close, \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning"} | ["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: place parentheses around the assignment to silence this warning"} | ||
Line 1,168: | Line 1,180: | ||
}, | }, | ||
["note_condition_assign_to_comparison"]={ | ["note_condition_assign_to_comparison"]={ | ||
[ | [b]="use \'==\' to turn this assignment into an equality comparison", | ||
[ | [d]=c, | ||
[ | [e]="use \'\\=\\=\' to turn this assignment into an equality comparison", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fa1e36d0de87",1262910023,"Improve the fix-its for -Wparentheses to ensure that the fix-it","Improve the fix-its for -Wparentheses to ensure that the fix-it\nsuggestions follow recovery. Additionally, add a note to these\ndiagnostics which suggests a fix-it for changing the behavior to what\nthe user probably meant. Examples:\n\nt.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first\n [-Wparentheses]\n if (i & j == k) {\n ^~~~~~~~\n ( )\nt.cpp:2:9: note: place parentheses around the & expression to evaluate it first\n if (i & j == k) {\n ^\n ( )\n\nt.cpp:14:9: warning: using the result of an assignment as a condition\nwithout\n parentheses [-Wparentheses]\n if (i = f()) {\n ~~^~~~~\n ( )\nt.cpp:14:9: note: use \'==\' to turn this assignment into an equality\ncomparison\n if (i = f()) {\n ^\n ==\n\nllvm-svn: 92975"}, | [h]={"fa1e36d0de87",1262910023,"Improve the fix-its for -Wparentheses to ensure that the fix-it","Improve the fix-its for -Wparentheses to ensure that the fix-it\nsuggestions follow recovery. Additionally, add a note to these\ndiagnostics which suggests a fix-it for changing the behavior to what\nthe user probably meant. Examples:\n\nt.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first\n [-Wparentheses]\n if (i & j == k) {\n ^~~~~~~~\n ( )\nt.cpp:2:9: note: place parentheses around the & expression to evaluate it first\n if (i & j == k) {\n ^\n ( )\n\nt.cpp:14:9: warning: using the result of an assignment as a condition\nwithout\n parentheses [-Wparentheses]\n if (i = f()) {\n ~~^~~~~\n ( )\nt.cpp:14:9: note: use \'==\' to turn this assignment into an equality\ncomparison\n if (i = f()) {\n ^\n ==\n\nllvm-svn: 92975"}, | ||
[i]={{ | [i]={{o,20909,"// Diagnose the s/=/==/ and s/\\|=/!=/ typos. Note that adding parentheses\n// will prevent this condition from triggering, which is what we want.\nvoid Sema::DiagnoseAssignmentAsCondition(Expr *E) {\n // ...\n if (IsOrAssign)\n // ...\n else\n Diag(Loc, diag::note_condition_assign_to_comparison) << FixItHint::CreateReplacement(Loc, \"==\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison"} | ["clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp"]={"clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison","clang/test/CodeCompletion/crash-skipped-bodies-template-inst.cpp:15:9: note: use \'==\' to turn this assignment into an equality comparison"} | ||
Line 1,180: | Line 1,192: | ||
}, | }, | ||
["note_condition_or_assign_to_comparison"]={ | ["note_condition_or_assign_to_comparison"]={ | ||
[ | [b]="use \'!=\' to turn this compound assignment into an inequality comparison", | ||
[ | [d]=c, | ||
[ | [e]="use \'\\!\\=\' to turn this compound assignment into an inequality comparison", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2d4f64f441ce",1295455808,"Warn about the use of unparenthesized |= in conditionals (which may be","Warn about the use of unparenthesized |= in conditionals (which may be\na typo for !=). Fixes PR9001, from Hans Wennborg!\n\nllvm-svn: 123836"}, | [h]={"2d4f64f441ce",1295455808,"Warn about the use of unparenthesized |= in conditionals (which may be","Warn about the use of unparenthesized |= in conditionals (which may be\na typo for !=). Fixes PR9001, from Hans Wennborg!\n\nllvm-svn: 123836"}, | ||
[i]={{ | [i]={{o,20886,"// Diagnose the s/=/==/ and s/\\|=/!=/ typos. Note that adding parentheses\n// will prevent this condition from triggering, which is what we want.\nvoid Sema::DiagnoseAssignmentAsCondition(Expr *E) {\n // ...\n if (IsOrAssign)\n Diag(Loc, diag::note_condition_or_assign_to_comparison) << FixItHint::CreateReplacement(Loc, \"!=\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-assignment-condition.cpp"]={"clang/test/SemaCXX/warn-assignment-condition.cpp:101:9: note: use \'!=\' to turn this compound assignment into an inequality comparison","clang/test/SemaCXX/warn-assignment-condition.cpp:105:9: note: use \'!=\' to turn this compound assignment into an inequality comparison"} | ["clang/test/SemaCXX/warn-assignment-condition.cpp"]={"clang/test/SemaCXX/warn-assignment-condition.cpp:101:9: note: use \'!=\' to turn this compound assignment into an inequality comparison","clang/test/SemaCXX/warn-assignment-condition.cpp:105:9: note: use \'!=\' to turn this compound assignment into an inequality comparison"} | ||
Line 1,192: | Line 1,204: | ||
}, | }, | ||
["note_conflicting_attribute"]={ | ["note_conflicting_attribute"]={ | ||
[ | [b]="conflicting attribute is here", | ||
[ | [d]=c, | ||
[ | [e]="conflicting attribute is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"30e41fb4da68",1418669848,"Warn when attribute \'optnone\' conflicts with attributes on a","Warn when attribute \'optnone\' conflicts with attributes on a\ndifferent declaration of the same function.\n\nllvm-svn: 224256"}, | [h]={"30e41fb4da68",1418669848,"Warn when attribute \'optnone\' conflicts with attributes on a","Warn when attribute \'optnone\' conflicts with attributes on a\ndifferent declaration of the same function.\n\nllvm-svn: 224256"}, | ||
[i]={{ | [i]={{T,280,"/// Diagnose mutually exclusive attributes when present on a given\n/// declaration. Returns true if diagnosed.\ntemplate <typename AttrTy> static bool checkAttrMutualExclusion(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (const auto *A = D->getAttr<AttrTy>()) {\n // ...\n S.Diag(A->getLocation(), diag::note_conflicting_attribute);"},{T,292,"template <typename AttrTy> static bool checkAttrMutualExclusion(Sema &S, Decl *D, const Attr &AL) {\n if (const auto *A = D->getAttr<AttrTy>()) {\n // ...\n S.Diag(A->getLocation(), diag::note_conflicting_attribute);"},{T,2071,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Ensure we don\'t combine these with themselves, since that causes some\n // confusing behavior.\n if (AL.getParsedKind() == ParsedAttr::AT_CPUDispatch) {\n // ...\n if (const auto *Other = D->getAttr<CPUDispatchAttr>()) {\n // ...\n S.Diag(Other->getLocation(), diag::note_conflicting_attribute);"},{T,2080,"static void handleCPUSpecificAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // Ensure we don\'t combine these with themselves, since that causes some\n // confusing behavior.\n if (AL.getParsedKind() == ParsedAttr::AT_CPUDispatch) {\n // ...\n } else if (AL.getParsedKind() == ParsedAttr::AT_CPUSpecific) {\n // ...\n if (const auto *Other = D->getAttr<CPUSpecificAttr>()) {\n // ...\n S.Diag(Other->getLocation(), diag::note_conflicting_attribute);"},{T,3621,"static void handleTargetClonesAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n // Ensure we don\'t combine these with themselves, since that causes some\n // confusing behavior.\n if (const auto *Other = D->getAttr<TargetClonesAttr>()) {\n // ...\n S.Diag(Other->getLocation(), diag::note_conflicting_attribute);"},{T,3902,"ErrorAttr *Sema::mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic) {\n if (const auto *EA = D->getAttr<ErrorAttr>()) {\n // ...\n if (!Match) {\n // ...\n Diag(CI.getLoc(), diag::note_conflicting_attribute);"},{T,4888,"AlwaysInlineAttr *Sema::mergeAlwaysInlineAttr(Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident) {\n if (OptimizeNoneAttr *Optnone = D->getAttr<OptimizeNoneAttr>()) {\n // ...\n Diag(Optnone->getLocation(), diag::note_conflicting_attribute);"},{T,4944,"MinSizeAttr *Sema::mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (OptimizeNoneAttr *Optnone = D->getAttr<OptimizeNoneAttr>()) {\n // ...\n Diag(Optnone->getLocation(), diag::note_conflicting_attribute);"},{T,4962,"SwiftNameAttr *Sema::mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA, StringRef Name) {\n if (const auto *PrevSNA = D->getAttr<SwiftNameAttr>()) {\n if (PrevSNA->getName() != Name && !PrevSNA->isImplicit()) {\n // ...\n Diag(SNA.getLoc(), diag::note_conflicting_attribute);"},{T,4974,"OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI) {\n if (AlwaysInlineAttr *Inline = D->getAttr<AlwaysInlineAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_conflicting_attribute);"},{T,4979,"OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI) {\n // ...\n if (MinSizeAttr *MinSize = D->getAttr<MinSizeAttr>()) {\n // ...\n Diag(CI.getLoc(), diag::note_conflicting_attribute);"},{T,5260,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.getKind() == ParsedAttr::AT_Owner) {\n // ...\n if (const auto *OAttr = D->getAttr<OwnerAttr>()) {\n // ...\n if (ExistingDerefType != ParmType.getTypePtrOrNull()) {\n // ...\n S.Diag(OAttr->getLocation(), diag::note_conflicting_attribute);"},{T,5279,"static void handleLifetimeCategoryAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.getKind() == ParsedAttr::AT_Owner) {\n // ...\n } else {\n // ...\n if (const auto *PAttr = D->getAttr<PointerAttr>()) {\n // ...\n if (ExistingDerefType != ParmType.getTypePtrOrNull()) {\n // ...\n S.Diag(PAttr->getLocation(), diag::note_conflicting_attribute);"},{T,5516,"void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) {\n // ...\n if (auto existingAttr = D->getAttr<ParameterABIAttr>()) {\n if (existingAttr->getABI() != abi) {\n // ...\n Diag(existingAttr->getLocation(), diag::note_conflicting_attribute);"},{T,7113,"HLSLNumThreadsAttr *Sema::mergeHLSLNumThreadsAttr(Decl *D, const AttributeCommonInfo &AL, int X, int Y, int Z) {\n if (HLSLNumThreadsAttr *NT = D->getAttr<HLSLNumThreadsAttr>()) {\n if (NT->getX() != X || NT->getY() != Y || NT->getZ() != Z) {\n // ...\n Diag(AL.getLoc(), diag::note_conflicting_attribute);"},{T,7210,"HLSLShaderAttr *Sema::mergeHLSLShaderAttr(Decl *D, const AttributeCommonInfo &AL, HLSLShaderAttr::ShaderType ShaderType) {\n if (HLSLShaderAttr *NT = D->getAttr<HLSLShaderAttr>()) {\n if (NT->getType() != ShaderType) {\n // ...\n Diag(AL.getLoc(), diag::note_conflicting_attribute);"},{T,8654,"template <typename AttrTy, typename ConflictingAttrTy> static AttrTy *mergeEnforceTCBAttrImpl(Sema &S, Decl *D, const AttrTy &AL) {\n // ...\n if (const ConflictingAttrTy *ConflictingAttr = findEnforceTCBAttrByName<ConflictingAttrTy>(D, TCBName)) {\n // ...\n S.Diag(AL.getLoc(), diag::note_conflicting_attribute);"},{G,931,"StmtResult Sema::ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *thenStmt, SourceLocation ElseLoc, Stmt *elseStmt) {\n // ...\n if (ConstevalOrNegatedConsteval || StatementKind == IfStatementKind::Constexpr) {\n // ...\n } else {\n // ...\n if (std::get<0>(LHC)) {\n // ...\n Diags.Report(ElseAttr->getLocation(), diag::note_conflicting_attribute) << ElseAttr << ElseAttr->getRange();"},{"clang/lib/Sema/SemaStmtAttr.cpp",254,"template <typename OtherAttr, int DiagIdx> static bool CheckStmtInlineAttr(Sema &SemaRef, const Stmt *OrigSt, const Stmt *CurSt, const AttributeCommonInfo &A) {\n // ...\n for (const auto &Tup : llvm::zip_longest(OrigCEF.getCallExprs(), CEF.getCallExprs())) {\n // If the original call expression already had a callee, we already\n // diagnosed this, so skip it here. We can\'t skip if there isn\'t a 1:1\n // relationship between the two lists of call expressions.\n if (!CanSuppressDiag || !(*std::get<0>(Tup))->getCalleeDecl()) {\n // ...\n if (Callee && (Callee->hasAttr<OtherAttr>() || Callee->hasAttr<FlattenAttr>())) {\n // ...\n SemaRef.Diag(Callee->getBeginLoc(), diag::note_conflicting_attribute);"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4025,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // ...\n // If we discovered any decl or stmt attributes to test for, generate the\n // predicates for them now.\n if (!DeclAttrs.empty()) {\n // ...\n for (const std::string &A : DeclAttrs) {\n // ...\n OS << \" S.Diag(A->getLocation(), diag::note_conflicting_attribute);\";"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4048,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // ...\n // If we discovered any decl or stmt attributes to test for, generate the\n // predicates for them now.\n if (!DeclAttrs.empty()) {\n // ...\n // Also generate the declaration attribute merging logic if the current\n // attribute is one that can be inheritted on a declaration. It is assumed\n // this code will be executed in the context of a function with parameters:\n // Sema &S, Decl *D, Attr *A and that returns a bool (false on diagnostic,\n // true on success).\n if (Attr.isSubClassOf(\"InheritableAttr\")) {\n // ...\n for (const std::string &A : DeclAttrs) {\n // ...\n MergeDeclOS << \" S.Diag(Second->getLocation(), \"\n << \"diag::note_conflicting_attribute);\\n\";"},{"clang/utils/TableGen/ClangAttrEmitter.cpp",4089,"// Generates the mutual exclusion checks. The checks for parsed attributes are\n// written into OS and the checks for merging declaration attributes are\n// written into MergeOS.\nstatic void GenerateMutualExclusionsChecks(const Record &Attr, const RecordKeeper &Records, raw_ostream &OS, raw_ostream &MergeDeclOS, raw_ostream &MergeStmtOS) {\n // ...\n // Statement attributes are a bit different from declarations. With\n // declarations, each attribute is added to the declaration as it is\n // processed, and so you can look on the Decl * itself to see if there is a\n // conflicting attribute. Statement attributes are processed as a group\n // because AttributedStmt needs to tail-allocate all of the attribute nodes\n // at once. This means we cannot check whether the statement already contains\n // an attribute to check for the conflict. Instead, we need to check whether\n // the given list of semantic attributes contain any conflicts. It is assumed\n // this code will be executed in the context of a function with parameters:\n // Sema &S, const SmallVectorImpl<const Attr *> &C. The code will be within a\n // loop which loops over the container C with a loop variable named A to\n // represent the current attribute to check for conflicts.\n //\n // FIXME: it would be nice not to walk over the list of potential attributes\n // to apply to the statement more than once, but statements typically don\'t\n // have long lists of attributes on them, so re-walking the list should not\n // be an expensive operation.\n if (!StmtAttrs.empty()) {\n // ...\n MergeStmtOS << \" S.Diag(Second->getLocation(), \"\n << \"diag::note_conflicting_attribute);\\n\";"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/mips-interrupt-attr.c"]={"clang/test/Sema/mips-interrupt-attr.c:22:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:24:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:26:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:28:16: note: conflicting attribute is here"} | ["clang/test/Sema/mips-interrupt-attr.c"]={"clang/test/Sema/mips-interrupt-attr.c:22:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:24:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:26:16: note: conflicting attribute is here","clang/test/Sema/mips-interrupt-attr.c:28:16: note: conflicting attribute is here"} | ||
Line 1,204: | Line 1,216: | ||
}, | }, | ||
["note_conflicting_prototype"]={ | ["note_conflicting_prototype"]={ | ||
[ | [b]={{nil,O,"conflicting prototype is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="conflicting prototype is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | [h]={"cb08f4aa4467",1620530452,"Support warn_unused_result on typedefs","Support warn_unused_result on typedefs\n\nWhile it\'s not as robust as using the attribute on enums/classes (the\ntype information may be lost through a function pointer, a declaration\nor use of the underlying type without using the typedef, etc) but I\nthink there\'s still value in being able to attribute a typedef and have\nall return types written with that typedef pick up the\nwarn_unused_result behavior.\n\nSpecifically I\'d like to be able to annotate LLVMErrorRef (a wrapper for\nllvm::Error used in the C API - the underlying type is a raw pointer, so\nit can\'t be attributed itself) to reduce the chance of unhandled errors.\n\nDifferential Revision: https://reviews.llvm.org/D102122"}, | ||
[i]={{ | [i]={{q,4179,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n // C: Function types need to be compatible, not identical. This handles\n // duplicate function decls like \"void f(int); void f(enum X);\" properly.\n if (!getLangOpts().CPlusPlus) {\n // ...\n // If we are merging two functions where only one of them has a prototype,\n // we may have enough information to decide to issue a diagnostic that the\n // function without a protoype will change behavior in C2x. This handles\n // cases like:\n // void i(); void i(int j);\n // void i(int j); void i();\n // void i(); void i(int j) {}\n // See ActOnFinishFunctionBody() for other cases of the behavior change\n // diagnostic. See GetFullTypeForDeclarator() for handling of a function\n // type without a prototype.\n if (New->hasWrittenPrototype() != Old->hasWrittenPrototype() && !New->isImplicit() && !Old->isImplicit()) {\n // ...\n if (WithProto->getNumParams() != 0) {\n if (WithoutProto->getBuiltinID() == 0 && !WithoutProto->isImplicit()) {\n // ...\n // The reason the one without the prototype will be changing behavior\n // is because of the one with the prototype, so note that so long as\n // it\'s a user-visible declaration. There is one exception to this:\n // when the new declaration is a definition without a prototype, the\n // old declaration with a prototype is not the cause of the issue,\n // and that does not need to be noted because the one with a\n // prototype will not change behavior in C2x.\n if (WithProto->getBuiltinID() == 0 && !WithProto->isImplicit() && !IsWithoutProtoADef)\n Diag(WithProto->getLocation(), diag::note_conflicting_prototype);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:63:6: note: conflicting prototype is here"} | ["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:63:6: note: conflicting prototype is here"} | ||
Line 1,216: | Line 1,228: | ||
}, | }, | ||
["note_conflicting_try_here"]={ | ["note_conflicting_try_here"]={ | ||
[ | [b]="conflicting %0 here", | ||
[ | [d]=c, | ||
[ | [e]="conflicting (.*?) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e71759103e72",1422915331,"SEH: Diagnose use of C++ EH and SEH in the same function","SEH: Diagnose use of C++ EH and SEH in the same function\n\nThis check does not apply when Borland extensions are enabled, as they\nhave a checked in test case indicating that mixed usage of SEH and C++\nis supported.\n\nllvm-svn: 227876"}, | [h]={"e71759103e72",1422915331,"SEH: Diagnose use of C++ EH and SEH in the same function","SEH: Diagnose use of C++ EH and SEH in the same function\n\nThis check does not apply when Borland extensions are enabled, as they\nhave a checked in test case indicating that mixed usage of SEH and C++\nis supported.\n\nllvm-svn: 227876"}, | ||
[i]={{ | [i]={{G,4245,"StmtResult Sema::ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, MultiStmtArg CatchStmts, Stmt *Finally) {\n // ...\n if (FSI->FirstSEHTryLoc.isValid()) {\n // ...\n Diag(FSI->FirstSEHTryLoc, diag::note_conflicting_try_here) << \"\'__try\'\";"},{G,4495,"/// ActOnCXXTryBlock - Takes a try compound-statement and a number of\n/// handlers and creates a try statement from them.\nStmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef<Stmt *> Handlers) {\n // ...\n // C++ try is incompatible with SEH __try.\n if (!getLangOpts().Borland && FSI->FirstSEHTryLoc.isValid()) {\n // ...\n Diag(FSI->FirstSEHTryLoc, diag::note_conflicting_try_here) << \"\'__try\'\";"},{G,4588,"StmtResult Sema::ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler) {\n // ...\n // SEH __try is incompatible with C++ try. Borland appears to support this,\n // however.\n if (!getLangOpts().Borland) {\n if (FSI->FirstCXXOrObjCTryLoc.isValid()) {\n // ...\n Diag(FSI->FirstCXXOrObjCTryLoc, diag::note_conflicting_try_here) << (FSI->FirstTryType == sema::FunctionScopeInfo::TryLocIsCXX ? \"\'try\'\" : \"\'@try\'\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/exceptions-seh.mm"]={"clang/test/SemaCXX/exceptions-seh.mm:6:3: note: conflicting \'@try\' here","clang/test/SemaCXX/exceptions-seh.mm:17:3: note: conflicting \'__try\' here"} | ["clang/test/SemaCXX/exceptions-seh.mm"]={"clang/test/SemaCXX/exceptions-seh.mm:6:3: note: conflicting \'@try\' here","clang/test/SemaCXX/exceptions-seh.mm:17:3: note: conflicting \'__try\' here"} | ||
Line 1,228: | Line 1,240: | ||
}, | }, | ||
["note_consteval_address_accessible"]={ | ["note_consteval_address_accessible"]={ | ||
[ | [b]={{nil,K,"%select{pointer|reference}0 to a consteval declaration is not a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:pointer|reference) to a consteval declaration is not a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={qd,1579695612,pd,md}, | |||
[i]={{l,2196,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (auto *FD = dyn_cast_or_null<FunctionDecl>(BaseVD); FD && FD->isImmediateFunction()) {\n Info.FFDiag(Loc, diag::note_consteval_address_accessible) << !Type->isAnyPointerType();"},{l,2336,"/// Member pointers are constant expressions unless they point to a\n/// non-virtual dllimport member function.\nstatic bool CheckMemberPointerConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const APValue &Value, ConstantExprKind Kind) {\n // ...\n if (FD->isImmediateFunction()) {\n Info.FFDiag(Loc, diag::note_consteval_address_accessible) << /*pointer*/ 0;"}}, | [i]={{l,2196,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (auto *FD = dyn_cast_or_null<FunctionDecl>(BaseVD); FD && FD->isImmediateFunction()) {\n Info.FFDiag(Loc, diag::note_consteval_address_accessible) << !Type->isAnyPointerType();"},{l,2336,"/// Member pointers are constant expressions unless they point to a\n/// non-virtual dllimport member function.\nstatic bool CheckMemberPointerConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const APValue &Value, ConstantExprKind Kind) {\n // ...\n if (FD->isImmediateFunction()) {\n Info.FFDiag(Loc, diag::note_consteval_address_accessible) << /*pointer*/ 0;"}}, | ||
[j]={ | [j]={ | ||
Line 1,240: | Line 1,252: | ||
}, | }, | ||
["note_constexpr_access_deleted_object"]={ | ["note_constexpr_access_deleted_object"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 heap allocated object that has been deleted"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) heap allocated object that has been deleted", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,4174,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n if (!Alloc) {\n Info.FFDiag(E, diag::note_constexpr_access_deleted_object) << AK;"}}, | [i]={{l,4174,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n if (!Alloc) {\n Info.FFDiag(E, diag::note_constexpr_access_deleted_object) << AK;"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:111:5: note: construction of heap allocated object that has been deleted"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_access_inactive_union_member"]={ | ["note_constexpr_access_inactive_union_member"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 member %1 of union with %select{active member %3|no active member}2 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of) member (.*?) of union with (?:active member (.*?)|no active member) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,3824,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n } else if (const FieldDecl *Field = getAsField(Sub.Entries[I])) {\n // ...\n if (RD->isUnion()) {\n // ...\n if (!UnionField || UnionField->getCanonicalDecl() != Field->getCanonicalDecl()) {\n if (I == N - 1 && handler.AccessKind == AK_Construct) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_inactive_union_member) << handler.AccessKind << Field << !UnionField << UnionField;"},{ | [h]={fc,1366986990,ec,dc}, | ||
[i]={{l,3824,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n } else if (const FieldDecl *Field = getAsField(Sub.Entries[I])) {\n // ...\n if (RD->isUnion()) {\n // ...\n if (!UnionField || UnionField->getCanonicalDecl() != Field->getCanonicalDecl()) {\n if (I == N - 1 && handler.AccessKind == AK_Construct) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_inactive_union_member) << handler.AccessKind << Field << !UnionField << UnionField;"},{x,84,"static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_inactive_union_member) << AK << InactiveField << !ActiveField << ActiveField;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:28:17: note: read of member \'d\' of union with active member \'c\' is not allowed in a constant expression"} | ["clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:28:17: note: read of member \'d\' of union with active member \'c\' is not allowed in a constant expression"} | ||
Line 1,264: | Line 1,276: | ||
}, | }, | ||
["note_constexpr_access_mutable"]={ | ["note_constexpr_access_mutable"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 mutable member %1 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) mutable member (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"2b4fa5348ee1",1569733726,"For P0784R7: compute whether a variable has constant destruction if it","For P0784R7: compute whether a variable has constant destruction if it\nhas a constexpr destructor.\n\nFor constexpr variables, reject if the variable does not have constant\ndestruction. In all cases, do not emit runtime calls to the destructor\nfor variables with constant destruction.\n\nllvm-svn: 373159"}, | [h]={"2b4fa5348ee1",1569733726,"For P0784R7: compute whether a variable has constant destruction if it","For P0784R7: compute whether a variable has constant destruction if it\nhas a constexpr destructor.\n\nFor constexpr variables, reject if the variable does not have constant\ndestruction. In all cases, do not emit runtime calls to the destructor\nfor variables with constant destruction.\n\nllvm-svn: 373159"}, | ||
[i]={{l,3542,"/// Diagnose an attempt to read from any unreadable field within the specified\n/// type, which might be a class type.\nstatic bool diagnoseMutableFields(EvalInfo &Info, const Expr *E, AccessKinds AK, QualType T) {\n // ...\n for (auto *Field : RD->fields()) {\n // If we\'re actually going to read this field in some way, then it can\'t\n // be mutable. If we\'re in a union, then assigning to a mutable field\n // (even an empty one) can change the active member, so that\'s not OK.\n // FIXME: Add core issue number for the union case.\n if (Field->isMutable() && (RD->isUnion() || isReadByLvalueToRvalueConversion(Field->getType()))) {\n Info.FFDiag(E, diag::note_constexpr_access_mutable, 1) << AK << Field;"},{l,3804,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n } else if (const FieldDecl *Field = getAsField(Sub.Entries[I])) {\n if (Field->isMutable() && !Obj.mayAccessMutableMembers(Info, handler.AccessKind)) {\n Info.FFDiag(E, diag::note_constexpr_access_mutable, 1) << handler.AccessKind << Field;"},{ | [i]={{l,3542,"/// Diagnose an attempt to read from any unreadable field within the specified\n/// type, which might be a class type.\nstatic bool diagnoseMutableFields(EvalInfo &Info, const Expr *E, AccessKinds AK, QualType T) {\n // ...\n for (auto *Field : RD->fields()) {\n // If we\'re actually going to read this field in some way, then it can\'t\n // be mutable. If we\'re in a union, then assigning to a mutable field\n // (even an empty one) can change the active member, so that\'s not OK.\n // FIXME: Add core issue number for the union case.\n if (Field->isMutable() && (RD->isUnion() || isReadByLvalueToRvalueConversion(Field->getType()))) {\n Info.FFDiag(E, diag::note_constexpr_access_mutable, 1) << AK << Field;"},{l,3804,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n } else if (const FieldDecl *Field = getAsField(Sub.Entries[I])) {\n if (Field->isMutable() && !Obj.mayAccessMutableMembers(Info, handler.AccessKind)) {\n Info.FFDiag(E, diag::note_constexpr_access_mutable, 1) << handler.AccessKind << Field;"},{x,231,"bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_mutable, 1) << AK_Read << Field;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:15:35: note: read of mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:21:38: note: assignment to mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:32:13: note: read of mutable member \'hcm\' is not allowed in a constant expression"} | ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:15:35: note: read of mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:21:38: note: assignment to mutable member \'member\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:32:13: note: read of mutable member \'hcm\' is not allowed in a constant expression"} | ||
Line 1,276: | Line 1,288: | ||
}, | }, | ||
["note_constexpr_access_null"]={ | ["note_constexpr_access_null"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 dereferenced null pointer is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 dereferenced null pointer is not allowed in a constant expression"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 dereferenced null pointer is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) dereferenced null pointer is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,1654,"#endif\n // ...\n bool checkNullPointerForFoldAccess(EvalInfo &Info, const Expr *E, AccessKinds AK) {\n return checkNullPointerDiagnosingWith([&Info, E, AK] { Info.FFDiag(E, diag::note_constexpr_access_null) << AK; });"},{l,4009,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (!LVal.Base) {\n Info.FFDiag(E, diag::note_constexpr_access_null) << AK;"},{ | [h]={fc,1366986990,ec,dc}, | ||
[i]={{l,1654,"#endif\n // ...\n bool checkNullPointerForFoldAccess(EvalInfo &Info, const Expr *E, AccessKinds AK) {\n return checkNullPointerDiagnosingWith([&Info, E, AK] { Info.FFDiag(E, diag::note_constexpr_access_null) << AK; });"},{l,4009,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (!LVal.Base) {\n Info.FFDiag(E, diag::note_constexpr_access_null) << AK;"},{x,155,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n if (Ptr.isZero()) {\n // ...\n if (Ptr.isField())\n // ...\n else\n S.FFDiag(Src, diag::note_constexpr_access_null) << AK;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/builtin-functions.cpp"]={"clang/test/AST/Interp/builtin-functions.cpp:19:17: note: read of dereferenced null pointer is not allowed in a constant expression","clang/test/AST/Interp/builtin-functions.cpp:24:17: note: read of dereferenced null pointer is not allowed in a constant expression"} | ["clang/test/AST/Interp/builtin-functions.cpp"]={"clang/test/AST/Interp/builtin-functions.cpp:19:17: note: read of dereferenced null pointer is not allowed in a constant expression","clang/test/AST/Interp/builtin-functions.cpp:24:17: note: read of dereferenced null pointer is not allowed in a constant expression"} | ||
Line 1,288: | Line 1,300: | ||
}, | }, | ||
["note_constexpr_access_past_end"]={ | ["note_constexpr_access_past_end"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) dereferenced one\\-past\\-the\\-end pointer is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,3659,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n if (Sub.isOnePastTheEnd() || Sub.isMostDerivedAnUnsizedArray()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, Sub.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << handler.AccessKind;"},{l,3761,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n if (CAT->getSize().ule(Index)) {\n // Note, it should not be possible to form a pointer with a valid\n // designator which points more than one past the end of the array.\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_access_past_end) << handler.AccessKind;"},{l,3782,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n if (Index > 1) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_access_past_end) << handler.AccessKind;"},{l,4340,"/// Perform an lvalue-to-rvalue conversion on the given glvalue. This\n/// can also be used for \'lvalue-to-lvalue\' conversions for looking up the\n/// glvalue referred to by an entity of reference type.\n///\n/// \\param Info - Information about the ongoing evaluation.\n/// \\param Conv - The expression for which we are performing the conversion.\n/// Used for diagnostics.\n/// \\param Type - The type of the glvalue (before stripping cv-qualifiers in the\n/// case of a non-class type).\n/// \\param LVal - The glvalue on which we are attempting to perform this action.\n/// \\param RVal - The produced value will be placed here.\n/// \\param WantObjectRepresentation - If true, we\'re looking for the object\n/// representation rather than the value, and in particular,\n/// there is no requirement that the result be fully initialized.\nstatic bool handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, const LValue &LVal, APValue &RVal, bool WantObjectRepresentation = false) {\n // ...\n if (Base && !LVal.getLValueCallIndex() && !Type.isVolatileQualified()) {\n if (const CompoundLiteralExpr *CLE = dyn_cast<CompoundLiteralExpr>(Base)) {\n // ...\n } else if (isa<StringLiteral>(Base) || isa<PredefinedExpr>(Base)) {\n // ...\n if (LVal.Designator.isOnePastTheEnd()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(Conv, diag::note_constexpr_access_past_end) << AK;"},{l,5661,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n Info.FFDiag(E, This.Designator.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << AK;"},{ | [h]={fc,1366986990,ec,dc}, | ||
[i]={{l,3659,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n if (Sub.isOnePastTheEnd() || Sub.isMostDerivedAnUnsizedArray()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, Sub.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << handler.AccessKind;"},{l,3761,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n if (CAT->getSize().ule(Index)) {\n // Note, it should not be possible to form a pointer with a valid\n // designator which points more than one past the end of the array.\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_access_past_end) << handler.AccessKind;"},{l,3782,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n if (ObjType->isArrayType()) {\n // ...\n } else if (ObjType->isAnyComplexType()) {\n // ...\n if (Index > 1) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_access_past_end) << handler.AccessKind;"},{l,4340,"/// Perform an lvalue-to-rvalue conversion on the given glvalue. This\n/// can also be used for \'lvalue-to-lvalue\' conversions for looking up the\n/// glvalue referred to by an entity of reference type.\n///\n/// \\param Info - Information about the ongoing evaluation.\n/// \\param Conv - The expression for which we are performing the conversion.\n/// Used for diagnostics.\n/// \\param Type - The type of the glvalue (before stripping cv-qualifiers in the\n/// case of a non-class type).\n/// \\param LVal - The glvalue on which we are attempting to perform this action.\n/// \\param RVal - The produced value will be placed here.\n/// \\param WantObjectRepresentation - If true, we\'re looking for the object\n/// representation rather than the value, and in particular,\n/// there is no requirement that the result be fully initialized.\nstatic bool handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, const LValue &LVal, APValue &RVal, bool WantObjectRepresentation = false) {\n // ...\n if (Base && !LVal.getLValueCallIndex() && !Type.isVolatileQualified()) {\n if (const CompoundLiteralExpr *CLE = dyn_cast<CompoundLiteralExpr>(Base)) {\n // ...\n } else if (isa<StringLiteral>(Base) || isa<PredefinedExpr>(Base)) {\n // ...\n if (LVal.Designator.isOnePastTheEnd()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(Conv, diag::note_constexpr_access_past_end) << AK;"},{l,5661,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n Info.FFDiag(E, This.Designator.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << AK;"},{x,191,"bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_past_end) << AK;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:5:32: note: read of dereferenced one-past-the-end pointer is not allowed in a constant expression"} | ["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:5:32: note: read of dereferenced one-past-the-end pointer is not allowed in a constant expression"} | ||
Line 1,300: | Line 1,312: | ||
}, | }, | ||
["note_constexpr_access_static_temporary"]={ | ["note_constexpr_access_static_temporary"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|reconstruction of|destruction of}0 temporary is not allowed in a constant expression outside the expression that created the temporary"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 temporary is not allowed in a constant expression outside the expression that created the temporary"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 temporary is not allowed in a constant expression outside the expression that created the temporary"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|reconstruction of|destruction of) temporary is not allowed in a constant expression outside the expression that created the temporary", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"e6c0144208a4",1370393174,"Model temporary lifetime-extension explicitly in the AST. Use this model to","Model temporary lifetime-extension explicitly in the AST. Use this model to\nhandle temporaries which have been lifetime-extended to static storage duration\nwithin constant expressions. This correctly handles nested lifetime extension\n(through reference members of aggregates in aggregate initializers) but\nnon-constant-expression emission hasn\'t yet been updated to do the same.\n\nllvm-svn: 183283"}, | [h]={"e6c0144208a4",1370393174,"Model temporary lifetime-extension explicitly in the AST. Use this model to","Model temporary lifetime-extension explicitly in the AST. Use this model to\nhandle temporaries which have been lifetime-extended to static storage duration\nwithin constant expressions. This correctly handles nested lifetime extension\n(through reference members of aggregates in aggregate initializers) but\nnon-constant-expression emission hasn\'t yet been updated to do the same.\n\nllvm-svn: 183283"}, | ||
[i]={{l,4217,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n // C++20 [expr.const]p4: [DR2126]\n // An object or reference is usable in constant expressions if it is\n // - a temporary object of non-volatile const-qualified literal type\n // whose lifetime is extended to that of a variable that is usable\n // in constant expressions\n //\n // C++20 [expr.const]p5:\n // an lvalue-to-rvalue conversion [is not allowed unless it applies to]\n // - a non-volatile glvalue that refers to an object that is usable\n // in constant expressions, or\n // - a non-volatile glvalue of literal type that refers to a\n // non-volatile object whose lifetime began within the evaluation\n // of E;\n //\n // C++11 misses the \'began within the evaluation of e\' check and\n // instead allows all temporaries, including things like:\n // int &&r = 1;\n // int x = ++r;\n // constexpr int k = r;\n // Therefore we use the C++14-onwards rules in C++11 too.\n //\n // Note that temporaries whose lifetimes began while evaluating a\n // variable\'s constructor are not usable while evaluating the\n // corresponding destructor, not even if they\'re of const-qualified\n // types.\n if (!MTE->isUsableInConstantExpressions(Info.Ctx) && !lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_static_temporary, 1) << AK;"},{ | [i]={{l,4217,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n // C++20 [expr.const]p4: [DR2126]\n // An object or reference is usable in constant expressions if it is\n // - a temporary object of non-volatile const-qualified literal type\n // whose lifetime is extended to that of a variable that is usable\n // in constant expressions\n //\n // C++20 [expr.const]p5:\n // an lvalue-to-rvalue conversion [is not allowed unless it applies to]\n // - a non-volatile glvalue that refers to an object that is usable\n // in constant expressions, or\n // - a non-volatile glvalue of literal type that refers to a\n // non-volatile object whose lifetime began within the evaluation\n // of E;\n //\n // C++11 misses the \'began within the evaluation of e\' check and\n // instead allows all temporaries, including things like:\n // int &&r = 1;\n // int x = ++r;\n // constexpr int k = r;\n // Therefore we use the C++14-onwards rules in C++11 too.\n //\n // Note that temporaries whose lifetimes began while evaluating a\n // variable\'s constructor are not usable while evaluating the\n // corresponding destructor, not even if they\'re of const-qualified\n // types.\n if (!MTE->isUsableInConstantExpressions(Info.Ctx) && !lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_static_temporary, 1) << AK;"},{x,102,"static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n if (auto ID = Ptr.getDeclID()) {\n // ...\n S.FFDiag(E, diag::note_constexpr_access_static_temporary, 1) << AK;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:40:13: note: read of temporary is not allowed in a constant expression outside the expression that created the temporary"} | ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:40:13: note: read of temporary is not allowed in a constant expression outside the expression that created the temporary"} | ||
Line 1,312: | Line 1,324: | ||
}, | }, | ||
["note_constexpr_access_uninit"]={ | ["note_constexpr_access_uninit"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of}0 %select{object outside its lifetime|uninitialized object}1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 %select{object outside its lifetime|uninitialized object}1 is not allowed in a constant expression"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 object outside its lifetime is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of) (?:object outside its lifetime|uninitialized object) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,3679,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // Reading an indeterminate value is undefined, but assigning over one is OK.\n if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) || (O->isIndeterminate() && !isValidIndeterminateAccess(handler.AccessKind))) {\n if (!Info.checkingPotentialConstantExpression())\n Info.FFDiag(E, diag::note_constexpr_access_uninit) << handler.AccessKind << O->isIndeterminate();"},{ | [h]={fc,1366986990,ec,dc}, | ||
[i]={{l,3679,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // Reading an indeterminate value is undefined, but assigning over one is OK.\n if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) || (O->isIndeterminate() && !isValidIndeterminateAccess(handler.AccessKind))) {\n if (!Info.checkingPotentialConstantExpression())\n Info.FFDiag(E, diag::note_constexpr_access_uninit) << handler.AccessKind << O->isIndeterminate();"},{x,243,"bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n if (!S.checkingPotentialConstantExpression()) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_uninit) << AK << /*uninitialized=*/true;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-value-init.cpp"]={ | ["clang/test/SemaCXX/constexpr-value-init.cpp"]={od,od,od,od,od} | ||
} | } | ||
}, | }, | ||
["note_constexpr_access_unreadable_object"]={ | ["note_constexpr_access_unreadable_object"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 object \'%1\' whose value is not known"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 object \'%1\' whose value is not known"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) object \'(.*?)\' whose value is not known", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7ee4307bd445",1558057565,"Refactor constant evaluation of typeid(T) to track a symbolic type_info","Refactor constant evaluation of typeid(T) to track a symbolic type_info\nobject rather than tracking the originating expression.\n\nThis is groundwork for supporting polymorphic typeid expressions. (Note\nthat this somewhat regresses our support for DR1968, but it turns out\nthat that never actually worked anyway, at least in non-trivial cases.)\n\nllvm-svn: 360974"}, | [h]={"7ee4307bd445",1558057565,"Refactor constant evaluation of typeid(T) to track a symbolic type_info","Refactor constant evaluation of typeid(T) to track a symbolic type_info\nobject rather than tracking the originating expression.\n\nThis is groundwork for supporting polymorphic typeid expressions. (Note\nthat this somewhat regresses our support for DR1968, but it turns out\nthat that never actually worked anyway, at least in non-trivial cases.)\n\nllvm-svn: 360974"}, | ||
[i]={{l,4229,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_unreadable_object) << AK << Val.getAsString(Info.Ctx, Info.Ctx.getLValueReferenceType(LValType));"}}, | [i]={{l,4229,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_unreadable_object) << AK << Val.getAsString(Info.Ctx, Info.Ctx.getLValueReferenceType(LValType));"}}, | ||
Line 1,336: | Line 1,348: | ||
}, | }, | ||
["note_constexpr_access_unsized_array"]={ | ["note_constexpr_access_unsized_array"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 element of array without known bound is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 element of array without known bound is not allowed in a constant expression"},{z,V,"%select{read of|assignment to|increment of|decrement of}0 pointer to element of array without known bound is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) element of array without known bound is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | [h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | ||
[i]={{l,3660,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n if (Sub.isOnePastTheEnd() || Sub.isMostDerivedAnUnsizedArray()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, Sub.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << handler.AccessKind;"},{l,5662,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n Info.FFDiag(E, This.Designator.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << AK;"}} | [i]={{l,3660,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n if (Sub.isOnePastTheEnd() || Sub.isMostDerivedAnUnsizedArray()) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, Sub.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << handler.AccessKind;"},{l,5662,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n Info.FFDiag(E, This.Designator.isOnePastTheEnd() ? diag::note_constexpr_access_past_end : diag::note_constexpr_access_unsized_array) << AK;"}} | ||
}, | }, | ||
["note_constexpr_access_volatile_obj"]={ | ["note_constexpr_access_volatile_obj"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 volatile %select{temporary|object %2|member %2}1 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of) volatile (?:temporary|object (.*?)|member (.*?)) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={fc,1366986990,ec,dc}, | |||
[i]={{l,3719,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_volatile_obj, 1) << handler.AccessKind << DiagKind << Decl;"}}, | [i]={{l,3719,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_access_volatile_obj, 1) << handler.AccessKind << DiagKind << Decl;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:328:17: note: read of volatile object \'vi\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:350:17: note: read of volatile object \'vi\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:352:17: note: read of volatile object \'vs\' is not allowed in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_access_volatile_type"]={ | ["note_constexpr_access_volatile_type"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{r,r,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 volatile-qualified type %1 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of) volatile\\-qualified type (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={fc,1366986990,ec,dc}, | |||
[i]={{l,4034,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n // C++11 DR1311: An lvalue-to-rvalue conversion on a volatile-qualified type\n // is not a constant expression (even if the object is non-volatile). We also\n // apply this rule to C++98, in order to conform to the expected \'volatile\'\n // semantics.\n if (isFormalAccess(AK) && LValType.isVolatileQualified()) {\n if (Info.getLangOpts().CPlusPlus)\n Info.FFDiag(E, diag::note_constexpr_access_volatile_type) << AK << LValType;"}}, | [i]={{l,4034,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n // C++11 DR1311: An lvalue-to-rvalue conversion on a volatile-qualified type\n // is not a constant expression (even if the object is non-volatile). We also\n // apply this rule to C++98, in order to conform to the expected \'volatile\'\n // semantics.\n if (isFormalAccess(AK) && LValType.isVolatileQualified()) {\n if (Info.getLangOpts().CPlusPlus)\n Info.FFDiag(E, diag::note_constexpr_access_volatile_type) << AK << LValType;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:327:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:329:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:349:17: note: read of volatile-qualified type \'volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:351:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:353:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:359:17: note: read of volatile-qualified type \'volatile int\' is not allowed in a constant expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:360:17: note: read of volatile-qualified type \'const volatile int\' is not allowed in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_alignment_adjust"]={ | ["note_constexpr_alignment_adjust"]={ | ||
[ | [b]={{nil,n,"cannot constant evaluate the result of adjusting alignment to %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot constant evaluate the result of adjusting alignment to (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[i]={{l,9287,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_align_up:\n case Builtin::BI__builtin_align_down: {\n // ...\n Info.FFDiag(E->getArg(0), diag::note_constexpr_alignment_adjust) << Alignment;"}}, | [i]={{l,9287,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_align_up:\n case Builtin::BI__builtin_align_down: {\n // ...\n Info.FFDiag(E->getArg(0), diag::note_constexpr_alignment_adjust) << Alignment;"}}, | ||
Line 1,381: | Line 1,393: | ||
}, | }, | ||
["note_constexpr_alignment_compute"]={ | ["note_constexpr_alignment_compute"]={ | ||
[ | [b]={{nil,n,"cannot constant evaluate whether run-time alignment is at least %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot constant evaluate whether run\\-time alignment is at least (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[i]={{l,12026,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_is_aligned: {\n // ...\n if (Src.isLValue()) {\n // ...\n Info.FFDiag(E->getArg(0), diag::note_constexpr_alignment_compute) << Alignment;"}}, | [i]={{l,12026,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_is_aligned: {\n // ...\n if (Src.isLValue()) {\n // ...\n Info.FFDiag(E->getArg(0), diag::note_constexpr_alignment_compute) << Alignment;"}}, | ||
Line 1,393: | Line 1,405: | ||
}, | }, | ||
["note_constexpr_alignment_too_big"]={ | ["note_constexpr_alignment_too_big"]={ | ||
[ | [b]={{nil,n,"requested alignment must be %0 or less for type %1; %2 is invalid"}}, | ||
[ | [d]=c, | ||
[ | [e]="requested alignment must be (.*?) or less for type (.*?); (.*?) is invalid", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[i]={{l,9149,"/// Evaluate the value of the alignment argument to __builtin_align_{up,down},\n/// __builtin_is_aligned and __builtin_assume_aligned.\nstatic bool getAlignmentArgument(const Expr *E, QualType ForType, EvalInfo &Info, APSInt &Alignment) {\n // ...\n if (APSInt::compareValues(Alignment, MaxValue) > 0) {\n Info.FFDiag(E, diag::note_constexpr_alignment_too_big) << MaxValue << ForType << Alignment;"}}, | [i]={{l,9149,"/// Evaluate the value of the alignment argument to __builtin_align_{up,down},\n/// __builtin_is_aligned and __builtin_assume_aligned.\nstatic bool getAlignmentArgument(const Expr *E, QualType ForType, EvalInfo &Info, APSInt &Alignment) {\n // ...\n if (APSInt::compareValues(Alignment, MaxValue) > 0) {\n Info.FFDiag(E, diag::note_constexpr_alignment_too_big) << MaxValue << ForType << Alignment;"}}, | ||
Line 1,405: | Line 1,417: | ||
}, | }, | ||
["note_constexpr_array_index"]={ | ["note_constexpr_array_index"]={ | ||
[ | [b]="cannot refer to element %0 of %select{array of %2 elements|non-array object}1 in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="cannot refer to element (.*?) of (?:array of (.*?) element(?:|s)|non\\-array object) in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | [h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | ||
[i]={{l,1435,"void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info, const Expr *E, const APSInt &N) {\n // If we\'re complaining, we must be able to statically determine the size of\n // the most derived array.\n if (MostDerivedPathLength == Entries.size() && MostDerivedIsArrayElement)\n Info.CCEDiag(E, diag::note_constexpr_array_index) << N << /*array*/ 0 << static_cast<unsigned>(getMostDerivedArraySize());"},{l,1439,"void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info, const Expr *E, const APSInt &N) {\n // If we\'re complaining, we must be able to statically determine the size of\n // the most derived array.\n if (MostDerivedPathLength == Entries.size() && MostDerivedIsArrayElement)\n // ...\n else\n Info.CCEDiag(E, diag::note_constexpr_array_index) << N << /*non-array*/ 1;"}}, | [i]={{l,1435,"void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info, const Expr *E, const APSInt &N) {\n // If we\'re complaining, we must be able to statically determine the size of\n // the most derived array.\n if (MostDerivedPathLength == Entries.size() && MostDerivedIsArrayElement)\n Info.CCEDiag(E, diag::note_constexpr_array_index) << N << /*array*/ 0 << static_cast<unsigned>(getMostDerivedArraySize());"},{l,1439,"void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info, const Expr *E, const APSInt &N) {\n // If we\'re complaining, we must be able to statically determine the size of\n // the most derived array.\n if (MostDerivedPathLength == Entries.size() && MostDerivedIsArrayElement)\n // ...\n else\n Info.CCEDiag(E, diag::note_constexpr_array_index) << N << /*non-array*/ 1;"}}, | ||
Line 1,417: | Line 1,429: | ||
}, | }, | ||
["note_constexpr_baa_insufficient_alignment"]={ | ["note_constexpr_baa_insufficient_alignment"]={ | ||
[ | [b]="%select{alignment of|offset of the aligned pointer from}0 the base pointee object (%1 %plural{1:byte|:bytes}1) is %select{less than|not a multiple of}0 the asserted %2 %plural{1:byte|:bytes}2", | ||
[ | [d]=c, | ||
[ | [e]="(?:alignment of|offset of the aligned pointer from) the base pointee object \\((.*?) (?:byte|bytes)\\) is (?:less than|not a multiple of) the asserted (.*?) (?:byte|bytes)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0dd05d4b5936",1412356717,"constexpr evaluation for __builtin_assume_aligned","constexpr evaluation for __builtin_assume_aligned\n\nRichard noted in the review of r217349 that extra handling of\n__builtin_assume_aligned inside of the expression evaluator was needed. He was\nright, and this should address the concerns raised, namely:\n\n 1. The offset argument to __builtin_assume_aligned can have side effects, and\n we need to make sure that all arguments are properly evaluated.\n\n 2. If the alignment assumption does not hold, that introduces undefined\n behavior, and undefined behavior cannot appear inside a constexpr.\n\nand hopefully the diagnostics produced are detailed enough to explain what is\ngoing on.\n\nllvm-svn: 218992"}, | [h]={"0dd05d4b5936",1412356717,"constexpr evaluation for __builtin_assume_aligned","constexpr evaluation for __builtin_assume_aligned\n\nRichard noted in the review of r217349 that extra handling of\n__builtin_assume_aligned inside of the expression evaluator was needed. He was\nright, and this should address the concerns raised, namely:\n\n 1. The offset argument to __builtin_assume_aligned can have side effects, and\n we need to make sure that all arguments are properly evaluated.\n\n 2. If the alignment assumption does not hold, that introduces undefined\n behavior, and undefined behavior cannot appear inside a constexpr.\n\nand hopefully the diagnostics produced are detailed enough to explain what is\ngoing on.\n\nllvm-svn: 218992"}, | ||
[i]={{l,9231,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // If there is a base object, then it must have the correct alignment.\n if (OffsetResult.Base) {\n // ...\n if (BaseAlignment < Align) {\n // ...\n CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 0 << (unsigned)BaseAlignment.getQuantity() << (unsigned)Align.getQuantity();"},{l,9244,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // The offset must also have the correct alignment.\n if (OffsetResult.Offset.alignTo(Align) != OffsetResult.Offset) {\n // ...\n (OffsetResult.Base ? CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 1 : CCEDiag(E->getArg(0), diag::note_constexpr_baa_value_insufficient_alignment)) << (int)OffsetResult.Offset.getQuantity() << (unsigned)Align.getQuantity();"}}, | [i]={{l,9231,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // If there is a base object, then it must have the correct alignment.\n if (OffsetResult.Base) {\n // ...\n if (BaseAlignment < Align) {\n // ...\n CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 0 << (unsigned)BaseAlignment.getQuantity() << (unsigned)Align.getQuantity();"},{l,9244,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // The offset must also have the correct alignment.\n if (OffsetResult.Offset.alignTo(Align) != OffsetResult.Offset) {\n // ...\n (OffsetResult.Base ? CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 1 : CCEDiag(E->getArg(0), diag::note_constexpr_baa_value_insufficient_alignment)) << (int)OffsetResult.Offset.getQuantity() << (unsigned)Align.getQuantity();"}}, | ||
Line 1,429: | Line 1,441: | ||
}, | }, | ||
["note_constexpr_baa_value_insufficient_alignment"]={ | ["note_constexpr_baa_value_insufficient_alignment"]={ | ||
[ | [b]="value of the aligned pointer (%0) is not a multiple of the asserted %1 %plural{1:byte|:bytes}1", | ||
[ | [d]=c, | ||
[ | [e]="value of the aligned pointer \\((.*?)\\) is not a multiple of the asserted (.*?) (?:byte|bytes)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0dd05d4b5936",1412356717,"constexpr evaluation for __builtin_assume_aligned","constexpr evaluation for __builtin_assume_aligned\n\nRichard noted in the review of r217349 that extra handling of\n__builtin_assume_aligned inside of the expression evaluator was needed. He was\nright, and this should address the concerns raised, namely:\n\n 1. The offset argument to __builtin_assume_aligned can have side effects, and\n we need to make sure that all arguments are properly evaluated.\n\n 2. If the alignment assumption does not hold, that introduces undefined\n behavior, and undefined behavior cannot appear inside a constexpr.\n\nand hopefully the diagnostics produced are detailed enough to explain what is\ngoing on.\n\nllvm-svn: 218992"}, | [h]={"0dd05d4b5936",1412356717,"constexpr evaluation for __builtin_assume_aligned","constexpr evaluation for __builtin_assume_aligned\n\nRichard noted in the review of r217349 that extra handling of\n__builtin_assume_aligned inside of the expression evaluator was needed. He was\nright, and this should address the concerns raised, namely:\n\n 1. The offset argument to __builtin_assume_aligned can have side effects, and\n we need to make sure that all arguments are properly evaluated.\n\n 2. If the alignment assumption does not hold, that introduces undefined\n behavior, and undefined behavior cannot appear inside a constexpr.\n\nand hopefully the diagnostics produced are detailed enough to explain what is\ngoing on.\n\nllvm-svn: 218992"}, | ||
[i]={{l,9246,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // The offset must also have the correct alignment.\n if (OffsetResult.Offset.alignTo(Align) != OffsetResult.Offset) {\n // ...\n (OffsetResult.Base ? CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 1 : CCEDiag(E->getArg(0), diag::note_constexpr_baa_value_insufficient_alignment)) << (int)OffsetResult.Offset.getQuantity() << (unsigned)Align.getQuantity();"}}, | [i]={{l,9246,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_assume_aligned: {\n // ...\n // The offset must also have the correct alignment.\n if (OffsetResult.Offset.alignTo(Align) != OffsetResult.Offset) {\n // ...\n (OffsetResult.Base ? CCEDiag(E->getArg(0), diag::note_constexpr_baa_insufficient_alignment) << 1 : CCEDiag(E->getArg(0), diag::note_constexpr_baa_value_insufficient_alignment)) << (int)OffsetResult.Offset.getQuantity() << (unsigned)Align.getQuantity();"}}, | ||
Line 1,441: | Line 1,453: | ||
}, | }, | ||
["note_constexpr_bit_cast_indet_dest"]={ | ["note_constexpr_bit_cast_indet_dest"]={ | ||
[ | [b]={{nil,r,"indeterminate value can only initialize an object of type \'unsigned char\'%select{, \'char\',|}1 or \'std::byte\'; %0 is invalid"}}, | ||
[ | [d]=c, | ||
[ | [e]="indeterminate value can only initialize an object of type \'unsigned char\'(?:, \'char\',|) or \'std\\:\\:byte\'; (.*?) is invalid", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={jd,1562092093,kd,rd}, | |||
[i]={{l,7142,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::optional<APValue> visit(const BuiltinType *T, CharUnits Offset, const EnumType *EnumSugar = nullptr) {\n // ...\n if (!Buffer.readObject(Offset, SizeOf, Bytes)) {\n // ...\n if (!IsStdByte && !IsUChar) {\n // ...\n Info.FFDiag(BCE->getExprLoc(), diag::note_constexpr_bit_cast_indet_dest) << DisplayType << Info.Ctx.getLangOpts().CharIsSigned;"}}, | [i]={{l,7142,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::optional<APValue> visit(const BuiltinType *T, CharUnits Offset, const EnumType *EnumSugar = nullptr) {\n // ...\n if (!Buffer.readObject(Offset, SizeOf, Bytes)) {\n // ...\n if (!IsStdByte && !IsUChar) {\n // ...\n Info.FFDiag(BCE->getExprLoc(), diag::note_constexpr_bit_cast_indet_dest) << DisplayType << Info.Ctx.getLangOpts().CharIsSigned;"}}, | ||
[j]={ | [j]={ | ||
Line 1,453: | Line 1,465: | ||
}, | }, | ||
["note_constexpr_bit_cast_invalid_subtype"]={ | ["note_constexpr_bit_cast_invalid_subtype"]={ | ||
[ | [b]={{nil,r,"invalid type %0 is a %select{member|base}1 of %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="invalid type (.*?) is a (?:member|base) of (.*?)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={jd,1562092093,kd,rd}, | |||
[i]={{l,7309,"static bool checkBitCastConstexprEligibilityType(SourceLocation Loc, QualType Ty, EvalInfo *Info, const ASTContext &Ctx, bool CheckingDest) {\n // ...\n auto note = [&](int Construct, QualType NoteTy, SourceLocation NoteLoc) {\n if (Info)\n Info->Note(NoteLoc, diag::note_constexpr_bit_cast_invalid_subtype) << NoteTy << Construct << Ty;"}}, | [i]={{l,7309,"static bool checkBitCastConstexprEligibilityType(SourceLocation Loc, QualType Ty, EvalInfo *Info, const ASTContext &Ctx, bool CheckingDest) {\n // ...\n auto note = [&](int Construct, QualType NoteTy, SourceLocation NoteLoc) {\n if (Info)\n Info->Note(NoteLoc, diag::note_constexpr_bit_cast_invalid_subtype) << NoteTy << Construct << Ty;"}}, | ||
[j]={ | [j]={ | ||
Line 1,465: | Line 1,477: | ||
}, | }, | ||
["note_constexpr_bit_cast_invalid_type"]={ | ["note_constexpr_bit_cast_invalid_type"]={ | ||
[ | [b]={{nil,r,"bit_cast %select{from|to}0 a %select{|type with a }1%select{union|pointer|member pointer|volatile|reference}2 %select{type|member}1 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="bit_cast (?:from|to) a (?:|type with a )(?:union|pointer|member pointer|volatile|reference) (?:type|member) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={jd,1562092093,kd,rd}, | |||
[i]={{l,7303,"static bool checkBitCastConstexprEligibilityType(SourceLocation Loc, QualType Ty, EvalInfo *Info, const ASTContext &Ctx, bool CheckingDest) {\n // ...\n auto diag = [&](int Reason) {\n if (Info)\n Info->FFDiag(Loc, diag::note_constexpr_bit_cast_invalid_type) << CheckingDest << (Reason == 4) << Reason;"}}, | [i]={{l,7303,"static bool checkBitCastConstexprEligibilityType(SourceLocation Loc, QualType Ty, EvalInfo *Info, const ASTContext &Ctx, bool CheckingDest) {\n // ...\n auto diag = [&](int Reason) {\n if (Info)\n Info->FFDiag(Loc, diag::note_constexpr_bit_cast_invalid_type) << CheckingDest << (Reason == 4) << Reason;"}}, | ||
[j]={ | [j]={ | ||
Line 1,477: | Line 1,489: | ||
}, | }, | ||
["note_constexpr_bit_cast_unrepresentable_value"]={ | ["note_constexpr_bit_cast_unrepresentable_value"]={ | ||
[ | [b]={{nil,I,"value %1 cannot be represented in type %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="value (.*?) cannot be represented in type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"9523cf02c22a",1599063797,"[AST] Fix handling of long double and bool in __builtin_bit_cast","[AST] Fix handling of long double and bool in __builtin_bit_cast\n\nOn x86, long double has 6 unused trailing bytes. This patch changes the\nconstant evaluator to treat them as though they were padding bytes, so reading\nfrom them results in an indeterminate value, and nothing is written for them.\nAlso, fix a similar bug with bool, but instead of treating the unused bits as\npadding, enforce that they\'re zero.\n\nDifferential revision: https://reviews.llvm.org/D76323"}, | [h]={"9523cf02c22a",1599063797,"[AST] Fix handling of long double and bool in __builtin_bit_cast","[AST] Fix handling of long double and bool in __builtin_bit_cast\n\nOn x86, long double has 6 unused trailing bytes. This patch changes the\nconstant evaluator to treat them as though they were padding bytes, so reading\nfrom them results in an indeterminate value, and nothing is written for them.\nAlso, fix a similar bug with bool, but instead of treating the unused bits as\npadding, enforce that they\'re zero.\n\nDifferential revision: https://reviews.llvm.org/D76323"}, | ||
[i]={{l,7102,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::nullopt_t unrepresentableValue(QualType Ty, const APSInt &Val) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unrepresentable_value) << Ty << toString(Val, /*Radix=*/10);"}}, | [i]={{l,7102,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::nullopt_t unrepresentableValue(QualType Ty, const APSInt &Val) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unrepresentable_value) << Ty << toString(Val, /*Radix=*/10);"}}, | ||
Line 1,489: | Line 1,501: | ||
}, | }, | ||
["note_constexpr_bit_cast_unsupported_bitfield"]={ | ["note_constexpr_bit_cast_unsupported_bitfield"]={ | ||
[ | [b]={{nil,r,"constexpr bit_cast involving bit-field is not yet supported"}}, | ||
[ | [d]=c, | ||
[ | [e]="constexpr bit_cast involving bit\\-field is not yet supported", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={jd,1562092093,kd,rd}, | |||
[i]={{l,7003,"/// Traverse an APValue to produce an BitCastBuffer, emulating how the current\n/// target would represent the value at runtime.\nclass APValueToBufferConverter {\n // ...\n bool visitRecord(const APValue &Val, QualType Ty, CharUnits Offset) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n if (FD->isBitField()) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_bitfield);"},{l,7211,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::optional<APValue> visit(const RecordType *RTy, CharUnits Offset) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n // FIXME: We don\'t currently support bit-fields. A lot of the logic for\n // this is in CodeGen, so we need to factor it around.\n if (FD->isBitField()) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_bitfield);"}}, | [i]={{l,7003,"/// Traverse an APValue to produce an BitCastBuffer, emulating how the current\n/// target would represent the value at runtime.\nclass APValueToBufferConverter {\n // ...\n bool visitRecord(const APValue &Val, QualType Ty, CharUnits Offset) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n if (FD->isBitField()) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_bitfield);"},{l,7211,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n std::optional<APValue> visit(const RecordType *RTy, CharUnits Offset) {\n // ...\n for (FieldDecl *FD : RD->fields()) {\n // FIXME: We don\'t currently support bit-fields. A lot of the logic for\n // this is in CodeGen, so we need to factor it around.\n if (FD->isBitField()) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_bitfield);"}}, | ||
[j]={ | [j]={ | ||
Line 1,501: | Line 1,513: | ||
}, | }, | ||
["note_constexpr_bit_cast_unsupported_type"]={ | ["note_constexpr_bit_cast_unsupported_type"]={ | ||
[ | [b]={{nil,r,"constexpr bit_cast involving type %0 is not yet supported"}}, | ||
[ | [d]=c, | ||
[ | [e]="constexpr bit_cast involving type (.*?) is not yet supported", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={jd,1562092093,kd,rd}, | |||
[i]={{l,6971,"/// Traverse an APValue to produce an BitCastBuffer, emulating how the current\n/// target would represent the value at runtime.\nclass APValueToBufferConverter {\n // ...\n // Write out Val with type Ty into Buffer starting at Offset.\n bool visit(const APValue &Val, QualType Ty, CharUnits Offset) {\n // ...\n case APValue::Union:\n case APValue::MemberPointer:\n case APValue::AddrLabelDiff: {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_type) << Ty;"},{l,7095,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n // Emit an unsupported bit_cast type error. Sema refuses to build a bit_cast\n // with an invalid type, so anything left is a deficiency on our part (FIXME).\n // Ideally this will be unreachable.\n std::nullopt_t unsupportedType(QualType Ty) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_type) << Ty;"}} | [i]={{l,6971,"/// Traverse an APValue to produce an BitCastBuffer, emulating how the current\n/// target would represent the value at runtime.\nclass APValueToBufferConverter {\n // ...\n // Write out Val with type Ty into Buffer starting at Offset.\n bool visit(const APValue &Val, QualType Ty, CharUnits Offset) {\n // ...\n case APValue::Union:\n case APValue::MemberPointer:\n case APValue::AddrLabelDiff: {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_type) << Ty;"},{l,7095,"/// Write an BitCastBuffer into an APValue.\nclass BufferToAPValueConverter {\n // ...\n // Emit an unsupported bit_cast type error. Sema refuses to build a bit_cast\n // with an invalid type, so anything left is a deficiency on our part (FIXME).\n // Ideally this will be unreachable.\n std::nullopt_t unsupportedType(QualType Ty) {\n Info.FFDiag(BCE->getBeginLoc(), diag::note_constexpr_bit_cast_unsupported_type) << Ty;"}} | ||
}, | }, | ||
["note_constexpr_body_previous_return"]={ | ["note_constexpr_body_previous_return"]={ | ||
[ | [b]="previous return statement is here", | ||
[ | [d]=c, | ||
[ | [e]="previous return statement is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{m,2403,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (const CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Dcl)) {\n // ...\n } else {\n if (ReturnStmts.empty()) {\n // ...\n } else if (ReturnStmts.size() > 1) {\n // ...\n case Sema::CheckConstexprKind::Diagnose:\n // ...\n for (unsigned I = 0; I < ReturnStmts.size() - 1; ++I)\n SemaRef.Diag(ReturnStmts[I], diag::note_constexpr_body_previous_return);"}}, | [i]={{m,2403,"/// Check the body for the given constexpr function declaration only contains\n/// the permitted types of statement. C++11 [dcl.constexpr]p3,p4.\n///\n/// \\return true if the body is OK, false if we have found or diagnosed a\n/// problem.\nstatic bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *Body, Sema::CheckConstexprKind Kind) {\n // ...\n if (const CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Dcl)) {\n // ...\n } else {\n if (ReturnStmts.empty()) {\n // ...\n } else if (ReturnStmts.size() > 1) {\n // ...\n case Sema::CheckConstexprKind::Diagnose:\n // ...\n for (unsigned I = 0; I < ReturnStmts.size() - 1; ++I)\n SemaRef.Diag(ReturnStmts[I], diag::note_constexpr_body_previous_return);"}}, | ||
[j]={ | [j]={ | ||
Line 1,522: | Line 1,534: | ||
}, | }, | ||
["note_constexpr_call_here"]={ | ["note_constexpr_call_here"]={ | ||
[ | [b]="in call to \'%0\'", | ||
[ | [d]=c, | ||
[ | [e]="in call to \'(.*?)\'", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"f6f003af6a91",1324062367,"C++11 constexpr: Add note stacks containing backtraces if constant evaluation","C++11 constexpr: Add note stacks containing backtraces if constant evaluation\nfails within a call to a constexpr function. Add -fconstexpr-backtrace-limit\nargument to driver and frontend, to control the maximum number of notes so\nproduced (default 10). Fix APValue printing to be able to pretty-print all\nAPValue types, and move the testing for this functionality from a unittest to\na -verify test now that it\'s visible in clang\'s output.\n\nllvm-svn: 146749"}, | [h]={"f6f003af6a91",1324062367,"C++11 constexpr: Add note stacks containing backtraces if constant evaluation","C++11 constexpr: Add note stacks containing backtraces if constant evaluation\nfails within a call to a constexpr function. Add -fconstexpr-backtrace-limit\nargument to driver and frontend, to control the maximum number of notes so\nproduced (default 10). Fix APValue printing to be able to pretty-print all\nAPValue types, and move the testing for this functionality from a unittest to\na -verify test now that it\'s visible in clang\'s output.\n\nllvm-svn: 146749"}, | ||
[i]={{"clang/lib/AST/Interp/State.cpp",158,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n addDiag(CallLocation, diag::note_constexpr_call_here) << Out.str();"}}, | [i]={{"clang/lib/AST/Interp/State.cpp",158,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n addDiag(CallLocation, diag::note_constexpr_call_here) << Out.str();"}}, | ||
Line 1,534: | Line 1,546: | ||
}, | }, | ||
["note_constexpr_call_limit_exceeded"]={ | ["note_constexpr_call_limit_exceeded"]={ | ||
[ | [b]="constexpr evaluation hit maximum call limit", | ||
[ | [d]=c, | ||
[ | [e]="constexpr evaluation hit maximum call limit", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"b228a86fcfd1",1329272293,"Implement DR1454. This allows all intermediate results in constant expressions","Implement DR1454. This allows all intermediate results in constant expressions\nto be core constant expressions (including pointers and references to\ntemporaries), and makes constexpr calculations Turing-complete. A Turing machine\nsimulator is included as a testcase.\n\nThis opens up the possibilty of removing CCValue entirely, and removing some\ncopies from the constant evaluator in the process, but that cleanup is not part\nof this change.\n\nllvm-svn: 150557"}, | [h]={"b228a86fcfd1",1329272293,"Implement DR1454. This allows all intermediate results in constant expressions","Implement DR1454. This allows all intermediate results in constant expressions\nto be core constant expressions (including pointers and references to\ntemporaries), and makes constexpr calculations Turing-complete. A Turing machine\nsimulator is included as a testcase.\n\nThis opens up the possibilty of removing CCValue entirely, and removing some\ncopies from the constant evaluator in the process, but that cleanup is not part\nof this change.\n\nllvm-svn: 150557"}, | ||
[i]={{l,1013,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool CheckCallLimit(SourceLocation Loc) {\n // ...\n if (NextCallIndex == 0) {\n // ...\n FFDiag(Loc, diag::note_constexpr_call_limit_exceeded);"}} | [i]={{l,1013,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool CheckCallLimit(SourceLocation Loc) {\n // ...\n if (NextCallIndex == 0) {\n // ...\n FFDiag(Loc, diag::note_constexpr_call_limit_exceeded);"}} | ||
}, | }, | ||
["note_constexpr_calls_suppressed"]={ | ["note_constexpr_calls_suppressed"]={ | ||
[ | [b]="(skipping %0 call%s0 in backtrace; use -fconstexpr-backtrace-limit=0 to see all)", | ||
[ | [d]=c, | ||
[ | [e]="\\(skipping (.*?) call(.*?) in backtrace; use \\-fconstexpr\\-backtrace\\-limit\\=0 to see all\\)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"f6f003af6a91",1324062367,"C++11 constexpr: Add note stacks containing backtraces if constant evaluation","C++11 constexpr: Add note stacks containing backtraces if constant evaluation\nfails within a call to a constexpr function. Add -fconstexpr-backtrace-limit\nargument to driver and frontend, to control the maximum number of notes so\nproduced (default 10). Fix APValue printing to be able to pretty-print all\nAPValue types, and move the testing for this functionality from a unittest to\na -verify test now that it\'s visible in clang\'s output.\n\nllvm-svn: 146749"}, | [h]={"f6f003af6a91",1324062367,"C++11 constexpr: Add note stacks containing backtraces if constant evaluation","C++11 constexpr: Add note stacks containing backtraces if constant evaluation\nfails within a call to a constexpr function. Add -fconstexpr-backtrace-limit\nargument to driver and frontend, to control the maximum number of notes so\nproduced (default 10). Fix APValue printing to be able to pretty-print all\nAPValue types, and move the testing for this functionality from a unittest to\na -verify test now that it\'s visible in clang\'s output.\n\nllvm-svn: 146749"}, | ||
[i]={{"clang/lib/AST/Interp/State.cpp",139,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n // Skip this call?\n if (CallIdx >= SkipStart && CallIdx < SkipEnd) {\n if (CallIdx == SkipStart) {\n // ...\n addDiag(CallLocation, diag::note_constexpr_calls_suppressed) << unsigned(ActiveCalls - Limit);"}}, | [i]={{"clang/lib/AST/Interp/State.cpp",139,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n // Skip this call?\n if (CallIdx >= SkipStart && CallIdx < SkipEnd) {\n if (CallIdx == SkipStart) {\n // ...\n addDiag(CallLocation, diag::note_constexpr_calls_suppressed) << unsigned(ActiveCalls - Limit);"}}, | ||
Line 1,555: | Line 1,567: | ||
}, | }, | ||
["note_constexpr_compare_virtual_mem_ptr"]={ | ["note_constexpr_compare_virtual_mem_ptr"]={ | ||
[ | [b]="comparison of pointer to virtual member function %0 has unspecified value", | ||
[ | [d]=c, | ||
[ | [e]="comparison of pointer to virtual member function (.*?) has unspecified value", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7bb0067c06ef",1328060564,"constexpr: add support for comparisons of pointer-to-members.","constexpr: add support for comparisons of pointer-to-members.\n\nllvm-svn: 149463"}, | [h]={"7bb0067c06ef",1328060564,"constexpr: add support for comparisons of pointer-to-members.","constexpr: add support for comparisons of pointer-to-members.\n\nllvm-svn: 149463"}, | ||
[i]={{l,13246,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n // Otherwise if either is a pointer to a virtual member function, the\n // result is unspecified.\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(LHSValue.getDecl()))\n if (MD->isVirtual())\n Info.CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;"},{l,13249,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(RHSValue.getDecl()))\n if (MD->isVirtual())\n Info.CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;"}}, | [i]={{l,13246,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n // Otherwise if either is a pointer to a virtual member function, the\n // result is unspecified.\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(LHSValue.getDecl()))\n if (MD->isVirtual())\n Info.CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;"},{l,13249,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(RHSValue.getDecl()))\n if (MD->isVirtual())\n Info.CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:1113:20: note: comparison of pointer to virtual member function \'g\' has unspecified value","clang/test/SemaCXX/constant-expression-cxx11.cpp:1114:20: note: comparison of pointer to virtual member function \'g\' has unspecified value"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_conditional_never_const"]={ | ["note_constexpr_conditional_never_const"]={ | ||
[ | [b]="both arms of conditional operator are unable to produce a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="both arms of conditional operator are unable to produce a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"17100bad0ac1",1329360394,"constexpr tidyups:","constexpr tidyups:\n * Fix bug when determining whether && / || are potential constant expressions\n * Try harder when determining whether ?: is a potential constant expression\n * Produce a diagnostic on sizeof(VLA) to provide a better source location\n\nllvm-svn: 150657"}, | [h]={"17100bad0ac1",1329360394,"constexpr tidyups:","constexpr tidyups:\n * Fix bug when determining whether && / || are potential constant expressions\n * Try harder when determining whether ?: is a potential constant expression\n * Produce a diagnostic on sizeof(VLA) to provide a better source location\n\nllvm-svn: 150657"}, | ||
[i]={{l,7429,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n // Check whether a conditional operator with a non-constant condition is a\n // potential constant expression. If neither arm is a potential constant\n // expression, then the conditional operator is not either.\n template <typename ConditionalOperator> void CheckPotentialConstantConditional(const ConditionalOperator *E) {\n // ...\n Error(E, diag::note_constexpr_conditional_never_const);"}}, | [i]={{l,7429,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n // Check whether a conditional operator with a non-constant condition is a\n // potential constant expression. If neither arm is a potential constant\n // expression, then the conditional operator is not either.\n template <typename ConditionalOperator> void CheckPotentialConstantConditional(const ConditionalOperator *E) {\n // ...\n Error(E, diag::note_constexpr_conditional_never_const);"}}, | ||
Line 1,579: | Line 1,591: | ||
}, | }, | ||
["note_constexpr_construct_complex_elem"]={ | ["note_constexpr_construct_complex_elem"]={ | ||
[ | [b]={{nil,n,"construction of individual component of complex number is not yet supported in constant expressions"}}, | ||
[ | [d]=c, | ||
[ | [e]="construction of individual component of complex number is not yet supported in constant expressions", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"b542602c5f35",1570063175,"For P0784R7: support placement new-expressions in constant evaluation.","For P0784R7: support placement new-expressions in constant evaluation.\n\nFor now, we restrict this support to use from within the standard\nlibrary implementation, since we\'re required to make parts of the\nstandard library that use placement new work, but not permitted to\nmake uses of placement new from user code work.\n\nllvm-svn: 373547"}, | [h]={"b542602c5f35",1570063175,"For P0784R7: support placement new-expressions in constant evaluation.","For P0784R7: support placement new-expressions in constant evaluation.\n\nFor now, we restrict this support to use from within the standard\nlibrary implementation, since we\'re required to make parts of the\nstandard library that use placement new work, but not permitted to\nmake uses of placement new from user code work.\n\nllvm-svn: 373547"}, | ||
[i]={{l,9717,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_construct_complex_elem);"},{l,9721,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_construct_complex_elem);"}} | [i]={{l,9717,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_construct_complex_elem);"},{l,9721,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_construct_complex_elem);"}} | ||
}, | }, | ||
["note_constexpr_ctor_missing_init"]={ | ["note_constexpr_ctor_missing_init"]={ | ||
[ | [b]="member not initialized by constructor", | ||
[ | [d]=c, | ||
[ | [e]="member not initialized by constructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{m,2049,"/// Check that the given field is initialized within a constexpr constructor.\n///\n/// \\param Dcl The constexpr constructor being checked.\n/// \\param Field The field being checked. This may be a member of an anonymous\n/// struct or union nested within the class being checked.\n/// \\param Inits All declarations, including anonymous struct/union members and\n/// indirect members, for which any initialization was provided.\n/// \\param Diagnosed Whether we\'ve emitted the error message yet. Used to attach\n/// multiple notes for different members to the same error.\n/// \\param Kind Whether we\'re diagnosing a constructor as written or determining\n/// whether the formal requirements are satisfied.\n/// \\return \\c false if we\'re checking for validity and the constructor does\n/// not satisfy the requirements on a constexpr constructor.\nstatic bool CheckConstexprCtorInitializer(Sema &SemaRef, const FunctionDecl *Dcl, FieldDecl *Field, llvm::SmallSet<Decl *, 16> &Inits, bool &Diagnosed, Sema::CheckConstexprKind Kind) {\n // ...\n if (!Inits.count(Field)) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_constexpr_ctor_missing_init);"}}, | [i]={{m,2049,"/// Check that the given field is initialized within a constexpr constructor.\n///\n/// \\param Dcl The constexpr constructor being checked.\n/// \\param Field The field being checked. This may be a member of an anonymous\n/// struct or union nested within the class being checked.\n/// \\param Inits All declarations, including anonymous struct/union members and\n/// indirect members, for which any initialization was provided.\n/// \\param Diagnosed Whether we\'ve emitted the error message yet. Used to attach\n/// multiple notes for different members to the same error.\n/// \\param Kind Whether we\'re diagnosing a constructor as written or determining\n/// whether the formal requirements are satisfied.\n/// \\return \\c false if we\'re checking for validity and the constructor does\n/// not satisfy the requirements on a constexpr constructor.\nstatic bool CheckConstexprCtorInitializer(Sema &SemaRef, const FunctionDecl *Dcl, FieldDecl *Field, llvm::SmallSet<Decl *, 16> &Inits, bool &Diagnosed, Sema::CheckConstexprKind Kind) {\n // ...\n if (!Inits.count(Field)) {\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_constexpr_ctor_missing_init);"}}, | ||
[j]={ | [j]={ | ||
Line 1,600: | Line 1,612: | ||
}, | }, | ||
["note_constexpr_deallocate_null"]={ | ["note_constexpr_deallocate_null"]={ | ||
[ | [b]={{nil,M,"\'std::allocator<...>::deallocate\' used to delete a null pointer"}}, | ||
[ | [d]=c, | ||
[ | [e]="\'std\\:\\:allocator\\<\\.\\.\\.\\>\\:\\:deallocate\' used to delete a null pointer", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a892b0015ed6",1615331091,"PR49465: Disallow constant evaluation of a call to operator delete(nullptr).","PR49465: Disallow constant evaluation of a call to operator delete(nullptr).\n\nThe only time we would consider allowing this is inside a call to\nstd::allocator<T>::deallocate, whose contract does not permit deletion\nof null pointers."}, | [h]={"a892b0015ed6",1615331091,"PR49465: Disallow constant evaluation of a call to operator delete(nullptr).","PR49465: Disallow constant evaluation of a call to operator delete(nullptr).\n\nThe only time we would consider allowing this is inside a call to\nstd::allocator<T>::deallocate, whose contract does not permit deletion\nof null pointers."}, | ||
[i]={{l,6858,"// Perform a call to \'operator delete\' or \'__builtin_operator_delete\'.\nbool HandleOperatorDeleteCall(EvalInfo &Info, const CallExpr *E) {\n // ...\n // Deleting a null pointer would have no effect, but it\'s not permitted by\n // std::allocator<T>::deallocate\'s contract.\n if (Pointer.isNullPointer()) {\n Info.CCEDiag(E->getExprLoc(), diag::note_constexpr_deallocate_null);"}}, | [i]={{l,6858,"// Perform a call to \'operator delete\' or \'__builtin_operator_delete\'.\nbool HandleOperatorDeleteCall(EvalInfo &Info, const CallExpr *E) {\n // ...\n // Deleting a null pointer would have no effect, but it\'s not permitted by\n // std::allocator<T>::deallocate\'s contract.\n if (Pointer.isNullPointer()) {\n Info.CCEDiag(E->getExprLoc(), diag::note_constexpr_deallocate_null);"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: \'std::allocator<...>::deallocate\' used to delete a null pointer"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_delete_base_nonvirt_dtor"]={ | ["note_constexpr_delete_base_nonvirt_dtor"]={ | ||
[ | [b]={{nil,n,"delete of object with dynamic type %1 through pointer to base class type %0 with non-virtual destructor"}}, | ||
[ | [d]=c, | ||
[ | [e]="delete of object with dynamic type (.*?) through pointer to base class type (.*?) with non\\-virtual destructor", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,15029,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // For the non-array case, the designator must be empty if the static type\n // does not have a virtual destructor.\n if (!E->isArrayForm() && Pointer.Designator.Entries.size() != 0 && !hasVirtualDestructor(Arg->getType()->getPointeeType())) {\n Info.FFDiag(E, diag::note_constexpr_delete_base_nonvirt_dtor) << Arg->getType()->getPointeeType() << AllocType;"}}, | [i]={{l,15029,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // For the non-array case, the designator must be empty if the static type\n // does not have a virtual destructor.\n if (!E->isArrayForm() && Pointer.Designator.Entries.size() != 0 && !hasVirtualDestructor(Arg->getType()->getPointeeType())) {\n Info.FFDiag(E, diag::note_constexpr_delete_base_nonvirt_dtor) << Arg->getType()->getPointeeType() << AllocType;"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:774:5: note: delete of object with dynamic type \'T\' through pointer to base class type \'S\' with non-virtual destructor"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_delete_not_heap_alloc"]={ | ["note_constexpr_delete_not_heap_alloc"]={ | ||
[ | [b]={{nil,n,"delete of pointer \'%0\' that does not point to a heap-allocated object"}}, | ||
[ | [d]=c, | ||
[ | [e]="delete of pointer \'(.*?)\' that does not point to a heap\\-allocated object", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6796,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (!DA) {\n Info.FFDiag(E, diag::note_constexpr_delete_not_heap_alloc) << PointerAsString();"}}, | [i]={{l,6796,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (!DA) {\n Info.FFDiag(E, diag::note_constexpr_delete_not_heap_alloc) << PointerAsString();"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: delete of pointer \'&no_deallocate_nonalloc\' that does not point to a heap-allocated object"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_delete_subobject"]={ | ["note_constexpr_delete_subobject"]={ | ||
[ | [b]={{nil,n,"delete of pointer%select{ to subobject|}1 \'%0\' %select{|that does not point to complete object}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="delete of pointer(?: to subobject|) \'(.*?)\' (?:|that does not point to complete object)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6826,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (Subobject) {\n Info.FFDiag(E, diag::note_constexpr_delete_subobject) << PointerAsString() << Pointer.Designator.isOnePastTheEnd();"}}, | [i]={{l,6826,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (Subobject) {\n Info.FFDiag(E, diag::note_constexpr_delete_subobject) << PointerAsString() << Pointer.Designator.isOnePastTheEnd();"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:824:7: note: delete of pointer to subobject \'&{*new T[3]#0}[0]\' ","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1034:18: note: delete of pointer to subobject \'&{*new A#0}.n\' ","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1035:18: note: delete of pointer \'&{*new int#0} + 1\' that does not point to complete object","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1036:18: note: delete of pointer to subobject \'&{*new int[3]#0}[1]\' "} | ||
} | } | ||
}, | }, | ||
["note_constexpr_depth_limit_exceeded"]={ | ["note_constexpr_depth_limit_exceeded"]={ | ||
[ | [b]="constexpr evaluation exceeded maximum depth of %0 calls", | ||
[ | [d]=c, | ||
[ | [e]="constexpr evaluation exceeded maximum depth of (.*?) calls", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,1018,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool CheckCallLimit(SourceLocation Loc) {\n // ...\n FFDiag(Loc, diag::note_constexpr_depth_limit_exceeded) << getLangOpts().ConstexprCallDepth;"},{ | [h]={sc,1323758398,tc,uc}, | ||
[i]={{l,1018,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool CheckCallLimit(SourceLocation Loc) {\n // ...\n FFDiag(Loc, diag::note_constexpr_depth_limit_exceeded) << getLangOpts().ConstexprCallDepth;"},{x,348,"bool CheckCallDepth(InterpState &S, CodePtr OpPC) {\n if ((S.Current->getDepth() + 1) > S.getLangOpts().ConstexprCallDepth) {\n S.FFDiag(S.Current->getSource(OpPC), diag::note_constexpr_depth_limit_exceeded) << S.getLangOpts().ConstexprCallDepth;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: constexpr evaluation exceeded maximum depth of 100 calls"} | ["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: constexpr evaluation exceeded maximum depth of 100 calls"} | ||
Line 1,660: | Line 1,672: | ||
}, | }, | ||
["note_constexpr_destroy_complex_elem"]={ | ["note_constexpr_destroy_complex_elem"]={ | ||
[ | [b]={{nil,n,"destruction of individual component of complex number is not yet supported in constant expressions"}}, | ||
[ | [d]=c, | ||
[ | [e]="destruction of individual component of complex number is not yet supported in constant expressions", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"61422f96653f",1569615876,"For P0784R7: add support for explicit destructor calls and","For P0784R7: add support for explicit destructor calls and\npseudo-destructor calls in constant evaluation.\n\nllvm-svn: 373122"}, | [h]={"61422f96653f",1569615876,"For P0784R7: add support for explicit destructor calls and","For P0784R7: add support for explicit destructor calls and\npseudo-destructor calls in constant evaluation.\n\nllvm-svn: 373122"}, | ||
[i]={{l,6671,"struct DestroyObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"},{l,6675,"struct DestroyObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"}} | [i]={{l,6671,"struct DestroyObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"},{l,6675,"struct DestroyObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"}} | ||
}, | }, | ||
["note_constexpr_destroy_out_of_lifetime"]={ | ["note_constexpr_destroy_out_of_lifetime"]={ | ||
[ | [b]={{nil,n,"destroying object \'%0\' whose lifetime has already ended"}}, | ||
[ | [d]=c, | ||
[ | [e]="destroying object \'(.*?)\' whose lifetime has already ended", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6500,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // Objects can only be destroyed while they\'re within their lifetimes.\n // FIXME: We have no representation for whether an object of type nullptr_t\n // is in its lifetime; it usually doesn\'t matter. Perhaps we should model it\n // as indeterminate instead?\n if (Value.isAbsent() && !T->isNullPtrType()) {\n // ...\n Info.FFDiag(CallLoc, diag::note_constexpr_destroy_out_of_lifetime) << Printable.getAsString(Info.Ctx, Info.Ctx.getLValueReferenceType(T));"}}, | [i]={{l,6500,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // Objects can only be destroyed while they\'re within their lifetimes.\n // FIXME: We have no representation for whether an object of type nullptr_t\n // is in its lifetime; it usually doesn\'t matter. Perhaps we should model it\n // as indeterminate instead?\n if (Value.isAbsent() && !T->isNullPtrType()) {\n // ...\n Info.FFDiag(CallLoc, diag::note_constexpr_destroy_out_of_lifetime) << Printable.getAsString(Info.Ctx, Info.Ctx.getLValueReferenceType(T));"}}, | ||
[j]={ | [j]={ | ||
Line 1,681: | Line 1,693: | ||
}, | }, | ||
["note_constexpr_double_delete"]={ | ["note_constexpr_double_delete"]={ | ||
[ | [b]={{nil,n,"delete of pointer that has already been deleted"}}, | ||
[ | [d]=c, | ||
[ | [e]="delete of pointer that has already been deleted", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6805,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (!Alloc) {\n Info.FFDiag(E, diag::note_constexpr_double_delete);"},{l,15055,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n if (!Info.HeapAllocs.erase(Pointer.Base.dyn_cast<DynamicAllocLValue>())) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_double_delete);"}}, | [i]={{l,6805,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (!Alloc) {\n Info.FFDiag(E, diag::note_constexpr_double_delete);"},{l,15055,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n if (!Info.HeapAllocs.erase(Pointer.Base.dyn_cast<DynamicAllocLValue>())) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_double_delete);"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:917:5: note: delete of pointer that has already been deleted"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_double_destroy"]={ | ["note_constexpr_double_destroy"]={ | ||
[ | [b]={{nil,n,"destruction of object that is already being destroyed"}}, | ||
[ | [d]=c, | ||
[ | [e]="destruction of object that is already being destroyed", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6598,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (!EvalObj.DidInsert) {\n // ...\n Info.FFDiag(CallLoc, diag::note_constexpr_double_destroy);"}}, | [i]={{l,6598,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (!EvalObj.DidInsert) {\n // ...\n Info.FFDiag(CallLoc, diag::note_constexpr_double_destroy);"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:921:24: note: destruction of object that is already being destroyed"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_dtor_subobject"]={ | ["note_constexpr_dtor_subobject"]={ | ||
[ | [b]={{nil,n,"%select{data member %1|base class %2}0 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:data member (.*?)|base class (.*?)) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{m,1700,"/// Determine whether a destructor cannot be constexpr due to\nstatic bool CheckConstexprDestructorSubobjects(Sema &SemaRef, const CXXDestructorDecl *DD, Sema::CheckConstexprKind Kind) {\n auto Check = [&](SourceLocation Loc, QualType T, const FieldDecl *FD) {\n // ...\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n // ...\n SemaRef.Diag(Loc, diag::note_constexpr_dtor_subobject) << !FD << (FD ? FD->getDeclName() : DeclarationName()) << T;"}}, | [i]={{m,1700,"/// Determine whether a destructor cannot be constexpr due to\nstatic bool CheckConstexprDestructorSubobjects(Sema &SemaRef, const CXXDestructorDecl *DD, Sema::CheckConstexprKind Kind) {\n auto Check = [&](SourceLocation Loc, QualType T, const FieldDecl *FD) {\n // ...\n if (Kind == Sema::CheckConstexprKind::Diagnose) {\n // ...\n SemaRef.Diag(Loc, diag::note_constexpr_dtor_subobject) << !FD << (FD ? FD->getDeclName() : DeclarationName()) << T;"}}, | ||
[j]={ | [j]={ | ||
Line 1,717: | Line 1,729: | ||
}, | }, | ||
["note_constexpr_dynamic_alloc"]={ | ["note_constexpr_dynamic_alloc"]={ | ||
[ | [b]={{nil,n,"%select{pointer|reference}0 to %select{|subobject of }1heap-allocated object is not a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:pointer|reference) to (?:|subobject of )heap\\-allocated object is not a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,2234,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (Base.is<DynamicAllocLValue>()) {\n Info.FFDiag(Loc, diag::note_constexpr_dynamic_alloc) << IsReferenceType << !Designator.Entries.empty();"}}, | [i]={{l,2234,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (Base.is<DynamicAllocLValue>()) {\n Info.FFDiag(Loc, diag::note_constexpr_dynamic_alloc) << IsReferenceType << !Designator.Entries.empty();"}}, | ||
[j]={ | [j]={ | ||
Line 1,729: | Line 1,741: | ||
}, | }, | ||
["note_constexpr_dynamic_alloc_here"]={ | ["note_constexpr_dynamic_alloc_here"]={ | ||
[ | [b]={{nil,n,"heap allocation performed here"}}, | ||
[ | [d]=c, | ||
[ | [e]="heap allocation performed here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,2130,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n // ...\n else if (const Expr *E = Base.dyn_cast<const Expr *>())\n // ...\n else if (DynamicAllocLValue DA = Base.dyn_cast<DynamicAllocLValue>()) {\n // FIXME: Produce a note for dangling pointers too.\n if (std::optional<DynAlloc *> Alloc = Info.lookupDynamicAlloc(DA))\n Info.Note((*Alloc)->AllocExpr->getExprLoc(), diag::note_constexpr_dynamic_alloc_here);"}}, | [i]={{l,2130,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n // ...\n else if (const Expr *E = Base.dyn_cast<const Expr *>())\n // ...\n else if (DynamicAllocLValue DA = Base.dyn_cast<DynamicAllocLValue>()) {\n // FIXME: Produce a note for dangling pointers too.\n if (std::optional<DynAlloc *> Alloc = Info.lookupDynamicAlloc(DA))\n Info.Note((*Alloc)->AllocExpr->getExprLoc(), diag::note_constexpr_dynamic_alloc_here);"}}, | ||
[j]={ | [j]={ | ||
Line 1,741: | Line 1,753: | ||
}, | }, | ||
["note_constexpr_dynamic_cast_to_reference_failed"]={ | ["note_constexpr_dynamic_cast_to_reference_failed"]={ | ||
[ | [b]={{nil,r,"reference dynamic_cast failed: %select{static type %1 of operand is a non-public base class of dynamic type %2|dynamic type %2 of operand does not have a base class of type %3|%3 is an ambiguous base class of dynamic type %2 of operand|%3 is a non-public base class of dynamic type %2 of operand}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="reference dynamic_cast failed\\: (?:static type (.*?) of operand is a non\\-public base class of dynamic type (.*?)|dynamic type (.*?) of operand does not have a base class of type (.*?)|(.*?) is an ambiguous base class of dynamic type (.*?) of operand|(.*?) is a non\\-public base class of dynamic type (.*?) of operand)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7bd54ab58665",1557951741,"[c++20] For P1327R1: support dynamic_cast in constant expression","[c++20] For P1327R1: support dynamic_cast in constant expression\nevaluation.\n\nllvm-svn: 360806"}, | [h]={"7bd54ab58665",1557951741,"[c++20] For P1327R1: support dynamic_cast in constant expression","[c++20] For P1327R1: support dynamic_cast in constant expression\nevaluation.\n\nllvm-svn: 360806"}, | ||
[i]={{l,5926,"/// Apply the given dynamic cast operation on the provided lvalue.\n///\n/// This implements the hard case of dynamic_cast, requiring a \"runtime check\"\n/// to find a suitable target subobject.\nstatic bool HandleDynamicCast(EvalInfo &Info, const ExplicitCastExpr *E, LValue &Ptr) {\n // ...\n auto RuntimeCheckFailed = [&](CXXBasePaths *Paths) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_dynamic_cast_to_reference_failed) << DiagKind << Ptr.Designator.getType(Info.Ctx) << Info.Ctx.getRecordType(DynType->Type) << E->getType().getUnqualifiedType();"}}, | [i]={{l,5926,"/// Apply the given dynamic cast operation on the provided lvalue.\n///\n/// This implements the hard case of dynamic_cast, requiring a \"runtime check\"\n/// to find a suitable target subobject.\nstatic bool HandleDynamicCast(EvalInfo &Info, const ExplicitCastExpr *E, LValue &Ptr) {\n // ...\n auto RuntimeCheckFailed = [&](CXXBasePaths *Paths) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_dynamic_cast_to_reference_failed) << DiagKind << Ptr.Designator.getType(Info.Ctx) << Info.Ctx.getRecordType(DynType->Type) << E->getType().getUnqualifiedType();"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:259:24: note: reference dynamic_cast failed: \'A\' is an ambiguous base class of dynamic type \'DynamicCast::G\' of operand","clang/test/SemaCXX/constant-expression-cxx2a.cpp:267:18: note: reference dynamic_cast failed: \'A\' is an ambiguous base class of dynamic type \'DynamicCast::G\' of operand","clang/test/SemaCXX/constant-expression-cxx2a.cpp:274:24: note: reference dynamic_cast failed: static type \'DynamicCast::E\' of operand is a non-public base class of dynamic type \'DynamicCast::G\'","clang/test/SemaCXX/constant-expression-cxx2a.cpp:278:24: note: reference dynamic_cast failed: \'E\' is a non-public base class of dynamic type \'DynamicCast::G\' of operand","clang/test/SemaCXX/constant-expression-cxx2a.cpp:282:32: note: reference dynamic_cast failed: dynamic type \'DynamicCast::G\' of operand does not have a base class of type \'Unrelated\'","clang/test/SemaCXX/constant-expression-cxx2a.cpp:284:32: note: reference dynamic_cast failed: dynamic type \'DynamicCast::G\' of operand does not have a base class of type \'Unrelated\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_dynamic_rounding"]={ | ["note_constexpr_dynamic_rounding"]={ | ||
[ | [b]={{nil,I,"cannot evaluate this expression if rounding mode is dynamic"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot evaluate this expression if rounding mode is dynamic", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"6314f412a83d",1600326607,"[FPEnv] Evaluate constant expressions under non-default rounding modes","[FPEnv] Evaluate constant expressions under non-default rounding modes\n\nThe change implements evaluation of constant floating point expressions\nunder non-default rounding modes. The main objective was to support\nevaluation of global variable initializers, where constant rounding mode\nmay be specified by `#pragma STDC FENV_ROUND`.\n\nDifferential Revision: https://reviews.llvm.org/D87822"}, | [h]={"6314f412a83d",1600326607,"[FPEnv] Evaluate constant expressions under non-default rounding modes","[FPEnv] Evaluate constant expressions under non-default rounding modes\n\nThe change implements evaluation of constant floating point expressions\nunder non-default rounding modes. The main objective was to support\nevaluation of global variable initializers, where constant rounding mode\nmay be specified by `#pragma STDC FENV_ROUND`.\n\nDifferential Revision: https://reviews.llvm.org/D87822"}, | ||
[i]={{l,2625,"/// Check if the given evaluation result is allowed for constant evaluation.\nstatic bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, APFloat::opStatus St) {\n // ...\n if ((St & APFloat::opInexact) && FPO.getRoundingMode() == llvm::RoundingMode::Dynamic) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_dynamic_rounding);"},{ | [i]={{l,2625,"/// Check if the given evaluation result is allowed for constant evaluation.\nstatic bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, APFloat::opStatus St) {\n // ...\n if ((St & APFloat::opInexact) && FPO.getRoundingMode() == llvm::RoundingMode::Dynamic) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_dynamic_rounding);"},{x,480,"bool CheckFloatResult(InterpState &S, CodePtr OpPC, APFloat::opStatus Status) {\n // ...\n if ((Status & APFloat::opInexact) && FPO.getRoundingMode() == llvm::RoundingMode::Dynamic) {\n // ...\n S.FFDiag(E, diag::note_constexpr_dynamic_rounding);"}} | ||
}, | }, | ||
["note_constexpr_float_arithmetic"]={ | ["note_constexpr_float_arithmetic"]={ | ||
[ | [b]="floating point arithmetic produces %select{an infinity|a NaN}0", | ||
[ | [d]=c, | ||
[ | [e]="floating point arithmetic produces (?:an infinity|a NaN)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"c8042323e1b2",1328075592,"constexpr: overflow checking for integral and floating-point arithmetic.","constexpr: overflow checking for integral and floating-point arithmetic.\n\nllvm-svn: 149473"}, | [h]={"c8042323e1b2",1328075592,"constexpr: overflow checking for integral and floating-point arithmetic.","constexpr: overflow checking for integral and floating-point arithmetic.\n\nllvm-svn: 149473"}, | ||
[i]={{l,2917,"/// Perform the given binary floating-point operation, in-place, on LHS.\nstatic bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, APFloat &LHS, BinaryOperatorKind Opcode, const APFloat &RHS) {\n // ...\n // [expr.pre]p4:\n // If during the evaluation of an expression, the result is not\n // mathematically defined [...], the behavior is undefined.\n // FIXME: C++ rules require us to not conform to IEEE 754 here.\n if (LHS.isNaN()) {\n Info.CCEDiag(E, diag::note_constexpr_float_arithmetic) << LHS.isNaN();"}}, | [i]={{l,2917,"/// Perform the given binary floating-point operation, in-place, on LHS.\nstatic bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, APFloat &LHS, BinaryOperatorKind Opcode, const APFloat &RHS) {\n // ...\n // [expr.pre]p4:\n // If during the evaluation of an expression, the result is not\n // mathematically defined [...], the behavior is undefined.\n // FIXME: C++ rules require us to not conform to IEEE 754 here.\n if (LHS.isNaN()) {\n Info.CCEDiag(E, diag::note_constexpr_float_arithmetic) << LHS.isNaN();"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:281:30: note: floating point arithmetic produces a NaN","clang/test/CXX/expr/expr.const/p2-0x.cpp:282:30: note: floating point arithmetic produces a NaN","clang/test/CXX/expr/expr.const/p2-0x.cpp:283:30: note: floating point arithmetic produces a NaN"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_float_arithmetic_strict"]={ | ["note_constexpr_float_arithmetic_strict"]={ | ||
[ | [b]={{nil,I,"compile time floating point arithmetic suppressed in strict evaluation modes"}}, | ||
[ | [d]=c, | ||
[ | [e]="compile time floating point arithmetic suppressed in strict evaluation modes", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS","[clang] Enable support for #pragma STDC FENV_ACCESS\n\nReviewers: rjmccall, rsmith, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D87528"}, | [h]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS","[clang] Enable support for #pragma STDC FENV_ACCESS\n\nReviewers: rjmccall, rsmith, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D87528"}, | ||
[i]={{l,2633,"/// Check if the given evaluation result is allowed for constant evaluation.\nstatic bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, APFloat::opStatus St) {\n // ...\n if ((St != APFloat::opOK) && (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic || FPO.getExceptionMode() != LangOptions::FPE_Ignore || FPO.getAllowFEnvAccess())) {\n Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"},{l,13037,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isRealFloatingType() && RHSTy->isRealFloatingType()) {\n // ...\n if (!Info.InConstantContext && APFloatCmpResult == APFloat::cmpUnordered && E->getFPFeaturesInEffect(Info.Ctx.getLangOpts()).isFPConstrained()) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"},{ | [i]={{l,2633,"/// Check if the given evaluation result is allowed for constant evaluation.\nstatic bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, APFloat::opStatus St) {\n // ...\n if ((St != APFloat::opOK) && (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic || FPO.getExceptionMode() != LangOptions::FPE_Ignore || FPO.getAllowFEnvAccess())) {\n Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"},{l,13037,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isRealFloatingType() && RHSTy->isRealFloatingType()) {\n // ...\n if (!Info.InConstantContext && APFloatCmpResult == APFloat::cmpUnordered && E->getFPFeaturesInEffect(Info.Ctx.getLangOpts()).isFPConstrained()) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"},{x,488,"bool CheckFloatResult(InterpState &S, CodePtr OpPC, APFloat::opStatus Status) {\n // ...\n if ((Status != APFloat::opOK) && (FPO.getRoundingMode() == llvm::RoundingMode::Dynamic || FPO.getExceptionMode() != LangOptions::FPE_Ignore || FPO.getAllowFEnvAccess())) {\n S.FFDiag(E, diag::note_constexpr_float_arithmetic_strict);"}} | ||
}, | }, | ||
["note_constexpr_function_param_value_unknown"]={ | ["note_constexpr_function_param_value_unknown"]={ | ||
[ | [b]={{nil,K,"function parameter %0 with unknown value cannot be used in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="function parameter (.*?) with unknown value cannot be used in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | [h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | ||
[i]={{l,3323,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (isa<ParmVarDecl>(VD)) {\n // Assume parameters of a potential constant expression are usable in\n // constant expressions.\n if (!Info.checkingPotentialConstantExpression() || !Info.CurrentCall->Callee || !Info.CurrentCall->Callee->Equals(VD->getDeclContext())) {\n if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(E, diag::note_constexpr_function_param_value_unknown) << VD;"}}, | [i]={{l,3323,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (isa<ParmVarDecl>(VD)) {\n // Assume parameters of a potential constant expression are usable in\n // constant expressions.\n if (!Info.checkingPotentialConstantExpression() || !Info.CurrentCall->Callee || !Info.CurrentCall->Callee->Equals(VD->getDeclContext())) {\n if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(E, diag::note_constexpr_function_param_value_unknown) << VD;"}}, | ||
Line 1,795: | Line 1,807: | ||
}, | }, | ||
["note_constexpr_heap_alloc_limit_exceeded"]={ | ["note_constexpr_heap_alloc_limit_exceeded"]={ | ||
[ | [b]={{nil,n,"constexpr evaluation hit maximum heap allocation limit"}}, | ||
[ | [d]=c, | ||
[ | [e]="constexpr evaluation hit maximum heap allocation limit", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,1905,"APValue *EvalInfo::createHeapAlloc(const Expr *E, QualType T, LValue &LV) {\n if (NumHeapAllocs > DynamicAllocLValue::getMaxIndex()) {\n FFDiag(E, diag::note_constexpr_heap_alloc_limit_exceeded);"}} | [i]={{l,1905,"APValue *EvalInfo::createHeapAlloc(const Expr *E, QualType T, LValue &LV) {\n if (NumHeapAllocs > DynamicAllocLValue::getMaxIndex()) {\n FFDiag(E, diag::note_constexpr_heap_alloc_limit_exceeded);"}} | ||
}, | }, | ||
["note_constexpr_inherited_ctor_call_here"]={ | ["note_constexpr_inherited_ctor_call_here"]={ | ||
[ | [b]="in implicit initialization for inherited constructor of %0", | ||
[ | [d]=c, | ||
[ | [e]="in implicit initialization for inherited constructor of (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | [h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | ||
[i]={{"clang/lib/AST/Interp/State.cpp",150,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n // Use a different note for an inheriting constructor, because from the\n // user\'s perspective it\'s not really a function at all.\n if (const auto *CD = dyn_cast_if_present<CXXConstructorDecl>(F->getCallee()); CD && CD->isInheritingConstructor()) {\n addDiag(CallLocation, diag::note_constexpr_inherited_ctor_call_here) << CD->getParent();"}} | [i]={{"clang/lib/AST/Interp/State.cpp",150,"void State::addCallStack(unsigned Limit) {\n // ...\n for (const Frame *F = Top; F != Bottom; F = F->getCaller(), ++CallIdx) {\n // ...\n // Use a different note for an inheriting constructor, because from the\n // user\'s perspective it\'s not really a function at all.\n if (const auto *CD = dyn_cast_if_present<CXXConstructorDecl>(F->getCallee()); CD && CD->isInheritingConstructor()) {\n addDiag(CallLocation, diag::note_constexpr_inherited_ctor_call_here) << CD->getParent();"}} | ||
}, | }, | ||
["note_constexpr_invalid_alignment"]={ | ["note_constexpr_invalid_alignment"]={ | ||
[ | [b]={{nil,n,"requested alignment %0 is not a positive power of two"}}, | ||
[ | [d]=c, | ||
[ | [e]="requested alignment (.*?) is not a positive power of two", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | [h]={"8c387cbea76b",1578602886,"Add builtins for aligning and checking alignment of pointers and integers","Add builtins for aligning and checking alignment of pointers and integers\n\nThis change introduces three new builtins (which work on both pointers\nand integers) that can be used instead of common bitwise arithmetic:\n__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and\n__builtin_is_aligned(x, alignment).\n\nI originally added these builtins to the CHERI fork of LLVM a few years ago\nto handle the slightly different C semantics that we use for CHERI [1].\nUntil recently these builtins (or sequences of other builtins) were\nrequired to generate correct code. I have since made changes to the default\nC semantics so that they are no longer strictly necessary (but using them\ndoes generate slightly more efficient code). However, based on our experience\nusing them in various projects over the past few years, I believe that adding\nthese builtins to clang would be useful.\n\nThese builtins have the following benefit over bit-manipulation and casts\nvia uintptr_t:\n\n- The named builtins clearly convey the semantics of the operation. While\n checking alignment using __builtin_is_aligned(x, 16) versus\n ((x & 15) == 0) is probably not a huge win in readably, I personally find\n __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1).\n- They preserve the type of the argument (including const qualifiers). When\n using casts via uintptr_t, it is easy to cast to the wrong type or strip\n qualifiers such as const.\n- If the alignment argument is a constant value, clang can check that it is\n a power-of-two and within the range of the type. Since the semantics of\n these builtins is well defined compared to arbitrary bit-manipulation,\n it is possible to add a UBSAN checker that the run-time value is a valid\n power-of-two. I intend to add this as a follow-up to this change.\n- The builtins avoids int-to-pointer casts both in C and LLVM IR.\n In the future (i.e. once most optimizations handle it), we could use the new\n llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally\n be generated.\n- They can be used to round up/down to the next aligned value for both\n integers and pointers without requiring two separate macros.\n- In many projects the alignment operations are already wrapped in macros (e.g.\n roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation\n with a builtin call, we get improved diagnostics for many call-sites while\n only having to change a few lines.\n- Finally, the builtins also emit assume_aligned metadata when used on pointers.\n This can improve code generation compared to the uintptr_t casts.\n\n[1] In our CHERI compiler we have compilation mode where all pointers are\nimplemented as capabilities (essentially unforgeable 128-bit fat pointers).\nIn our original model, casts from uintptr_t (which is a 128-bit capability)\nto an integer value returned the \"offset\" of the capability (i.e. the\ndifference between the virtual address and the base of the allocation).\nThis causes problems for cases such as checking the alignment: for example, the\nexpression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the\npointer is aligned to a multiple of 64 bytes. The problem with offsets is that\nany pointer to the beginning of an allocation will have an offset of zero, so\nthis check always succeeds in that case (even if the address is not correctly\naligned). The same issues also exist when aligning up or down. Using the\nalignment builtins ensures that the address is used instead of the offset. While\nI have since changed the default C semantics to return the address instead of\nthe offset when casting, this offset compilation mode can still be used by\npassing a command-line flag.\n\nReviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune\nReviewed By: aaron.ballman, lebedev.ri\nDifferential Revision: https://reviews.llvm.org/D71499"}, | ||
[i]={{l,9143,"/// Evaluate the value of the alignment argument to __builtin_align_{up,down},\n/// __builtin_is_aligned and __builtin_assume_aligned.\nstatic bool getAlignmentArgument(const Expr *E, QualType ForType, EvalInfo &Info, APSInt &Alignment) {\n // ...\n if (Alignment < 0 || !Alignment.isPowerOf2()) {\n Info.FFDiag(E, diag::note_constexpr_invalid_alignment) << Alignment;"}}, | [i]={{l,9143,"/// Evaluate the value of the alignment argument to __builtin_align_{up,down},\n/// __builtin_is_aligned and __builtin_assume_aligned.\nstatic bool getAlignmentArgument(const Expr *E, QualType ForType, EvalInfo &Info, APSInt &Alignment) {\n // ...\n if (Alignment < 0 || !Alignment.isPowerOf2()) {\n Info.FFDiag(E, diag::note_constexpr_invalid_alignment) << Alignment;"}}, | ||
Line 1,825: | Line 1,837: | ||
}, | }, | ||
["note_constexpr_invalid_cast"]={ | ["note_constexpr_invalid_cast"]={ | ||
[ | [b]={{nil,F,"%select{reinterpret_cast|dynamic_cast|%select{this conversion|cast that performs the conversions of a reinterpret_cast}1|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++20||}0"},{O,n,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++20||}0"},{r,r,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++2a||}0"},{z,nil,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:reinterpret_cast|dynamic_cast|(?:this conversion|cast that performs the conversions of a reinterpret_cast)|cast from (.*?)) is not allowed in a constant expression(?:| in C\\+\\+ standards before C\\+\\+20||)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"6d6ecc34f841",1323693976,"Implement C++11 constant expression cast restrictions.","Implement C++11 constant expression cast restrictions.\n\nllvm-svn: 146371"}, | [h]={"6d6ecc34f841",1323693976,"Implement C++11 constant expression cast restrictions.","Implement C++11 constant expression cast restrictions.\n\nllvm-svn: 146371"}, | ||
[i]={{l,7536,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *E) {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 0;"},{l,7541,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *E) {\n if (!Info.Ctx.getLangOpts().CPlusPlus20)\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 1;"},{l,8247,"class LValueExprEvaluator : public LValueExprEvaluatorBase<LValueExprEvaluator> {\n // ...\n bool VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_LValueBitCast:\n this->CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{l,8976,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n if (HasValidResult)\n // ...\n else\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 3 << SubExpr->getType();"},{l,8979,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n // ...\n } else\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{l,9018,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_IntegralToPointer: {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{l,13795,"/// HandleCast - This is used to evaluate implicit or explicit casts where the\n/// result type is integer.\nbool IntExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_PointerToIntegral: {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"}}, | [i]={{l,7536,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *E) {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 0;"},{l,7541,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *E) {\n if (!Info.Ctx.getLangOpts().CPlusPlus20)\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 1;"},{l,8247,"class LValueExprEvaluator : public LValueExprEvaluatorBase<LValueExprEvaluator> {\n // ...\n bool VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_LValueBitCast:\n this->CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{l,8976,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n if (HasValidResult)\n // ...\n else\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 3 << SubExpr->getType();"},{l,8979,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n // ...\n } else\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{l,9018,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_IntegralToPointer: {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"},{l,13795,"/// HandleCast - This is used to evaluate implicit or explicit casts where the\n/// result type is integer.\nbool IntExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_PointerToIntegral: {\n CCEDiag(E, diag::note_constexpr_invalid_cast) << 2 << Info.Ctx.getLangOpts().CPlusPlus;"}}, | ||
Line 1,837: | Line 1,849: | ||
}, | }, | ||
["note_constexpr_invalid_downcast"]={ | ["note_constexpr_invalid_downcast"]={ | ||
[ | [b]="cannot cast object of dynamic type %0 to type %1", | ||
[ | [d]=c, | ||
[ | [e]="cannot cast object of dynamic type (.*?) to type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | [h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | ||
[i]={{l,4800,"/// HandleBaseToDerivedCast - Apply the given base-to-derived cast operation on\n/// the provided lvalue, which currently refers to the base object.\nstatic bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E, LValue &Result) {\n // ...\n // Check this cast lands within the final derived-to-base subobject path.\n if (D.MostDerivedPathLength + E->path_size() > D.Entries.size()) {\n Info.CCEDiag(E, diag::note_constexpr_invalid_downcast) << D.MostDerivedType << TargetQT;"},{l,4815,"/// HandleBaseToDerivedCast - Apply the given base-to-derived cast operation on\n/// the provided lvalue, which currently refers to the base object.\nstatic bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E, LValue &Result) {\n // ...\n if (FinalType->getCanonicalDecl() != TargetType->getCanonicalDecl()) {\n Info.CCEDiag(E, diag::note_constexpr_invalid_downcast) << D.MostDerivedType << TargetQT;"}}, | [i]={{l,4800,"/// HandleBaseToDerivedCast - Apply the given base-to-derived cast operation on\n/// the provided lvalue, which currently refers to the base object.\nstatic bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E, LValue &Result) {\n // ...\n // Check this cast lands within the final derived-to-base subobject path.\n if (D.MostDerivedPathLength + E->path_size() > D.Entries.size()) {\n Info.CCEDiag(E, diag::note_constexpr_invalid_downcast) << D.MostDerivedType << TargetQT;"},{l,4815,"/// HandleBaseToDerivedCast - Apply the given base-to-derived cast operation on\n/// the provided lvalue, which currently refers to the base object.\nstatic bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E, LValue &Result) {\n // ...\n if (FinalType->getCanonicalDecl() != TargetType->getCanonicalDecl()) {\n Info.CCEDiag(E, diag::note_constexpr_invalid_downcast) << D.MostDerivedType << TargetQT;"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:889:25: note: cannot cast object of dynamic type \'const Derived\' to type \'Base2\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:890:25: note: cannot cast object of dynamic type \'const Derived\' to type \'Base\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:894:26: note: cannot cast object of dynamic type \'const Derived\' to type \'Base2\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:895:26: note: cannot cast object of dynamic type \'const Derived\' to type \'Base\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:978:10: note: cannot cast object of dynamic type \'const S\' to type \'const T\'","clang/test/SemaCXX/constant-expression-cxx11.cpp:1135:29: note: cannot cast object of dynamic type \'T<17>\' to type \'T<23>\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_invalid_function"]={ | ["note_constexpr_invalid_function"]={ | ||
[ | [b]="%select{non-constexpr|undefined}0 %select{function|constructor}1 %2 cannot be used in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="(?:non\\-constexpr|undefined) (?:function|constructor) (.*?) cannot be used in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,5557,"/// CheckTrivialDefaultConstructor - Check whether a constructor is a trivial\n/// default constructor. If so, we\'ll fold it whether or not it\'s marked as\n/// constexpr. If it is marked as constexpr, we will never implicitly define it,\n/// so we need special handling.\nstatic bool CheckTrivialDefaultConstructor(EvalInfo &Info, SourceLocation Loc, const CXXConstructorDecl *CD, bool IsValueInitialization) {\n // ...\n // Value-initialization does not call a trivial default constructor, so such a\n // call is a core constant expression whether or not the constructor is\n // constexpr.\n if (!CD->isConstexpr() && !IsValueInitialization) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n Info.CCEDiag(Loc, diag::note_constexpr_invalid_function, 1) << /*IsConstexpr*/ 0 << /*IsConstructor*/ 1 << CD;"},{l,5622,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n // ...\n else\n Info.FFDiag(CallLoc, diag::note_constexpr_invalid_function, 1) << DiagDecl->isConstexpr() << (bool)CD << DiagDecl;"},{l,9300,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrchr:\n case Builtin::BIwcschr:\n case Builtin::BImemchr:\n case Builtin::BIwmemchr:\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{l,9408,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BImemcpy:\n case Builtin::BImemmove:\n case Builtin::BIwmemcpy:\n case Builtin::BIwmemmove:\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{l,12285,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrlen:\n case Builtin::BIwcslen:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{l,12310,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrcmp:\n case Builtin::BIwcscmp:\n case Builtin::BIstrncmp:\n case Builtin::BIwcsncmp:\n case Builtin::BImemcmp:\n case Builtin::BIbcmp:\n case Builtin::BIwmemcmp:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{ | [h]={sc,1323758398,tc,uc}, | ||
[i]={{l,5557,"/// CheckTrivialDefaultConstructor - Check whether a constructor is a trivial\n/// default constructor. If so, we\'ll fold it whether or not it\'s marked as\n/// constexpr. If it is marked as constexpr, we will never implicitly define it,\n/// so we need special handling.\nstatic bool CheckTrivialDefaultConstructor(EvalInfo &Info, SourceLocation Loc, const CXXConstructorDecl *CD, bool IsValueInitialization) {\n // ...\n // Value-initialization does not call a trivial default constructor, so such a\n // call is a core constant expression whether or not the constructor is\n // constexpr.\n if (!CD->isConstexpr() && !IsValueInitialization) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n Info.CCEDiag(Loc, diag::note_constexpr_invalid_function, 1) << /*IsConstexpr*/ 0 << /*IsConstructor*/ 1 << CD;"},{l,5622,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n // ...\n else\n Info.FFDiag(CallLoc, diag::note_constexpr_invalid_function, 1) << DiagDecl->isConstexpr() << (bool)CD << DiagDecl;"},{l,9300,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrchr:\n case Builtin::BIwcschr:\n case Builtin::BImemchr:\n case Builtin::BIwmemchr:\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{l,9408,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BImemcpy:\n case Builtin::BImemmove:\n case Builtin::BIwmemcpy:\n case Builtin::BIwmemmove:\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{l,12285,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrlen:\n case Builtin::BIwcslen:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{l,12310,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrcmp:\n case Builtin::BIwcscmp:\n case Builtin::BIstrncmp:\n case Builtin::BIwcsncmp:\n case Builtin::BImemcmp:\n case Builtin::BIbcmp:\n case Builtin::BIwmemcmp:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str();"},{x,333,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n // ...\n if (!F->isConstexpr()) {\n // ...\n if (S.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n // ...\n else\n S.FFDiag(Loc, diag::note_constexpr_invalid_function, 1) << DiagDecl->isConstexpr() << (bool)CD << DiagDecl;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:26:33: note: non-constexpr function \'foo\' cannot be used in a constant expression"} | ["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:26:33: note: non-constexpr function \'foo\' cannot be used in a constant expression"} | ||
Line 1,861: | Line 1,873: | ||
}, | }, | ||
["note_constexpr_invalid_inhctor"]={ | ["note_constexpr_invalid_inhctor"]={ | ||
[ | [b]="constructor inherited from base class %0 cannot be used in a constant expression; derived class cannot be implicitly initialized", | ||
[ | [d]=c, | ||
[ | [e]="constructor inherited from base class (.*?) cannot be used in a constant expression; derived class cannot be implicitly initialized", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | [h]={"5179eb78210a",1467140637,"P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:","P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:\n\nReplace inheriting constructors implementation with new approach, voted into\nC++ last year as a DR against C++11.\n\nInstead of synthesizing a set of derived class constructors for each inherited\nbase class constructor, we make the constructors of the base class visible to\nconstructor lookup in the derived class, using the normal rules for\nusing-declarations.\n\nFor constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived\nclass that tracks the requisite additional information. We create shadow\nconstructors (not found by name lookup) in the derived class to model the\nactual initialization, and have a new expression node,\nCXXInheritedCtorInitExpr, to model the initialization of a base class from such\na constructor. (This initialization is special because it performs real perfect\nforwarding of arguments.)\n\nIn cases where argument forwarding is not possible (for inalloca calls,\nvariadic calls, and calls with callee parameter cleanup), the shadow inheriting\nconstructor is not emitted and instead we directly emit the initialization code\ninto the caller of the inherited constructor.\n\nNote that this new model is not perfectly compatible with the old model in some\ncorner cases. In particular:\n * if B inherits a private constructor from A, and C uses that constructor to\n construct a B, then we previously required that A befriends B and B\n befriends C, but the new rules require A to befriend C directly, and\n * if a derived class has its own constructors (and so its implicit default\n constructor is suppressed), it may still inherit a default constructor from\n a base class\n\nllvm-svn: 274049"}, | ||
[i]={{l,5619,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n Info.FFDiag(CallLoc, diag::note_constexpr_invalid_inhctor, 1) << CD->getInheritedConstructor().getConstructor()->getParent();"},{ | [i]={{l,5619,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n Info.FFDiag(CallLoc, diag::note_constexpr_invalid_inhctor, 1) << CD->getInheritedConstructor().getConstructor()->getParent();"},{x,330,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n // ...\n if (!F->isConstexpr()) {\n // ...\n if (S.getLangOpts().CPlusPlus11) {\n // ...\n // FIXME: If DiagDecl is an implicitly-declared special member function\n // or an inheriting constructor, we should be much more explicit about why\n // it\'s not constexpr.\n if (CD && CD->isInheritingConstructor())\n S.FFDiag(Loc, diag::note_constexpr_invalid_inhctor, 1) << CD->getInheritedConstructor().getConstructor()->getParent();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.inhctor/p2.cpp"]={"clang/test/CXX/special/class.inhctor/p2.cpp:80:28: note: constructor inherited from base class \'Constexpr\' cannot be used in a constant expression; derived class cannot be implicitly initialized"} | ["clang/test/CXX/special/class.inhctor/p2.cpp"]={"clang/test/CXX/special/class.inhctor/p2.cpp:80:28: note: constructor inherited from base class \'Constexpr\' cannot be used in a constant expression; derived class cannot be implicitly initialized"} | ||
Line 1,873: | Line 1,885: | ||
}, | }, | ||
["note_constexpr_invalid_template_arg"]={ | ["note_constexpr_invalid_template_arg"]={ | ||
[ | [b]={{nil,I,"%select{pointer|reference}0 to %select{|subobject of }1%select{type_info object|string literal|temporary object|predefined \'%3\' variable}2 is not allowed in a template argument"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:pointer|reference) to (?:|subobject of )(?:type_info object|string literal|temporary object|predefined \'(.*?)\' variable) is not allowed in a template argument", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7b3515880c22",1603602504,"For P0732R2, P1907R1: ensure that template parameter objects don\'t refer","For P0732R2, P1907R1: ensure that template parameter objects don\'t refer\nto disallowed objects or have non-constant destruction."}, | [h]={"7b3515880c22",1603602504,"For P0732R2, P1907R1: ensure that template parameter objects don\'t refer","For P0732R2, P1907R1: ensure that template parameter objects don\'t refer\nto disallowed objects or have non-constant destruction."}, | ||
[i]={{l,2187,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Additional restrictions apply in a template argument. We only enforce the\n // C++20 restrictions here; additional syntactic and semantic restrictions\n // are applied elsewhere.\n if (isTemplateArgument(Kind)) {\n // ...\n if (InvalidBaseKind != -1) {\n Info.FFDiag(Loc, diag::note_constexpr_invalid_template_arg) << IsReferenceType << !Designator.Entries.empty() << InvalidBaseKind << Ident;"},{ | [i]={{l,2187,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Additional restrictions apply in a template argument. We only enforce the\n // C++20 restrictions here; additional syntactic and semantic restrictions\n // are applied elsewhere.\n if (isTemplateArgument(Kind)) {\n // ...\n if (InvalidBaseKind != -1) {\n Info.FFDiag(Loc, diag::note_constexpr_invalid_template_arg) << IsReferenceType << !Designator.Entries.empty() << InvalidBaseKind << Ident;"},{fb,5989,"/// EvaluateConvertedConstantExpression - Evaluate an Expression\n/// That is a converted constant expression\n/// (which was built with BuildConvertedConstantExpression)\nstatic ExprResult EvaluateConvertedConstantExpression(Sema &S, Expr *E, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue) {\n // ...\n } else if (!Notes.empty() && Notes[0].second.getDiagID() == diag::note_constexpr_invalid_template_arg) {"}} | ||
}, | }, | ||
["note_constexpr_invalid_void_star_cast"]={ | ["note_constexpr_invalid_void_star_cast"]={ | ||
[ | [b]="cast from %0 is not allowed in a constant expression %select{in C++ standards before C++2c|because the pointed object type %2 is not similar to the target type %3}1", | ||
[ | [d]=c, | ||
[ | [e]="cast from (.*?) is not allowed in a constant expression (?:in C\\+\\+ standards before C\\+\\+2c|because the pointed object type (.*?) is not similar to the target type (.*?))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,8971,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n if (HasValidResult)\n CCEDiag(E, diag::note_constexpr_invalid_void_star_cast) << SubExpr->getType() << Info.getLangOpts().CPlusPlus26 << Result.Designator.getType(Info.Ctx).getCanonicalType() << E->getType()->getPointeeType();"}}, | [i]={{l,8971,"bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) {\n // ...\n case CK_BitCast:\n case CK_CPointerToObjCPointerCast:\n case CK_BlockPointerToObjCPointerCast:\n case CK_AnyPointerToBlockPointerCast:\n case CK_AddressSpaceConversion:\n // ...\n // Bitcasts to cv void* are static_casts, not reinterpret_casts, so are\n // permitted in constant expressions in C++11. Bitcasts from cv void* are\n // also static_casts, but we disallow them as a resolution to DR1312.\n if (!E->getType()->isVoidPointerType()) {\n // ...\n // 1. We\'ll allow it in std::allocator::allocate, and anything which that\n // calls.\n // 2. HACK 2022-03-28: Work around an issue with libstdc++\'s\n // <source_location> header. Fixed in GCC 12 and later (2022-04-??).\n // We\'ll allow it in the body of std::source_location::current. GCC\'s\n // implementation had a parameter of type `void*`, and casts from\n // that back to `const __impl*` in its body.\n if (VoidPtrCastMaybeOK && (Info.getStdAllocatorCaller(\"allocate\") || IsDeclSourceLocationCurrent(Info.CurrentCall->Callee) || Info.getLangOpts().CPlusPlus26)) {\n // ...\n } else {\n if (SubExpr->getType()->isVoidPointerType()) {\n if (HasValidResult)\n CCEDiag(E, diag::note_constexpr_invalid_void_star_cast) << SubExpr->getType() << Info.getLangOpts().CPlusPlus26 << Result.Designator.getType(Info.Ctx).getCanonicalType() << E->getType()->getPointeeType();"}}, | ||
[j]={ | [j]={ | ||
Line 1,894: | Line 1,906: | ||
}, | }, | ||
["note_constexpr_large_shift"]={ | ["note_constexpr_large_shift"]={ | ||
[ | [b]="shift count %0 >= width of type %1 (%2 bit%s2)", | ||
[ | [d]=c, | ||
[ | [e]="shift count (.*?) \\>\\= width of type (.*?) \\((.*?) bit(.*?)\\)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | [h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | ||
[i]={{l,2834,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth();"},{l,2867,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_right:\n // ...\n if (SA != RHS)\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth();"},{l,14046,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Shl:\n case BO_Shr: {\n // ...\n // Embedded-C 4.1.6.2.2:\n // The right operand must be nonnegative and less than the total number\n // of (nonpadding) bits of the fixed-point operand ...\n if (RHSVal.isNegative())\n // ...\n else if (Amt != RHSVal)\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHSVal << E->getType() << ShiftBW;"}}, | [i]={{l,2834,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth();"},{l,2867,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_right:\n // ...\n if (SA != RHS)\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHS << E->getType() << LHS.getBitWidth();"},{l,14046,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Shl:\n case BO_Shr: {\n // ...\n // Embedded-C 4.1.6.2.2:\n // The right operand must be nonnegative and less than the total number\n // of (nonpadding) bits of the fixed-point operand ...\n if (RHSVal.isNegative())\n // ...\n else if (Amt != RHSVal)\n Info.CCEDiag(E, diag::note_constexpr_large_shift) << RHSVal << E->getType() << ShiftBW;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:158:28: note: shift count 32 >= width of type \'int\' (32 bits)","clang/test/CXX/expr/expr.const/p2-0x.cpp:174:28: note: shift count 32 >= width of type \'int\' (32 bits)"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_lifetime_ended"]={ | ["note_constexpr_lifetime_ended"]={ | ||
[ | [b]={{nil,n,"%select{read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of}0 %select{temporary|variable}1 whose %plural{8:storage duration|:lifetime}0 has ended"},{r,r,"%select{read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to}0 %select{temporary|variable}1 whose lifetime has ended"},{z,nil,"%select{read of|assignment to|increment of|decrement of}0 %select{temporary|variable}1 whose lifetime has ended"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) (?:temporary|variable) whose (?:storage duration|lifetime) has ended", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"b228a86fcfd1",1329272293,"Implement DR1454. This allows all intermediate results in constant expressions","Implement DR1454. This allows all intermediate results in constant expressions\nto be core constant expressions (including pointers and references to\ntemporaries), and makes constexpr calculations Turing-complete. A Turing machine\nsimulator is included as a testcase.\n\nThis opens up the possibilty of removing CCValue entirely, and removing some\ncopies from the constant evaluator in the process, but that cleanup is not part\nof this change.\n\nllvm-svn: 150557"}, | [h]={"b228a86fcfd1",1329272293,"Implement DR1454. This allows all intermediate results in constant expressions","Implement DR1454. This allows all intermediate results in constant expressions\nto be core constant expressions (including pointers and references to\ntemporaries), and makes constexpr calculations Turing-complete. A Turing machine\nsimulator is included as a testcase.\n\nThis opens up the possibilty of removing CCValue entirely, and removing some\ncopies from the constant evaluator in the process, but that cleanup is not part\nof this change.\n\nllvm-svn: 150557"}, | ||
[i]={{l,4019,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (LVal.getLValueCallIndex()) {\n // ...\n if (!Frame) {\n Info.FFDiag(E, diag::note_constexpr_lifetime_ended, 1) << AK << LVal.Base.is<const ValueDecl *>();"},{ | [i]={{l,4019,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (LVal.getLValueCallIndex()) {\n // ...\n if (!Frame) {\n Info.FFDiag(E, diag::note_constexpr_lifetime_ended, 1) << AK << LVal.Base.is<const ValueDecl *>();"},{x,164,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n if (!Ptr.isLive()) {\n // ...\n S.FFDiag(Src, diag::note_constexpr_lifetime_ended, 1) << AK << !IsTemp;"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:1199:8: note: destruction of variable whose lifetime has ended","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1205:8: note: destruction of temporary whose lifetime has ended"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_literal_comparison"]={ | ["note_constexpr_literal_comparison"]={ | ||
[ | [b]={{nil,F,"comparison of addresses of literals has unspecified value"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison of addresses of literals has unspecified value", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,13096,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // It\'s implementation-defined whether distinct literals will have\n // distinct addresses. In clang, the result of such a comparison is\n // unspecified, so it is not a constant expression. However, we do know\n // that the address of a literal will be non-null.\n if ((IsLiteralLValue(LHSValue) || IsLiteralLValue(RHSValue)) && LHSValue.Base && RHSValue.Base)\n return DiagComparison(diag::note_constexpr_literal_comparison);"}}, | [i]={{l,13096,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // It\'s implementation-defined whether distinct literals will have\n // distinct addresses. In clang, the result of such a comparison is\n // unspecified, so it is not a constant expression. However, we do know\n // that the address of a literal will be non-null.\n if ((IsLiteralLValue(LHSValue) || IsLiteralLValue(RHSValue)) && LHSValue.Base && RHSValue.Base)\n return DiagComparison(diag::note_constexpr_literal_comparison);"}}, | ||
[j]={ | [j]={ | ||
Line 1,930: | Line 1,942: | ||
}, | }, | ||
["note_constexpr_lshift_discards"]={ | ["note_constexpr_lshift_discards"]={ | ||
[ | [b]="signed left shift discards bits", | ||
[ | [d]=c, | ||
[ | [e]="signed left shift discards bits", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"da7c4ba1af98",1328681693,"Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into","Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into\nthe sign bit doesn\'t have undefined behavior, but a signed left shift of a 1 bit\nout of the sign bit still does. As promised to Howard :)\n\nThe suppression of the potential constant expression checking in system headers\nis also removed, since the problem it was working around is gone.\n\nllvm-svn: 150059"}, | [h]={"da7c4ba1af98",1328681693,"Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into","Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into\nthe sign bit doesn\'t have undefined behavior, but a signed left shift of a 1 bit\nout of the sign bit still does. As promised to Howard :)\n\nThe suppression of the potential constant expression checking in system headers\nis also removed, since the problem it was working around is gone.\n\nllvm-svn: 150059"}, | ||
[i]={{l,2844,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n // ...\n } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) {\n // C++11 [expr.shift]p2: A signed left shift must have a non-negative\n // operand, and must not overflow the corresponding unsigned type.\n // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to\n // E1 x 2^E2 module 2^N.\n if (LHS.isNegative())\n // ...\n else if (LHS.countl_zero() < SA)\n Info.CCEDiag(E, diag::note_constexpr_lshift_discards);"}}, | [i]={{l,2844,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n // ...\n } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) {\n // C++11 [expr.shift]p2: A signed left shift must have a non-negative\n // operand, and must not overflow the corresponding unsigned type.\n // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to\n // E1 x 2^E2 module 2^N.\n if (LHS.isNegative())\n // ...\n else if (LHS.countl_zero() < SA)\n Info.CCEDiag(E, diag::note_constexpr_lshift_discards);"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:166:40: note: signed left shift discards bits","clang/test/CXX/expr/expr.const/p2-0x.cpp:167:51: note: signed left shift discards bits","clang/test/CXX/expr/expr.const/p2-0x.cpp:168:44: note: signed left shift discards bits"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_lshift_of_negative"]={ | ["note_constexpr_lshift_of_negative"]={ | ||
[ | [b]="left shift of negative value %0", | ||
[ | [d]=c, | ||
[ | [e]="left shift of negative value (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | [h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | ||
[i]={{l,2842,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n // ...\n } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) {\n // C++11 [expr.shift]p2: A signed left shift must have a non-negative\n // operand, and must not overflow the corresponding unsigned type.\n // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to\n // E1 x 2^E2 module 2^N.\n if (LHS.isNegative())\n Info.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS;"}}, | [i]={{l,2842,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n shift_left:\n // ...\n if (SA != RHS) {\n // ...\n } else if (LHS.isSigned() && !Info.getLangOpts().CPlusPlus20) {\n // C++11 [expr.shift]p2: A signed left shift must have a non-negative\n // operand, and must not overflow the corresponding unsigned type.\n // C++2a [expr.shift]p2: E1 << E2 is the unique value congruent to\n // E1 x 2^E2 module 2^N.\n if (LHS.isNegative())\n Info.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:162:44: note: left shift of negative value -3"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_ltor_incomplete_type"]={ | ["note_constexpr_ltor_incomplete_type"]={ | ||
[ | [b]={{nil,z,"read of incomplete type %0 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="read of incomplete type (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"147b743602e4",1544633623,"[ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types","[ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types\n\nSummary:\n`memchr` and `memcmp` operate upon the character units of the object\nrepresentation; that is, the `size_t` parameter expresses the number of\ncharacter units. The constant folding implementation is updated in this\npatch to account for multibyte element types in the arrays passed to\n`memchr`/`memcmp` and, in the case of `memcmp`, to account for the\npossibility that the arrays may have differing element types (even when\nthey are byte-sized).\n\nActual inspection of the object representation is not implemented.\nComparisons are done only between elements with the same object size;\nthat is, `memchr` will fail when inspecting at least one character unit\nof a multibyte element. The integer types are assumed to have two\'s\ncomplement representation with 0 for `false`, 1 for `true`, and no\npadding bits.\n\n`memcmp` on multibyte elements will only be able to fold in cases where\nenough elements are equal for the answer to be 0.\n\nVarious tests are added to guard against incorrect folding for cases\nthat miscompile on some system or other prior to this patch. At the same\ntime, the unsigned 32-bit `wchar_t` testing in\n`test/SemaCXX/constexpr-string.cpp` is restored.\n\nReviewers: rsmith, aaron.ballman, hfinkel\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D55510\n\nllvm-svn: 348938"}, | [h]={"147b743602e4",1544633623,"[ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types","[ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types\n\nSummary:\n`memchr` and `memcmp` operate upon the character units of the object\nrepresentation; that is, the `size_t` parameter expresses the number of\ncharacter units. The constant folding implementation is updated in this\npatch to account for multibyte element types in the arrays passed to\n`memchr`/`memcmp` and, in the case of `memcmp`, to account for the\npossibility that the arrays may have differing element types (even when\nthey are byte-sized).\n\nActual inspection of the object representation is not implemented.\nComparisons are done only between elements with the same object size;\nthat is, `memchr` will fail when inspecting at least one character unit\nof a multibyte element. The integer types are assumed to have two\'s\ncomplement representation with 0 for `false`, 1 for `true`, and no\npadding bits.\n\n`memcmp` on multibyte elements will only be able to fold in cases where\nenough elements are equal for the answer to be 0.\n\nVarious tests are added to guard against incorrect folding for cases\nthat miscompile on some system or other prior to this patch. At the same\ntime, the unsigned 32-bit `wchar_t` testing in\n`test/SemaCXX/constexpr-string.cpp` is restored.\n\nReviewers: rsmith, aaron.ballman, hfinkel\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D55510\n\nllvm-svn: 348938"}, | ||
[i]={{l,9340,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strchr:\n case Builtin::BI__builtin_wcschr:\n case Builtin::BI__builtin_memchr:\n case Builtin::BI__builtin_char_memchr:\n case Builtin::BI__builtin_wmemchr: {\n // ...\n // Pointers to const void may point to objects of incomplete type.\n if (IsRawByte && CharTy->isIncompleteType()) {\n Info.FFDiag(E, diag::note_constexpr_ltor_incomplete_type) << CharTy;"}}, | [i]={{l,9340,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strchr:\n case Builtin::BI__builtin_wcschr:\n case Builtin::BI__builtin_memchr:\n case Builtin::BI__builtin_char_memchr:\n case Builtin::BI__builtin_wmemchr: {\n // ...\n // Pointers to const void may point to objects of incomplete type.\n if (IsRawByte && CharTy->isIncompleteType()) {\n Info.FFDiag(E, diag::note_constexpr_ltor_incomplete_type) << CharTy;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:406:17: note: read of incomplete type \'struct Incomplete\' is not allowed in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_ltor_non_const_int"]={ | ["note_constexpr_ltor_non_const_int"]={ | ||
[ | [b]="read of non-const variable %0 is not allowed in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="read of non\\-const variable (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"f2b681b4d819",1324443886,"constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in","constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in\nconstant expressions.\n\nllvm-svn: 147035"}, | [h]={"f2b681b4d819",1324443886,"constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in","constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in\nconstant expressions.\n\nllvm-svn: 147035"}, | ||
[i]={{l,4129,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n if (!IsConstant) {\n // ...\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, diag::note_constexpr_ltor_non_const_int, 1) << VD;"}}, | [i]={{l,4129,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n if (!IsConstant) {\n // ...\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, diag::note_constexpr_ltor_non_const_int, 1) << VD;"}}, | ||
Line 1,978: | Line 1,990: | ||
}, | }, | ||
["note_constexpr_ltor_non_constexpr"]={ | ["note_constexpr_ltor_non_constexpr"]={ | ||
[ | [b]="read of non-constexpr variable %0 is not allowed in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="read of non\\-constexpr variable (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"f2b681b4d819",1324443886,"constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in","constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in\nconstant expressions.\n\nllvm-svn: 147035"}, | [h]={"f2b681b4d819",1324443886,"constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in","constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions in\nconstant expressions.\n\nllvm-svn: 147035"}, | ||
[i]={{l,3357,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (Init->isValueDependent()) {\n // ...\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"},{l,4147,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // Keep evaluating to see what we can do. In particular, we support\n // folding of const floating-point types, in order to make static const\n // data members of such types (supported as an extension) more useful.\n if (Info.getLangOpts().CPlusPlus) {\n Info.CCEDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{l,4158,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // ...\n } else {\n // Never allow reading a non-const value.\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{ | [i]={{l,3357,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (Init->isValueDependent()) {\n // ...\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"},{l,4147,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // Keep evaluating to see what we can do. In particular, we support\n // folding of const floating-point types, in order to make static const\n // data members of such types (supported as an extension) more useful.\n if (Info.getLangOpts().CPlusPlus) {\n Info.CCEDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{l,4158,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // ...\n } else {\n // Never allow reading a non-const value.\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{x,133,"bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n if (!S.checkingPotentialConstantExpression()) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_ltor_non_constexpr, 1) << VD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:27:4: note: read of non-constexpr variable \'nonconst_np\' is not allowed in a constant expression"} | ["clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp"]={"clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:27:4: note: read of non-constexpr variable \'nonconst_np\' is not allowed in a constant expression"} | ||
Line 1,990: | Line 2,002: | ||
}, | }, | ||
["note_constexpr_ltor_non_integral"]={ | ["note_constexpr_ltor_non_integral"]={ | ||
[ | [b]={{nil,K,"read of variable %0 of non-integral, non-enumeration type %1 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="read of variable (.*?) of non\\-integral, non\\-enumeration type (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | [h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | ||
[i]={{l,3358,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (Init->isValueDependent()) {\n // ...\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"},{l,4148,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // Keep evaluating to see what we can do. In particular, we support\n // folding of const floating-point types, in order to make static const\n // data members of such types (supported as an extension) more useful.\n if (Info.getLangOpts().CPlusPlus) {\n Info.CCEDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{l,4159,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // ...\n } else {\n // Never allow reading a non-const value.\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{l,8367,"bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {\n // ...\n if (!Info.getLangOpts().CPlusPlus11) {\n Info.CCEDiag(E, diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"}}, | [i]={{l,3358,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (Init->isValueDependent()) {\n // ...\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"},{l,4148,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // Keep evaluating to see what we can do. In particular, we support\n // folding of const floating-point types, in order to make static const\n // data members of such types (supported as an extension) more useful.\n if (Info.getLangOpts().CPlusPlus) {\n Info.CCEDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{l,4159,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n } else if (VD->isConstexpr()) {\n // ...\n } else if (BaseType->isIntegralOrEnumerationType()) {\n // ...\n } else if (!IsAccess) {\n // ...\n } else if (IsConstant && Info.checkingPotentialConstantExpression() && BaseType->isLiteralType(Info.Ctx) && !VD->hasDefinition()) {\n // ...\n } else if (IsConstant) {\n // ...\n } else {\n // Never allow reading a non-const value.\n if (Info.getLangOpts().CPlusPlus) {\n Info.FFDiag(E, Info.getLangOpts().CPlusPlus11 ? diag::note_constexpr_ltor_non_constexpr : diag::note_constexpr_ltor_non_integral, 1) << VD << BaseType;"},{l,8367,"bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {\n // ...\n if (!Info.getLangOpts().CPlusPlus11) {\n Info.CCEDiag(E, diag::note_constexpr_ltor_non_integral, 1) << VD << VD->getType();"}}, | ||
Line 2,002: | Line 2,014: | ||
}, | }, | ||
["note_constexpr_mem_pointer_weak_comparison"]={ | ["note_constexpr_mem_pointer_weak_comparison"]={ | ||
[ | [b]={{nil,F,"comparison against pointer to weak member %q0 can only be performed at runtime"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison against pointer to weak member (.*?) can only be performed at runtime", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,13224,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n // If either operand is a pointer to a weak function, the comparison is not\n // constant.\n if (LHSValue.getDecl() && LHSValue.getDecl()->isWeak()) {\n Info.FFDiag(E, diag::note_constexpr_mem_pointer_weak_comparison) << LHSValue.getDecl();"},{l,13229,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n if (RHSValue.getDecl() && RHSValue.getDecl()->isWeak()) {\n Info.FFDiag(E, diag::note_constexpr_mem_pointer_weak_comparison) << RHSValue.getDecl();"}}, | [i]={{l,13224,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n // If either operand is a pointer to a weak function, the comparison is not\n // constant.\n if (LHSValue.getDecl() && LHSValue.getDecl()->isWeak()) {\n Info.FFDiag(E, diag::note_constexpr_mem_pointer_weak_comparison) << LHSValue.getDecl();"},{l,13229,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isMemberPointerType()) {\n // ...\n if (RHSValue.getDecl() && RHSValue.getDecl()->isWeak()) {\n Info.FFDiag(E, diag::note_constexpr_mem_pointer_weak_comparison) << RHSValue.getDecl();"}}, | ||
[j]={ | [j]={ | ||
Line 2,014: | Line 2,026: | ||
}, | }, | ||
["note_constexpr_memchr_unsupported"]={ | ["note_constexpr_memchr_unsupported"]={ | ||
[ | [b]={{nil,K,"constant evaluation of %0 on array of type %1 is not supported; only arrays of narrow character types can be searched"}}, | ||
[ | [d]=c, | ||
[ | [e]="constant evaluation of (.*?) on array of type (.*?) is not supported; only arrays of narrow character types can be searched", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={qd,1579695612,pd,md}, | |||
[i]={{l,9346,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strchr:\n case Builtin::BI__builtin_wcschr:\n case Builtin::BI__builtin_memchr:\n case Builtin::BI__builtin_char_memchr:\n case Builtin::BI__builtin_wmemchr: {\n // ...\n // Give up on byte-oriented matching against multibyte elements.\n // FIXME: We can compare the bytes in the correct order.\n if (IsRawByte && !isOneByteCharacterType(CharTy)) {\n Info.FFDiag(E, diag::note_constexpr_memchr_unsupported) << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str() << CharTy;"}}, | [i]={{l,9346,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strchr:\n case Builtin::BI__builtin_wcschr:\n case Builtin::BI__builtin_memchr:\n case Builtin::BI__builtin_char_memchr:\n case Builtin::BI__builtin_wmemchr: {\n // ...\n // Give up on byte-oriented matching against multibyte elements.\n // FIXME: We can compare the bytes in the correct order.\n if (IsRawByte && !isOneByteCharacterType(CharTy)) {\n Info.FFDiag(E, diag::note_constexpr_memchr_unsupported) << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str() << CharTy;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:416:17: note: constant evaluation of \'__builtin_memchr\' on array of type \'E\' is not supported; only arrays of narrow character types can be searched","SemaCXX/constexpr-string.cpp:420:39: note: constant evaluation of \'__builtin_memchr\' on array of type \'const bool\' is not supported; only arrays of narrow character types can be searched","SemaCXX/constexpr-string.cpp:421:39: note: constant evaluation of \'__builtin_memchr\' on array of type \'const bool\' is not supported; only arrays of narrow character types can be searched","SemaCXX/constexpr-string.cpp:422:39: note: constant evaluation of \'__builtin_memchr\' on array of type \'const bool\' is not supported; only arrays of narrow character types can be searched","SemaCXX/constexpr-string.cpp:423:39: note: constant evaluation of \'__builtin_memchr\' on array of type \'const bool\' is not supported; only arrays of narrow character types can be searched"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcmp_unsupported"]={ | ["note_constexpr_memcmp_unsupported"]={ | ||
[ | [b]={{nil,K,"constant evaluation of %0 between arrays of types %1 and %2 is not supported; only arrays of narrow character types can be compared"}}, | ||
[ | [d]=c, | ||
[ | [e]="constant evaluation of (.*?) between arrays of types (.*?) and (.*?) is not supported; only arrays of narrow character types can be compared", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={qd,1579695612,pd,md}, | |||
[i]={{l,12366,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strcmp:\n case Builtin::BI__builtin_wcscmp:\n case Builtin::BI__builtin_strncmp:\n case Builtin::BI__builtin_wcsncmp:\n case Builtin::BI__builtin_memcmp:\n case Builtin::BI__builtin_bcmp:\n case Builtin::BI__builtin_wmemcmp: {\n // ...\n // For memcmp, allow comparing any arrays of \'[[un]signed] char\' or\n // \'char8_t\', but no other types.\n if (IsRawByte && !(isOneByteCharacterType(CharTy1) && isOneByteCharacterType(CharTy2))) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcmp_unsupported) << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str() << CharTy1 << CharTy2;"}}, | [i]={{l,12366,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_strcmp:\n case Builtin::BI__builtin_wcscmp:\n case Builtin::BI__builtin_strncmp:\n case Builtin::BI__builtin_wcsncmp:\n case Builtin::BI__builtin_memcmp:\n case Builtin::BI__builtin_bcmp:\n case Builtin::BI__builtin_wmemcmp: {\n // ...\n // For memcmp, allow comparing any arrays of \'[[un]signed] char\' or\n // \'char8_t\', but no other types.\n if (IsRawByte && !(isOneByteCharacterType(CharTy1) && isOneByteCharacterType(CharTy2))) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcmp_unsupported) << (\"\'\" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + \"\'\").str() << CharTy1 << CharTy2;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:138:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'struct Incomplete\' and \'const char\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:139:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const char\' and \'struct Incomplete\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:143:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'struct Incomplete\' and \'const char\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:144:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const char\' and \'struct Incomplete\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:172:39: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const signed char\' and \'const bool\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:173:39: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const signed char\' and \'const bool\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:175:39: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const signed char\' and \'const bool\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:176:39: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const signed char\' and \'const bool\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:190:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:191:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:192:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:193:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:194:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:195:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:196:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:197:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:198:17: note: constant evaluation of \'__builtin_memcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:200:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:201:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:202:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:203:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:204:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:205:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:206:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:207:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared","SemaCXX/constexpr-string.cpp:208:17: note: constant evaluation of \'__builtin_bcmp\' between arrays of types \'const long\' and \'const unsigned int\' is not supported; only arrays of narrow character types can be compared"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcpy_incomplete_type"]={ | ["note_constexpr_memcpy_incomplete_type"]={ | ||
[ | [b]={{nil,z,"cannot constant evaluate \'%select{memcpy|memmove}0\' between objects of incomplete type %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot constant evaluate \'(?:memcpy|memmove)\' between objects of incomplete type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"ed083f2c1f56",1538645144,"[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array","[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array\n\nFix code for constant evaluation of __builtin_memcpy() and\n__builtin_memmove() that would attempt to divide by zero when given two\npointers to an incomplete array.\n\nDifferential Revision: https://reviews.llvm.org/D51855\n\nllvm-svn: 343761"}, | [h]={"ed083f2c1f56",1538645144,"[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array","[constexpr] Fix ICE when memcpy() is given a pointer to an incomplete array\n\nFix code for constant evaluation of __builtin_memcpy() and\n__builtin_memmove() that would attempt to divide by zero when given two\npointers to an incomplete array.\n\nDifferential Revision: https://reviews.llvm.org/D51855\n\nllvm-svn: 343761"}, | ||
[i]={{l,9471,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (T->isIncompleteType()) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_incomplete_type) << Move << T;"}}, | [i]={{l,9471,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (T->isIncompleteType()) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_incomplete_type) << Move << T;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:663:5: note: cannot constant evaluate \'memmove\' between objects of incomplete type \'int[]\'","SemaCXX/constexpr-string.cpp:663:5: note: cannot constant evaluate \'memmove\' between objects of incomplete type \'int[]\'","SemaCXX/constexpr-string.cpp:673:5: note: cannot constant evaluate \'memcpy\' between objects of incomplete type \'Incomplete\'","SemaCXX/constexpr-string.cpp:673:5: note: cannot constant evaluate \'memcpy\' between objects of incomplete type \'Incomplete\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcpy_nontrivial"]={ | ["note_constexpr_memcpy_nontrivial"]={ | ||
[ | [b]={{nil,z,"cannot constant evaluate \'%select{memcpy|memmove}0\' between objects of non-trivially-copyable type %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot constant evaluate \'(?:memcpy|memmove)\' between objects of non\\-trivially\\-copyable type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | [h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | ||
[i]={{l,9475,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (!T.isTriviallyCopyableType(Info.Ctx)) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_nontrivial) << Move << T;"}}, | [i]={{l,9475,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (!T.isTriviallyCopyableType(Info.Ctx)) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_nontrivial) << Move << T;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:606:5: note: cannot constant evaluate \'memcpy\' between objects of non-trivially-copyable type \'NonTrivial\'","SemaCXX/constexpr-string.cpp:606:5: note: cannot constant evaluate \'memcpy\' between objects of non-trivially-copyable type \'NonTrivial\'","SemaCXX/constexpr-string.cpp:612:5: note: cannot constant evaluate \'memcpy\' between objects of non-trivially-copyable type \'NonTrivial\'","SemaCXX/constexpr-string.cpp:612:5: note: cannot constant evaluate \'memcpy\' between objects of non-trivially-copyable type \'NonTrivial\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcpy_null"]={ | ["note_constexpr_memcpy_null"]={ | ||
[ | [b]={{nil,z,"%select{source|destination}2 of \'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0\' is %3"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:source|destination) of \'(?:(?:memcpy|wmemcpy)|(?:memmove|wmemmove))\' is (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"128719c4fe7c",1536878853,"Fix crash on call to __builtin_memcpy with a null pointer to an","Fix crash on call to __builtin_memcpy with a null pointer to an\nincomplete type.\n\nAlso improve the diagnostics for similar situations.\n\nllvm-svn: 342192"}, | [h]={"128719c4fe7c",1536878853,"Fix crash on call to __builtin_memcpy with a null pointer to an","Fix crash on call to __builtin_memcpy with a null pointer to an\nincomplete type.\n\nAlso improve the diagnostics for similar situations.\n\nllvm-svn: 342192"}, | ||
[i]={{l,9452,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n // Otherwise, if either of the operands is null, we can\'t proceed. Don\'t\n // try to determine the type of the copied objects, because there aren\'t\n // any.\n if (!Src.Base || !Dest.Base) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcpy_null) << Move << WChar << !!Src.Base << Val.getAsString(Info.Ctx, E->getArg(0)->getType());"}}, | [i]={{l,9452,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n // Otherwise, if either of the operands is null, we can\'t proceed. Don\'t\n // try to determine the type of the copied objects, because there aren\'t\n // any.\n if (!Src.Base || !Dest.Base) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcpy_null) << Move << WChar << !!Src.Base << Val.getAsString(Info.Ctx, E->getArg(0)->getType());"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:575:17: note: source of \'memcpy\' is nullptr","SemaCXX/constexpr-string.cpp:576:17: note: source of \'memmove\' is nullptr","SemaCXX/constexpr-string.cpp:577:17: note: source of \'wmemcpy\' is nullptr","SemaCXX/constexpr-string.cpp:578:17: note: source of \'wmemmove\' is nullptr","SemaCXX/constexpr-string.cpp:579:17: note: destination of \'memcpy\' is nullptr","SemaCXX/constexpr-string.cpp:580:17: note: destination of \'memmove\' is nullptr","SemaCXX/constexpr-string.cpp:581:17: note: destination of \'wmemcpy\' is nullptr","SemaCXX/constexpr-string.cpp:582:17: note: destination of \'wmemmove\' is nullptr","SemaCXX/constexpr-string.cpp:583:17: note: source of \'memcpy\' is (void *)123","SemaCXX/constexpr-string.cpp:584:17: note: destination of \'memcpy\' is (void *)123","SemaCXX/constexpr-string.cpp:586:17: note: source of \'memcpy\' is nullptr"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcpy_overlap"]={ | ["note_constexpr_memcpy_overlap"]={ | ||
[ | [b]={{nil,z,"\'%select{memcpy|wmemcpy}0\' between overlapping memory regions"}}, | ||
[ | [d]=c, | ||
[ | [e]="\'(?:memcpy|wmemcpy)\' between overlapping memory regions", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | [h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | ||
[i]={{l,9515,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (HasSameBase(Src, Dest)) {\n // ...\n if (DestOffset >= SrcOffset && DestOffset - SrcOffset < NBytes) {\n // Dest is inside the source region.\n if (!Move) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_overlap) << WChar;"},{l,9526,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (HasSameBase(Src, Dest)) {\n // ...\n if (DestOffset >= SrcOffset && DestOffset - SrcOffset < NBytes) {\n // ...\n } else if (!Move && SrcOffset >= DestOffset && SrcOffset - DestOffset < NBytes) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcpy_overlap) << WChar;"}}, | [i]={{l,9515,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (HasSameBase(Src, Dest)) {\n // ...\n if (DestOffset >= SrcOffset && DestOffset - SrcOffset < NBytes) {\n // Dest is inside the source region.\n if (!Move) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_overlap) << WChar;"},{l,9526,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (HasSameBase(Src, Dest)) {\n // ...\n if (DestOffset >= SrcOffset && DestOffset - SrcOffset < NBytes) {\n // ...\n } else if (!Move && SrcOffset >= DestOffset && SrcOffset - DestOffset < NBytes) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcpy_overlap) << WChar;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:504:5: note: \'memcpy\' between overlapping memory regions","SemaCXX/constexpr-string.cpp:504:5: note: \'memcpy\' between overlapping memory regions","SemaCXX/constexpr-string.cpp:521:5: note: \'wmemcpy\' between overlapping memory regions","SemaCXX/constexpr-string.cpp:521:5: note: \'wmemcpy\' between overlapping memory regions"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcpy_type_pun"]={ | ["note_constexpr_memcpy_type_pun"]={ | ||
[ | [b]={{nil,z,"cannot constant evaluate \'%select{memcpy|memmove}0\' from object of type %1 to object of type %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot constant evaluate \'(?:memcpy|memmove)\' from object of type (.*?) to object of type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | [h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | ||
[i]={{l,9467,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (!Info.Ctx.hasSameUnqualifiedType(T, SrcT)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcpy_type_pun) << Move << SrcT << T;"}}, | [i]={{l,9467,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (!Info.Ctx.hasSameUnqualifiedType(T, SrcT)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_memcpy_type_pun) << Move << SrcT << T;"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:620:5: note: cannot constant evaluate \'memcpy\' from object of type \'const unsigned int\' to object of type \'float\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memcpy_unsupported"]={ | ["note_constexpr_memcpy_unsupported"]={ | ||
[ | [b]={{nil,z,"\'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0\' not supported: %select{size to copy (%4) is not a multiple of size of element type %3 (%5)|source is not a contiguous array of at least %4 elements of type %3|destination is not a contiguous array of at least %4 elements of type %3}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="\'(?:(?:memcpy|wmemcpy)|(?:memmove|wmemmove))\' not supported\\: (?:size to copy \\((.*?)\\) is not a multiple of size of element type (.*?) \\((.*?)\\)|source is not a contiguous array of at least (.*?) elements of type (.*?)|destination is not a contiguous array of at least (.*?) elements of type (.*?))", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | [h]={"96beffba15bc",1533080109,"[constexpr] Support for constant evaluation of __builtin_memcpy and","[constexpr] Support for constant evaluation of __builtin_memcpy and\n__builtin_memmove (in non-type-punning cases).\n\nThis is intended to permit libc++ to make std::copy etc constexpr\nwithout sacrificing the optimization that uses memcpy on\ntrivially-copyable types.\n\n__builtin_strcpy and __builtin_wcscpy are not handled by this change.\nThey\'d be straightforward to add, but we haven\'t encountered a need for\nthem just yet.\n\nllvm-svn: 338455"}, | ||
[i]={{l,9486,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (!WChar) {\n // ...\n if (Remainder) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_unsupported) << Move << WChar << 0 << T << toString(OrigN, 10, /*Signed*/ false) << (unsigned)TSize;"},{l,9499,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (N.ugt(RemainingSrcSize) || N.ugt(RemainingDestSize)) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_unsupported) << Move << WChar << (N.ugt(RemainingSrcSize) ? 1 : 2) << T << toString(N, 10, /*Signed*/ false);"}}, | [i]={{l,9486,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (!WChar) {\n // ...\n if (Remainder) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_unsupported) << Move << WChar << 0 << T << toString(OrigN, 10, /*Signed*/ false) << (unsigned)TSize;"},{l,9499,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_memcpy:\n case Builtin::BI__builtin_memmove:\n case Builtin::BI__builtin_wmemcpy:\n case Builtin::BI__builtin_wmemmove: {\n // ...\n if (N.ugt(RemainingSrcSize) || N.ugt(RemainingDestSize)) {\n Info.FFDiag(E, diag::note_constexpr_memcpy_unsupported) << Move << WChar << (N.ugt(RemainingSrcSize) ? 1 : 2) << T << toString(N, 10, /*Signed*/ false);"}}, | ||
[j]={ | [j]={ | ||
[ | [Eb]={"SemaCXX/constexpr-string.cpp:504:5: note: \'memcpy\' not supported: size to copy (1) is not a multiple of size of element type \'int\' (4)","SemaCXX/constexpr-string.cpp:504:5: note: \'memcpy\' not supported: source is not a contiguous array of at least 2 elements of type \'int\'","SemaCXX/constexpr-string.cpp:504:5: note: \'memcpy\' not supported: destination is not a contiguous array of at least 3 elements of type \'int\'","SemaCXX/constexpr-string.cpp:513:5: note: \'memmove\' not supported: size to copy (1) is not a multiple of size of element type \'int\' (4)","SemaCXX/constexpr-string.cpp:513:5: note: \'memmove\' not supported: source is not a contiguous array of at least 2 elements of type \'int\'","SemaCXX/constexpr-string.cpp:513:5: note: \'memmove\' not supported: destination is not a contiguous array of at least 3 elements of type \'int\'","SemaCXX/constexpr-string.cpp:521:5: note: \'wmemcpy\' not supported: source is not a contiguous array of at least 2 elements of type \'wchar_t\' (aka \'unsigned int\')","SemaCXX/constexpr-string.cpp:521:5: note: \'wmemcpy\' not supported: destination is not a contiguous array of at least 3 elements of type \'wchar_t\' (aka \'unsigned int\')","SemaCXX/constexpr-string.cpp:529:5: note: \'wmemmove\' not supported: source is not a contiguous array of at least 2 elements of type \'wchar_t\' (aka \'unsigned int\')","SemaCXX/constexpr-string.cpp:529:5: note: \'wmemmove\' not supported: destination is not a contiguous array of at least 3 elements of type \'wchar_t\' (aka \'unsigned int\')","SemaCXX/constexpr-string.cpp:632:5: note: \'memcpy\' not supported: source is not a contiguous array of at least 2 elements of type \'MemcpyEtc::Base\'","SemaCXX/constexpr-string.cpp:654:5: note: \'memmove\' not supported: source is not a contiguous array of at least 4 elements of type \'int\'","SemaCXX/constexpr-string.cpp:654:5: note: \'memmove\' not supported: source is not a contiguous array of at least 4 elements of type \'int\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_memory_leak"]={ | ["note_constexpr_memory_leak"]={ | ||
[ | [b]={{nil,n,"allocation performed here was not deallocated%plural{0:|: (along with %0 other memory leak%s0)}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="allocation performed here was not deallocated(?:| \\(along with (.*?) other memory leak(.*?)\\))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,2502,"/// Enforce C++2a [expr.const]/4.17, which disallows new-expressions unless\n/// \"the allocated storage is deallocated within the evaluation\".\nstatic bool CheckMemoryLeaks(EvalInfo &Info) {\n if (!Info.HeapAllocs.empty()) {\n // ...\n Info.CCEDiag(Info.HeapAllocs.begin()->second.AllocExpr, diag::note_constexpr_memory_leak) << unsigned(Info.HeapAllocs.size() - 1);"}}, | [i]={{l,2502,"/// Enforce C++2a [expr.const]/4.17, which disallows new-expressions unless\n/// \"the allocated storage is deallocated within the evaluation\".\nstatic bool CheckMemoryLeaks(EvalInfo &Info) {\n if (!Info.HeapAllocs.empty()) {\n // ...\n Info.CCEDiag(Info.HeapAllocs.begin()->second.AllocExpr, diag::note_constexpr_memory_leak) << unsigned(Info.HeapAllocs.size() - 1);"}}, | ||
[j]={ | [j]={ | ||
Line 2,122: | Line 2,134: | ||
}, | }, | ||
["note_constexpr_modify_const_type"]={ | ["note_constexpr_modify_const_type"]={ | ||
[ | [b]="modification of object of const-qualified type %0 is not allowed in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="modification of object of const\\-qualified type (.*?) is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,3896,"struct ModifySubobjectHandler {\n // ...\n bool checkConst(QualType QT) {\n // Assigning to a const object has undefined behavior.\n if (QT.isConstQualified()) {\n Info.FFDiag(E, diag::note_constexpr_modify_const_type) << QT;"},{l,4385,"struct CompoundAssignSubobjectHandler {\n // ...\n bool checkConst(QualType QT) {\n // Assigning to a const object has undefined behavior.\n if (QT.isConstQualified()) {\n Info.FFDiag(E, diag::note_constexpr_modify_const_type) << QT;"},{l,4527,"struct IncDecSubobjectHandler {\n // ...\n bool checkConst(QualType QT) {\n // Assigning to a const object has undefined behavior.\n if (QT.isConstQualified()) {\n Info.FFDiag(E, diag::note_constexpr_modify_const_type) << QT;"},{ | [h]={fc,1366986990,ec,dc}, | ||
[i]={{l,3896,"struct ModifySubobjectHandler {\n // ...\n bool checkConst(QualType QT) {\n // Assigning to a const object has undefined behavior.\n if (QT.isConstQualified()) {\n Info.FFDiag(E, diag::note_constexpr_modify_const_type) << QT;"},{l,4385,"struct CompoundAssignSubobjectHandler {\n // ...\n bool checkConst(QualType QT) {\n // Assigning to a const object has undefined behavior.\n if (QT.isConstQualified()) {\n Info.FFDiag(E, diag::note_constexpr_modify_const_type) << QT;"},{l,4527,"struct IncDecSubobjectHandler {\n // ...\n bool checkConst(QualType QT) {\n // Assigning to a const object has undefined behavior.\n if (QT.isConstQualified()) {\n Info.FFDiag(E, diag::note_constexpr_modify_const_type) << QT;"},{x,219,"bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_modify_const_type) << Ty;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constant-expression-cxx14.cpp"]={"clang/test/SemaCXX/constant-expression-cxx14.cpp:257:43: note: modification of object of const-qualified type \'const int\' is not allowed in a constant expression","clang/test/SemaCXX/constant-expression-cxx14.cpp:257:43: note: modification of object of const-qualified type \'const int\' is not allowed in a constant expression","clang/test/SemaCXX/constant-expression-cxx14.cpp:1212:30: note: modification of object of const-qualified type \'const int\' is not allowed in a constant expression"} | ["clang/test/SemaCXX/constant-expression-cxx14.cpp"]={"clang/test/SemaCXX/constant-expression-cxx14.cpp:257:43: note: modification of object of const-qualified type \'const int\' is not allowed in a constant expression","clang/test/SemaCXX/constant-expression-cxx14.cpp:257:43: note: modification of object of const-qualified type \'const int\' is not allowed in a constant expression","clang/test/SemaCXX/constant-expression-cxx14.cpp:1212:30: note: modification of object of const-qualified type \'const int\' is not allowed in a constant expression"} | ||
Line 2,134: | Line 2,146: | ||
}, | }, | ||
["note_constexpr_modify_global"]={ | ["note_constexpr_modify_global"]={ | ||
[ | [b]="a constant expression cannot modify an object that is visible outside that expression", | ||
[ | [d]=c, | ||
[ | [e]="a constant expression cannot modify an object that is visible outside that expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,4055,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // Allow reading from a GUID declaration.\n if (auto *GD = dyn_cast<MSGuidDecl>(D)) {\n if (isModification(AK)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{l,4070,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Allow reading the APValue from an UnnamedGlobalConstantDecl.\n if (auto *GCD = dyn_cast<UnnamedGlobalConstantDecl>(D)) {\n if (isModification(AK)) {\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{l,4080,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Allow reading from template parameter objects.\n if (auto *TPO = dyn_cast<TemplateParamObjectDecl>(D)) {\n if (isModification(AK)) {\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{l,4120,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{ | [h]={fc,1366986990,ec,dc}, | ||
[i]={{l,4055,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // Allow reading from a GUID declaration.\n if (auto *GD = dyn_cast<MSGuidDecl>(D)) {\n if (isModification(AK)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{l,4070,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Allow reading the APValue from an UnnamedGlobalConstantDecl.\n if (auto *GCD = dyn_cast<UnnamedGlobalConstantDecl>(D)) {\n if (isModification(AK)) {\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{l,4080,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Allow reading from template parameter objects.\n if (auto *TPO = dyn_cast<TemplateParamObjectDecl>(D)) {\n if (isModification(AK)) {\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{l,4120,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n // Unless we\'re looking at a local variable or argument in a constexpr call,\n // the variable we\'re reading must be const.\n if (!Frame) {\n if (IsAccess && isa<ParmVarDecl>(VD)) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus14 && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (isModification(AK)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_modify_global);"},{x,117,"static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n if (auto ID = Ptr.getDeclID()) {\n // ...\n S.FFDiag(S.Current->getLocation(OpPC), diag::note_constexpr_modify_global);"}}, | |||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:447:14: note: a constant expression cannot modify an object that is visible outside that expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:472:13: note: a constant expression cannot modify an object that is visible outside that expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:473:13: note: a constant expression cannot modify an object that is visible outside that expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:592:16: note: a constant expression cannot modify an object that is visible outside that expression","clang/test/CXX/expr/expr.const/p2-0x.cpp:593:16: note: a constant expression cannot modify an object that is visible outside that expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_negative_shift"]={ | ["note_constexpr_negative_shift"]={ | ||
[ | [b]="negative shift count %0", | ||
[ | [d]=c, | ||
[ | [e]="negative shift count (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | [h]={"fe800031ec14",1327982900,"constexpr: catch a collection of integral undefined behaviors:","constexpr: catch a collection of integral undefined behaviors:\n -INT_MIN and INT_MIN / -1\n Shift by a negative or too large quantity\n Left shift of negative value\n Overflow in left shift\n\nllvm-svn: 149344"}, | ||
[i]={{l,2825,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n case BO_Shl: {\n if (Info.getLangOpts().OpenCL)\n // ...\n else if (RHS.isSigned() && RHS.isNegative()) {\n // ...\n Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;"},{l,2858,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n case BO_Shr: {\n if (Info.getLangOpts().OpenCL)\n // ...\n else if (RHS.isSigned() && RHS.isNegative()) {\n // ...\n Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;"},{l,14044,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Shl:\n case BO_Shr: {\n // ...\n // Embedded-C 4.1.6.2.2:\n // The right operand must be nonnegative and less than the total number\n // of (nonpadding) bits of the fixed-point operand ...\n if (RHSVal.isNegative())\n Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHSVal;"}}, | [i]={{l,2825,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n case BO_Shl: {\n if (Info.getLangOpts().OpenCL)\n // ...\n else if (RHS.isSigned() && RHS.isNegative()) {\n // ...\n Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;"},{l,2858,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n case BO_Shr: {\n if (Info.getLangOpts().OpenCL)\n // ...\n else if (RHS.isSigned() && RHS.isNegative()) {\n // ...\n Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;"},{l,14044,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Shl:\n case BO_Shr: {\n // ...\n // Embedded-C 4.1.6.2.2:\n // The right operand must be nonnegative and less than the total number\n // of (nonpadding) bits of the fixed-point operand ...\n if (RHSVal.isNegative())\n Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHSVal;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:155:28: note: negative shift count -1","clang/test/CXX/expr/expr.const/p2-0x.cpp:171:28: note: negative shift count -1"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new"]={ | ["note_constexpr_new"]={ | ||
[ | [b]={{nil,n,"dynamic memory allocation is not permitted in constant expressions until C++20"}}, | ||
[ | [d]=c, | ||
[ | [e]="dynamic memory allocation is not permitted in constant expressions until C\\+\\+20", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6716,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (!Caller) {\n Info.FFDiag(E->getExprLoc(), Info.getLangOpts().CPlusPlus20 ? diag::note_constexpr_new_untyped : diag::note_constexpr_new);"},{l,9563,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(E, diag::note_constexpr_new);"},{l,15015,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // Deleting a null pointer has no effect.\n if (Pointer.isNullPointer()) {\n // This is the only case where we need to produce an extension warning:\n // the only other way we can succeed is if we find a dynamic allocation,\n // and we will have warned when we allocated it in that case.\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(E, diag::note_constexpr_new);"}}, | [i]={{l,6716,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (!Caller) {\n Info.FFDiag(E->getExprLoc(), Info.getLangOpts().CPlusPlus20 ? diag::note_constexpr_new_untyped : diag::note_constexpr_new);"},{l,9563,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(E, diag::note_constexpr_new);"},{l,15015,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // Deleting a null pointer has no effect.\n if (Pointer.isNullPointer()) {\n // This is the only case where we need to produce an extension warning:\n // the only other way we can succeed is if we find a dynamic allocation,\n // and we will have warned when we allocated it in that case.\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(E, diag::note_constexpr_new);"}}, | ||
[j]={ | [j]={ | ||
Line 2,170: | Line 2,182: | ||
}, | }, | ||
["note_constexpr_new_delete_mismatch"]={ | ["note_constexpr_new_delete_mismatch"]={ | ||
[ | [b]={{nil,n,"%plural{2:\'delete\' used to delete pointer to object allocated with \'std::allocator<...>::allocate\'|:%select{non-array delete|array delete|\'std::allocator<...>::deallocate\'}0 used to delete pointer to %select{array object of type %2|non-array object of type %2|object allocated with \'new\'}0}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:\'delete\' used to delete pointer to object allocated with \'std\\:\\:allocator\\<\\.\\.\\.\\>\\:\\:allocate\'|(?:non\\-array delete|array delete|\'std\\:\\:allocator\\<\\.\\.\\.\\>\\:\\:deallocate\') used to delete pointer to (?:array object of type (.*?)|non\\-array object of type (.*?)|object allocated with \'new\'))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6811,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (DeallocKind != (*Alloc)->getKind()) {\n Info.FFDiag(E, diag::note_constexpr_new_delete_mismatch) << DeallocKind << (*Alloc)->getKind() << AllocType;"}}, | [i]={{l,6811,"/// Check that the given object is a suitable pointer to a heap allocation that\n/// still exists and is of the right kind for the purpose of a deletion.\n///\n/// On success, returns the heap allocation to deallocate. On failure, produces\n/// a diagnostic and returns std::nullopt.\nstatic std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, const LValue &Pointer, DynAlloc::Kind DeallocKind) {\n // ...\n if (DeallocKind != (*Alloc)->getKind()) {\n Info.FFDiag(E, diag::note_constexpr_new_delete_mismatch) << DeallocKind << (*Alloc)->getKind() << AllocType;"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: \'std::allocator<...>::deallocate\' used to delete pointer to object allocated with \'new\'","clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: \'std::allocator<...>::deallocate\' used to delete pointer to object allocated with \'new\'","clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:66:5: note: \'delete\' used to delete pointer to object allocated with \'std::allocator<...>::allocate\'","clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:69:5: note: \'delete\' used to delete pointer to object allocated with \'std::allocator<...>::allocate\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_negative"]={ | ["note_constexpr_new_negative"]={ | ||
[ | [b]={{nil,n,"cannot allocate array; evaluated array bound %0 is negative"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot allocate array; evaluated array bound (.*?) is negative", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,9633,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (std::optional<const Expr *> ArraySize = E->getArraySize()) {\n // ...\n // C++ [expr.new]p9:\n // The expression is erroneous if:\n // -- [...] its value before converting to size_t [or] applying the\n // second standard conversion sequence is less than zero\n if (ArrayBound.isSigned() && ArrayBound.isNegative()) {\n // ...\n Info.FFDiag(*ArraySize, diag::note_constexpr_new_negative) << ArrayBound << (*ArraySize)->getSourceRange();"}}, | [i]={{l,9633,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (std::optional<const Expr *> ArraySize = E->getArraySize()) {\n // ...\n // C++ [expr.new]p9:\n // The expression is erroneous if:\n // -- [...] its value before converting to size_t [or] applying the\n // second standard conversion sequence is less than zero\n if (ArrayBound.isSigned() && ArrayBound.isNegative()) {\n // ...\n Info.FFDiag(*ArraySize, diag::note_constexpr_new_negative) << ArrayBound << (*ArraySize)->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:888:22: note: cannot allocate array; evaluated array bound -1 is negative"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_non_replaceable"]={ | ["note_constexpr_new_non_replaceable"]={ | ||
[ | [b]={{nil,n,"call to %select{placement|class-specific}0 %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="call to (?:placement|class\\-specific) (.*?)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,9583,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (OperatorNew->isReservedGlobalPlacementOperator() && Info.CurrentCall->isStdFunction() && !E->isArray()) {\n // ...\n } else if (!OperatorNew->isReplaceableGlobalAllocationFunction()) {\n Info.FFDiag(E, diag::note_constexpr_new_non_replaceable) << isa<CXXMethodDecl>(OperatorNew) << OperatorNew;"},{l,14996,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n if (!OperatorDelete->isReplaceableGlobalAllocationFunction()) {\n Info.FFDiag(E, diag::note_constexpr_new_non_replaceable) << isa<CXXMethodDecl>(OperatorDelete) << OperatorDelete;"},{l,15040,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // For a class type with a virtual destructor, the selected operator delete\n // is the one looked up when building the destructor.\n if (!E->isArrayForm() && !E->isGlobalDelete()) {\n // ...\n if (VirtualDelete && !VirtualDelete->isReplaceableGlobalAllocationFunction()) {\n Info.FFDiag(E, diag::note_constexpr_new_non_replaceable) << isa<CXXMethodDecl>(VirtualDelete) << VirtualDelete;"}}, | [i]={{l,9583,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (OperatorNew->isReservedGlobalPlacementOperator() && Info.CurrentCall->isStdFunction() && !E->isArray()) {\n // ...\n } else if (!OperatorNew->isReplaceableGlobalAllocationFunction()) {\n Info.FFDiag(E, diag::note_constexpr_new_non_replaceable) << isa<CXXMethodDecl>(OperatorNew) << OperatorNew;"},{l,14996,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n if (!OperatorDelete->isReplaceableGlobalAllocationFunction()) {\n Info.FFDiag(E, diag::note_constexpr_new_non_replaceable) << isa<CXXMethodDecl>(OperatorDelete) << OperatorDelete;"},{l,15040,"bool VoidExprEvaluator::VisitCXXDeleteExpr(const CXXDeleteExpr *E) {\n // ...\n // For a class type with a virtual destructor, the selected operator delete\n // is the one looked up when building the destructor.\n if (!E->isArrayForm() && !E->isGlobalDelete()) {\n // ...\n if (VirtualDelete && !VirtualDelete->isReplaceableGlobalAllocationFunction()) {\n Info.FFDiag(E, diag::note_constexpr_new_non_replaceable) << isa<CXXMethodDecl>(VirtualDelete) << VirtualDelete;"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:95:3: note: call to placement \'operator new\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_not_complete_object_type"]={ | ["note_constexpr_new_not_complete_object_type"]={ | ||
[ | [b]={{nil,n,"cannot allocate memory of %select{incomplete|function}0 type %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot allocate memory of (?:incomplete|function) type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"19ad5239713c",1570063173,"For P0784R7: allow direct calls to operator new / operator delete from","For P0784R7: allow direct calls to operator new / operator delete from\nstd::allocator::{allocate,deallocate} in constant evaluation.\n\nllvm-svn: 373546"}, | [h]={"19ad5239713c",1570063173,"For P0784R7: allow direct calls to operator new / operator delete from","For P0784R7: allow direct calls to operator new / operator delete from\nstd::allocator::{allocate,deallocate} in constant evaluation.\n\nllvm-svn: 373546"}, | ||
[i]={{l,6723,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (ElemType->isIncompleteType() || ElemType->isFunctionType()) {\n Info.FFDiag(E->getExprLoc(), diag::note_constexpr_new_not_complete_object_type) << (ElemType->isIncompleteType() ? 0 : 1) << ElemType;"}}, | [i]={{l,6723,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (ElemType->isIncompleteType() || ElemType->isFunctionType()) {\n Info.FFDiag(E->getExprLoc(), diag::note_constexpr_new_not_complete_object_type) << (ElemType->isIncompleteType() ? 0 : 1) << ElemType;"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:34:39: note: cannot allocate memory of function type \'void ()\'","clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:40:39: note: cannot allocate memory of incomplete type \'Incomplete\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_placement"]={ | ["note_constexpr_new_placement"]={ | ||
[ | [b]={{nil,n,"this placement new expression is not yet supported in constant expressions"}}, | ||
[ | [d]=c, | ||
[ | [e]="this placement new expression is not yet supported in constant expressions", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,9599,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (OperatorNew->isReservedGlobalPlacementOperator() && Info.CurrentCall->isStdFunction() && !E->isArray()) {\n // ...\n } else if (!OperatorNew->isReplaceableGlobalAllocationFunction()) {\n // ...\n } else if (E->getNumPlacementArgs()) {\n // The only new-placement list we support is of the form (std::nothrow).\n //\n // FIXME: There is no restriction on this, but it\'s not clear that any\n // other form makes any sense. We get here for cases such as:\n //\n // new (std::align_val_t{N}) X(int)\n //\n // (which should presumably be valid only if N is a multiple of\n // alignof(int), and in any case can\'t be deallocated unless N is\n // alignof(X) and X has new-extended alignment).\n if (E->getNumPlacementArgs() != 1 || !E->getPlacementArg(0)->getType()->isNothrowT())\n return Error(E, diag::note_constexpr_new_placement);"}}, | [i]={{l,9599,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (OperatorNew->isReservedGlobalPlacementOperator() && Info.CurrentCall->isStdFunction() && !E->isArray()) {\n // ...\n } else if (!OperatorNew->isReplaceableGlobalAllocationFunction()) {\n // ...\n } else if (E->getNumPlacementArgs()) {\n // The only new-placement list we support is of the form (std::nothrow).\n //\n // FIXME: There is no restriction on this, but it\'s not clear that any\n // other form makes any sense. We get here for cases such as:\n //\n // new (std::align_val_t{N}) X(int)\n //\n // (which should presumably be valid only if N is a multiple of\n // alignof(int), and in any case can\'t be deallocated unless N is\n // alignof(X) and X has new-extended alignment).\n if (E->getNumPlacementArgs() != 1 || !E->getPlacementArg(0)->getType()->isNothrowT())\n return Error(E, diag::note_constexpr_new_placement);"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:1015:14: note: this placement new expression is not yet supported in constant expressions"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_too_large"]={ | ["note_constexpr_new_too_large"]={ | ||
[ | [b]={{nil,n,"cannot allocate array; evaluated array bound %0 is too large"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot allocate array; evaluated array bound (.*?) is too large", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,6756,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (ByteSize.getActiveBits() > ConstantArrayType::getMaxSizeBits(Info.Ctx)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_new_too_large) << APSInt(Size, true);"},{l,9646,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (std::optional<const Expr *> ArraySize = E->getArraySize()) {\n // ...\n // -- its value is such that the size of the allocated object would\n // exceed the implementation-defined limit\n if (ConstantArrayType::getNumAddressingBits(Info.Ctx, AllocType, ArrayBound) > ConstantArrayType::getMaxSizeBits(Info.Ctx)) {\n // ...\n Info.FFDiag(*ArraySize, diag::note_constexpr_new_too_large) << ArrayBound << (*ArraySize)->getSourceRange();"}}, | [i]={{l,6756,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (ByteSize.getActiveBits() > ConstantArrayType::getMaxSizeBits(Info.Ctx)) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_new_too_large) << APSInt(Size, true);"},{l,9646,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (std::optional<const Expr *> ArraySize = E->getArraySize()) {\n // ...\n // -- its value is such that the size of the allocated object would\n // exceed the implementation-defined limit\n if (ConstantArrayType::getNumAddressingBits(Info.Ctx, AllocType, ArrayBound) > ConstantArrayType::getMaxSizeBits(Info.Ctx)) {\n // ...\n Info.FFDiag(*ArraySize, diag::note_constexpr_new_too_large) << ArrayBound << (*ArraySize)->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:888:22: note: cannot allocate array; evaluated array bound 4611686018427387904 is too large"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_too_small"]={ | ["note_constexpr_new_too_small"]={ | ||
[ | [b]={{nil,n,"cannot allocate array; evaluated array bound %0 is too small to hold %1 explicitly initialized elements"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot allocate array; evaluated array bound (.*?) is too small to hold (.*?) explicitly initialized elements", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={W,1569547607,Z,X}, | |||
[i]={{l,9673,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (std::optional<const Expr *> ArraySize = E->getArraySize()) {\n // ...\n // -- the new-initializer is a braced-init-list and the number of\n // array elements for which initializers are provided [...]\n // exceeds the number of elements to initialize\n if (!Init) {\n // ...\n } else if (isa<CXXScalarValueInitExpr>(Init) || isa<ImplicitValueInitExpr>(Init)) {\n // ...\n } else if (auto *CCE = dyn_cast<CXXConstructExpr>(Init)) {\n // ...\n } else {\n // ...\n if (InitBound.ugt(AllocBound)) {\n // ...\n Info.FFDiag(*ArraySize, diag::note_constexpr_new_too_small) << toString(AllocBound, 10, /*Signed=*/false) << toString(InitBound, 10, /*Signed=*/false) << (*ArraySize)->getSourceRange();"}}, | [i]={{l,9673,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (std::optional<const Expr *> ArraySize = E->getArraySize()) {\n // ...\n // -- the new-initializer is a braced-init-list and the number of\n // array elements for which initializers are provided [...]\n // exceeds the number of elements to initialize\n if (!Init) {\n // ...\n } else if (isa<CXXScalarValueInitExpr>(Init) || isa<ImplicitValueInitExpr>(Init)) {\n // ...\n } else if (auto *CCE = dyn_cast<CXXConstructExpr>(Init)) {\n // ...\n } else {\n // ...\n if (InitBound.ugt(AllocBound)) {\n // ...\n Info.FFDiag(*ArraySize, diag::note_constexpr_new_too_small) << toString(AllocBound, 10, /*Signed=*/false) << toString(InitBound, 10, /*Signed=*/false) << (*ArraySize)->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:851:17: note: cannot allocate array; evaluated array bound 2 is too small to hold 3 explicitly initialized elements","clang/test/SemaCXX/constant-expression-cxx2a.cpp:849:17: note: cannot allocate array; evaluated array bound 3 is too small to hold 4 explicitly initialized elements"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_new_untyped"]={ | ["note_constexpr_new_untyped"]={ | ||
[ | [b]={{nil,n,"cannot allocate untyped memory in a constant expression; use \'std::allocator<T>::allocate\' to allocate memory of type \'T\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot allocate untyped memory in a constant expression; use \'std\\:\\:allocator\\<T\\>\\:\\:allocate\' to allocate memory of type \'T\'", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"19ad5239713c",1570063173,"For P0784R7: allow direct calls to operator new / operator delete from","For P0784R7: allow direct calls to operator new / operator delete from\nstd::allocator::{allocate,deallocate} in constant evaluation.\n\nllvm-svn: 373546"}, | [h]={"19ad5239713c",1570063173,"For P0784R7: allow direct calls to operator new / operator delete from","For P0784R7: allow direct calls to operator new / operator delete from\nstd::allocator::{allocate,deallocate} in constant evaluation.\n\nllvm-svn: 373546"}, | ||
[i]={{l,6715,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (!Caller) {\n Info.FFDiag(E->getExprLoc(), Info.getLangOpts().CPlusPlus20 ? diag::note_constexpr_new_untyped : diag::note_constexpr_new);"}}, | [i]={{l,6715,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (!Caller) {\n Info.FFDiag(E->getExprLoc(), Info.getLangOpts().CPlusPlus20 ? diag::note_constexpr_new_untyped : diag::note_constexpr_new);"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:6:13: note: cannot allocate untyped memory in a constant expression; use \'std::allocator<T>::allocate\' to allocate memory of type \'T\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_no_return"]={ | ["note_constexpr_no_return"]={ | ||
[ | [b]="control reached end of constexpr function", | ||
[ | [d]=c, | ||
[ | [e]="control reached end of constexpr function", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and","C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr functions. Everything which doesn\'t require variable\nmutation is also allowed as an extension in C++11. \'void\' becomes a literal\ntype to support constexpr functions which return \'void\'.\n\nllvm-svn: 180022"}, | [h]={"d9f663b510c4",1366644711,"C++1y constexpr extensions, round 1: Allow most forms of declaration and","C++1y constexpr extensions, round 1: Allow most forms of declaration and\nstatement in constexpr functions. Everything which doesn\'t require variable\nmutation is also allowed as an extension in C++11. \'void\' becomes a literal\ntype to support constexpr functions which return \'void\'.\n\nllvm-svn: 180022"}, | ||
[i]={{l,6258,"/// Evaluate a function call.\nstatic bool HandleFunctionCall(SourceLocation CallLoc, const FunctionDecl *Callee, const LValue *This, const Expr *E, ArrayRef<const Expr *> Args, CallRef Call, const Stmt *Body, EvalInfo &Info, APValue &Result, const LValue *ResultSlot) {\n // ...\n if (ESR == ESR_Succeeded) {\n // ...\n Info.FFDiag(Callee->getEndLoc(), diag::note_constexpr_no_return);"}}, | [i]={{l,6258,"/// Evaluate a function call.\nstatic bool HandleFunctionCall(SourceLocation CallLoc, const FunctionDecl *Callee, const LValue *This, const Expr *E, ArrayRef<const Expr *> Args, CallRef Call, const Stmt *Body, EvalInfo &Info, APValue &Result, const LValue *ResultSlot) {\n // ...\n if (ESR == ESR_Succeeded) {\n // ...\n Info.FFDiag(Callee->getEndLoc(), diag::note_constexpr_no_return);"}}, | ||
Line 2,278: | Line 2,290: | ||
}, | }, | ||
["note_constexpr_non_global"]={ | ["note_constexpr_non_global"]={ | ||
[ | [b]="%select{pointer|reference}0 to %select{|subobject of }1%select{temporary|%3}2 is not a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="(?:pointer|reference) to (?:|subobject of )(?:temporary|(.*?)) is not a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={sc,1323758398,tc,uc}, | |||
[i]={{l,2207,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Check that the object is a global. Note that the fake \'this\' object we\n // manufacture when checking potential constant expressions is conservatively\n // assumed to be global here.\n if (!IsGlobalLValue(Base)) {\n if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(Loc, diag::note_constexpr_non_global, 1) << IsReferenceType << !Designator.Entries.empty() << !!BaseVD << BaseVD;"}}, | [i]={{l,2207,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Check that the object is a global. Note that the fake \'this\' object we\n // manufacture when checking potential constant expressions is conservatively\n // assumed to be global here.\n if (!IsGlobalLValue(Base)) {\n if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(Loc, diag::note_constexpr_non_global, 1) << IsReferenceType << !Designator.Entries.empty() << !!BaseVD << BaseVD;"}}, | ||
[j]={ | [j]={ | ||
Line 2,290: | Line 2,302: | ||
}, | }, | ||
["note_constexpr_nonliteral"]={ | ["note_constexpr_nonliteral"]={ | ||
[ | [b]="non-literal type %0 cannot be used in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="non\\-literal type (.*?) cannot be used in a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={sc,1323758398,tc,uc}, | |||
[i]={{l,2369,"/// Check that this core constant expression is of literal type, and if not,\n/// produce an appropriate diagnostic.\nstatic bool CheckLiteralType(EvalInfo &Info, const Expr *E, const LValue *This = nullptr) {\n // ...\n // Prvalue constant expressions must be of literal types.\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_nonliteral) << E->getType();"},{l,4671,"/// Build an lvalue for the object argument of a member function call.\nstatic bool EvaluateObjectArgument(EvalInfo &Info, const Expr *Object, LValue &This) {\n // ...\n Info.FFDiag(Object, diag::note_constexpr_nonliteral) << Object->getType();"},{l,15127,"static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {\n // ...\n if (E->isGLValue() || T->isFunctionType()) {\n // ...\n } else if (T->isVectorType()) {\n // ...\n } else if (T->isIntegralOrEnumerationType()) {\n // ...\n } else if (T->hasPointerRepresentation()) {\n // ...\n } else if (T->isRealFloatingType()) {\n // ...\n } else if (T->isAnyComplexType()) {\n // ...\n } else if (T->isFixedPointType()) {\n // ...\n } else if (T->isMemberPointerType()) {\n // ...\n } else if (T->isArrayType()) {\n // ...\n } else if (T->isRecordType()) {\n // ...\n } else if (T->isVoidType()) {\n if (!Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_nonliteral) << E->getType();"},{l,15145,"static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {\n // ...\n if (E->isGLValue() || T->isFunctionType()) {\n // ...\n } else if (T->isVectorType()) {\n // ...\n } else if (T->isIntegralOrEnumerationType()) {\n // ...\n } else if (T->hasPointerRepresentation()) {\n // ...\n } else if (T->isRealFloatingType()) {\n // ...\n } else if (T->isAnyComplexType()) {\n // ...\n } else if (T->isFixedPointType()) {\n // ...\n } else if (T->isMemberPointerType()) {\n // ...\n } else if (T->isArrayType()) {\n // ...\n } else if (T->isRecordType()) {\n // ...\n } else if (T->isVoidType()) {\n // ...\n } else if (T->isAtomicType()) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(E, diag::note_constexpr_nonliteral) << E->getType();"}}, | [i]={{l,2369,"/// Check that this core constant expression is of literal type, and if not,\n/// produce an appropriate diagnostic.\nstatic bool CheckLiteralType(EvalInfo &Info, const Expr *E, const LValue *This = nullptr) {\n // ...\n // Prvalue constant expressions must be of literal types.\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_nonliteral) << E->getType();"},{l,4671,"/// Build an lvalue for the object argument of a member function call.\nstatic bool EvaluateObjectArgument(EvalInfo &Info, const Expr *Object, LValue &This) {\n // ...\n Info.FFDiag(Object, diag::note_constexpr_nonliteral) << Object->getType();"},{l,15127,"static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {\n // ...\n if (E->isGLValue() || T->isFunctionType()) {\n // ...\n } else if (T->isVectorType()) {\n // ...\n } else if (T->isIntegralOrEnumerationType()) {\n // ...\n } else if (T->hasPointerRepresentation()) {\n // ...\n } else if (T->isRealFloatingType()) {\n // ...\n } else if (T->isAnyComplexType()) {\n // ...\n } else if (T->isFixedPointType()) {\n // ...\n } else if (T->isMemberPointerType()) {\n // ...\n } else if (T->isArrayType()) {\n // ...\n } else if (T->isRecordType()) {\n // ...\n } else if (T->isVoidType()) {\n if (!Info.getLangOpts().CPlusPlus11)\n Info.CCEDiag(E, diag::note_constexpr_nonliteral) << E->getType();"},{l,15145,"static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {\n // ...\n if (E->isGLValue() || T->isFunctionType()) {\n // ...\n } else if (T->isVectorType()) {\n // ...\n } else if (T->isIntegralOrEnumerationType()) {\n // ...\n } else if (T->hasPointerRepresentation()) {\n // ...\n } else if (T->isRealFloatingType()) {\n // ...\n } else if (T->isAnyComplexType()) {\n // ...\n } else if (T->isFixedPointType()) {\n // ...\n } else if (T->isMemberPointerType()) {\n // ...\n } else if (T->isArrayType()) {\n // ...\n } else if (T->isRecordType()) {\n // ...\n } else if (T->isVoidType()) {\n // ...\n } else if (T->isAtomicType()) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus11) {\n Info.FFDiag(E, diag::note_constexpr_nonliteral) << E->getType();"}}, | ||
[j]={ | [j]={ | ||
Line 2,302: | Line 2,314: | ||
}, | }, | ||
["note_constexpr_not_static"]={ | ["note_constexpr_not_static"]={ | ||
[ | [b]={{nil,I,"address of non-static constexpr variable %0 may differ on each invocation of the enclosing function; add \'static\' to give it a constant address"}}, | ||
[ | [d]=c, | ||
[ | [e]="address of non\\-static constexpr variable (.*?) may differ on each invocation of the enclosing function; add \'static\' to give it a constant address", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0fd3d379e26d",1597104144,"Improve diagnostic for an expression that\'s not constant because it uses","Improve diagnostic for an expression that\'s not constant because it uses\nthe address of a constexpr local variable.\n\nSuggest adding \'static\' to give the constexpr local variable a constant\naddress."}, | [h]={"0fd3d379e26d",1597104144,"Improve diagnostic for an expression that\'s not constant because it uses","Improve diagnostic for an expression that\'s not constant because it uses\nthe address of a constexpr local variable.\n\nSuggest adding \'static\' to give the constexpr local variable a constant\naddress."}, | ||
[i]={{l,2217,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Check that the object is a global. Note that the fake \'this\' object we\n // manufacture when checking potential constant expressions is conservatively\n // assumed to be global here.\n if (!IsGlobalLValue(Base)) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n if (VarD && VarD->isConstexpr()) {\n // ...\n Info.Note(VarD->getLocation(), diag::note_constexpr_not_static) << VarD << FixItHint::CreateInsertion(VarD->getBeginLoc(), \"static \");"}}, | [i]={{l,2217,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Check that the object is a global. Note that the fake \'this\' object we\n // manufacture when checking potential constant expressions is conservatively\n // assumed to be global here.\n if (!IsGlobalLValue(Base)) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n if (VarD && VarD->isConstexpr()) {\n // ...\n Info.Note(VarD->getLocation(), diag::note_constexpr_not_static) << VarD << FixItHint::CreateInsertion(VarD->getBeginLoc(), \"static \");"}}, | ||
Line 2,314: | Line 2,326: | ||
}, | }, | ||
["note_constexpr_null_callee"]={ | ["note_constexpr_null_callee"]={ | ||
[ | [b]="\'%0\' evaluates to a null function pointer", | ||
[ | [d]=c, | ||
[ | [e]="\'(.*?)\' evaluates to a null function pointer", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,7719,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool handleCallExpr(const CallExpr *E, APValue &Result, const LValue *ResultSlot) {\n // ...\n // Extract function decl and \'this\' pointer from the callee.\n if (CalleeType->isSpecificBuiltinType(BuiltinType::BoundMember)) {\n // ...\n } else if (CalleeType->isFunctionPointerType()) {\n // ...\n if (CalleeLV.isNullPointer()) {\n Info.FFDiag(Callee, diag::note_constexpr_null_callee) << const_cast<Expr *>(Callee);"}}, | [i]={{l,7719,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool handleCallExpr(const CallExpr *E, APValue &Result, const LValue *ResultSlot) {\n // ...\n // Extract function decl and \'this\' pointer from the callee.\n if (CalleeType->isSpecificBuiltinType(BuiltinType::BoundMember)) {\n // ...\n } else if (CalleeType->isFunctionPointerType()) {\n // ...\n if (CalleeLV.isNullPointer()) {\n Info.FFDiag(Callee, diag::note_constexpr_null_callee) << const_cast<Expr *>(Callee);"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:282:54: note: \'F\' evaluates to a null function pointer"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_null_subobject"]={ | ["note_constexpr_null_subobject"]={ | ||
[ | [b]={{nil,r,"cannot %select{access base class of|access derived class of|access field of|access array element of|perform pointer arithmetic on|access real component of|access imaginary component of}0 null pointer"},{z,nil,"cannot %select{access base class of|access derived class of|access field of|access array element of|perform pointer arithmetic on|call member function on|access real component of|access imaginary component of}0 null pointer"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot (?:access base class of|access derived class of|access field of|access array element of|perform pointer arithmetic on|access real component of|access imaginary component of) null pointer", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | [h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | ||
[i]={{l,1647,"#endif\n // ...\n bool checkNullPointer(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK) {\n return checkNullPointerDiagnosingWith([&Info, E, CSK] { Info.CCEDiag(E, diag::note_constexpr_null_subobject) << CSK; });"},{ | [i]={{l,1647,"#endif\n // ...\n bool checkNullPointer(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK) {\n return checkNullPointerDiagnosingWith([&Info, E, CSK] { Info.CCEDiag(E, diag::note_constexpr_null_subobject) << CSK; });"},{x,153,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n if (Ptr.isZero()) {\n // ...\n if (Ptr.isField())\n S.FFDiag(Src, diag::note_constexpr_null_subobject) << CSK_Field;"},{x,182,"bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_null_subobject) << CSK;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/AST/Interp/arrays.cpp"]={"clang/test/AST/Interp/arrays.cpp:73:24: note: cannot perform pointer arithmetic on null pointer"} | ["clang/test/AST/Interp/arrays.cpp"]={"clang/test/AST/Interp/arrays.cpp:73:24: note: cannot perform pointer arithmetic on null pointer"} | ||
Line 2,338: | Line 2,350: | ||
}, | }, | ||
["note_constexpr_operator_new_bad_size"]={ | ["note_constexpr_operator_new_bad_size"]={ | ||
[ | [b]={{nil,n,"allocated size %0 is not a multiple of size %1 of element type %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="allocated size (.*?) is not a multiple of size (.*?) of element type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"19ad5239713c",1570063173,"For P0784R7: allow direct calls to operator new / operator delete from","For P0784R7: allow direct calls to operator new / operator delete from\nstd::allocator::{allocate,deallocate} in constant evaluation.\n\nllvm-svn: 373546"}, | [h]={"19ad5239713c",1570063173,"For P0784R7: allow direct calls to operator new / operator delete from","For P0784R7: allow direct calls to operator new / operator delete from\nstd::allocator::{allocate,deallocate} in constant evaluation.\n\nllvm-svn: 373546"}, | ||
[i]={{l,6745,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (Remainder != 0) {\n // ...\n Info.FFDiag(E->getExprLoc(), diag::note_constexpr_operator_new_bad_size) << ByteSize << APSInt(ElemSizeAP, true) << ElemType;"}}, | [i]={{l,6745,"/// Perform a call to \'perator new\' or to `__builtin_operator_new\'.\nstatic bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E, LValue &Result) {\n // ...\n if (Remainder != 0) {\n // ...\n Info.FFDiag(E->getExprLoc(), diag::note_constexpr_operator_new_bad_size) << ByteSize << APSInt(ElemSizeAP, true) << ElemType;"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:47:39: note: allocated size 7 is not a multiple of size 5 of element type \'WrongSize\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_overflow"]={ | ["note_constexpr_overflow"]={ | ||
[ | [b]="value %0 is outside the range of representable values of type %1", | ||
[ | [d]=c, | ||
[ | [e]="value (.*?) is outside the range of representable values of type (.*?)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={sc,1323758398,tc,uc}, | |||
[i]={{l,2579,"template <typename T> static bool HandleOverflow(EvalInfo &Info, const Expr *E, const T &SrcValue, QualType DestType) {\n Info.CCEDiag(E, diag::note_constexpr_overflow) << SrcValue << DestType;"},{"clang/lib/AST/Interp/InterpState.cpp",45,"bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) {\n // ...\n CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;"}}, | [i]={{l,2579,"template <typename T> static bool HandleOverflow(EvalInfo &Info, const Expr *E, const T &SrcValue, QualType DestType) {\n Info.CCEDiag(E, diag::note_constexpr_overflow) << SrcValue << DestType;"},{"clang/lib/AST/Interp/InterpState.cpp",45,"bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) {\n // ...\n CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;"}}, | ||
[j]={ | [j]={ | ||
Line 2,362: | Line 2,374: | ||
}, | }, | ||
["note_constexpr_past_end"]={ | ["note_constexpr_past_end"]={ | ||
[ | [b]="dereferenced pointer past the end of %select{|subobject of }0%select{temporary|%2}1 is not a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="dereferenced pointer past the end of (?:|subobject of )(?:temporary|(.*?)) is not a constant expression", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={sc,1323758398,tc,uc}, | |||
[i]={{l,2316,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Does this refer one past the end of some object?\n if (!Designator.Invalid && Designator.isOnePastTheEnd()) {\n Info.FFDiag(Loc, diag::note_constexpr_past_end, 1) << !Designator.Entries.empty() << !!BaseVD << BaseVD;"}}, | [i]={{l,2316,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n // Does this refer one past the end of some object?\n if (!Designator.Invalid && Designator.isOnePastTheEnd()) {\n Info.FFDiag(Loc, diag::note_constexpr_past_end, 1) << !Designator.Entries.empty() << !!BaseVD << BaseVD;"}}, | ||
[j]={ | [j]={ | ||
Line 2,374: | Line 2,386: | ||
}, | }, | ||
["note_constexpr_past_end_subobject"]={ | ["note_constexpr_past_end_subobject"]={ | ||
[ | [b]={{nil,r,"cannot %select{access base class of|access derived class of|access field of|access array element of|ERROR|access real component of|access imaginary component of}0 pointer past the end of object"},{z,nil,"cannot %select{access base class of|access derived class of|access field of|access array element of|ERROR|call member function on|access real component of|access imaginary component of}0 pointer past the end of object"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot (?:access base class of|access derived class of|access field of|access array element of|ERROR|access real component of|access imaginary component of) pointer past the end of object", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | [h]={"a8105bc9cecb",1325867940,"C++11 generalized constant expressions: implement checking and diagnostics for","C++11 generalized constant expressions: implement checking and diagnostics for\npointer-arithmetic-related undefined behavior and unspecified results. We\ncontinue to fold such values, but now notice they aren\'t constant expressions.\n\nllvm-svn: 147659"}, | ||
[i]={{l,1411,"bool SubobjectDesignator::checkSubobject(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK) {\n // ...\n if (isOnePastTheEnd()) {\n Info.CCEDiag(E, diag::note_constexpr_past_end_subobject) << CSK;"},{ | [i]={{l,1411,"bool SubobjectDesignator::checkSubobject(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK) {\n // ...\n if (isOnePastTheEnd()) {\n Info.CCEDiag(E, diag::note_constexpr_past_end_subobject) << CSK;"},{x,200,"bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_past_end_subobject) << CSK;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:195:23: note: cannot access base class of pointer past the end of object","clang/test/CXX/expr/expr.const/p2-0x.cpp:196:23: note: cannot access derived class of pointer past the end of object","clang/test/CXX/expr/expr.const/p2-0x.cpp:197:42: note: cannot access field of pointer past the end of object","clang/test/CXX/expr/expr.const/p2-0x.cpp:198:26: note: cannot access array element of pointer past the end of object"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_placement_new_wrong_type"]={ | ["note_constexpr_placement_new_wrong_type"]={ | ||
[ | [b]={{nil,n,"placement new would change type of storage from %0 to %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="placement new would change type of storage from (.*?) to (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"b542602c5f35",1570063175,"For P0784R7: support placement new-expressions in constant evaluation.","For P0784R7: support placement new-expressions in constant evaluation.\n\nFor now, we restrict this support to use from within the standard\nlibrary implementation, since we\'re required to make parts of the\nstandard library that use placement new work, but not permitted to\nmake uses of placement new from user code work.\n\nllvm-svn: 373547"}, | [h]={"b542602c5f35",1570063175,"For P0784R7: support placement new-expressions in constant evaluation.","For P0784R7: support placement new-expressions in constant evaluation.\n\nFor now, we restrict this support to use from within the standard\nlibrary implementation, since we\'re required to make parts of the\nstandard library that use placement new work, but not permitted to\nmake uses of placement new from user code work.\n\nllvm-svn: 373547"}, | ||
[i]={{l,9709,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APValue &Subobj, QualType SubobjType) {\n // FIXME: Reject the cases where [basic.life]p8 would not permit the\n // old name of the object to be used to name the new object.\n if (!Info.Ctx.hasSameUnqualifiedType(SubobjType, AllocType)) {\n Info.FFDiag(E, diag::note_constexpr_placement_new_wrong_type) << SubobjType << AllocType;"}}, | [i]={{l,9709,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n // ...\n if (IsPlacement) {\n // ...\n struct FindObjectHandler {\n // ...\n bool found(APValue &Subobj, QualType SubobjType) {\n // FIXME: Reject the cases where [basic.life]p8 would not permit the\n // old name of the object to be used to name the new object.\n if (!Info.Ctx.hasSameUnqualifiedType(SubobjType, AllocType)) {\n Info.FFDiag(E, diag::note_constexpr_placement_new_wrong_type) << SubobjType << AllocType;"}}, | ||
[j]={ | [j]={ | ||
[ | [Pb]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:111:5: note: placement new would change type of storage from \'int\' to \'float\'"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_comparison_base_classes"]={ | ["note_constexpr_pointer_comparison_base_classes"]={ | ||
[ | [b]="comparison of addresses of subobjects of different base classes has unspecified value", | ||
[ | [d]=c, | ||
[ | [e]="comparison of addresses of subobjects of different base classes has unspecified value", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | [h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | ||
[i]={{l,13160,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_base_classes);"}}, | [i]={{l,13160,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_base_classes);"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:567:34: note: comparison of addresses of subobjects of different base classes has unspecified value"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_comparison_base_field"]={ | ["note_constexpr_pointer_comparison_base_field"]={ | ||
[ | [b]="comparison of address of base class subobject %0 of class %1 to field %2 has unspecified value", | ||
[ | [d]=c, | ||
[ | [e]="comparison of address of base class subobject (.*?) of class (.*?) to field (.*?) has unspecified value", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | [h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | ||
[i]={{l,13162,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n // ...\n else if (!LF)\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field) << getAsBaseClass(LHSDesignator.Entries[Mismatch]) << RF->getParent() << RF;"},{l,13166,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n // ...\n else if (!LF)\n // ...\n else if (!RF)\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field) << getAsBaseClass(RHSDesignator.Entries[Mismatch]) << LF->getParent() << LF;"}}, | [i]={{l,13162,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n // ...\n else if (!LF)\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field) << getAsBaseClass(LHSDesignator.Entries[Mismatch]) << RF->getParent() << RF;"},{l,13166,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n // ...\n else if (!LF)\n // ...\n else if (!RF)\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field) << getAsBaseClass(RHSDesignator.Entries[Mismatch]) << LF->getParent() << LF;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:568:34: note: comparison of address of base class subobject \'C\' of class \'E\' to field \'e\' has unspecified value","clang/test/CXX/expr/expr.const/p2-0x.cpp:569:33: note: comparison of address of base class subobject \'D\' of class \'E\' to field \'e\' has unspecified value"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_comparison_differing_access"]={ | ["note_constexpr_pointer_comparison_differing_access"]={ | ||
[ | [b]="comparison of address of fields %0 and %2 of %4 with differing access specifiers (%1 vs %3) has unspecified value", | ||
[ | [d]=c, | ||
[ | [e]="comparison of address of fields (.*?) and (.*?) of (.*?) with differing access specifiers \\((.*?) vs (.*?)\\) has unspecified value", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | [h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | ||
[i]={{l,13172,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n // ...\n else if (!LF)\n // ...\n else if (!RF)\n // ...\n else if (!LF->getParent()->isUnion() && LF->getAccess() != RF->getAccess())\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_differing_access) << LF << LF->getAccess() << RF << RF->getAccess() << LF->getParent();"}}, | [i]={{l,13172,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p2:\n // - If two pointers point to non-static data members of the same object,\n // or to subobjects or array elements fo such members, recursively, the\n // pointer to the later declared member compares greater provided the\n // two members have the same access control and provided their class is\n // not a union.\n // [...]\n // - Otherwise pointer comparisons are unspecified.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && IsRelational) {\n // ...\n // At the point where the designators diverge, the comparison has a\n // specified value if:\n // - we are comparing array indices\n // - we are comparing fields of a union, or fields with the same access\n // Otherwise, the result is unspecified and thus the comparison is not a\n // constant expression.\n if (!WasArrayIndex && Mismatch < LHSDesignator.Entries.size() && Mismatch < RHSDesignator.Entries.size()) {\n // ...\n if (!LF && !RF)\n // ...\n else if (!LF)\n // ...\n else if (!RF)\n // ...\n else if (!LF->getParent()->isUnion() && LF->getAccess() != RF->getAccess())\n Info.CCEDiag(E, diag::note_constexpr_pointer_comparison_differing_access) << LF << LF->getAccess() << RF << RF->getAccess() << LF->getParent();"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:537:44: note: comparison of address of fields \'a\' and \'b\' of \'A\' with differing access specifiers (public vs private) has unspecified value","clang/test/CXX/expr/expr.const/p2-0x.cpp:545:46: note: comparison of address of fields \'a\' and \'b\' of \'B\' with differing access specifiers (public vs protected) has unspecified value"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_comparison_past_end"]={ | ["note_constexpr_pointer_comparison_past_end"]={ | ||
[ | [b]={{nil,F,"comparison against pointer \'%0\' that points past the end of a complete object has unspecified value"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison against pointer \'(.*?)\' that points past the end of a complete object has unspecified value", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,13106,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // We can\'t compare the address of the start of one object with the\n // past-the-end address of another object, per C++ DR1652.\n if (LHSValue.Base && LHSValue.Offset.isZero() && isOnePastTheEndOfCompleteObject(Info.Ctx, RHSValue))\n return DiagComparison(diag::note_constexpr_pointer_comparison_past_end, true);"},{l,13110,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n if (RHSValue.Base && RHSValue.Offset.isZero() && isOnePastTheEndOfCompleteObject(Info.Ctx, LHSValue))\n return DiagComparison(diag::note_constexpr_pointer_comparison_past_end, false);"}}, | [i]={{l,13106,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // We can\'t compare the address of the start of one object with the\n // past-the-end address of another object, per C++ DR1652.\n if (LHSValue.Base && LHSValue.Offset.isZero() && isOnePastTheEndOfCompleteObject(Info.Ctx, RHSValue))\n return DiagComparison(diag::note_constexpr_pointer_comparison_past_end, true);"},{l,13110,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n if (RHSValue.Base && RHSValue.Offset.isZero() && isOnePastTheEndOfCompleteObject(Info.Ctx, LHSValue))\n return DiagComparison(diag::note_constexpr_pointer_comparison_past_end, false);"}}, | ||
[j]={ | [j]={ | ||
Line 2,446: | Line 2,458: | ||
}, | }, | ||
["note_constexpr_pointer_comparison_unspecified"]={ | ["note_constexpr_pointer_comparison_unspecified"]={ | ||
[ | [b]={{nil,F,"comparison between \'%0\' and \'%1\' has unspecified value"},{O,n,"comparison has unspecified value"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison between \'(.*?)\' and \'(.*?)\' has unspecified value", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"4e9f1379b9cd",1576544926,"If constant evaluation fails due to an unspecified pointer comparison,","If constant evaluation fails due to an unspecified pointer comparison,\nproduce a note saying that rather than the default \"evaluation failed\"\nnote."}, | [h]={"4e9f1379b9cd",1576544926,"If constant evaluation fails due to an unspecified pointer comparison,","If constant evaluation fails due to an unspecified pointer comparison,\nproduce a note saying that rather than the default \"evaluation failed\"\nnote."}, | ||
[i]={{l,13080,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // Inequalities and subtractions between unrelated pointers have\n // unspecified or undefined behavior.\n if (!IsEquality)\n return DiagComparison(diag::note_constexpr_pointer_comparison_unspecified);"}}, | [i]={{l,13080,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // Inequalities and subtractions between unrelated pointers have\n // unspecified or undefined behavior.\n if (!IsEquality)\n return DiagComparison(diag::note_constexpr_pointer_comparison_unspecified);"}}, | ||
Line 2,458: | Line 2,470: | ||
}, | }, | ||
["note_constexpr_pointer_comparison_zero_sized"]={ | ["note_constexpr_pointer_comparison_zero_sized"]={ | ||
[ | [b]={{nil,F,"comparison of pointers \'%0\' and \'%1\' to unrelated zero-sized objects"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison of pointers \'(.*?)\' and \'(.*?)\' to unrelated zero\\-sized objects", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,13117,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // We can\'t tell whether an object is at the same address as another\n // zero sized object.\n if ((RHSValue.Base && isZeroSized(LHSValue)) || (LHSValue.Base && isZeroSized(RHSValue)))\n return DiagComparison(diag::note_constexpr_pointer_comparison_zero_sized);"}}, | [i]={{l,13117,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // We can\'t tell whether an object is at the same address as another\n // zero sized object.\n if ((RHSValue.Base && isZeroSized(LHSValue)) || (LHSValue.Base && isZeroSized(RHSValue)))\n return DiagComparison(diag::note_constexpr_pointer_comparison_zero_sized);"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:2216:24: note: comparison of pointers \'&start\' and \'&end\' to unrelated zero-sized objects"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_constant_comparison"]={ | ["note_constexpr_pointer_constant_comparison"]={ | ||
[ | [b]={{nil,F,"comparison of numeric address \'%0\' with pointer \'%1\' can only be performed at runtime"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison of numeric address \'(.*?)\' with pointer \'(.*?)\' can only be performed at runtime", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,13088,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // A constant address may compare equal to the address of a symbol.\n // The one exception is that address of an object cannot compare equal\n // to a null pointer constant.\n // TODO: Should we restrict this to actual null pointers, and exclude the\n // case of zero cast to pointer type?\n if ((!LHSValue.Base && !LHSValue.Offset.isZero()) || (!RHSValue.Base && !RHSValue.Offset.isZero()))\n return DiagComparison(diag::note_constexpr_pointer_constant_comparison, !RHSValue.Base);"}} | [i]={{l,13088,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // A constant address may compare equal to the address of a symbol.\n // The one exception is that address of an object cannot compare equal\n // to a null pointer constant.\n // TODO: Should we restrict this to actual null pointers, and exclude the\n // case of zero cast to pointer type?\n if ((!LHSValue.Base && !LHSValue.Offset.isZero()) || (!RHSValue.Base && !RHSValue.Offset.isZero()))\n return DiagComparison(diag::note_constexpr_pointer_constant_comparison, !RHSValue.Base);"}} | ||
}, | }, | ||
["note_constexpr_pointer_subtraction_not_same_array"]={ | ["note_constexpr_pointer_subtraction_not_same_array"]={ | ||
[ | [b]="subtracted pointers are not elements of the same array", | ||
[ | [d]=c, | ||
[ | [e]="subtracted pointers are not elements of the same array", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | [h]={"84f6dcf2b52c",1328145417,"constexpr:","constexpr:\n * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11\n * check for unspecified values in pointer comparisons and pointer subtractions\n\nllvm-svn: 149578"}, | ||
[i]={{l,13410,"bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType() && E->getOpcode() == BO_Sub) {\n // ...\n // C++11 [expr.add]p6:\n // Unless both pointers point to elements of the same array object, or\n // one past the last element of the array object, the behavior is\n // undefined.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && !AreElementsOfSameArray(getType(LHSValue.Base), LHSDesignator, RHSDesignator))\n Info.CCEDiag(E, diag::note_constexpr_pointer_subtraction_not_same_array);"}}, | [i]={{l,13410,"bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType() && E->getOpcode() == BO_Sub) {\n // ...\n // C++11 [expr.add]p6:\n // Unless both pointers point to elements of the same array object, or\n // one past the last element of the array object, the behavior is\n // undefined.\n if (!LHSDesignator.Invalid && !RHSDesignator.Invalid && !AreElementsOfSameArray(getType(LHSValue.Base), LHSDesignator, RHSDesignator))\n Info.CCEDiag(E, diag::note_constexpr_pointer_subtraction_not_same_array);"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:222:36: note: subtracted pointers are not elements of the same array","clang/test/CXX/expr/expr.const/p2-0x.cpp:225:38: note: subtracted pointers are not elements of the same array","clang/test/CXX/expr/expr.const/p2-0x.cpp:227:40: note: subtracted pointers are not elements of the same array"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_subtraction_zero_size"]={ | ["note_constexpr_pointer_subtraction_zero_size"]={ | ||
[ | [b]="subtraction of pointers to type %0 of zero size", | ||
[ | [d]=c, | ||
[ | [e]="subtraction of pointers to type (.*?) of zero size", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"84c6b3d293d9",1378848854,"PR5683: Issue a warning when subtracting pointers to types of zero size, and","PR5683: Issue a warning when subtracting pointers to types of zero size, and\ntreat such subtractions as being non-constant. Patch by Serge Pavlov! With a\nfew tweaks by me.\n\nllvm-svn: 190439"}, | [h]={"84c6b3d293d9",1378848854,"PR5683: Issue a warning when subtracting pointers to types of zero size, and","PR5683: Issue a warning when subtracting pointers to types of zero size, and\ntreat such subtractions as being non-constant. Patch by Serge Pavlov! With a\nfew tweaks by me.\n\nllvm-svn: 190439"}, | ||
[i]={{l,13423,"bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType() && E->getOpcode() == BO_Sub) {\n // ...\n // As an extension, a type may have zero size (empty struct or union in\n // C, array of zero length). Pointer subtraction in such cases has\n // undefined behavior, so is not constant.\n if (ElementSize.isZero()) {\n Info.FFDiag(E, diag::note_constexpr_pointer_subtraction_zero_size) << ElementType;"}}, | [i]={{l,13423,"bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType() && E->getOpcode() == BO_Sub) {\n // ...\n // As an extension, a type may have zero size (empty struct or union in\n // C, array of zero length). Pointer subtraction in such cases has\n // undefined behavior, so is not constant.\n if (ElementSize.isZero()) {\n Info.FFDiag(E, diag::note_constexpr_pointer_subtraction_zero_size) << ElementType;"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:2091:24: note: subtraction of pointers to type \'int[0]\' of zero size","clang/test/SemaCXX/constant-expression-cxx11.cpp:2097:20: note: subtraction of pointers to type \'int[0]\' of zero size"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pointer_weak_comparison"]={ | ["note_constexpr_pointer_weak_comparison"]={ | ||
[ | [b]={{nil,F,"comparison against address of weak declaration \'%0\' can only be performed at runtime"}}, | ||
[ | [d]=c, | ||
[ | [e]="comparison against address of weak declaration \'(.*?)\' can only be performed at runtime", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Jb,1662843785,Fb,Gb}, | |||
[i]={{l,13100,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // We can\'t tell whether weak symbols will end up pointing to the same\n // object.\n if (IsWeakLValue(LHSValue) || IsWeakLValue(RHSValue))\n return DiagComparison(diag::note_constexpr_pointer_weak_comparison, !IsWeakLValue(LHSValue));"}}, | [i]={{l,13100,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // Reject differing bases from the normal codepath; we special-case\n // comparisons to null.\n if (!HasSameBase(LHSValue, RHSValue)) {\n // ...\n // We can\'t tell whether weak symbols will end up pointing to the same\n // object.\n if (IsWeakLValue(LHSValue) || IsWeakLValue(RHSValue))\n return DiagComparison(diag::note_constexpr_pointer_weak_comparison, !IsWeakLValue(LHSValue));"}}, | ||
[j]={ | [j]={ | ||
Line 2,515: | Line 2,527: | ||
}, | }, | ||
["note_constexpr_polymorphic_unknown_dynamic_type"]={ | ["note_constexpr_polymorphic_unknown_dynamic_type"]={ | ||
[ | [b]={{nil,n,"%select{|||||virtual function called on|dynamic_cast applied to|typeid applied to|construction of|destruction of}0 object \'%1\' whose dynamic type is not constant"},{r,r,"%select{||||virtual function called on|dynamic_cast applied to|typeid applied to}0 object \'%1\' whose dynamic type is not constant"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:|||||virtual function called on|dynamic_cast applied to|typeid applied to|construction of|destruction of) object \'(.*?)\' whose dynamic type is not constant", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7bd54ab58665",1557951741,"[c++20] For P1327R1: support dynamic_cast in constant expression","[c++20] For P1327R1: support dynamic_cast in constant expression\nevaluation.\n\nllvm-svn: 360806"}, | [h]={"7bd54ab58665",1557951741,"[c++20] For P1327R1: support dynamic_cast in constant expression","[c++20] For P1327R1: support dynamic_cast in constant expression\nevaluation.\n\nllvm-svn: 360806"}, | ||
[i]={{l,5672,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n // ...\n } else if (Polymorphic) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_polymorphic_unknown_dynamic_type) << AK << Val.getAsString(Info.Ctx, StarThisType);"}}, | [i]={{l,5672,"/// Check that we can access the notional vptr of an object / determine its\n/// dynamic type.\nstatic bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This, AccessKinds AK, bool Polymorphic) {\n // ...\n if (!Obj.Value) {\n // The object is not usable in constant expressions, so we can\'t inspect\n // its value to see if it\'s in-lifetime or what the active union members\n // are. We can still check for a one-past-the-end lvalue.\n if (This.Designator.isOnePastTheEnd() || This.Designator.isMostDerivedAnUnsizedArray()) {\n // ...\n } else if (Polymorphic) {\n // ...\n Info.FFDiag(E, diag::note_constexpr_polymorphic_unknown_dynamic_type) << AK << Val.getAsString(Info.Ctx, StarThisType);"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:186:33: note: virtual function called on object \'d_not_constexpr\' whose dynamic type is not constant","clang/test/SemaCXX/constant-expression-cxx2a.cpp:312:18: note: typeid applied to object \'extern_b2\' whose dynamic type is not constant"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pseudo_destructor"]={ | ["note_constexpr_pseudo_destructor"]={ | ||
[ | [b]={{nil,n,"pseudo-destructor call is not permitted in constant expressions until C++20"}}, | ||
[ | [d]=c, | ||
[ | [e]="pseudo\\-destructor call is not permitted in constant expressions until C\\+\\+20", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"61422f96653f",1569615876,"For P0784R7: add support for explicit destructor calls and","For P0784R7: add support for explicit destructor calls and\npseudo-destructor calls in constant evaluation.\n\nllvm-svn: 373122"}, | [h]={"61422f96653f",1569615876,"For P0784R7: add support for explicit destructor calls and","For P0784R7: add support for explicit destructor calls and\npseudo-destructor calls in constant evaluation.\n\nllvm-svn: 373122"}, | ||
[i]={{l,7705,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool handleCallExpr(const CallExpr *E, APValue &Result, const LValue *ResultSlot) {\n // ...\n // Extract function decl and \'this\' pointer from the callee.\n if (CalleeType->isSpecificBuiltinType(BuiltinType::BoundMember)) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(Callee)) {\n // ...\n } else if (const BinaryOperator *BE = dyn_cast<BinaryOperator>(Callee)) {\n // ...\n } else if (const auto *PDE = dyn_cast<CXXPseudoDestructorExpr>(Callee)) {\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(PDE, diag::note_constexpr_pseudo_destructor);"}}, | [i]={{l,7705,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool handleCallExpr(const CallExpr *E, APValue &Result, const LValue *ResultSlot) {\n // ...\n // Extract function decl and \'this\' pointer from the callee.\n if (CalleeType->isSpecificBuiltinType(BuiltinType::BoundMember)) {\n // ...\n if (const MemberExpr *ME = dyn_cast<MemberExpr>(Callee)) {\n // ...\n } else if (const BinaryOperator *BE = dyn_cast<BinaryOperator>(Callee)) {\n // ...\n } else if (const auto *PDE = dyn_cast<CXXPseudoDestructorExpr>(Callee)) {\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(PDE, diag::note_constexpr_pseudo_destructor);"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:452:9: note: pseudo-destructor call is not permitted in constant expressions until C++20","clang/test/CXX/expr/expr.const/p2-0x.cpp:462:9: note: pseudo-destructor call is not permitted in constant expressions until C++20","clang/test/CXX/expr/expr.const/p2-0x.cpp:462:9: note: pseudo-destructor call is not permitted in constant expressions until C++20"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_pure_virtual_call"]={ | ["note_constexpr_pure_virtual_call"]={ | ||
[ | [b]={{nil,r,"pure virtual function %q0 called"}}, | ||
[ | [d]=c, | ||
[ | [e]="pure virtual function (.*?) called", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"5c5be6b2f7fc",1557733330,"[c++20] P1064R0: Allow virtual function calls in constant expression","[c++20] P1064R0: Allow virtual function calls in constant expression\nevaluation.\n\nllvm-svn: 360559"}, | [h]={"5c5be6b2f7fc",1557733330,"[c++20] P1064R0: Allow virtual function calls in constant expression","[c++20] P1064R0: Allow virtual function calls in constant expression\nevaluation.\n\nllvm-svn: 360559"}, | ||
[i]={{l,5797,"/// Perform virtual dispatch.\nstatic const CXXMethodDecl *HandleVirtualDispatch(EvalInfo &Info, const Expr *E, LValue &This, const CXXMethodDecl *Found, llvm::SmallVectorImpl<QualType> &CovariantAdjustmentPath) {\n // ...\n // C++2a [class.abstract]p6:\n // the effect of making a virtual call to a pure virtual function [...] is\n // undefined\n if (Callee->isPure()) {\n Info.FFDiag(E, diag::note_constexpr_pure_virtual_call, 1) << Callee;"},{ | [i]={{l,5797,"/// Perform virtual dispatch.\nstatic const CXXMethodDecl *HandleVirtualDispatch(EvalInfo &Info, const Expr *E, LValue &This, const CXXMethodDecl *Found, llvm::SmallVectorImpl<QualType> &CovariantAdjustmentPath) {\n // ...\n // C++2a [class.abstract]p6:\n // the effect of making a virtual call to a pure virtual function [...] is\n // undefined\n if (Callee->isPure()) {\n Info.FFDiag(E, diag::note_constexpr_pure_virtual_call, 1) << Callee;"},{x,378,"bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) {\n // ...\n S.FFDiag(E, diag::note_constexpr_pure_virtual_call, 1) << MD;"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:229:30: note: pure virtual function \'Virtual::Abstract::f\' called"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_static_local"]={ | ["note_constexpr_static_local"]={ | ||
[ | [b]={{nil,O,"control flows through the definition of a %select{static|thread_local}0 variable"}}, | ||
[ | [d]=c, | ||
[ | [e]="control flows through the definition of a (?:static|thread_local) variable", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"683e83c56f98",1633469611,"[Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr","[Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr\n\nAllow goto, labelled statements as well as `static`, `thread_local`, and\nnon-literal variables in `constexpr` functions.\n\nAs specified. for all of the above (except labelled statements) constant\nevaluation of the construct still fails.\n\nFor `constexpr` bodies, the proposal is implemented with diagnostics as\na language extension in older language modes. For determination of\nwhether a lambda body satisfies the requirements for a constexpr\nfunction, the proposal is implemented only in C++2b mode to retain the\nsemantics of older modes for programs conforming to them.\n\nReviewed By: aaron.ballman, hubert.reinterpretcast, erichkeane\n\nDifferential Revision: https://reviews.llvm.org/D111400"}, | [h]={"683e83c56f98",1633469611,"[Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr","[Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr\n\nAllow goto, labelled statements as well as `static`, `thread_local`, and\nnon-literal variables in `constexpr` functions.\n\nAs specified. for all of the above (except labelled statements) constant\nevaluation of the construct still fails.\n\nFor `constexpr` bodies, the proposal is implemented with diagnostics as\na language extension in older language modes. For determination of\nwhether a lambda body satisfies the requirements for a constexpr\nfunction, the proposal is implemented only in C++2b mode to retain the\nsemantics of older modes for programs conforming to them.\n\nReviewed By: aaron.ballman, hubert.reinterpretcast, erichkeane\n\nDifferential Revision: https://reviews.llvm.org/D111400"}, | ||
[i]={{l,5090,"static bool CheckLocalVariableDeclaration(EvalInfo &Info, const VarDecl *VD) {\n // An expression E is a core constant expression unless the evaluation of E\n // would evaluate one of the following: [C++23] - a control flow that passes\n // through a declaration of a variable with static or thread storage duration\n // unless that variable is usable in constant expressions.\n if (VD->isLocalVarDecl() && VD->isStaticLocal() && !VD->isUsableInConstantExpressions(Info.Ctx)) {\n Info.CCEDiag(VD->getLocation(), diag::note_constexpr_static_local) << (VD->getTSCSpec() == TSCS_unspecified ? 0 : 1) << VD;"}}, | [i]={{l,5090,"static bool CheckLocalVariableDeclaration(EvalInfo &Info, const VarDecl *VD) {\n // An expression E is a core constant expression unless the evaluation of E\n // would evaluate one of the following: [C++23] - a control flow that passes\n // through a declaration of a variable with static or thread storage duration\n // unless that variable is usable in constant expressions.\n if (VD->isLocalVarDecl() && VD->isStaticLocal() && !VD->isUsableInConstantExpressions(Info.Ctx)) {\n Info.CCEDiag(VD->getLocation(), diag::note_constexpr_static_local) << (VD->getTSCSpec() == TSCS_unspecified ? 0 : 1) << VD;"}}, | ||
Line 2,563: | Line 2,575: | ||
}, | }, | ||
["note_constexpr_step_limit_exceeded"]={ | ["note_constexpr_step_limit_exceeded"]={ | ||
[ | [b]="constexpr evaluation hit maximum step limit; possible infinite loop?", | ||
[ | [d]=c, | ||
[ | [e]="constexpr evaluation hit maximum step limit; possible infinite loop\\?", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a3d3bd215bcd",1367979123,"C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.","C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.\n\nllvm-svn: 181388"}, | [h]={"a3d3bd215bcd",1367979123,"C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.","C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.\n\nllvm-svn: 181388"}, | ||
[i]={{l,1041,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool nextStep(const Stmt *S) {\n if (!StepsLeft) {\n FFDiag(S->getBeginLoc(), diag::note_constexpr_step_limit_exceeded);"}}, | [i]={{l,1041,"/// EvalInfo - This is a private struct used by the evaluator to capture\n/// information about a subexpression as it is folded. It retains information\n/// about the AST context, but also maintains information about the folded\n/// expression.\n///\n/// If an expression could be evaluated, it is still possible it is not a C\n/// \"integer constant expression\" or constant expression. If not, this struct\n/// captures information about how and why not.\n///\n/// One bit of information passed *into* the request for constant folding\n/// indicates whether the subexpression is \"evaluated\" or not according to C\n/// rules. For example, the RHS of (0 && foo()) is not evaluated. We can\n/// evaluate the expression regardless of what the RHS is, but C only allows\n/// certain things in certain situations.\nclass EvalInfo : public interp::State {\n // ...\n bool nextStep(const Stmt *S) {\n if (!StepsLeft) {\n FFDiag(S->getBeginLoc(), diag::note_constexpr_step_limit_exceeded);"}}, | ||
Line 2,575: | Line 2,587: | ||
}, | }, | ||
["note_constexpr_stmt_expr_unsupported"]={ | ["note_constexpr_stmt_expr_unsupported"]={ | ||
[ | [b]="this use of statement expressions is not supported in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="this use of statement expressions is not supported in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"51f0317e527d",1371697205,"PR16377: Allow evaluation of statement expressions in constant evaluation,","PR16377: Allow evaluation of statement expressions in constant evaluation,\nwhy not. Apparently GCC supports this.\n\nllvm-svn: 184396"}, | [h]={"51f0317e527d",1371697205,"PR16377: Allow evaluation of statement expressions in constant evaluation,","PR16377: Allow evaluation of statement expressions in constant evaluation,\nwhy not. Apparently GCC supports this.\n\nllvm-svn: 184396"}, | ||
[i]={{l,5077,"/// Evaluate a switch statement.\nstatic EvalStmtResult EvaluateSwitch(StmtResult &Result, EvalInfo &Info, const SwitchStmt *SS) {\n // ...\n case ESR_CaseNotFound:\n // ...\n Info.FFDiag(Found->getBeginLoc(), diag::note_constexpr_stmt_expr_unsupported);"},{l,8028,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitStmtExpr(const StmtExpr *E) {\n // ...\n for (CompoundStmt::const_body_iterator BI = CS->body_begin(), BE = CS->body_end();\n // ...\n if (BI + 1 == BE) {\n // ...\n if (!FinalExpr) {\n Info.FFDiag((*BI)->getBeginLoc(), diag::note_constexpr_stmt_expr_unsupported);"},{l,8043,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitStmtExpr(const StmtExpr *E) {\n // ...\n for (CompoundStmt::const_body_iterator BI = CS->body_begin(), BE = CS->body_end();\n // ...\n if (ESR != ESR_Succeeded) {\n // FIXME: If the statement-expression terminated due to \'return\',\n // \'break\', or \'continue\', it would be nice to propagate that to\n // the outer statement evaluation rather than bailing out.\n if (ESR != ESR_Failed)\n Info.FFDiag((*BI)->getBeginLoc(), diag::note_constexpr_stmt_expr_unsupported);"}}, | [i]={{l,5077,"/// Evaluate a switch statement.\nstatic EvalStmtResult EvaluateSwitch(StmtResult &Result, EvalInfo &Info, const SwitchStmt *SS) {\n // ...\n case ESR_CaseNotFound:\n // ...\n Info.FFDiag(Found->getBeginLoc(), diag::note_constexpr_stmt_expr_unsupported);"},{l,8028,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitStmtExpr(const StmtExpr *E) {\n // ...\n for (CompoundStmt::const_body_iterator BI = CS->body_begin(), BE = CS->body_end();\n // ...\n if (BI + 1 == BE) {\n // ...\n if (!FinalExpr) {\n Info.FFDiag((*BI)->getBeginLoc(), diag::note_constexpr_stmt_expr_unsupported);"},{l,8043,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool VisitStmtExpr(const StmtExpr *E) {\n // ...\n for (CompoundStmt::const_body_iterator BI = CS->body_begin(), BE = CS->body_end();\n // ...\n if (ESR != ESR_Succeeded) {\n // FIXME: If the statement-expression terminated due to \'return\',\n // \'break\', or \'continue\', it would be nice to propagate that to\n // the outer statement evaluation rather than bailing out.\n if (ESR != ESR_Failed)\n Info.FFDiag((*BI)->getBeginLoc(), diag::note_constexpr_stmt_expr_unsupported);"}}, | ||
Line 2,587: | Line 2,599: | ||
}, | }, | ||
["note_constexpr_subobject_declared_here"]={ | ["note_constexpr_subobject_declared_here"]={ | ||
[ | [b]={{nil,r,"subobject declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="subobject declared here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"31c69a3d6363",1558480520,"[c++20] P1330R0: permit simple-assignments that change the active member","[c++20] P1330R0: permit simple-assignments that change the active member\nof a union within constant expression evaluation.\n\nllvm-svn: 361329"}, | [h]={"31c69a3d6363",1558480520,"[c++20] P1330R0: permit simple-assignments that change the active member","[c++20] P1330R0: permit simple-assignments that change the active member\nof a union within constant expression evaluation.\n\nllvm-svn: 361329"}, | ||
[i]={{l,2387,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n if (!Value.hasValue()) {\n if (SubobjectDecl) {\n // ...\n Info.Note(SubobjectDecl->getLocation(), diag::note_constexpr_subobject_declared_here);"},{ | [i]={{l,2387,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n if (!Value.hasValue()) {\n if (SubobjectDecl) {\n // ...\n Info.Note(SubobjectDecl->getLocation(), diag::note_constexpr_subobject_declared_here);"},{x,389,"static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) {\n // ...\n S.Note(SubObjDecl->getLocation(), diag::note_constexpr_subobject_declared_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:759:7: note: subobject declared here","clang/test/SemaCXX/cxx2a-consteval.cpp:768:6: note: subobject declared here"} | ["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:759:7: note: subobject declared here","clang/test/SemaCXX/cxx2a-consteval.cpp:768:6: note: subobject declared here"} | ||
Line 2,599: | Line 2,611: | ||
}, | }, | ||
["note_constexpr_temporary_here"]={ | ["note_constexpr_temporary_here"]={ | ||
[ | [b]="temporary created here", | ||
[ | [d]=c, | ||
[ | [e]="temporary created here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{l,2125,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n // ...\n else if (const Expr *E = Base.dyn_cast<const Expr *>())\n Info.Note(E->getExprLoc(), diag::note_constexpr_temporary_here);"},{l,4218,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n // C++20 [expr.const]p4: [DR2126]\n // An object or reference is usable in constant expressions if it is\n // - a temporary object of non-volatile const-qualified literal type\n // whose lifetime is extended to that of a variable that is usable\n // in constant expressions\n //\n // C++20 [expr.const]p5:\n // an lvalue-to-rvalue conversion [is not allowed unless it applies to]\n // - a non-volatile glvalue that refers to an object that is usable\n // in constant expressions, or\n // - a non-volatile glvalue of literal type that refers to a\n // non-volatile object whose lifetime began within the evaluation\n // of E;\n //\n // C++11 misses the \'began within the evaluation of e\' check and\n // instead allows all temporaries, including things like:\n // int &&r = 1;\n // int x = ++r;\n // constexpr int k = r;\n // Therefore we use the C++14-onwards rules in C++11 too.\n //\n // Note that temporaries whose lifetimes began while evaluating a\n // variable\'s constructor are not usable while evaluating the\n // corresponding destructor, not even if they\'re of const-qualified\n // types.\n if (!MTE->isUsableInConstantExpressions(Info.Ctx) && !lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n Info.Note(MTE->getExprLoc(), diag::note_constexpr_temporary_here);"},{ | [h]={sc,1323758398,tc,uc}, | ||
[i]={{l,2125,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n // ...\n else if (const Expr *E = Base.dyn_cast<const Expr *>())\n Info.Note(E->getExprLoc(), diag::note_constexpr_temporary_here);"},{l,4218,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // ...\n } else if (DynamicAllocLValue DA = LVal.Base.dyn_cast<DynamicAllocLValue>()) {\n // ...\n } else {\n // ...\n if (!Frame) {\n if (const MaterializeTemporaryExpr *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(Base)) {\n // ...\n // C++20 [expr.const]p4: [DR2126]\n // An object or reference is usable in constant expressions if it is\n // - a temporary object of non-volatile const-qualified literal type\n // whose lifetime is extended to that of a variable that is usable\n // in constant expressions\n //\n // C++20 [expr.const]p5:\n // an lvalue-to-rvalue conversion [is not allowed unless it applies to]\n // - a non-volatile glvalue that refers to an object that is usable\n // in constant expressions, or\n // - a non-volatile glvalue of literal type that refers to a\n // non-volatile object whose lifetime began within the evaluation\n // of E;\n //\n // C++11 misses the \'began within the evaluation of e\' check and\n // instead allows all temporaries, including things like:\n // int &&r = 1;\n // int x = ++r;\n // constexpr int k = r;\n // Therefore we use the C++14-onwards rules in C++11 too.\n //\n // Note that temporaries whose lifetimes began while evaluating a\n // variable\'s constructor are not usable while evaluating the\n // corresponding destructor, not even if they\'re of const-qualified\n // types.\n if (!MTE->isUsableInConstantExpressions(Info.Ctx) && !lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n Info.Note(MTE->getExprLoc(), diag::note_constexpr_temporary_here);"},{x,103,"static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n if (auto ID = Ptr.getDeclID()) {\n // ...\n S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here);"},{x,167,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n if (!Ptr.isLive()) {\n // ...\n if (IsTemp)\n S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:43:26: note: temporary created here"} | ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:43:26: note: temporary created here"} | ||
Line 2,611: | Line 2,623: | ||
}, | }, | ||
["note_constexpr_this"]={ | ["note_constexpr_this"]={ | ||
[ | [b]="%select{|implicit }0use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function", | ||
[ | [d]=c, | ||
[ | [e]="(?:|implicit )use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"22a5d61b5d39",1404712813,"Add an explicit diagnostic for the case where an expression is not a constant","Add an explicit diagnostic for the case where an expression is not a constant\nexpression because it uses \'this\'. Inspired by PR20219 comment#2.\n\nllvm-svn: 212433"}, | [h]={"22a5d61b5d39",1404712813,"Add an explicit diagnostic for the case where an expression is not a constant","Add an explicit diagnostic for the case where an expression is not a constant\nexpression because it uses \'this\'. Inspired by PR20219 comment#2.\n\nllvm-svn: 212433"}, | ||
[i]={{l,8809,"class PointerExprEvaluator : public ExprEvaluatorBase<PointerExprEvaluator> {\n // ...\n bool VisitCXXThisExpr(const CXXThisExpr *E) {\n // ...\n if (!Info.CurrentCall->This) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_this) << E->isImplicit();"},{ | [i]={{l,8809,"class PointerExprEvaluator : public ExprEvaluatorBase<PointerExprEvaluator> {\n // ...\n bool VisitCXXThisExpr(const CXXThisExpr *E) {\n // ...\n if (!Info.CurrentCall->This) {\n if (Info.getLangOpts().CPlusPlus11)\n Info.FFDiag(E, diag::note_constexpr_this) << E->isImplicit();"},{x,367,"bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This) {\n // ...\n if (S.getLangOpts().CPlusPlus11)\n S.FFDiag(Loc, diag::note_constexpr_this) << IsImplicit;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:746:5: note: use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function","clang/test/SemaCXX/cxx2a-consteval.cpp:751:5: note: implicit use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function"} | ["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:746:5: note: use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function","clang/test/SemaCXX/cxx2a-consteval.cpp:751:5: note: implicit use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function"} | ||
Line 2,623: | Line 2,635: | ||
}, | }, | ||
["note_constexpr_typeid_polymorphic"]={ | ["note_constexpr_typeid_polymorphic"]={ | ||
[ | [b]={{nil,n,"typeid applied to expression of polymorphic type %0 is not allowed in a constant expression in C++ standards before C++20"},{r,r,"typeid applied to expression of polymorphic type %0 is not allowed in a constant expression in C++ standards before C++2a"},{z,nil,"typeid applied to expression of polymorphic type %0 is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="typeid applied to expression of polymorphic type (.*?) is not allowed in a constant expression in C\\+\\+ standards before C\\+\\+20", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"6e52514c5deb",1324988308,"constexpr: support for evaluation and codegen of typeid constants.","constexpr: support for evaluation and codegen of typeid constants.\n\nllvm-svn: 147290"}, | [h]={"6e52514c5deb",1324988308,"constexpr: support for evaluation and codegen of typeid constants.","constexpr: support for evaluation and codegen of typeid constants.\n\nllvm-svn: 147290"}, | ||
[i]={{l,8493,"bool LValueExprEvaluator::VisitCXXTypeidExpr(const CXXTypeidExpr *E) {\n // ...\n if (!E->isPotentiallyEvaluated()) {\n // ...\n } else {\n if (!Info.Ctx.getLangOpts().CPlusPlus20) {\n Info.CCEDiag(E, diag::note_constexpr_typeid_polymorphic) << E->getExprOperand()->getType() << E->getExprOperand()->getSourceRange();"}}, | [i]={{l,8493,"bool LValueExprEvaluator::VisitCXXTypeidExpr(const CXXTypeidExpr *E) {\n // ...\n if (!E->isPotentiallyEvaluated()) {\n // ...\n } else {\n if (!Info.Ctx.getLangOpts().CPlusPlus20) {\n Info.CCEDiag(E, diag::note_constexpr_typeid_polymorphic) << E->getExprOperand()->getType() << E->getExprOperand()->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:487:41: note: typeid applied to expression of polymorphic type \'S\' is not allowed in a constant expression in C++ standards before C++20"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_uninitialized"]={ | ["note_constexpr_uninitialized"]={ | ||
[ | [b]="subobject %select{of type |}0%1 is not initialized", | ||
[ | [d]=c, | ||
[ | [e]="subobject (?:of type |)(.*?) is not initialized", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"1a90f5956d15",1371577911,"PR14503: Don\'t assert if a constexpr constructor temploid instantiates to a","PR14503: Don\'t assert if a constexpr constructor temploid instantiates to a\nconstructor that does not initialize all members, and that constructor is used\nto initialize a global.\n\nllvm-svn: 184211"}, | [h]={"1a90f5956d15",1371577911,"PR14503: Don\'t assert if a constexpr constructor temploid instantiates to a","PR14503: Don\'t assert if a constexpr constructor temploid instantiates to a\nconstructor that does not initialize all members, and that constructor is used\nto initialize a global.\n\nllvm-svn: 184211"}, | ||
[i]={{l,2384,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n if (!Value.hasValue()) {\n if (SubobjectDecl) {\n Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << /*(name)*/ 1 << SubobjectDecl;"},{l,2389,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n if (!Value.hasValue()) {\n if (SubobjectDecl) {\n // ...\n } else {\n Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << /*of type*/ 0 << Type;"},{ | [i]={{l,2384,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n if (!Value.hasValue()) {\n if (SubobjectDecl) {\n Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << /*(name)*/ 1 << SubobjectDecl;"},{l,2389,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n if (!Value.hasValue()) {\n if (SubobjectDecl) {\n // ...\n } else {\n Info.FFDiag(DiagLoc, diag::note_constexpr_uninitialized) << /*of type*/ 0 << Type;"},{x,386,"static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) {\n // ...\n S.FFDiag(SI, diag::note_constexpr_uninitialized) << /*(name)*/ 1 << SubObjDecl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:763:3: note: subobject \'Val\' is not initialized","clang/test/SemaCXX/cxx2a-consteval.cpp:772:8: note: subobject \'Val\' is not initialized"} | ["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:763:3: note: subobject \'Val\' is not initialized","clang/test/SemaCXX/cxx2a-consteval.cpp:772:8: note: subobject \'Val\' is not initialized"} | ||
Line 2,647: | Line 2,659: | ||
}, | }, | ||
["note_constexpr_uninitialized_base"]={ | ["note_constexpr_uninitialized_base"]={ | ||
[ | [b]="constructor of base class %0 is not called", | ||
[ | [d]=c, | ||
[ | [e]="constructor of base class (.*?) is not called", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"8c5c652ed71b",1691496625,"[clang][ExprConstant] Fix crash on uninitialized base class subobject","[clang][ExprConstant] Fix crash on uninitialized base class subobject\n\nThis patch fixes the reported regression caused by D146358 through adding notes about an uninitialized base class when we diagnose uninitialized constructor.\n\nThis also changes the wording from the old one in order to make it clear that the uninitialized subobject is a base class and its constructor is not called.\nWording changes:\nBEFORE: `subobject of type \'Base\' is not initialized`\nAFTER: `constructor of base class \'Base\' is not called`\n\nFixes https://github.com/llvm/llvm-project/issues/63496\n\nReviewed By: aaron.ballman\nDifferential Revision: https://reviews.llvm.org/D153969"}, | [h]={"8c5c652ed71b",1691496625,"[clang][ExprConstant] Fix crash on uninitialized base class subobject","[clang][ExprConstant] Fix crash on uninitialized base class subobject\n\nThis patch fixes the reported regression caused by D146358 through adding notes about an uninitialized base class when we diagnose uninitialized constructor.\n\nThis also changes the wording from the old one in order to make it clear that the uninitialized subobject is a base class and its constructor is not called.\nWording changes:\nBEFORE: `subobject of type \'Base\' is not initialized`\nAFTER: `constructor of base class \'Base\' is not called`\n\nFixes https://github.com/llvm/llvm-project/issues/63496\n\nReviewed By: aaron.ballman\nDifferential Revision: https://reviews.llvm.org/D153969"}, | ||
[i]={{l,2430,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n // ...\n if (Value.isStruct()) {\n // ...\n if (const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(RD)) {\n // ...\n for (const CXXBaseSpecifier &BS : CD->bases()) {\n // ...\n if (!BaseValue.hasValue()) {\n // ...\n Info.FFDiag(TypeBeginLoc, diag::note_constexpr_uninitialized_base) << BS.getType() << SourceRange(TypeBeginLoc, BS.getEndLoc());"}}, | [i]={{l,2430,"static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, EvalInfo &Info, SourceLocation DiagLoc, QualType Type, const APValue &Value, ConstantExprKind Kind, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) {\n // ...\n if (Value.isStruct()) {\n // ...\n if (const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(RD)) {\n // ...\n for (const CXXBaseSpecifier &BS : CD->bases()) {\n // ...\n if (!BaseValue.hasValue()) {\n // ...\n Info.FFDiag(TypeBeginLoc, diag::note_constexpr_uninitialized_base) << BS.getType() << SourceRange(TypeBeginLoc, BS.getEndLoc());"}}, | ||
Line 2,659: | Line 2,671: | ||
}, | }, | ||
["note_constexpr_union_member_change_during_init"]={ | ["note_constexpr_union_member_change_during_init"]={ | ||
[ | [b]={{nil,K,"assignment would change active union member during the initialization of a different member of the same union"}}, | ||
[ | [d]=c, | ||
[ | [e]="assignment would change active union member during the initialization of a different member of the same union", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={qd,1579695612,pd,md}, | |||
[i]={{l,5999,"struct StartLifetimeOfUnionMemberHandler {\n // ...\n bool found(APValue &Subobj, QualType SubobjType) {\n // ...\n if (declaresSameEntity(Subobj.getUnionField(), Field)) {\n // ...\n } else if (DuringInit) {\n // ...\n Info.FFDiag(LHSExpr, diag::note_constexpr_union_member_change_during_init);"}}, | [i]={{l,5999,"struct StartLifetimeOfUnionMemberHandler {\n // ...\n bool found(APValue &Subobj, QualType SubobjType) {\n // ...\n if (declaresSameEntity(Subobj.getUnionField(), Field)) {\n // ...\n } else if (DuringInit) {\n // ...\n Info.FFDiag(LHSExpr, diag::note_constexpr_union_member_change_during_init);"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:1377:9: note: assignment would change active union member during the initialization of a different member of the same union","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1388:27: note: assignment would change active union member during the initialization of a different member of the same union","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1392:28: note: assignment would change active union member during the initialization of a different member of the same union"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_unsized_array_indexed"]={ | ["note_constexpr_unsized_array_indexed"]={ | ||
[ | [b]={{nil,V,"indexing of array without known bound is not allowed in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="indexing of array without known bound is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | [h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | ||
[i]={{l,1424,"void SubobjectDesignator::diagnoseUnsizedArrayPointerArithmetic(EvalInfo &Info, const Expr *E) {\n Info.CCEDiag(E, diag::note_constexpr_unsized_array_indexed);"},{ | [i]={{l,1424,"void SubobjectDesignator::diagnoseUnsizedArrayPointerArithmetic(EvalInfo &Info, const Expr *E) {\n Info.CCEDiag(E, diag::note_constexpr_unsized_array_indexed);"},{x,143,"bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(E, diag::note_constexpr_unsized_array_indexed);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:20:27: note: indexing of array without known bound is not allowed in a constant expression"} | ["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:20:27: note: indexing of array without known bound is not allowed in a constant expression"} | ||
Line 2,683: | Line 2,695: | ||
}, | }, | ||
["note_constexpr_unsupported_destruction"]={ | ["note_constexpr_unsupported_destruction"]={ | ||
[ | [b]={{nil,n,"non-trivial destruction of type %0 in a constant expression is not supported"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-trivial destruction of type (.*?) in a constant expression is not supported", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"457226e02a6e",1569210524,"For P0784R7: add support for constexpr destructors, and call them as","For P0784R7: add support for constexpr destructors, and call them as\nappropriate during constant evaluation.\n\nNote that the evaluator is sometimes invoked on incomplete expressions.\nIn such cases, if an object is constructed but we never reach the point\nwhere it would be destroyed (and it has non-trivial destruction), we\ntreat the expression as having an unmodeled side-effect.\n\nllvm-svn: 372538"}, | [h]={"457226e02a6e",1569210524,"For P0784R7: add support for constexpr destructors, and call them as","For P0784R7: add support for constexpr destructors, and call them as\nappropriate during constant evaluation.\n\nNote that the evaluator is sometimes invoked on incomplete expressions.\nIn such cases, if an object is constructed but we never reach the point\nwhere it would be destroyed (and it has non-trivial destruction), we\ntreat the expression as having an unmodeled side-effect.\n\nllvm-svn: 372538"}, | ||
[i]={{l,6540,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (!RD) {\n if (T.isDestructedType()) {\n Info.FFDiag(CallLoc, diag::note_constexpr_unsupported_destruction) << T;"}} | [i]={{l,6540,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (!RD) {\n if (T.isDestructedType()) {\n Info.FFDiag(CallLoc, diag::note_constexpr_unsupported_destruction) << T;"}} | ||
}, | }, | ||
["note_constexpr_unsupported_flexible_array"]={ | ["note_constexpr_unsupported_flexible_array"]={ | ||
[ | [b]={{nil,O,"flexible array initialization is not yet supported"}}, | ||
[ | [d]=c, | ||
[ | [e]="flexible array initialization is not yet supported", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Zb,1643408541,bc,cc}, | |||
[i]={{l,10128,"bool RecordExprEvaluator::VisitCXXParenListOrInitListExpr(const Expr *ExprToVisit, ArrayRef<Expr *> Args) {\n // ...\n // Initialize members.\n for (const auto *Field : RD->fields()) {\n // ...\n if (Field->getType()->isIncompleteArrayType()) {\n if (auto *CAT = Info.Ctx.getAsConstantArrayType(Init->getType())) {\n if (!CAT->getSize().isZero()) {\n // ...\n Info.FFDiag(Init, diag::note_constexpr_unsupported_flexible_array);"}}, | [i]={{l,10128,"bool RecordExprEvaluator::VisitCXXParenListOrInitListExpr(const Expr *ExprToVisit, ArrayRef<Expr *> Args) {\n // ...\n // Initialize members.\n for (const auto *Field : RD->fields()) {\n // ...\n if (Field->getType()->isIncompleteArrayType()) {\n if (auto *CAT = Info.Ctx.getAsConstantArrayType(Init->getType())) {\n if (!CAT->getSize().isZero()) {\n // ...\n Info.FFDiag(Init, diag::note_constexpr_unsupported_flexible_array);"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:2419:23: note: flexible array initialization is not yet supported"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_unsupported_layout"]={ | ["note_constexpr_unsupported_layout"]={ | ||
[ | [b]={{nil,K,"type %0 has unexpected layout"}}, | ||
[ | [d]=c, | ||
[ | [e]="type (.*?) has unexpected layout", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={qd,1579695612,pd,md}, | |||
[i]={{l,4060,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // Allow reading from a GUID declaration.\n if (auto *GD = dyn_cast<MSGuidDecl>(D)) {\n // ...\n if (V.isAbsent()) {\n Info.FFDiag(E, diag::note_constexpr_unsupported_layout) << GD->getType();"},{l,10239,"bool RecordExprEvaluator::VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E) {\n // ...\n auto InvalidType = [&] {\n Info.FFDiag(E, diag::note_constexpr_unsupported_layout) << E->getType();"}}, | [i]={{l,4060,"/// Find the complete object to which an LValue refers.\nstatic CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E, AccessKinds AK, const LValue &LVal, QualType LValType) {\n // ...\n if (Info.getLangOpts().CPlusPlus14 && LVal.Base == Info.EvaluatingDecl && lifetimeStartedInEvaluation(Info, LVal.Base)) {\n // ...\n } else if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl *>()) {\n // Allow reading from a GUID declaration.\n if (auto *GD = dyn_cast<MSGuidDecl>(D)) {\n // ...\n if (V.isAbsent()) {\n Info.FFDiag(E, diag::note_constexpr_unsupported_layout) << GD->getType();"},{l,10239,"bool RecordExprEvaluator::VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E) {\n // ...\n auto InvalidType = [&] {\n Info.FFDiag(E, diag::note_constexpr_unsupported_layout) << E->getType();"}}, | ||
[j]={ | [j]={ | ||
Line 2,716: | Line 2,728: | ||
}, | }, | ||
["note_constexpr_unsupported_temporary_nontrivial_dtor"]={ | ["note_constexpr_unsupported_temporary_nontrivial_dtor"]={ | ||
[ | [b]={{nil,I,"non-trivial destruction of lifetime-extended temporary with type %0 used in the result of a constant expression is not yet supported"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-trivial destruction of lifetime\\-extended temporary with type (.*?) used in the result of a constant expression is not yet supported", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS","[clang] Enable support for #pragma STDC FENV_ACCESS\n\nReviewers: rjmccall, rsmith, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D87528"}, | [h]={"2e204e23911b",1601401476,"[clang] Enable support for #pragma STDC FENV_ACCESS","[clang] Enable support for #pragma STDC FENV_ACCESS\n\nReviewers: rjmccall, rsmith, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D87528"}, | ||
[i]={{l,2288,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (BaseVD) {\n // ...\n } else if (const auto *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(BaseE)) {\n if (CheckedTemps.insert(MTE).second) {\n // ...\n if (TempType.isDestructedType()) {\n Info.FFDiag(MTE->getExprLoc(), diag::note_constexpr_unsupported_temporary_nontrivial_dtor) << TempType;"}}, | [i]={{l,2288,"/// Check that this reference or pointer core constant expression is a valid\n/// value for an address or reference constant expression. Return true if we\n/// can fold this expression, whether or not it\'s a constant expression.\nstatic bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc, QualType Type, const LValue &LVal, ConstantExprKind Kind, CheckedTemporaries &CheckedTemps) {\n // ...\n if (BaseVD) {\n // ...\n } else if (const auto *MTE = dyn_cast_or_null<MaterializeTemporaryExpr>(BaseE)) {\n if (CheckedTemps.insert(MTE).second) {\n // ...\n if (TempType.isDestructedType()) {\n Info.FFDiag(MTE->getExprLoc(), diag::note_constexpr_unsupported_temporary_nontrivial_dtor) << TempType;"}}, | ||
[j]={ | [j]={ | ||
[ | [db]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:1294:21: note: non-trivial destruction of lifetime-extended temporary with type \'A\' used in the result of a constant expression is not yet supported","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1297:21: note: non-trivial destruction of lifetime-extended temporary with type \'A\' used in the result of a constant expression is not yet supported","clang/test/SemaCXX/constant-expression-cxx2a.cpp:1300:26: note: non-trivial destruction of lifetime-extended temporary with type \'const A\' used in the result of a constant expression is not yet supported"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_unsupported_unsized_array"]={ | ["note_constexpr_unsupported_unsized_array"]={ | ||
[ | [b]={{nil,V,"array-to-pointer decay of array member without known bound is not supported"}}, | ||
[ | [d]=c, | ||
[ | [e]="array\\-to\\-pointer decay of array member without known bound is not supported", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | [h]={"2cd56048239f",1503971533,"Improve constant expression evaluation of arrays of unknown bound.","Improve constant expression evaluation of arrays of unknown bound.\n\nThe standard is not clear on how these are supposed to be handled, so we\nconservatively treat as non-constant any cases whose value is unknown or whose\nevaluation might result in undefined behavior.\n\nllvm-svn: 311970"}, | ||
[i]={{l,1672,"#endif\n // ...\n void addUnsizedArray(EvalInfo &Info, const Expr *E, QualType ElemTy) {\n if (!Designator.Entries.empty()) {\n Info.CCEDiag(E, diag::note_constexpr_unsupported_unsized_array);"}}, | [i]={{l,1672,"#endif\n // ...\n void addUnsizedArray(EvalInfo &Info, const Expr *E, QualType ElemTy) {\n if (!Designator.Entries.empty()) {\n Info.CCEDiag(E, diag::note_constexpr_unsupported_unsized_array);"}}, | ||
Line 2,740: | Line 2,752: | ||
}, | }, | ||
["note_constexpr_use_uninit_reference"]={ | ["note_constexpr_use_uninit_reference"]={ | ||
[ | [b]="use of reference outside its lifetime is not allowed in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="use of reference outside its lifetime is not allowed in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"08d6a2cc7a58",1374649917,"C++1y: track object lifetime during constexpr evaluation, and don\'t allow","C++1y: track object lifetime during constexpr evaluation, and don\'t allow\nobjects to be used once their lifetimes end. This completes the C++1y\nconstexpr extensions.\n\nllvm-svn: 187025"}, | [h]={"08d6a2cc7a58",1374649917,"C++1y: track object lifetime during constexpr evaluation, and don\'t allow","C++1y: track object lifetime during constexpr evaluation, and don\'t allow\nobjects to be used once their lifetimes end. This completes the C++1y\nconstexpr extensions.\n\nllvm-svn: 187025"}, | ||
[i]={{l,8379,"bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {\n // ...\n if (!V->hasValue()) {\n // FIXME: Is it possible for V to be indeterminate here? If so, we should\n // adjust the diagnostic to say that.\n if (!Info.checkingPotentialConstantExpression())\n Info.FFDiag(E, diag::note_constexpr_use_uninit_reference);"}}, | [i]={{l,8379,"bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {\n // ...\n if (!V->hasValue()) {\n // FIXME: Is it possible for V to be indeterminate here? If so, we should\n // adjust the diagnostic to say that.\n if (!Info.checkingPotentialConstantExpression())\n Info.FFDiag(E, diag::note_constexpr_use_uninit_reference);"}}, | ||
[j]={ | [j]={ | ||
[ | [hc]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:1964:24: note: use of reference outside its lifetime is not allowed in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_var_init_non_constant"]={ | ["note_constexpr_var_init_non_constant"]={ | ||
[ | [b]="initializer of %0 is not a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="initializer of (.*?) is not a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"d0b4dd656d11",1324275561,"constexpr handling improvements. Produce detailed diagnostics when a \'constexpr\'","constexpr handling improvements. Produce detailed diagnostics when a \'constexpr\'\nvariable is initialized by a non-constant expression, and pass in the variable\nbeing declared so that earlier-initialized fields\' values can be used.\n\nRearrange VarDecl init evaluation to make this possible, and in so doing fix a\nlong-standing issue in our C++ constant expression handling, where we would\nmishandle cases like:\n\n extern const int a;\n const int n = a;\n const int a = 5;\n int arr[n];\n\nHere, n is not initialized by a constant expression, so can\'t be used in an ICE,\neven though the initialization expression would be an ICE if it appeared later\nin the TU. This requires computing whether the initializer is an ICE eagerly,\nand saving that information in PCH files.\n\nllvm-svn: 146856"}, | [h]={"d0b4dd656d11",1324275561,"constexpr handling improvements. Produce detailed diagnostics when a \'constexpr\'","constexpr handling improvements. Produce detailed diagnostics when a \'constexpr\'\nvariable is initialized by a non-constant expression, and pass in the variable\nbeing declared so that earlier-initialized fields\' values can be used.\n\nRearrange VarDecl init evaluation to make this possible, and in so doing fix a\nlong-standing issue in our C++ constant expression handling, where we would\nmishandle cases like:\n\n extern const int a;\n const int n = a;\n const int a = 5;\n int arr[n];\n\nHere, n is not initialized by a constant expression, so can\'t be used in an ICE,\neven though the initialization expression would be an ICE if it appeared later\nin the TU. This requires computing whether the initializer is an ICE eagerly,\nand saving that information in PCH files.\n\nllvm-svn: 146856"}, | ||
[i]={{l,3368,"/// 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 // Check that we can fold the initializer. In C++, we will have already done\n // this in the cases where it matters for conformance.\n if (!VD->evaluateValue()) {\n Info.FFDiag(E, diag::note_constexpr_var_init_non_constant, 1) << VD;"},{l,3386,"/// 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 // Check that the variable is actually usable in constant expressions. For a\n // const integral variable or a reference, we might have a non-constant\n // initializer that we can nonetheless evaluate the initializer for. Such\n // variables are not usable in constant expressions. In C++98, the\n // initializer also syntactically needs to be an ICE.\n //\n // FIXME: We don\'t diagnose cases that aren\'t potentially usable in constant\n // expressions here; doing so would regress diagnostics for things like\n // reading from a volatile constexpr variable.\n if ((Info.getLangOpts().CPlusPlus && !VD->hasConstantInitialization() && VD->mightBeUsableInConstantExpressions(Info.Ctx)) || ((Info.getLangOpts().CPlusPlus || Info.getLangOpts().OpenCL) && !Info.getLangOpts().CPlusPlus11 && !VD->hasICEInitializer(Info.Ctx))) {\n Info.CCEDiag(E, diag::note_constexpr_var_init_non_constant, 1) << VD;"}}, | [i]={{l,3368,"/// 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 // Check that we can fold the initializer. In C++, we will have already done\n // this in the cases where it matters for conformance.\n if (!VD->evaluateValue()) {\n Info.FFDiag(E, diag::note_constexpr_var_init_non_constant, 1) << VD;"},{l,3386,"/// 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 // Check that the variable is actually usable in constant expressions. For a\n // const integral variable or a reference, we might have a non-constant\n // initializer that we can nonetheless evaluate the initializer for. Such\n // variables are not usable in constant expressions. In C++98, the\n // initializer also syntactically needs to be an ICE.\n //\n // FIXME: We don\'t diagnose cases that aren\'t potentially usable in constant\n // expressions here; doing so would regress diagnostics for things like\n // reading from a volatile constexpr variable.\n if ((Info.getLangOpts().CPlusPlus && !VD->hasConstantInitialization() && VD->mightBeUsableInConstantExpressions(Info.Ctx)) || ((Info.getLangOpts().CPlusPlus || Info.getLangOpts().OpenCL) && !Info.getLangOpts().CPlusPlus11 && !VD->hasICEInitializer(Info.Ctx))) {\n Info.CCEDiag(E, diag::note_constexpr_var_init_non_constant, 1) << VD;"}}, | ||
Line 2,764: | Line 2,776: | ||
}, | }, | ||
["note_constexpr_var_init_unknown"]={ | ["note_constexpr_var_init_unknown"]={ | ||
[ | [b]={{nil,K,"initializer of %0 is unknown"}}, | ||
[ | [d]=c, | ||
[ | [e]="initializer of (.*?) is unknown", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | [h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | ||
[i]={{l,3341,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (!Init) {\n // Don\'t diagnose during potential constant expression checking; an\n // initializer might be added later.\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, diag::note_constexpr_var_init_unknown, 1) << VD;"}}, | [i]={{l,3341,"/// Try to evaluate the initializer for a variable declaration.\n///\n/// \\param Info Information about the ongoing evaluation.\n/// \\param E An expression to be used when printing diagnostics.\n/// \\param VD The variable whose initializer should be obtained.\n/// \\param Version The version of the variable within the frame.\n/// \\param Frame The frame in which the variable was created. Must be null\n/// if this variable is not local to the evaluation.\n/// \\param Result Filled in with a pointer to the value of the variable.\nstatic bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) {\n // ...\n if (!Init) {\n // Don\'t diagnose during potential constant expression checking; an\n // initializer might be added later.\n if (!Info.checkingPotentialConstantExpression()) {\n Info.FFDiag(E, diag::note_constexpr_var_init_unknown, 1) << VD;"}}, | ||
Line 2,776: | Line 2,788: | ||
}, | }, | ||
["note_constexpr_var_init_weak"]={ | ["note_constexpr_var_init_weak"]={ | ||
[ | [b]={{nil,K,"initializer of weak variable %0 is not considered constant because it may be different at runtime"}}, | ||
[ | [d]=c, | ||
[ | [e]="initializer of weak variable (.*?) is not considered constant because it may be different at runtime", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | [h]={"00068c452a59",1594250761,"Improve diagnostics for constant evaluation that fails because a","Improve diagnostics for constant evaluation that fails because a\nvariable\'s initializer is not known.\n\nThe hope is that a better diagnostic for this case will reduce the rate\nat which duplicates of non-bug PR41093 are reported."}, | ||
[i]={{l,3393,"/// 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 // Never use the initializer of a weak variable, not even for constant\n // folding. We can\'t be sure that this is the definition that will be used.\n if (VD->isWeak()) {\n Info.FFDiag(E, diag::note_constexpr_var_init_weak) << VD;"}}, | [i]={{l,3393,"/// 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 // Never use the initializer of a weak variable, not even for constant\n // folding. We can\'t be sure that this is the definition that will be used.\n if (VD->isWeak()) {\n Info.FFDiag(E, diag::note_constexpr_var_init_weak) << VD;"}}, | ||
Line 2,788: | Line 2,800: | ||
}, | }, | ||
["note_constexpr_virtual_base"]={ | ["note_constexpr_virtual_base"]={ | ||
[ | [b]="cannot construct object of type %0 with virtual base class in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="cannot construct object of type (.*?) with virtual base class in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"3607ffee5cca",1329105243,"Update constexpr implementation to match CWG\'s chosen approach for core issues","Update constexpr implementation to match CWG\'s chosen approach for core issues\n1358, 1360, 1452 and 1453.\n - Instantiations of constexpr functions are always constexpr. This removes the\n need for separate declaration/definition checking, which is now gone.\n - This makes it possible for a constexpr function to be virtual, if they are\n only dependently virtual. Virtual calls to such functions are not constant\n expressions.\n - Likewise, it\'s now possible for a literal type to have virtual base classes.\n A constexpr constructor for such a type cannot actually produce a constant\n expression, though, so add a special-case diagnostic for a constructor call\n to such a type rather than trying to evaluate it.\n - Classes with trivial default constructors (for which value initialization can\n produce a fully-initialized value) are considered literal types.\n - Classes with volatile members are not literal types.\n - constexpr constructors can be members of non-literal types. We do not yet use\n static initialization for global objects constructed in this way.\n\nllvm-svn: 150359"}, | [h]={"3607ffee5cca",1329105243,"Update constexpr implementation to match CWG\'s chosen approach for core issues","Update constexpr implementation to match CWG\'s chosen approach for core issues\n1358, 1360, 1452 and 1453.\n - Instantiations of constexpr functions are always constexpr. This removes the\n need for separate declaration/definition checking, which is now gone.\n - This makes it possible for a constexpr function to be virtual, if they are\n only dependently virtual. Virtual calls to such functions are not constant\n expressions.\n - Likewise, it\'s now possible for a literal type to have virtual base classes.\n A constexpr constructor for such a type cannot actually produce a constant\n expression, though, so add a special-case diagnostic for a constructor call\n to such a type rather than trying to evaluate it.\n - Classes with trivial default constructors (for which value initialization can\n produce a fully-initialized value) are considered literal types.\n - Classes with volatile members are not literal types.\n - constexpr constructors can be members of non-literal types. We do not yet use\n static initialization for global objects constructed in this way.\n\nllvm-svn: 150359"}, | ||
[i]={{l,6274,"/// Evaluate a constructor call.\nstatic bool HandleConstructorCall(const Expr *E, const LValue &This, CallRef Call, const CXXConstructorDecl *Definition, EvalInfo &Info, APValue &Result) {\n // ...\n if (RD->getNumVBases()) {\n Info.FFDiag(CallLoc, diag::note_constexpr_virtual_base) << RD;"},{l,6549,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (RD->getNumVBases()) {\n Info.FFDiag(CallLoc, diag::note_constexpr_virtual_base) << RD;"},{l,9974,"bool RecordExprEvaluator::ZeroInitialization(const Expr *E, QualType T) {\n // ...\n if (isa<CXXRecordDecl>(RD) && cast<CXXRecordDecl>(RD)->getNumVBases()) {\n Info.FFDiag(E, diag::note_constexpr_virtual_base) << RD;"}}, | [i]={{l,6274,"/// Evaluate a constructor call.\nstatic bool HandleConstructorCall(const Expr *E, const LValue &This, CallRef Call, const CXXConstructorDecl *Definition, EvalInfo &Info, APValue &Result) {\n // ...\n if (RD->getNumVBases()) {\n Info.FFDiag(CallLoc, diag::note_constexpr_virtual_base) << RD;"},{l,6549,"static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc, const LValue &This, APValue &Value, QualType T) {\n // ...\n if (RD->getNumVBases()) {\n Info.FFDiag(CallLoc, diag::note_constexpr_virtual_base) << RD;"},{l,9974,"bool RecordExprEvaluator::ZeroInitialization(const Expr *E, QualType T) {\n // ...\n if (isa<CXXRecordDecl>(RD) && cast<CXXRecordDecl>(RD)->getNumVBases()) {\n Info.FFDiag(E, diag::note_constexpr_virtual_base) << RD;"}}, | ||
[j]={ | [j]={ | ||
[ | [Rc]={"clang/test/CXX/basic/basic.types/p10.cpp:102:25: note: cannot construct object of type \'DerivedFromVBase<HasVBase>\' with virtual base class in a constant expression"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_virtual_base_here"]={ | ["note_constexpr_virtual_base_here"]={ | ||
[ | [b]="virtual base class declared here", | ||
[ | [d]=c, | ||
[ | [e]="virtual base class declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{m,1793,"// 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 (MD && MD->isInstance()) {\n // ...\n if (RD->getNumVBases()) {\n // ...\n for (const auto &I : RD->vbases())\n Diag(I.getBeginLoc(), diag::note_constexpr_virtual_base_here) << I.getSourceRange();"},{ | [i]={{m,1793,"// 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 (MD && MD->isInstance()) {\n // ...\n if (RD->getNumVBases()) {\n // ...\n for (const auto &I : RD->vbases())\n Diag(I.getBeginLoc(), diag::note_constexpr_virtual_base_here) << I.getSourceRange();"},{H,9342,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n for (const auto &I : RD->vbases())\n Diag(I.getBeginLoc(), diag::note_constexpr_virtual_base_here) << I.getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.ctor/p6-0x.cpp"]={"clang/test/CXX/special/class.ctor/p6-0x.cpp:24:24: note: virtual base class declared here"} | ["clang/test/CXX/special/class.ctor/p6-0x.cpp"]={"clang/test/CXX/special/class.ctor/p6-0x.cpp:24:24: note: virtual base class declared here"} | ||
Line 2,812: | Line 2,824: | ||
}, | }, | ||
["note_constexpr_virtual_call"]={ | ["note_constexpr_virtual_call"]={ | ||
[ | [b]={{nil,n,"cannot evaluate call to virtual function in a constant expression in C++ standards before C++20"},{r,r,"cannot evaluate call to virtual function in a constant expression in C++ standards before C++2a"},{z,nil,"cannot evaluate virtual function call in a constant expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="cannot evaluate call to virtual function in a constant expression in C\\+\\+ standards before C\\+\\+20", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"3607ffee5cca",1329105243,"Update constexpr implementation to match CWG\'s chosen approach for core issues","Update constexpr implementation to match CWG\'s chosen approach for core issues\n1358, 1360, 1452 and 1453.\n - Instantiations of constexpr functions are always constexpr. This removes the\n need for separate declaration/definition checking, which is now gone.\n - This makes it possible for a constexpr function to be virtual, if they are\n only dependently virtual. Virtual calls to such functions are not constant\n expressions.\n - Likewise, it\'s now possible for a literal type to have virtual base classes.\n A constexpr constructor for such a type cannot actually produce a constant\n expression, though, so add a special-case diagnostic for a constructor call\n to such a type rather than trying to evaluate it.\n - Classes with trivial default constructors (for which value initialization can\n produce a fully-initialized value) are considered literal types.\n - Classes with volatile members are not literal types.\n - constexpr constructors can be members of non-literal types. We do not yet use\n static initialization for global objects constructed in this way.\n\nllvm-svn: 150359"}, | [h]={"3607ffee5cca",1329105243,"Update constexpr implementation to match CWG\'s chosen approach for core issues","Update constexpr implementation to match CWG\'s chosen approach for core issues\n1358, 1360, 1452 and 1453.\n - Instantiations of constexpr functions are always constexpr. This removes the\n need for separate declaration/definition checking, which is now gone.\n - This makes it possible for a constexpr function to be virtual, if they are\n only dependently virtual. Virtual calls to such functions are not constant\n expressions.\n - Likewise, it\'s now possible for a literal type to have virtual base classes.\n A constexpr constructor for such a type cannot actually produce a constant\n expression, though, so add a special-case diagnostic for a constructor call\n to such a type rather than trying to evaluate it.\n - Classes with trivial default constructors (for which value initialization can\n produce a fully-initialized value) are considered literal types.\n - Classes with volatile members are not literal types.\n - constexpr constructors can be members of non-literal types. We do not yet use\n static initialization for global objects constructed in this way.\n\nllvm-svn: 150359"}, | ||
[i]={{l,5592,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n // DR1872: An instantiated virtual constexpr function can\'t be called in a\n // constant expression (prior to C++20). We can still constant-fold such a\n // call.\n if (!Info.Ctx.getLangOpts().CPlusPlus20 && isa<CXXMethodDecl>(Declaration) && cast<CXXMethodDecl>(Declaration)->isVirtual())\n Info.CCEDiag(CallLoc, diag::note_constexpr_virtual_call);"},{ | [i]={{l,5592,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n // DR1872: An instantiated virtual constexpr function can\'t be called in a\n // constant expression (prior to C++20). We can still constant-fold such a\n // call.\n if (!Info.Ctx.getLangOpts().CPlusPlus20 && isa<CXXMethodDecl>(Declaration) && cast<CXXMethodDecl>(Declaration)->isVirtual())\n Info.CCEDiag(CallLoc, diag::note_constexpr_virtual_call);"},{x,303,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n if (F->isVirtual() && !S.getLangOpts().CPlusPlus20) {\n // ...\n S.CCEDiag(Loc, diag::note_constexpr_virtual_call);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp:30:57: note: cannot evaluate call to virtual function in a constant expression in C++ standards before C++20","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp:32:94: note: cannot evaluate call to virtual function in a constant expression in C++ standards before C++20"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp:30:57: note: cannot evaluate call to virtual function in a constant expression in C++ standards before C++20","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp:32:94: note: cannot evaluate call to virtual function in a constant expression in C++ standards before C++20"} | ||
Line 2,824: | Line 2,836: | ||
}, | }, | ||
["note_constexpr_void_comparison"]={ | ["note_constexpr_void_comparison"]={ | ||
[ | [b]="comparison between unequal pointers to void has unspecified result", | ||
[ | [d]=c, | ||
[ | [e]="comparison between unequal pointers to void has unspecified result", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"de21b245c664",1327992090,"constexpr: the result of a relational operator between pointers to void is","constexpr: the result of a relational operator between pointers to void is\nunspecified unless the pointers are equal; therefore, such a comparison is not\na constant expression unless the pointers are equal.\n\nllvm-svn: 149366"}, | [h]={"de21b245c664",1327992090,"constexpr: the result of a relational operator between pointers to void is","constexpr: the result of a relational operator between pointers to void is\nunspecified unless the pointers are equal; therefore, such a comparison is not\na constant expression unless the pointers are equal.\n\nllvm-svn: 149366"}, | ||
[i]={{l,13135,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p3:\n // Pointers to void (after pointer conversions) can be compared, with a\n // result defined as follows: If both pointers represent the same\n // address or are both the null pointer value, the result is true if the\n // operator is <= or >= and false otherwise; otherwise the result is\n // unspecified.\n // We interpret this as applying to pointers to *cv* void.\n if (LHSTy->isVoidPointerType() && LHSOffset != RHSOffset && IsRelational)\n Info.CCEDiag(E, diag::note_constexpr_void_comparison);"}}, | [i]={{l,13135,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n if (LHSTy->isPointerType() && RHSTy->isPointerType()) {\n // ...\n // C++11 [expr.rel]p3:\n // Pointers to void (after pointer conversions) can be compared, with a\n // result defined as follows: If both pointers represent the same\n // address or are both the null pointer value, the result is true if the\n // operator is <= or >= and false otherwise; otherwise the result is\n // unspecified.\n // We interpret this as applying to pointers to *cv* void.\n if (LHSTy->isVoidPointerType() && LHSOffset != RHSOffset && IsRelational)\n Info.CCEDiag(E, diag::note_constexpr_void_comparison);"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:582:26: note: comparison between unequal pointers to void has unspecified result","clang/test/CXX/expr/expr.const/p2-0x.cpp:585:26: note: comparison between unequal pointers to void has unspecified result"} | ||
} | } | ||
}, | }, | ||
["note_constexpr_volatile_here"]={ | ["note_constexpr_volatile_here"]={ | ||
[ | [b]={{nil,r,"volatile %select{temporary created|object declared|member declared}0 here"}}, | ||
[ | [d]=c, | ||
[ | [e]="volatile (?:temporary created|object declared|member declared) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"c0fe5eb39c85",1557518732,"Fix handling of objects under construction during constant expression","Fix handling of objects under construction during constant expression\nevaluation.\n\nIt\'s not enough to just track the LValueBase that we\'re evaluating, we\nneed to also track the path to the objects whose constructors are\nrunning.\n\nllvm-svn: 360464"}, | [h]={"c0fe5eb39c85",1557518732,"Fix handling of objects under construction during constant expression","Fix handling of objects under construction during constant expression\nevaluation.\n\nIt\'s not enough to just track the LValueBase that we\'re evaluating, we\nneed to also track the path to the objects whose constructors are\nrunning.\n\nllvm-svn: 360464"}, | ||
[i]={{l,3721,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n Info.Note(Loc, diag::note_constexpr_volatile_here) << DiagKind;"}}, | [i]={{l,3721,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n Info.Note(Loc, diag::note_constexpr_volatile_here) << DiagKind;"}}, | ||
[j]={ | [j]={ | ||
[ | [bb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:324:22: note: volatile object declared here","clang/test/CXX/expr/expr.const/p2-0x.cpp:324:22: note: volatile object declared here","clang/test/CXX/expr/expr.const/p2-0x.cpp:346:24: note: volatile object declared here"} | ||
} | } | ||
}, | }, | ||
["note_constinit_missing_here"]={ | ["note_constinit_missing_here"]={ | ||
[ | [b]={{nil,n,"add the %select{\'require_constant_initialization\' attribute|\'constinit\' specifier}0 to the initializing declaration here"}}, | ||
[ | [d]=c, | ||
[ | [e]="add the (?:\'require_constant_initialization\' attribute|\'constinit\' specifier) to the initializing declaration here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{ | [i]={{q,3175,"static void diagnoseMissingConstinit(Sema &S, const VarDecl *InitDecl, const ConstInitAttr *CIAttr, bool AttrBeforeInit) {\n // ...\n if (AttrBeforeInit) {\n // ...\n } else {\n // ...\n S.Diag(InitDecl->getLocation(), diag::note_constinit_missing_here) << CIAttr->isConstinit() << FixItHint::CreateInsertion(InsertLoc, SuitableSpelling);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:14:7: note: add the \'constinit\' specifier to the initializing declaration here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:35:24: note: add the \'constinit\' specifier to the initializing declaration here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:36:20: note: add the \'constinit\' specifier to the initializing declaration here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:37:20: note: add the \'constinit\' specifier to the initializing declaration here"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:14:7: note: add the \'constinit\' specifier to the initializing declaration here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:35:24: note: add the \'constinit\' specifier to the initializing declaration here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:36:20: note: add the \'constinit\' specifier to the initializing declaration here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp:37:20: note: add the \'constinit\' specifier to the initializing declaration here"} | ||
Line 2,860: | Line 2,872: | ||
}, | }, | ||
["note_constinit_specified_here"]={ | ["note_constinit_specified_here"]={ | ||
[ | [b]={{nil,n,"variable declared constinit here"}}, | ||
[ | [d]=c, | ||
[ | [e]="variable declared constinit here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{ | [i]={{q,3167,"static void diagnoseMissingConstinit(Sema &S, const VarDecl *InitDecl, const ConstInitAttr *CIAttr, bool AttrBeforeInit) {\n // ...\n if (AttrBeforeInit) {\n // ...\n S.Diag(CIAttr->getLocation(), diag::note_constinit_specified_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp:7:8: note: variable declared constinit here"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p2.cpp:7:8: note: variable declared constinit here"} | ||
Line 2,872: | Line 2,884: | ||
}, | }, | ||
["note_constraint_normalization_here"]={ | ["note_constraint_normalization_here"]={ | ||
[ | [b]={{nil,n,"while calculating associated constraint of template \'%0\' here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while calculating associated constraint of template \'(.*?)\' here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | [h]={"349636d2bfc3",1575555459,"Implement VectorType conditional operator GNU extension.","Implement VectorType conditional operator GNU extension.\n\nGCC supports the conditional operator on VectorTypes that acts as a\n\'select\' in C++ mode. This patch implements the support. Types are\nconverted as closely to GCC\'s behavior as possible, though in a few\nplaces consistency with our existing vector type support was preferred.\n\nNote that this implementation is different from the OpenCL version in a\nnumber of ways, so it unfortunately required a different implementation.\n\nFirst, the SEMA rules and promotion rules are significantly different.\n\nSecondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in\nthe range 0- VectorSize, for each element). In OpenCL, the condition is\nCOND[i] < 0 ? LHS[i]: RHS[i].\n\nIn the process of implementing this, it was also required to make the\nexpression COND ? LHS : RHS type dependent if COND is type dependent,\nsince the type is now dependent on the condition. For example:\n\n T ? 1 : 2;\n\nIs not typically type dependent, since the result can be deduced from\nthe operands. HOWEVER, if T is a VectorType now, it could change this\nto a \'select\' (basically a swizzle with a non-constant mask) with the 1\nand 2 being promoted to vectors themselves.\n\nWhile this is a change, it is NOT a standards incompatible change. Based\non my (and D. Gregor\'s, at the time of writing the code) reading of the\nstandard, the expression is supposed to be type dependent if ANY\nsub-expression is type dependent.\n\nDifferential Revision: https://reviews.llvm.org/D71463"}, | ||
[i]={{ | [i]={{E,1059,"/// 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::ConstraintNormalization:\n Diags.Report(Active->PointOfInstantiation, diag::note_constraint_normalization_here) << cast<NamedDecl>(Active->Entity)->getName() << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp:16:31: note: while calculating associated constraint of template \'S2\' here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp:16:31: note: while calculating associated constraint of template \'S2\' here"} | ||
Line 2,884: | Line 2,896: | ||
}, | }, | ||
["note_constraint_references_error"]={ | ["note_constraint_references_error"]={ | ||
[ | [b]={{nil,F,"constraint depends on a previously diagnosed expression"}}, | ||
[ | [d]=c, | ||
[ | [e]="constraint depends on a previously diagnosed expression", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{ | [i]={{eb,250,"template <typename AtomicEvaluator> static ExprResult calculateConstraintSatisfaction(Sema &S, const Expr *ConstraintExpr, ConstraintSatisfaction &Satisfaction, AtomicEvaluator &&Evaluator) {\n // ...\n // We don\'t have the ability to evaluate this, since it contains a\n // RecoveryExpr, so we want to fail overload resolution. Otherwise,\n // we\'d potentially pick up a different overload, and cause confusing\n // diagnostics. SO, add a failure detail that will cause us to make this\n // overload set not viable.\n if (SubstitutedAtomicExpr.get()->containsErrors()) {\n // ...\n PartialDiagnostic Msg = S.PDiag(diag::note_constraint_references_error);"}} | ||
}, | }, | ||
["note_constraint_substitution_here"]={ | ["note_constraint_substitution_here"]={ | ||
[ | [b]={{nil,n,"while substituting template arguments into constraint expression here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while substituting template arguments into constraint expression here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{ | [i]={{E,1054,"/// 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::ConstraintSubstitution:\n Diags.Report(Active->PointOfInstantiation, diag::note_constraint_substitution_here) << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:22:33: note: while substituting template arguments into constraint expression here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:71:33: note: while substituting template arguments into constraint expression here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:22:33: note: while substituting template arguments into constraint expression here","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:71:33: note: while substituting template arguments into constraint expression here"} | ||
Line 2,905: | Line 2,917: | ||
}, | }, | ||
["note_conv_function_declared_at"]={ | ["note_conv_function_declared_at"]={ | ||
[ | [b]="type conversion function declared here", | ||
[ | [d]=c, | ||
[ | [e]="type conversion function declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"01d96986d843",1480719628,"More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.","More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.\nIn passing, add a warning group for \"ignored qualifier in inline assembly\" warnings.\n\nllvm-svn: 288548"}, | [h]={"01d96986d843",1480719628,"More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.","More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.\nIn passing, add a warning group for \"ignored qualifier in inline assembly\" warnings.\n\nllvm-svn: 288548"}, | ||
[i]={{"clang/lib/Sema/SemaPseudoObject.cpp",1117,"/// CheckSubscriptingKind - This routine decide what type\n/// of indexing represented by \"FromE\" is being done.\nSema::ObjCSubscriptKind Sema::CheckSubscriptingKind(Expr *FromE) {\n // ...\n for (unsigned int i = 0; i < ConversionDecls.size(); i++)\n Diag(ConversionDecls[i]->getLocation(), diag::note_conv_function_declared_at);"}}, | [i]={{"clang/lib/Sema/SemaPseudoObject.cpp",1117,"/// CheckSubscriptingKind - This routine decide what type\n/// of indexing represented by \"FromE\" is being done.\nSema::ObjCSubscriptKind Sema::CheckSubscriptingKind(Expr *FromE) {\n // ...\n for (unsigned int i = 0; i < ConversionDecls.size(); i++)\n Diag(ConversionDecls[i]->getLocation(), diag::note_conv_function_declared_at);"}}, | ||
Line 2,917: | Line 2,929: | ||
}, | }, | ||
["note_convert_inline_to_static"]={ | ["note_convert_inline_to_static"]={ | ||
[ | [b]="use \'static\' to give inline function %0 internal linkage", | ||
[ | [d]=c, | ||
[ | [e]="use \'static\' to give inline function (.*?) internal linkage", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2684c68ddc2f",1339784388,"Warn when a static variable is referenced in a non-static inline function.","Warn when a static variable is referenced in a non-static inline function.\n\nThis is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++,\nprobably because by default file-scope const/constexpr variables have internal\nlinkage, while functions have external linkage. There\'s also the issue of\nanonymous namespaces to consider. Nevertheless, there should probably be a\nsimilar warning, since the semantics of inlining a function that references\na variable with internal linkage do not seem well-defined.\n\n<rdar://problem/11577619>\n\nllvm-svn: 158531"}, | [h]={"2684c68ddc2f",1339784388,"Warn when a static variable is referenced in a non-static inline function.","Warn when a static variable is referenced in a non-static inline function.\n\nThis is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++,\nprobably because by default file-scope const/constexpr variables have internal\nlinkage, while functions have external linkage. There\'s also the issue of\nanonymous namespaces to consider. Nevertheless, there should probably be a\nsimilar warning, since the semantics of inlining a function that references\na variable with internal linkage do not seem well-defined.\n\n<rdar://problem/11577619>\n\nllvm-svn: 158531"}, | ||
[i]={{ | [i]={{o,207,"void Sema::MaybeSuggestAddingStaticToDecl(const FunctionDecl *Cur) {\n // ...\n // Suggest \"static\" on the function, if possible.\n if (!hasAnyExplicitStorageClass(First)) {\n // ...\n Diag(DeclBegin, diag::note_convert_inline_to_static) << Cur << FixItHint::CreateInsertion(DeclBegin, \"static \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:13:1: note: use \'static\' to give inline function \'useStatic\' internal linkage","clang/test/Sema/inline.c:13:1: note: use \'static\' to give inline function \'useStatic\' internal linkage","clang/test/Sema/inline.c:13:1: note: use \'static\' to give inline function \'useStatic\' internal linkage","clang/test/Sema/inline.c:69:1: note: use \'static\' to give inline function \'useStaticAgain\' internal linkage","clang/test/Sema/inline.c:69:1: note: use \'static\' to give inline function \'useStaticAgain\' internal linkage","clang/test/Sema/inline.c:76:1: note: use \'static\' to give inline function \'defineStaticVar\' internal linkage","XXX.h:1:1: note: use \'static\' to give inline function \'useStaticMainFileInLineMarker\' internal linkage","XXX.h:1:1: note: use \'static\' to give inline function \'useStaticMainFileInLineMarker\' internal linkage"} | ["clang/test/Sema/inline.c"]={"clang/test/Sema/inline.c:13:1: note: use \'static\' to give inline function \'useStatic\' internal linkage","clang/test/Sema/inline.c:13:1: note: use \'static\' to give inline function \'useStatic\' internal linkage","clang/test/Sema/inline.c:13:1: note: use \'static\' to give inline function \'useStatic\' internal linkage","clang/test/Sema/inline.c:69:1: note: use \'static\' to give inline function \'useStaticAgain\' internal linkage","clang/test/Sema/inline.c:69:1: note: use \'static\' to give inline function \'useStaticAgain\' internal linkage","clang/test/Sema/inline.c:76:1: note: use \'static\' to give inline function \'defineStaticVar\' internal linkage","XXX.h:1:1: note: use \'static\' to give inline function \'useStaticMainFileInLineMarker\' internal linkage","XXX.h:1:1: note: use \'static\' to give inline function \'useStaticMainFileInLineMarker\' internal linkage"} | ||
Line 2,929: | Line 2,941: | ||
}, | }, | ||
["note_coroutine_function_declare_noexcept"]={ | ["note_coroutine_function_declare_noexcept"]={ | ||
[ | [b]={{nil,K,"must be declared with \'noexcept\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="must be declared with \'noexcept\'", | ||
[ | [f]=a, | ||
[ | [g]=Wc, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{ab,684,"bool Sema::checkFinalSuspendNoThrow(const Stmt *FinalSuspend) {\n // ...\n for (const auto *D : SortedDecls) {\n Diag(D->getEndLoc(), diag::note_coroutine_function_declare_noexcept);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp"]={"clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:24:38: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:25:43: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:26:24: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:27:35: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:45:34: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:90:41: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:24:38: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:25:43: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:26:24: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:27:35: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:45:34: note: must be declared with \'noexcept\'"} | ["clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp"]={"clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:24:38: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:25:43: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:26:24: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:27:35: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:45:34: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:90:41: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:24:38: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:25:43: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:26:24: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:27:35: note: must be declared with \'noexcept\'","clang/test/SemaCXX/coroutine-final-suspend-noexcept.cpp:45:34: note: must be declared with \'noexcept\'"} | ||
Line 2,941: | Line 2,953: | ||
}, | }, | ||
["note_coroutine_promise_call_implicitly_required"]={ | ["note_coroutine_promise_call_implicitly_required"]={ | ||
[ | [b]={{nil,U,"call to %0 implicitly required by coroutine function here"}}, | ||
[ | [d]=c, | ||
[ | [e]="call to (.*?) implicitly required by coroutine function here", | ||
[ | [f]=a, | ||
[ | [g]=Wc, | ||
[h]={"20f25cb6dfb3",1488843495,"[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.","[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.\n\nSummary:\nThe changes contained in this patch are:\n\n1. Defines a new AST node `CoawaitDependentExpr` for representing co_await expressions while the promise type is still dependent.\n2. Correctly detect and transform the \'co_await\' operand to `p.await_transform(<expr>)` when possible.\n3. Change the initial/final suspend points to build during the initial parse, so they have the correct operator co_await lookup results.\n4. Fix transformation of the CoroutineBodyStmt so that it doesn\'t re-build the final/initial suspends.\n\n\n@rsmith: This change is a little big, but it\'s not trivial for me to split it up. Please let me know if you would prefer this submitted as multiple patches.\n\n\n\nReviewers: rsmith, GorNishanov\n\nReviewed By: rsmith\n\nSubscribers: ABataev, rsmith, mehdi_amini, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D26057\n\nllvm-svn: 297093"}, | [h]={"20f25cb6dfb3",1488843495,"[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.","[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.\n\nSummary:\nThe changes contained in this patch are:\n\n1. Defines a new AST node `CoawaitDependentExpr` for representing co_await expressions while the promise type is still dependent.\n2. Correctly detect and transform the \'co_await\' operand to `p.await_transform(<expr>)` when possible.\n3. Change the initial/final suspend points to build during the initial parse, so they have the correct operator co_await lookup results.\n4. Fix transformation of the CoroutineBodyStmt so that it doesn\'t re-build the final/initial suspends.\n\n\n@rsmith: This change is a little big, but it\'s not trivial for me to split it up. Please let me know if you would prefer this submitted as multiple patches.\n\n\n\nReviewers: rsmith, GorNishanov\n\nReviewed By: rsmith\n\nSubscribers: ABataev, rsmith, mehdi_amini, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D26057\n\nllvm-svn: 297093"}, | ||
[i]={{ | [i]={{ab,409,"/// Build calls to await_ready, await_suspend, and await_resume for a co_await\n/// expression.\n/// The generated AST tries to clean up temporary objects as early as\n/// possible so that they don\'t live across suspension points if possible.\n/// Having temporary objects living across suspension points unnecessarily can\n/// lead to large frame size, and also lead to memory corruptions if the\n/// coroutine frame is destroyed after coming back from suspension. This is done\n/// by wrapping both the await_ready call and the await_suspend call with\n/// ExprWithCleanups. In the end of this function, we also need to explicitly\n/// set cleanup state so that the CoawaitExpr is also wrapped with an\n/// ExprWithCleanups to clean up the awaiter associated with the co_await\n/// expression.\nstatic ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, SourceLocation Loc, Expr *E) {\n // ...\n if (!AwaitReady->getType()->isDependentType()) {\n // ...\n if (Conv.isInvalid()) {\n // ...\n S.Diag(Loc, diag::note_coroutine_promise_call_implicitly_required) << AwaitReady->getDirectCallee() << E->getSourceRange();"},{ab,450,"/// Build calls to await_ready, await_suspend, and await_resume for a co_await\n/// expression.\n/// The generated AST tries to clean up temporary objects as early as\n/// possible so that they don\'t live across suspension points if possible.\n/// Having temporary objects living across suspension points unnecessarily can\n/// lead to large frame size, and also lead to memory corruptions if the\n/// coroutine frame is destroyed after coming back from suspension. This is done\n/// by wrapping both the await_ready call and the await_suspend call with\n/// ExprWithCleanups. In the end of this function, we also need to explicitly\n/// set cleanup state so that the CoawaitExpr is also wrapped with an\n/// ExprWithCleanups to clean up the awaiter associated with the co_await\n/// expression.\nstatic ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, SourceLocation Loc, Expr *E) {\n // ...\n if (!AwaitSuspend->getType()->isDependentType()) {\n // ...\n // Support for coroutine_handle returning await_suspend.\n if (Expr *TailCallSuspend = maybeTailCall(S, RetType, AwaitSuspend, Loc))\n // ...\n else {\n // non-class prvalues always have cv-unqualified types\n if (RetType->isReferenceType() || (!RetType->isBooleanType() && !RetType->isVoidType())) {\n // ...\n S.Diag(Loc, diag::note_coroutine_promise_call_implicitly_required) << AwaitSuspend->getDirectCallee();"},{ab,1499,"bool CoroutineStmtBuilder::makeNewAndDeleteExpr() {\n // ...\n if (RequiresNoThrowAlloc) {\n // ...\n if (!FT->isNothrow(/*ResultIfDependent*/ false)) {\n // ...\n S.Diag(Loc, diag::note_coroutine_promise_call_implicitly_required) << OperatorNew;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:837:22: note: call to \'operator new\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:842:9: note: call to \'operator new\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1042:14: note: call to \'await_ready\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1046:14: note: call to \'await_suspend\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1057:14: note: call to \'await_suspend\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1058:14: note: call to \'await_suspend\' implicitly required by coroutine function here"} | ["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:837:22: note: call to \'operator new\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:842:9: note: call to \'operator new\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1042:14: note: call to \'await_ready\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1046:14: note: call to \'await_suspend\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1057:14: note: call to \'await_suspend\' implicitly required by coroutine function here","clang/test/SemaCXX/coroutines.cpp:1058:14: note: call to \'await_suspend\' implicitly required by coroutine function here"} | ||
Line 2,953: | Line 2,965: | ||
}, | }, | ||
["note_coroutine_promise_implicit_await_transform_required_here"]={ | ["note_coroutine_promise_implicit_await_transform_required_here"]={ | ||
[ | [b]={{nil,U,"call to \'await_transform\' implicitly required by \'co_await\' here"}}, | ||
[ | [d]=c, | ||
[ | [e]="call to \'await_transform\' implicitly required by \'co_await\' here", | ||
[ | [f]=a, | ||
[ | [g]=Wc, | ||
[h]={"20f25cb6dfb3",1488843495,"[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.","[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.\n\nSummary:\nThe changes contained in this patch are:\n\n1. Defines a new AST node `CoawaitDependentExpr` for representing co_await expressions while the promise type is still dependent.\n2. Correctly detect and transform the \'co_await\' operand to `p.await_transform(<expr>)` when possible.\n3. Change the initial/final suspend points to build during the initial parse, so they have the correct operator co_await lookup results.\n4. Fix transformation of the CoroutineBodyStmt so that it doesn\'t re-build the final/initial suspends.\n\n\n@rsmith: This change is a little big, but it\'s not trivial for me to split it up. Please let me know if you would prefer this submitted as multiple patches.\n\n\n\nReviewers: rsmith, GorNishanov\n\nReviewed By: rsmith\n\nSubscribers: ABataev, rsmith, mehdi_amini, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D26057\n\nllvm-svn: 297093"}, | [h]={"20f25cb6dfb3",1488843495,"[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.","[coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.\n\nSummary:\nThe changes contained in this patch are:\n\n1. Defines a new AST node `CoawaitDependentExpr` for representing co_await expressions while the promise type is still dependent.\n2. Correctly detect and transform the \'co_await\' operand to `p.await_transform(<expr>)` when possible.\n3. Change the initial/final suspend points to build during the initial parse, so they have the correct operator co_await lookup results.\n4. Fix transformation of the CoroutineBodyStmt so that it doesn\'t re-build the final/initial suspends.\n\n\n@rsmith: This change is a little big, but it\'s not trivial for me to split it up. Please let me know if you would prefer this submitted as multiple patches.\n\n\n\nReviewers: rsmith, GorNishanov\n\nReviewed By: rsmith\n\nSubscribers: ABataev, rsmith, mehdi_amini, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D26057\n\nllvm-svn: 297093"}, | ||
[i]={{ | [i]={{ab,859,"// Attempts to resolve and build a CoawaitExpr from \"raw\" inputs, bailing out to\n// DependentCoawaitExpr if needed.\nExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, UnresolvedLookupExpr *Lookup) {\n // ...\n if (lookupMember(*this, \"await_transform\", RD, Loc)) {\n // ...\n if (R.isInvalid()) {\n Diag(Loc, diag::note_coroutine_promise_implicit_await_transform_required_here) << Operand->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/co_await-range-for.cpp"]={"clang/test/SemaCXX/co_await-range-for.cpp:53:23: note: call to \'await_transform\' implicitly required by \'co_await\' here","clang/test/SemaCXX/co_await-range-for.cpp:75:23: note: call to \'await_transform\' implicitly required by \'co_await\' here","clang/test/SemaCXX/co_await-range-for.cpp:82:23: note: call to \'await_transform\' implicitly required by \'co_await\' here"} | ["clang/test/SemaCXX/co_await-range-for.cpp"]={"clang/test/SemaCXX/co_await-range-for.cpp:53:23: note: call to \'await_transform\' implicitly required by \'co_await\' here","clang/test/SemaCXX/co_await-range-for.cpp:75:23: note: call to \'await_transform\' implicitly required by \'co_await\' here","clang/test/SemaCXX/co_await-range-for.cpp:82:23: note: call to \'await_transform\' implicitly required by \'co_await\' here"} | ||
Line 2,965: | Line 2,977: | ||
}, | }, | ||
["note_coroutine_promise_suspend_implicitly_required"]={ | ["note_coroutine_promise_suspend_implicitly_required"]={ | ||
[ | [b]={{nil,U,"call to \'%select{initial_suspend|final_suspend}0\' implicitly required by the %select{initial suspend point|final suspend point}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="call to \'(?:initial_suspend|final_suspend)\' implicitly required by the (?:initial suspend point|final suspend point)", | ||
[ | [f]=a, | ||
[ | [g]=Wc, | ||
[h]={"627a63cf5081",1492334399,"[coroutines] Fix building of new/delete expressions when get_return_object_on_allocation_failure() i...","[coroutines] Fix building of new/delete expressions when get_return_object_on_allocation_failure() is present.\n\nSummary:\nThis patch implements [dcl.fct.def.coroutine]p8:\n> The unqualified-id get_return_object_on_allocation_failure is looked up in the scope of\n> class P by class member access lookup (3.4.5). If a declaration is found, ..., and if a \n> global allocation function is selected, the ::operator new(size_t, nothrow_t) form shall be used.\n> [...]\n> The allocation function used in this case must have a non-throwing noexcept-specification.\n\nReviewers: GorNishanov, rsmith, majnemer, aaron.ballman\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D31562\n\nllvm-svn: 300420"}, | [h]={"627a63cf5081",1492334399,"[coroutines] Fix building of new/delete expressions when get_return_object_on_allocation_failure() i...","[coroutines] Fix building of new/delete expressions when get_return_object_on_allocation_failure() is present.\n\nSummary:\nThis patch implements [dcl.fct.def.coroutine]p8:\n> The unqualified-id get_return_object_on_allocation_failure is looked up in the scope of\n> class P by class member access lookup (3.4.5). If a declaration is found, ..., and if a \n> global allocation function is selected, the ::operator new(size_t, nothrow_t) form shall be used.\n> [...]\n> The allocation function used in this case must have a non-throwing noexcept-specification.\n\nReviewers: GorNishanov, rsmith, majnemer, aaron.ballman\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D31562\n\nllvm-svn: 300420"}, | ||
[i]={{ | [i]={{ab,719,"bool Sema::ActOnCoroutineBodyStart(Scope *SC, SourceLocation KWLoc, StringRef Keyword) {\n // ...\n // Build the initial suspend point\n auto buildSuspends = [&](StringRef Name) mutable -> StmtResult {\n // ...\n if (Suspend.isInvalid()) {\n Diag(Loc, diag::note_coroutine_promise_suspend_implicitly_required) << ((Name == \"initial_suspend\") ? 0 : 1);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:148:6: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:483:29: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:501:31: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:610:21: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:622:21: note: call to \'final_suspend\' implicitly required by the final suspend point","clang/test/SemaCXX/coroutines.cpp:768:7: note: call to \'initial_suspend\' implicitly required by the initial suspend point"} | ["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:148:6: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:483:29: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:501:31: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:610:21: note: call to \'initial_suspend\' implicitly required by the initial suspend point","clang/test/SemaCXX/coroutines.cpp:622:21: note: call to \'final_suspend\' implicitly required by the final suspend point","clang/test/SemaCXX/coroutines.cpp:768:7: note: call to \'initial_suspend\' implicitly required by the initial suspend point"} | ||
Line 2,977: | Line 2,989: | ||
}, | }, | ||
["note_covariant_thunk"]={ | ["note_covariant_thunk"]={ | ||
[ | [b]="covariant thunk required by %0", | ||
[ | [d]=c, | ||
[ | [e]="covariant thunk required by (.*?)", | ||
[ | [f]=a, | ||
[ | [g]="VTable ABI Issue", | ||
[h]={"70e6a00170a4",1430516145,"[MS ABI] Detect and diagnose vftables which cannot be created","[MS ABI] Detect and diagnose vftables which cannot be created\n\nThe MSVC ABI has a bug introduced by appending to the end of vftables\nwhich come from virtual bases: covariant thunks introduces via\nnon-overlapping regions of the inheritance lattice both append to the\nsame slot in the vftable.\n\nIt is possible to generate correct vftables in cases where one node in\nthe lattice completely dominates the other on the way to the base with\nthe vfptr; in all other cases, we must raise a diagnostic in order to\nprevent the illusion that we succeeded in laying out the vftable.\n\nThis fixes PR16759.\n\nllvm-svn: 236354"}, | [h]={"70e6a00170a4",1430516145,"[MS ABI] Detect and diagnose vftables which cannot be created","[MS ABI] Detect and diagnose vftables which cannot be created\n\nThe MSVC ABI has a bug introduced by appending to the end of vftables\nwhich come from virtual bases: covariant thunks introduces via\nnon-overlapping regions of the inheritance lattice both append to the\nsame slot in the vftable.\n\nIt is possible to generate correct vftables in cases where one node in\nthe lattice completely dominates the other on the way to the base with\nthe vfptr; in all other cases, we must raise a diagnostic in order to\nprevent the illusion that we succeeded in laying out the vftable.\n\nThis fixes PR16759.\n\nllvm-svn: 236354"}, | ||
[i]={{"clang/lib/AST/VTableBuilder.cpp",3555,"// We want to select the path which introduces the most covariant overrides. If\n// two paths introduce overrides which the other path doesn\'t contain, issue a\n// diagnostic.\nstatic const FullPathTy *selectBestPath(ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list<FullPathTy> &FullPaths) {\n // ...\n for (const FullPathTy &SpecificPath : FullPaths) {\n // ...\n if (MissingOverrides.empty()) {\n // ...\n } else {\n // ...\n Diags.Report(CovariantMD->getLocation(), diag::note_covariant_thunk) << CovariantMD;"},{"clang/lib/AST/VTableBuilder.cpp",3557,"// We want to select the path which introduces the most covariant overrides. If\n// two paths introduce overrides which the other path doesn\'t contain, issue a\n// diagnostic.\nstatic const FullPathTy *selectBestPath(ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list<FullPathTy> &FullPaths) {\n // ...\n for (const FullPathTy &SpecificPath : FullPaths) {\n // ...\n if (MissingOverrides.empty()) {\n // ...\n } else {\n // ...\n Diags.Report(ConflictMD->getLocation(), diag::note_covariant_thunk) << ConflictMD;"}} | [i]={{"clang/lib/AST/VTableBuilder.cpp",3555,"// We want to select the path which introduces the most covariant overrides. If\n// two paths introduce overrides which the other path doesn\'t contain, issue a\n// diagnostic.\nstatic const FullPathTy *selectBestPath(ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list<FullPathTy> &FullPaths) {\n // ...\n for (const FullPathTy &SpecificPath : FullPaths) {\n // ...\n if (MissingOverrides.empty()) {\n // ...\n } else {\n // ...\n Diags.Report(CovariantMD->getLocation(), diag::note_covariant_thunk) << CovariantMD;"},{"clang/lib/AST/VTableBuilder.cpp",3557,"// We want to select the path which introduces the most covariant overrides. If\n// two paths introduce overrides which the other path doesn\'t contain, issue a\n// diagnostic.\nstatic const FullPathTy *selectBestPath(ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list<FullPathTy> &FullPaths) {\n // ...\n for (const FullPathTy &SpecificPath : FullPaths) {\n // ...\n if (MissingOverrides.empty()) {\n // ...\n } else {\n // ...\n Diags.Report(ConflictMD->getLocation(), diag::note_covariant_thunk) << ConflictMD;"}} | ||
}, | }, | ||
["note_cuda_conflicting_device_function_declared_here"]={ | ["note_cuda_conflicting_device_function_declared_here"]={ | ||
[ | [b]="conflicting __device__ function declared here", | ||
[ | [d]=c, | ||
[ | [e]="conflicting __device__ function declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ba122ab42fe5",1459380621,"[CUDA] Make unattributed constexpr functions implicitly host+device.","[CUDA] Make unattributed constexpr functions implicitly host+device.\n\nWith this patch, by a constexpr function is implicitly host+device\nunless:\n\n a) it\'s a variadic function (variadic functions are not allowed on the\n device side), or\n b) it\'s preceeded by a __device__ overload in a system header.\n\nThe restriction on overloading __host__ __device__ functions on the\nbasis of their CUDA attributes remains in place, but we use (b) to allow\nus to define __device__ overloads for constexpr functions in cmath,\nwhich would otherwise be __host__ __device__ and thus not overloadable.\n\nYou can disable this behavior with -fno-cuda-host-device-constexpr.\n\nReviewers: tra, rnk, rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D18380\n\nllvm-svn: 264964"}, | [h]={"ba122ab42fe5",1459380621,"[CUDA] Make unattributed constexpr functions implicitly host+device.","[CUDA] Make unattributed constexpr functions implicitly host+device.\n\nWith this patch, by a constexpr function is implicitly host+device\nunless:\n\n a) it\'s a variadic function (variadic functions are not allowed on the\n device side), or\n b) it\'s preceeded by a __device__ overload in a system header.\n\nThe restriction on overloading __host__ __device__ functions on the\nbasis of their CUDA attributes remains in place, but we use (b) to allow\nus to define __device__ overloads for constexpr functions in cmath,\nwhich would otherwise be __host__ __device__ and thus not overloadable.\n\nYou can disable this behavior with -fno-cuda-host-device-constexpr.\n\nReviewers: tra, rnk, rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D18380\n\nllvm-svn: 264964"}, | ||
[i]={{"clang/lib/Sema/SemaCUDA.cpp",700,"// With -fcuda-host-device-constexpr, an unattributed constexpr function is\n// treated as implicitly __host__ __device__, unless:\n// * it is a variadic function (device-side variadic functions are not\n// allowed), or\n// * a __device__ function with this signature was already declared, in which\n// case in which case we output an error, unless the __device__ decl is in a\n// system header, in which case we leave the constexpr function unattributed.\n//\n// In addition, all function decls are treated as __host__ __device__ when\n// ForceCUDAHostDeviceDepth > 0 (corresponding to code within a\n// #pragma clang force_cuda_host_device_begin/end\n// pair).\nvoid Sema::maybeAddCUDAHostDeviceAttrs(FunctionDecl *NewD, const LookupResult &Previous) {\n // ...\n if (It != Previous.end()) {\n // ...\n if (!getSourceManager().isInSystemHeader(Match->getLocation())) {\n // ...\n Diag(Match->getLocation(), diag::note_cuda_conflicting_device_function_declared_here);"}}, | [i]={{"clang/lib/Sema/SemaCUDA.cpp",700,"// With -fcuda-host-device-constexpr, an unattributed constexpr function is\n// treated as implicitly __host__ __device__, unless:\n// * it is a variadic function (device-side variadic functions are not\n// allowed), or\n// * a __device__ function with this signature was already declared, in which\n// case in which case we output an error, unless the __device__ decl is in a\n// system header, in which case we leave the constexpr function unattributed.\n//\n// In addition, all function decls are treated as __host__ __device__ when\n// ForceCUDAHostDeviceDepth > 0 (corresponding to code within a\n// #pragma clang force_cuda_host_device_begin/end\n// pair).\nvoid Sema::maybeAddCUDAHostDeviceAttrs(FunctionDecl *NewD, const LookupResult &Previous) {\n // ...\n if (It != Previous.end()) {\n // ...\n if (!getSourceManager().isInSystemHeader(Match->getLocation())) {\n // ...\n Diag(Match->getLocation(), diag::note_cuda_conflicting_device_function_declared_here);"}}, | ||
Line 2,998: | Line 3,010: | ||
}, | }, | ||
["note_cuda_const_var_unpromoted"]={ | ["note_cuda_const_var_unpromoted"]={ | ||
[ | [b]={{nil,M,"const variable cannot be emitted on device side due to dynamic initialization"}}, | ||
[ | [d]=c, | ||
[ | [e]="const variable cannot be emitted on device side due to dynamic initialization", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Ic,1615397021,Hc,Cc}, | ||
[i]={{ | [i]={{o,19016,"/// Directly mark a variable odr-used. Given a choice, prefer to use\n/// MarkVariableReferenced since it does additional checks and then\n/// calls MarkVarDeclODRUsed.\n/// If the variable must be captured:\n/// - if FunctionScopeIndexToStopAt is null, capture it in the CurContext\n/// - else capture it in the DeclContext that maps to the\n/// *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.\nstatic void MarkVarDeclODRUsed(ValueDecl *V, SourceLocation Loc, Sema &SemaRef, const unsigned *const FunctionScopeIndexToStopAt = nullptr) {\n // ...\n if (SemaRef.LangOpts.CUDA && Var->hasGlobalStorage()) {\n // ...\n if (VarTarget == Sema::CVT_Host && (UserTarget == Sema::CFT_Device || UserTarget == Sema::CFT_HostDevice || UserTarget == Sema::CFT_Global)) {\n // Diagnose ODR-use of host global variables in device functions.\n // Reference of device global variables in host functions is allowed\n // through shadow variables therefore it is not diagnosed.\n if (SemaRef.LangOpts.CUDAIsDevice) {\n // ...\n SemaRef.targetDiag(Var->getLocation(), Var->getType().isConstQualified() ? diag::note_cuda_const_var_unpromoted : diag::note_cuda_host_var);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCUDA/const-var.cu"]={"clang/test/SemaCUDA/const-var.cu:43:15: note: const variable cannot be emitted on device side due to dynamic initialization"} | ["clang/test/SemaCUDA/const-var.cu"]={"clang/test/SemaCUDA/const-var.cu:43:15: note: const variable cannot be emitted on device side due to dynamic initialization"} | ||
Line 3,010: | Line 3,022: | ||
}, | }, | ||
["note_cuda_device_builtin_surftex_cls_should_have_match_arg"]={ | ["note_cuda_device_builtin_surftex_cls_should_have_match_arg"]={ | ||
[ | [b]={{nil,K,"the %select{1st|2nd|3rd}1 template parameter of %0 needs to be %select{a type|an integer or enum value}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="the (?:1st|2nd|3rd) template parameter of (.*?) needs to be (?:a type|an integer or enum value)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Dc,1576908663,Uc,Gc}, | ||
[i]={{m,6348,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 0 && !isa<TemplateTypeParmDecl>(Params->getParam(0))) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*1st*/ 0 << /*type*/ 0;"},{m,6356,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 1) {\n // ...\n if (!NTTP || !NTTP->getType()->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*2nd*/ 1 << /*integer*/ 1;"},{m,6402,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 0 && !isa<TemplateTypeParmDecl>(Params->getParam(0))) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*1st*/ 0 << /*type*/ 0;"},{m,6410,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 1) {\n // ...\n if (!NTTP || !NTTP->getType()->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*2nd*/ 1 << /*integer*/ 1;"},{m,6419,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 2) {\n // ...\n if (!NTTP || !NTTP->getType()->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*3rd*/ 2 << /*integer*/ 1;"}}, | [i]={{m,6348,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 0 && !isa<TemplateTypeParmDecl>(Params->getParam(0))) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*1st*/ 0 << /*type*/ 0;"},{m,6356,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 1) {\n // ...\n if (!NTTP || !NTTP->getType()->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*2nd*/ 1 << /*integer*/ 1;"},{m,6402,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 0 && !isa<TemplateTypeParmDecl>(Params->getParam(0))) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*1st*/ 0 << /*type*/ 0;"},{m,6410,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 1) {\n // ...\n if (!NTTP || !NTTP->getType()->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*2nd*/ 1 << /*integer*/ 1;"},{m,6419,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N > 2) {\n // ...\n if (!NTTP || !NTTP->getType()->isIntegralOrEnumerationType()) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_match_arg) << TD << /*3rd*/ 2 << /*integer*/ 1;"}}, | ||
[j]={ | [j]={ | ||
Line 3,022: | Line 3,034: | ||
}, | }, | ||
["note_cuda_device_builtin_surftex_cls_should_have_n_args"]={ | ["note_cuda_device_builtin_surftex_cls_should_have_n_args"]={ | ||
[ | [b]={{nil,K,"%0 needs to have exactly %1 template parameters"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) needs to have exactly (.*?) template parameters", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Dc,1576908663,Uc,Gc}, | ||
[i]={{m,6342,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N != 2) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_n_args) << TD << 2;"},{m,6396,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N != 3) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_n_args) << TD << 3;"}}, | [i]={{m,6342,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N != 2) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_n_args) << TD << 2;"},{m,6396,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (N != 3) {\n // ...\n S.Diag(TD->getLocation(), diag::note_cuda_device_builtin_surftex_cls_should_have_n_args) << TD << 3;"}}, | ||
[j]={ | [j]={ | ||
Line 3,034: | Line 3,046: | ||
}, | }, | ||
["note_cuda_device_builtin_surftex_should_be_template_class"]={ | ["note_cuda_device_builtin_surftex_should_be_template_class"]={ | ||
[ | [b]={{nil,K,"%0 needs to be instantiated from a class template with proper template arguments"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) needs to be instantiated from a class template with proper template arguments", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Dc,1576908663,Uc,Gc}, | ||
[i]={{m,6329,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (!TD) {\n // ...\n if (!SD) {\n // ...\n S.Diag(Class->getLocation(), diag::note_cuda_device_builtin_surftex_should_be_template_class) << Class;"},{m,6383,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (!TD) {\n // ...\n if (!SD) {\n // ...\n S.Diag(Class->getLocation(), diag::note_cuda_device_builtin_surftex_should_be_template_class) << Class;"}}, | [i]={{m,6329,"static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (!TD) {\n // ...\n if (!SD) {\n // ...\n S.Diag(Class->getLocation(), diag::note_cuda_device_builtin_surftex_should_be_template_class) << Class;"},{m,6383,"static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S, CXXRecordDecl *Class) {\n // ...\n if (!TD) {\n // ...\n if (!SD) {\n // ...\n S.Diag(Class->getLocation(), diag::note_cuda_device_builtin_surftex_should_be_template_class) << Class;"}}, | ||
[j]={ | [j]={ | ||
Line 3,046: | Line 3,058: | ||
}, | }, | ||
["note_cuda_host_var"]={ | ["note_cuda_host_var"]={ | ||
[ | [b]={{nil,M,"host variable declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="host variable declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Ic,1615397021,Hc,Cc}, | ||
[i]={{ | [i]={{o,19079,"/// Directly mark a variable odr-used. Given a choice, prefer to use\n/// MarkVariableReferenced since it does additional checks and then\n/// calls MarkVarDeclODRUsed.\n/// If the variable must be captured:\n/// - if FunctionScopeIndexToStopAt is null, capture it in the CurContext\n/// - else capture it in the DeclContext that maps to the\n/// *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.\nstatic void MarkVarDeclODRUsed(ValueDecl *V, SourceLocation Loc, Sema &SemaRef, const unsigned *const FunctionScopeIndexToStopAt = nullptr) {\n // ...\n if (SemaRef.LangOpts.CUDA && Var->hasGlobalStorage()) {\n // ...\n if (VarTarget == Sema::CVT_Host && (UserTarget == Sema::CFT_Device || UserTarget == Sema::CFT_HostDevice || UserTarget == Sema::CFT_Global)) {\n // Diagnose ODR-use of host global variables in device functions.\n // Reference of device global variables in host functions is allowed\n // through shadow variables therefore it is not diagnosed.\n if (SemaRef.LangOpts.CUDAIsDevice) {\n // ...\n SemaRef.targetDiag(Var->getLocation(), Var->getType().isConstQualified() ? diag::note_cuda_const_var_unpromoted : diag::note_cuda_host_var);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCUDA/static-device-var.cu"]={"clang/test/SemaCUDA/static-device-var.cu:34:12: note: host variable declared here"} | ["clang/test/SemaCUDA/static-device-var.cu"]={"clang/test/SemaCUDA/static-device-var.cu:34:12: note: host variable declared here"} | ||
Line 3,058: | Line 3,070: | ||
}, | }, | ||
["note_cuda_ovl_candidate_target_mismatch"]={ | ["note_cuda_ovl_candidate_target_mismatch"]={ | ||
[ | [b]="candidate template ignored: target attributes do not match", | ||
[ | [d]=c, | ||
[ | [e]="candidate template ignored\\: target attributes do not match", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"13e9b4d76851",1481138836,"[CUDA] Improve target attribute checking for function templates.","[CUDA] Improve target attribute checking for function templates.\n\n* __host__ __device__ functions are no longer considered to be\n redeclarations of __host__ or __device__ functions. This prevents\n unintentional merging of target attributes across them.\n* Function target attributes are not considered (and must match) during\n explicit instantiation and specialization of function templates.\n\nDifferential Revision: https://reviews.llvm.org/D25809\n\nllvm-svn: 288962"}, | [h]={"13e9b4d76851",1481138836,"[CUDA] Improve target attribute checking for function templates.","[CUDA] Improve target attribute checking for function templates.\n\n* __host__ __device__ functions are no longer considered to be\n redeclarations of __host__ or __device__ functions. This prevents\n unintentional merging of target attributes across them.\n* Function target attributes are not considered (and must match) during\n explicit instantiation and specialization of function templates.\n\nDifferential Revision: https://reviews.llvm.org/D25809\n\nllvm-svn: 288962"}, | ||
[i]={{ | [i]={{fb,11366,"/// 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_CUDATargetMismatch:\n S.Diag(Templated->getLocation(), diag::note_cuda_ovl_candidate_target_mismatch);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCUDA/function-template-overload.cu"]={"clang/test/SemaCUDA/function-template-overload.cu:13:40: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:10:38: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:13:40: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:10:38: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:62:35: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:62:35: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:62:35: note: candidate template ignored: target attributes do not match"} | ["clang/test/SemaCUDA/function-template-overload.cu"]={"clang/test/SemaCUDA/function-template-overload.cu:13:40: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:10:38: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:13:40: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:10:38: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:62:35: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:62:35: note: candidate template ignored: target attributes do not match","clang/test/SemaCUDA/function-template-overload.cu:62:35: note: candidate template ignored: target attributes do not match"} | ||
Line 3,070: | Line 3,082: | ||
}, | }, | ||
["note_cxx20_compat_utf8_string_remove_u8"]={ | ["note_cxx20_compat_utf8_string_remove_u8"]={ | ||
[ | [b]={{nil,K,"remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8"}}, | ||
[ | [d]=c, | ||
[ | [e]="remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF\\-8", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"28ddb91decff",1542229474,"[c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.","[c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.\n\nThis unfortunately results in a substantial breaking change when\nswitching to C++20, but it\'s not yet clear what / how much we should\ndo about that. We may want to add a compatibility conversion from\nu8 string literals to const char*, similar to how C++98 provided a\ncompatibility conversion from string literals to non-const char*,\nbut that\'s not handled by this patch.\n\nThe feature can be disabled in C++20 mode with -fno-char8_t.\n\nllvm-svn: 346892"}, | [h]={"28ddb91decff",1542229474,"[c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.","[c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.\n\nThis unfortunately results in a substantial breaking change when\nswitching to C++20, but it\'s not yet clear what / how much we should\ndo about that. We may want to add a compatibility conversion from\nu8 string literals to const char*, similar to how C++98 provided a\ncompatibility conversion from string literals to non-const char*,\nbut that\'s not handled by this patch.\n\nThe feature can be disabled in C++20 mode with -fno-char8_t.\n\nllvm-svn: 346892"}, | ||
[i]={{ | [i]={{o,1997,"/// ActOnStringLiteral - The specified tokens were lexed as pasted string\n/// fragments (e.g. \"foo\" \"bar\" L\"baz\"). The result string has to handle string\n/// concatenation ([C99 5.1.1.2, translation phase #6]), so it may come from\n/// multiple tokens. However, the common case is that StringToks points to one\n/// string.\n///\nExprResult Sema::ActOnStringLiteral(ArrayRef<Token> StringToks, Scope *UDLScope) {\n // ...\n // Warn on initializing an array of char from a u8 string literal; this\n // becomes ill-formed in C++2a.\n if (getLangOpts().CPlusPlus && !getLangOpts().CPlusPlus20 && !getLangOpts().Char8 && Kind == StringLiteral::UTF8) {\n // ...\n auto RemovalDiag = PDiag(diag::note_cxx20_compat_utf8_string_remove_u8);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-compat.cpp"]={"clang/test/SemaCXX/cxx2a-compat.cpp:28:16: note: remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8","clang/test/SemaCXX/cxx2a-compat.cpp:29:26: note: remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8","clang/test/SemaCXX/cxx2a-compat.cpp:30:16: note: remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8"} | ["clang/test/SemaCXX/cxx2a-compat.cpp"]={"clang/test/SemaCXX/cxx2a-compat.cpp:28:16: note: remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8","clang/test/SemaCXX/cxx2a-compat.cpp:29:26: note: remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8","clang/test/SemaCXX/cxx2a-compat.cpp:30:16: note: remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8"} | ||
Line 3,082: | Line 3,094: | ||
}, | }, | ||
["note_decl_hiding_tag_type"]={ | ["note_decl_hiding_tag_type"]={ | ||
[ | [b]="%1 %0 is hidden by a non-type declaration of %0 here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) (.*?) is hidden by a non\\-type declaration of (.*?) here", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"3fe3f857699f",1335551209,"Imrpove the note text for when a non-type decl hides a tag type","Imrpove the note text for when a non-type decl hides a tag type\n\nllvm-svn: 155723"}, | [h]={"3fe3f857699f",1335551209,"Imrpove the note text for when a non-type decl hides a tag type","Imrpove the note text for when a non-type decl hides a tag type\n\nllvm-svn: 155723"}, | ||
[i]={{"clang/lib/Parse/ParseDecl.cpp",2830,"/// ParseImplicitInt - This method is called when we have an non-typename\n/// identifier in a declspec (which normally terminates the decl spec) when\n/// the declspec has no type specifier. In this case, the declspec is either\n/// malformed or is \"implicit int\" (in K&R and C89).\n///\n/// This method handles diagnosing this prettily and returns false if the\n/// declspec is done being processed. If it recovers and thinks there may be\n/// other pieces of declspec after it, it returns true.\n///\nbool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC, ParsedAttributes &Attrs) {\n // ...\n // Otherwise, if we don\'t consume this token, we are going to emit an\n // error anyway. Try to recover from various common problems. Check\n // to see if this was a reference to a tag name without a tag specified.\n // This is a common problem in C (saying \'foo\' instead of \'struct foo\').\n //\n // C++ doesn\'t need this, and isTagName doesn\'t take SS.\n if (SS == nullptr) {\n // ...\n if (TagName) {\n // ...\n if (Actions.LookupParsedName(R, getCurScope(), SS)) {\n for (LookupResult::iterator I = R.begin(), IEnd = R.end(); I != IEnd; ++I)\n Diag((*I)->getLocation(), diag::note_decl_hiding_tag_type) << TokenName << TagName;"},{ | [i]={{"clang/lib/Parse/ParseDecl.cpp",2830,"/// ParseImplicitInt - This method is called when we have an non-typename\n/// identifier in a declspec (which normally terminates the decl spec) when\n/// the declspec has no type specifier. In this case, the declspec is either\n/// malformed or is \"implicit int\" (in K&R and C89).\n///\n/// This method handles diagnosing this prettily and returns false if the\n/// declspec is done being processed. If it recovers and thinks there may be\n/// other pieces of declspec after it, it returns true.\n///\nbool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSC, ParsedAttributes &Attrs) {\n // ...\n // Otherwise, if we don\'t consume this token, we are going to emit an\n // error anyway. Try to recover from various common problems. Check\n // to see if this was a reference to a tag name without a tag specified.\n // This is a common problem in C (saying \'foo\' instead of \'struct foo\').\n //\n // C++ doesn\'t need this, and isTagName doesn\'t take SS.\n if (SS == nullptr) {\n // ...\n if (TagName) {\n // ...\n if (Actions.LookupParsedName(R, getCurScope(), SS)) {\n for (LookupResult::iterator I = R.begin(), IEnd = R.end(); I != IEnd; ++I)\n Diag((*I)->getLocation(), diag::note_decl_hiding_tag_type) << TokenName << TagName;"},{q,889,"static bool isTagTypeWithMissingTag(Sema &SemaRef, LookupResult &Result, Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc) {\n // ...\n if (TagDecl *Tag = R.getAsSingle<TagDecl>()) {\n // ...\n for (LookupResult::iterator I = Result.begin(), IEnd = Result.end(); I != IEnd; ++I)\n SemaRef.Diag((*I)->getLocation(), diag::note_decl_hiding_tag_type) << Name << TagName;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx-using-declaration.cpp"]={"clang/test/Parser/cxx-using-declaration.cpp:54:6: note: class \'Bar\' is hidden by a non-type declaration of \'Bar\' here"} | ["clang/test/Parser/cxx-using-declaration.cpp"]={"clang/test/Parser/cxx-using-declaration.cpp:54:6: note: class \'Bar\' is hidden by a non-type declaration of \'Bar\' here"} | ||
Line 3,094: | Line 3,106: | ||
}, | }, | ||
["note_decl_unguarded_availability_silence"]={ | ["note_decl_unguarded_availability_silence"]={ | ||
[ | [b]={{nil,V,"annotate %select{%1|anonymous %1}0 with an availability attribute to silence this warning"}}, | ||
[ | [d]=c, | ||
[ | [e]="annotate (?:(.*?)|anonymous (.*?)) with an availability attribute to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8b352c4d9d82",1502740152,"[Sema] Improve some -Wunguarded-availability diagnostics","[Sema] Improve some -Wunguarded-availability diagnostics\n\nrdar://33543523\nDifferential revision: https://reviews.llvm.org/D36200\n\nllvm-svn: 310874"}, | [h]={"8b352c4d9d82",1502740152,"[Sema] Improve some -Wunguarded-availability diagnostics","[Sema] Improve some -Wunguarded-availability diagnostics\n\nrdar://33543523\nDifferential revision: https://reviews.llvm.org/D36200\n\nllvm-svn: 310874"}, | ||
[i]={{ | [i]={{yb,404,"/// 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 if (const auto *Enclosing = findEnclosingDeclToAnnotate(Ctx)) {\n if (const auto *TD = dyn_cast<TagDecl>(Enclosing))\n if (TD->getDeclName().isEmpty()) {\n S.Diag(TD->getLocation(), diag::note_decl_unguarded_availability_silence) << /*Anonymous*/ 1 << TD->getKindName();"},{yb,410,"/// 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 if (const auto *Enclosing = findEnclosingDeclToAnnotate(Ctx)) {\n // ...\n auto FixitNoteDiag = S.Diag(Enclosing->getLocation(), diag::note_decl_unguarded_availability_silence) << /*Named*/ 0 << Enclosing;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/objc-implementation-attrs.m"]={"clang/test/Parser/objc-implementation-attrs.m:27:12: note: annotate \'I4\' with an availability attribute to silence this warning"} | ["clang/test/Parser/objc-implementation-attrs.m"]={"clang/test/Parser/objc-implementation-attrs.m:27:12: note: annotate \'I4\' with an availability attribute to silence this warning"} | ||
Line 3,106: | Line 3,118: | ||
}, | }, | ||
["note_declaration_not_a_prototype"]={ | ["note_declaration_not_a_prototype"]={ | ||
[ | [b]={{nil,r,"this declaration is not a prototype; add %select{\'void\'|parameter declarations}0 to make it %select{a prototype for a zero-parameter function|one}0"},{z,nil,"this declaration is not a prototype; add \'void\' to make it a prototype for a zero-parameter function"}}, | ||
[ | [d]=c, | ||
[ | [e]="this declaration is not a prototype; add (?:\'void\'|parameter declarations) to make it (?:a prototype for a zero\\-parameter function|one)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2a45e409a8ae",1355794160,"When warning about a missing prototype because a function declaration is missing \'void\', insert a fi...","When warning about a missing prototype because a function declaration is missing \'void\', insert a fixit to add the void.\n\nllvm-svn: 170399"}, | [h]={"2a45e409a8ae",1355794160,"When warning about a missing prototype because a function declaration is missing \'void\', insert a fi...","When warning about a missing prototype because a function declaration is missing \'void\', insert a fixit to add the void.\n\nllvm-svn: 170399"}, | ||
[i]={{ | [i]={{q,15671,"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 // We found a declaration that is not a prototype,\n // but that could be a zero-parameter prototype\n if (TypeSourceInfo *TI = PossiblePrototype->getTypeSourceInfo()) {\n // ...\n if (FunctionNoProtoTypeLoc FTL = TL.getAs<FunctionNoProtoTypeLoc>())\n Diag(PossiblePrototype->getLocation(), diag::note_declaration_not_a_prototype) << (FD->getNumParams() != 0) << (FD->getNumParams() == 0 ? FixItHint::CreateInsertion(FTL.getRParenLoc(), \"void\") : FixItHint{});"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-missing-prototypes.c"]={"clang/test/Sema/warn-missing-prototypes.c:4:5: note: this declaration is not a prototype; add parameter declarations to make it one","clang/test/Sema/warn-missing-prototypes.c:25:5: note: this declaration is not a prototype; add parameter declarations to make it one","clang/test/Sema/warn-missing-prototypes.c:49:6: note: this declaration is not a prototype; add \'void\' to make it a prototype for a zero-parameter function"} | ["clang/test/Sema/warn-missing-prototypes.c"]={"clang/test/Sema/warn-missing-prototypes.c:4:5: note: this declaration is not a prototype; add parameter declarations to make it one","clang/test/Sema/warn-missing-prototypes.c:25:5: note: this declaration is not a prototype; add parameter declarations to make it one","clang/test/Sema/warn-missing-prototypes.c:49:6: note: this declaration is not a prototype; add \'void\' to make it a prototype for a zero-parameter function"} | ||
Line 3,118: | Line 3,130: | ||
}, | }, | ||
["note_declare_parameter_strong"]={ | ["note_declare_parameter_strong"]={ | ||
[ | [b]="declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools", | ||
[ | [d]=c, | ||
[ | [e]="declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools", | ||
[ | [f]=a, | ||
[ | [g]="ARC Semantic Issue", | ||
[h]={"c81708e6ecf0",1477345554,"[Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured","[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"}, | [h]={"c81708e6ecf0",1477345554,"[Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured","[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"}, | ||
[i]={{ | [i]={{o,19346,"// 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(VarLoc, diag::note_declare_parameter_strong);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:816:38: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:817:49: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:819:49: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:822:38: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:823:48: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:825:49: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools"} | ["clang/test/SemaObjC/arc.m"]={"clang/test/SemaObjC/arc.m:816:38: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:817:49: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:819:49: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:822:38: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:823:48: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools","clang/test/SemaObjC/arc.m:825:49: note: declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools"} | ||
Line 3,130: | Line 3,142: | ||
}, | }, | ||
["note_declared_at"]={ | ["note_declared_at"]={ | ||
[ | [b]="declared here", | ||
[ | [d]=c, | ||
[ | [e]="declared here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Wb,1236199783,Vb,Ub}, | |||
[i]={ | [i]={ | ||
[1]={l,2123,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n Info.Note(VD->getLocation(), diag::note_declared_at);"}, | [1]={l,2123,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n Info.Note(VD->getLocation(), diag::note_declared_at);"}, | ||
Line 3,150: | Line 3,162: | ||
[12]={l,5798,"/// Perform virtual dispatch.\nstatic const CXXMethodDecl *HandleVirtualDispatch(EvalInfo &Info, const Expr *E, LValue &This, const CXXMethodDecl *Found, llvm::SmallVectorImpl<QualType> &CovariantAdjustmentPath) {\n // ...\n // C++2a [class.abstract]p6:\n // the effect of making a virtual call to a pure virtual function [...] is\n // undefined\n if (Callee->isPure()) {\n // ...\n Info.Note(Callee->getLocation(), diag::note_declared_at);"}, | [12]={l,5798,"/// Perform virtual dispatch.\nstatic const CXXMethodDecl *HandleVirtualDispatch(EvalInfo &Info, const Expr *E, LValue &This, const CXXMethodDecl *Found, llvm::SmallVectorImpl<QualType> &CovariantAdjustmentPath) {\n // ...\n // C++2a [class.abstract]p6:\n // the effect of making a virtual call to a pure virtual function [...] is\n // undefined\n if (Callee->isPure()) {\n // ...\n Info.Note(Callee->getLocation(), diag::note_declared_at);"}, | ||
[13]={l,8369,"bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {\n // ...\n if (!Info.getLangOpts().CPlusPlus11) {\n // ...\n Info.Note(VD->getLocation(), diag::note_declared_at);"}, | [13]={l,8369,"bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {\n // ...\n if (!Info.getLangOpts().CPlusPlus11) {\n // ...\n Info.Note(VD->getLocation(), diag::note_declared_at);"}, | ||
[14]={ | [14]={x,134,"bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n if (!S.checkingPotentialConstantExpression()) {\n // ...\n S.Note(VD->getLocation(), diag::note_declared_at);"}, | ||
[15]={ | [15]={x,169,"bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n if (!Ptr.isLive()) {\n // ...\n if (IsTemp)\n // ...\n else\n S.Note(Ptr.getDeclLoc(), diag::note_declared_at);"}, | ||
[16]={ | [16]={x,232,"bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.Note(Field->getLocation(), diag::note_declared_at);"}, | ||
[17]={ | [17]={x,335,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n // ...\n if (!F->isConstexpr()) {\n // ...\n if (S.getLangOpts().CPlusPlus11) {\n // ...\n S.Note(DiagDecl->getLocation(), diag::note_declared_at);"}, | ||
[18]={ | [18]={x,379,"bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) {\n // ...\n S.Note(MD->getLocation(), diag::note_declared_at);"}, | ||
[19]={"clang/lib/Sema/SemaAttr.cpp",702,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *Decl) {\n // ...\n if (Section.Decl)\n Diag(Section.Decl->getLocation(), diag::note_declared_at) << Section.Decl->getName();"}, | [19]={"clang/lib/Sema/SemaAttr.cpp",702,"bool Sema::UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *Decl) {\n // ...\n if (Section.Decl)\n Diag(Section.Decl->getLocation(), diag::note_declared_at) << Section.Decl->getName();"}, | ||
[20]={"clang/lib/Sema/SemaAttr.cpp",723,"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.Decl)\n Diag(Section.Decl->getLocation(), diag::note_declared_at) << Section.Decl->getName();"}, | [20]={"clang/lib/Sema/SemaAttr.cpp",723,"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.Decl)\n Diag(Section.Decl->getLocation(), diag::note_declared_at) << Section.Decl->getName();"}, | ||
[21]={ | [21]={cd,300,"/// Require that the EnumDecl is completed with its enumerators defined or\n/// instantiated. SS, if provided, is the ScopeRef parsed.\n///\nbool Sema::RequireCompleteEnumDecl(EnumDecl *EnumD, SourceLocation L, CXXScopeSpec *SS) {\n // ...\n if (SS) {\n // ...\n } else {\n // ...\n Diag(EnumD->getLocation(), diag::note_declared_at);"}, | ||
[22]={ | [22]={cd,593,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (Found.empty() && !ErrorRecoveryLookup) {\n // ...\n if (!R.empty()) {\n // ...\n // The identifier is found in ordinary lookup. If correction to colon is\n // allowed, suggest replacement to \':\'.\n if (IsCorrectedToColon) {\n // ...\n if (NamedDecl *ND = R.getAsSingle<NamedDecl>())\n Diag(ND->getLocation(), diag::note_declared_at);"}, | ||
[23]={ | [23]={q,17431,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n Diag(PrevDecl->getLocation(), diag::note_declared_at);"}, | ||
[24]={m,1066,"static bool lookupStdTypeTraitMember(Sema &S, LookupResult &TraitMemberLookup, SourceLocation Loc, StringRef Trait, TemplateArgumentListInfo &Args, unsigned DiagID) {\n // ...\n if (!TraitTD) {\n // ...\n S.Diag(Found->getLocation(), diag::note_declared_at);"}, | [24]={m,1066,"static bool lookupStdTypeTraitMember(Sema &S, LookupResult &TraitMemberLookup, SourceLocation Loc, StringRef Trait, TemplateArgumentListInfo &Args, unsigned DiagID) {\n // ...\n if (!TraitTD) {\n // ...\n S.Diag(Found->getLocation(), diag::note_declared_at);"}, | ||
[25]={m,1174,"/// \\return std::tuple_element<I, T>::type.\nstatic QualType getTupleLikeElementType(Sema &S, SourceLocation Loc, unsigned I, QualType T) {\n // ...\n if (!TD) {\n // ...\n if (!R.empty())\n S.Diag(R.getRepresentativeDecl()->getLocation(), diag::note_declared_at);"}, | [25]={m,1174,"/// \\return std::tuple_element<I, T>::type.\nstatic QualType getTupleLikeElementType(Sema &S, SourceLocation Loc, unsigned I, QualType T) {\n // ...\n if (!TD) {\n // ...\n if (!R.empty())\n S.Diag(R.getRepresentativeDecl()->getLocation(), diag::note_declared_at);"}, | ||
Line 3,171: | Line 3,183: | ||
[33]={m,15236,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n // Check for members of reference type; we can\'t move those.\n if (Field->getType()->isReferenceType()) {\n // ...\n Diag(Field->getLocation(), diag::note_declared_at);"}, | [33]={m,15236,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n // Check for members of reference type; we can\'t move those.\n if (Field->getType()->isReferenceType()) {\n // ...\n Diag(Field->getLocation(), diag::note_declared_at);"}, | ||
[34]={m,15246,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n // ...\n Diag(Field->getLocation(), diag::note_declared_at);"}, | [34]={m,15246,"void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MoveAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n // ...\n Diag(Field->getLocation(), diag::note_declared_at);"}, | ||
[35]={ | [35]={o,3388,"/// Complete semantic analysis for a reference to the given declaration.\nExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD, const TemplateArgumentListInfo *TemplateArgs, bool AcceptInvalidDecl) {\n // ...\n // Make sure that we\'re referring to a value.\n if (!isa<ValueDecl, UnresolvedUsingIfExistsDecl>(D)) {\n // ...\n Diag(D->getLocation(), diag::note_declared_at);"}, | ||
[36]={ | [36]={o,4468,"/// Check the constraints on expression operands to unary type expression\n/// and type traits.\n///\n/// Completes any types necessary and validates the constraints on the operand\n/// expression. The logic mostly mirrors the type-based overload, but may modify\n/// the expression as it completes the type for that expression through template\n/// instantiation, etc.\nbool Sema::CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind) {\n // ...\n if (ExprKind == UETT_SizeOf) {\n if (const auto *DeclRef = dyn_cast<DeclRefExpr>(E->IgnoreParens())) {\n if (const auto *PVD = dyn_cast<ParmVarDecl>(DeclRef->getFoundDecl())) {\n // ...\n if (Type->isPointerType() && OType->isArrayType()) {\n // ...\n Diag(PVD->getLocation(), diag::note_declared_at);"}, | ||
[37]={ | [37]={o,18444,"static void EvaluateAndDiagnoseImmediateInvocation(Sema &SemaRef, Sema::ImmediateInvocationCandidate Candidate) {\n // ...\n if (!Result || !Notes.empty()) {\n // ...\n if (auto Context = SemaRef.InnermostDeclarationWithDelayedImmediateInvocations()) {\n // ...\n SemaRef.Diag(Context->Decl->getBeginLoc(), diag::note_declared_at);"}, | ||
[38]={ | [38]={o,18449,"static void HandleImmediateInvocations(Sema &SemaRef, Sema::ExpressionEvaluationContextRecord &Rec) {\n // ...\n for (auto *DR : Rec.ReferenceToConsteval) {\n // ...\n if (!Rec.InImmediateEscalatingFunctionContext || (SemaRef.inTemplateInstantiation() && !ImmediateEscalating)) {\n // ...\n SemaRef.Diag(ND->getLocation(), diag::note_declared_at);"}, | ||
[39]={ | [39]={o,18477,"static void HandleImmediateInvocations(Sema &SemaRef, Sema::ExpressionEvaluationContextRecord &Rec) {\n // ...\n for (auto *DR : Rec.ReferenceToConsteval) {\n // ...\n if (!Rec.InImmediateEscalatingFunctionContext || (SemaRef.inTemplateInstantiation() && !ImmediateEscalating)) {\n // ...\n if (auto Context = SemaRef.InnermostDeclarationWithDelayedImmediateInvocations()) {\n // ...\n SemaRef.Diag(Context->Decl->getBeginLoc(), diag::note_declared_at);"}, | ||
[40]={ | [40]={o,19164,"// 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 are not allowed to capture unnamed variables\n // (e.g. anonymous unions).\n // FIXME: The C++11 rule don\'t actually state this explicitly, but I\'m\n // assuming that\'s the intent.\n if (IsLambda && !Var->getDeclName()) {\n if (Diagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_declared_at);"}, | ||
[41]={ | [41]={p,4045,"template <typename TB> static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castType->getAsObjCInterfacePointerType()) {\n // ...\n } else if (castType->isObjCIdType() || (S.Context.ObjCObjectAdoptsQTypeProtocols(castType, ExprClass)))\n // ...\n else {\n if (warn) {\n // ...\n S.Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[42]={ | [42]={p,4046,"template <typename TB> static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castType->getAsObjCInterfacePointerType()) {\n // ...\n } else if (castType->isObjCIdType() || (S.Context.ObjCObjectAdoptsQTypeProtocols(castType, ExprClass)))\n // ...\n else {\n if (warn) {\n // ...\n S.Diag(Target->getBeginLoc(), diag::note_declared_at);"}, | ||
[43]={ | [43]={p,4055,"template <typename TB> static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n } else if (!castType->isObjCIdType()) {\n // ...\n S.Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[44]={ | [44]={p,4098,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castExpr->getType()->getAsObjCInterfacePointerType()) {\n // ...\n if (warn) {\n // ...\n S.Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[45]={ | [45]={p,4113,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castExpr->getType()->getAsObjCInterfacePointerType()) {\n // ...\n } else if (castExpr->getType()->isObjCIdType() || (S.Context.QIdProtocolsAdoptObjCObjectProtocols(castExpr->getType(), CastClass)))\n // ...\n else {\n if (warn) {\n // ...\n S.Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[46]={ | [46]={p,4114,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (S.LookupName(R, S.TUScope)) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target)) {\n // ...\n if (const ObjCObjectPointerType *InterfacePointerType = castExpr->getType()->getAsObjCInterfacePointerType()) {\n // ...\n } else if (castExpr->getType()->isObjCIdType() || (S.Context.QIdProtocolsAdoptObjCObjectProtocols(castExpr->getType(), CastClass)))\n // ...\n else {\n if (warn) {\n // ...\n S.Diag(Target->getBeginLoc(), diag::note_declared_at);"}, | ||
[47]={ | [47]={p,4123,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n S.Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[48]={ | [48]={p,4125,"template <typename TB> static bool CheckObjCBridgeCFCast(Sema &S, QualType castType, Expr *castExpr, bool &HadTheAttribute, bool warn) {\n // ...\n while (const auto *TD = T->getAs<TypedefType>()) {\n // ...\n if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {\n if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {\n // ...\n if (Target)\n S.Diag(Target->getBeginLoc(), diag::note_declared_at);"}, | ||
[49]={ | [49]={p,4248,"bool Sema::checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose) {\n // ...\n if (!LookupName(R, TUScope)) {\n if (Diagnose) {\n // ...\n Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[50]={ | [50]={p,4259,"bool Sema::checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target))\n // ...\n else {\n if (Diagnose) {\n // ...\n Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[51]={ | [51]={p,4261,"bool Sema::checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose) {\n // ...\n if (Target && isa<ObjCInterfaceDecl>(Target))\n // ...\n else {\n if (Diagnose) {\n // ...\n if (Target)\n Diag(Target->getBeginLoc(), diag::note_declared_at);"}, | ||
[52]={ | [52]={p,4274,"bool Sema::checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose) {\n // ...\n // Check for an existing class method with the given selector name.\n if (CfToNs && CMId) {\n // ...\n if (!ClassMethod) {\n if (Diagnose) {\n // ...\n Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[53]={ | [53]={p,4288,"bool Sema::checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose) {\n // ...\n // Check for an existing instance method with the given selector name.\n if (!CfToNs && IMId) {\n // ...\n if (!InstanceMethod) {\n if (Diagnose) {\n // ...\n Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[54]={ | [54]={p,4332,"bool Sema::CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose) {\n // ...\n if (CfToNs) {\n // Implicit conversion from CF to ObjC object is needed.\n if (ClassMethod) {\n if (Diagnose) {\n // ...\n Diag(RelatedClass->getBeginLoc(), diag::note_declared_at);"}, | ||
[55]={ | [55]={p,4333,"bool Sema::CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose) {\n // ...\n if (CfToNs) {\n // Implicit conversion from CF to ObjC object is needed.\n if (ClassMethod) {\n if (Diagnose) {\n // ...\n Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[56]={ | [56]={p,4375,"bool Sema::CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose) {\n // ...\n if (CfToNs) {\n // ...\n } else {\n // Implicit conversion from ObjC type to CF object is needed.\n if (InstanceMethod) {\n if (Diagnose) {\n // ...\n Diag(RelatedClass->getBeginLoc(), diag::note_declared_at);"}, | ||
[57]={ | [57]={p,4376,"bool Sema::CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose) {\n // ...\n if (CfToNs) {\n // ...\n } else {\n // Implicit conversion from ObjC type to CF object is needed.\n if (InstanceMethod) {\n if (Diagnose) {\n // ...\n Diag(TDNDecl->getBeginLoc(), diag::note_declared_at);"}, | ||
[58]={ | [58]={cb,1730,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n // ...\n if ((propertyObjCPtr = PropertyRValueType->getAs<ObjCObjectPointerType>()) && (getterObjCPtr = GetterType->getAs<ObjCObjectPointerType>()))\n // ...\n else if (CheckAssignmentConstraints(Loc, GetterType, PropertyRValueType) != Compatible) {\n // ...\n Diag(GetterMethod->getLocation(), diag::note_declared_at);"}, | ||
[59]={ | [59]={cb,1745,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n // ...\n Diag(GetterMethod->getLocation(), diag::note_declared_at);"}, | ||
[60]={ | [60]={cb,2455,"/// 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 // ...\n Diag(SetterMethod->getLocation(), diag::note_declared_at);"}, | ||
[61]={ | [61]={J,3060,"ExprResult Sema::ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind) {\n // ...\n if (!Lookup.isSingleResult()) {\n // ...\n } else if (!(VD = Lookup.getAsSingle<VarDecl>())) {\n // ...\n Diag(Lookup.getFoundDecl()->getLocation(), diag::note_declared_at);"}, | ||
[62]={ | [62]={fb,14014,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\n // C++2a [over.match.oper]p9:\n // If a rewritten operator== candidate is selected by overload\n // resolution for an operator@, its return type shall be cv bool\n if (Best->RewriteKind && ChosenOp == OO_EqualEqual && !FnDecl->getReturnType()->isBooleanType()) {\n // ...\n Diag(FnDecl->getLocation(), diag::note_declared_at);"}, | ||
[63]={ | [63]={G,2928,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (const ArrayType *UnqAT = RangeType->getAsArrayTypeUnsafe()) {\n // ...\n } else {\n // ...\n if (Kind == BFRK_Build && RangeStatus == FRS_NoViableFunction && BEFFailure == BEF_begin) {\n // If the range is being built from an array parameter, emit a\n // a diagnostic that it is being treated as a pointer.\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Range)) {\n if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (PointerTy->isPointerType() && ArrayTy->isArrayType()) {\n // ...\n Diag(PVD->getLocation(), diag::note_declared_at);"}, | ||
[64]={"clang/lib/Sema/SemaSYCL.cpp",66,"void Sema::deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet<QualType> Visited, ValueDecl *DeclToCheck) {\n // ...\n auto Check = [&](QualType TypeToCheck, const ValueDecl *D) {\n // ...\n // Checks for other types can also be done here.\n if (ErrorFound) {\n if (NeedToEmitNotes) {\n if (auto *FD = dyn_cast<FieldDecl>(D))\n // ...\n else\n SYCLDiagIfDeviceCode(D->getLocation(), diag::note_declared_at);"}, | [64]={"clang/lib/Sema/SemaSYCL.cpp",66,"void Sema::deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet<QualType> Visited, ValueDecl *DeclToCheck) {\n // ...\n auto Check = [&](QualType TypeToCheck, const ValueDecl *D) {\n // ...\n // Checks for other types can also be done here.\n if (ErrorFound) {\n if (NeedToEmitNotes) {\n if (auto *FD = dyn_cast<FieldDecl>(D))\n // ...\n else\n SYCLDiagIfDeviceCode(D->getLocation(), diag::note_declared_at);"}, | ||
[65]={ | [65]={s,4286,"TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc) {\n // ...\n if (TypeAliasTemplateDecl *TAT = dyn_cast_or_null<TypeAliasTemplateDecl>(Template.getAsTemplateDecl())) {\n // ...\n Diag(TAT->getLocation(), diag::note_declared_at);"} | ||
}, | }, | ||
[j]={ | [j]={ | ||
Line 3,208: | Line 3,220: | ||
}, | }, | ||
["note_declared_coroutine_here"]={ | ["note_declared_coroutine_here"]={ | ||
[ | [b]="function is a coroutine due to use of \'%select{co_await|co_yield|co_return}0\' here", | ||
[ | [d]=c, | ||
[ | [e]="function is a coroutine due to use of \'(.*?)\' here", | ||
[ | [f]=a, | ||
[ | [g]=Wc, | ||
[h]={"cfd53b4e9993",1445494430,"[coroutines] Initial stub Sema functionality for handling coroutine await / yield / return.","[coroutines] Initial stub Sema functionality for handling coroutine await / yield / return.\n\nllvm-svn: 250993"}, | [h]={"cfd53b4e9993",1445494430,"[coroutines] Initial stub Sema functionality for handling coroutine await / yield / return.","[coroutines] Initial stub Sema functionality for handling coroutine await / yield / return.\n\nllvm-svn: 250993"}, | ||
[i]={{ | [i]={{ab,721,"bool Sema::ActOnCoroutineBodyStart(Scope *SC, SourceLocation KWLoc, StringRef Keyword) {\n // ...\n // Build the initial suspend point\n auto buildSuspends = [&](StringRef Name) mutable -> StmtResult {\n // ...\n if (Suspend.isInvalid()) {\n // ...\n Diag(KWLoc, diag::note_declared_coroutine_here) << Keyword;"},{ab,1124,"void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) {\n // ...\n // [stmt.return.coroutine]p1:\n // A coroutine shall not enclose a return statement ([stmt.return]).\n if (Fn->FirstReturnLoc.isValid()) {\n // ...\n Diag(Fn->FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn->getFirstCoroutineStmtKeyword();"},{ab,1229,"static bool diagReturnOnAllocFailure(Sema &S, Expr *E, CXXRecordDecl *PromiseRecordDecl, FunctionScopeInfo &Fn) {\n // ...\n S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn.getFirstCoroutineStmtKeyword();"},{ab,1272,"bool CoroutineStmtBuilder::makeReturnOnAllocFailure() {\n // ...\n if (ReturnStmt.isInvalid()) {\n // ...\n S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn.getFirstCoroutineStmtKeyword();"},{ab,1726,"bool CoroutineStmtBuilder::makeOnException() {\n // ...\n // Since the body of the coroutine will be wrapped in try-catch, it will\n // be incompatible with SEH __try if present in a function.\n if (!S.getLangOpts().Borland && Fn.FirstSEHTryLoc.isValid()) {\n // ...\n S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn.getFirstCoroutineStmtKeyword();"},{ab,1928,"static void noteMemberDeclaredHere(Sema &S, Expr *E, FunctionScopeInfo &Fn) {\n // ...\n S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn.getFirstCoroutineStmtKeyword();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutine-seh.cpp"]={"clang/test/SemaCXX/coroutine-seh.cpp:35:5: note: function is a coroutine due to use of \'co_return\' here"} | ["clang/test/SemaCXX/coroutine-seh.cpp"]={"clang/test/SemaCXX/coroutine-seh.cpp:35:5: note: function is a coroutine due to use of \'co_return\' here"} | ||
Line 3,220: | Line 3,232: | ||
}, | }, | ||
["note_declared_nonnull"]={ | ["note_declared_nonnull"]={ | ||
[ | [b]="declared %select{\'returns_nonnull\'|\'nonnull\'}0 here", | ||
[ | [d]=c, | ||
[ | [e]="declared (?:\'returns_nonnull\'|\'nonnull\') here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"bc85ec865606",1465967919,"Add a \"declared \'nonnull\' here\" note to warnings where an expression is checked against null.","Add a \"declared \'nonnull\' here\" note to warnings where an expression is checked against null.\n\nllvm-svn: 272755"}, | [h]={"bc85ec865606",1465967919,"Add a \"declared \'nonnull\' here\" note to warnings where an expression is checked against null.","Add a \"declared \'nonnull\' here\" note to warnings where an expression is checked against null.\n\nllvm-svn: 272755"}, | ||
[i]={{ | [i]={{C,15493,"/// 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 Diag(NonnullAttr->getLocation(), diag::note_declared_nonnull) << IsParam;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:93:16: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:93:16: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:112:80: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:112:80: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:134:16: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:148:31: note: declared \'nonnull\' here", | ["clang/test/Sema/nonnull.c"]={"clang/test/Sema/nonnull.c:93:16: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:93:16: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:112:80: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:112:80: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:134:16: note: declared \'nonnull\' here","clang/test/Sema/nonnull.c:148:31: note: declared \'nonnull\' here",Lc,Lc,Lc,Lc,Lc,Lc} | ||
} | } | ||
}, | }, | ||
["note_declared_required_constant_init_here"]={ | ["note_declared_required_constant_init_here"]={ | ||
[ | [b]="required by \'require_constant_initializer\' attribute here", | ||
[ | [d]=c, | ||
[ | [e]="required by (?:\'require_constant_initialization\' attribute|\'constinit\' specifier) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"92f8935e63f0",1472840729,"Implement __attribute__((require_constant_initialization)) for safe static initialization.","Implement __attribute__((require_constant_initialization)) for safe static initialization.\n\nSummary:\nThis attribute specifies expectations about the initialization of static and\nthread local variables. Specifically that the variable has a\n[constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization)\naccording to the rules of [basic.start.static]. Failure to meet this expectation\nwill result in an error.\n\nStatic objects with constant initializers avoid hard-to-find bugs caused by\nthe indeterminate order of dynamic initialization. They can also be safely\nused by other static constructors across translation units.\n\nThis attribute acts as a compile time assertion that the requirements\nfor constant initialization have been met. Since these requirements change\nbetween dialects and have subtle pitfalls it\'s important to fail fast instead\nof silently falling back on dynamic initialization.\n\n```c++\n // -std=c++14\n #define SAFE_STATIC __attribute__((require_constant_initialization)) static\n struct T {\n constexpr T(int) {}\n ~T();\n };\n SAFE_STATIC T x = {42}; // OK.\n SAFE_STATIC T y = 42; // error: variable does not have a constant initializer\n // copy initialization is not a constant expression on a non-literal type.\n```\nThis attribute can only be applied to objects with static or thread-local storage\nduration.\n\nReviewers: majnemer, rsmith, aaron.ballman\n\nSubscribers: jroelofs, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23385\n\nllvm-svn: 280516"}, | [h]={"92f8935e63f0",1472840729,"Implement __attribute__((require_constant_initialization)) for safe static initialization.","Implement __attribute__((require_constant_initialization)) for safe static initialization.\n\nSummary:\nThis attribute specifies expectations about the initialization of static and\nthread local variables. Specifically that the variable has a\n[constant initializer](http://en.cppreference.com/w/cpp/language/constant_initialization)\naccording to the rules of [basic.start.static]. Failure to meet this expectation\nwill result in an error.\n\nStatic objects with constant initializers avoid hard-to-find bugs caused by\nthe indeterminate order of dynamic initialization. They can also be safely\nused by other static constructors across translation units.\n\nThis attribute acts as a compile time assertion that the requirements\nfor constant initialization have been met. Since these requirements change\nbetween dialects and have subtle pitfalls it\'s important to fail fast instead\nof silently falling back on dynamic initialization.\n\n```c++\n // -std=c++14\n #define SAFE_STATIC __attribute__((require_constant_initialization)) static\n struct T {\n constexpr T(int) {}\n ~T();\n };\n SAFE_STATIC T x = {42}; // OK.\n SAFE_STATIC T y = 42; // error: variable does not have a constant initializer\n // copy initialization is not a constant expression on a non-literal type.\n```\nThis attribute can only be applied to objects with static or thread-local storage\nduration.\n\nReviewers: majnemer, rsmith, aaron.ballman\n\nSubscribers: jroelofs, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23385\n\nllvm-svn: 280516"}, | ||
[i]={{ | [i]={{q,14229,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n // Check whether the initializer is sufficiently constant.\n if (getLangOpts().CPlusPlus && !type->isDependentType() && Init && !Init->isValueDependent() && (GlobalStorage || var->isConstexpr() || var->mightBeUsableInConstantExpressions(Context))) {\n // ...\n if (HasConstInit) {\n // ...\n } else if (var->isConstexpr()) {\n // ...\n } else if (GlobalStorage && var->hasAttr<ConstInitAttr>()) {\n // ...\n Diag(Attr->getLocation(), diag::note_declared_required_constant_init_here) << Attr->getRange() << Attr->isConstinit();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp:6:1: note: required by \'constinit\' specifier here"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp:6:1: note: required by \'constinit\' specifier here"} | ||
Line 3,244: | Line 3,256: | ||
}, | }, | ||
["note_deduced_non_type_template_arg_type_mismatch"]={ | ["note_deduced_non_type_template_arg_type_mismatch"]={ | ||
[ | [b]="deduced non-type template argument does not have the same type as the corresponding template parameter%diff{ ($ vs $)|}0,1", | ||
[ | [d]=c, | ||
[ | [e]="deduced non\\-type template argument does not have the same type as the corresponding template parameter(?: \\((.*?) vs (.*?)\\)|)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:414:38: note: deduced non-type template argument does not have the same type as the corresponding template parameter (\'const int\' vs \'int &\')","clang/test/SemaTemplate/temp_arg_nontype.cpp:420:32: note: deduced non-type template argument does not have the same type as the corresponding template parameter (\'int\' vs \'const int &\')","clang/test/SemaTemplate/temp_arg_nontype.cpp:426:31: note: deduced non-type template argument does not have the same type as the corresponding template parameter (\'int\' vs \'const int &\')"} | ["clang/test/SemaTemplate/temp_arg_nontype.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype.cpp:414:38: note: deduced non-type template argument does not have the same type as the corresponding template parameter (\'const int\' vs \'int &\')","clang/test/SemaTemplate/temp_arg_nontype.cpp:420:32: note: deduced non-type template argument does not have the same type as the corresponding template parameter (\'int\' vs \'const int &\')","clang/test/SemaTemplate/temp_arg_nontype.cpp:426:31: note: deduced non-type template argument does not have the same type as the corresponding template parameter (\'int\' vs \'const int &\')"} | ||
Line 3,254: | Line 3,266: | ||
}, | }, | ||
["note_deduced_template_arg_substitution_here"]={ | ["note_deduced_template_arg_substitution_here"]={ | ||
[ | [b]="during template argument deduction for %select{class|variable}0 template %select{partial specialization |}1%2 %3", | ||
[ | [d]=c, | ||
[ | [e]="during template argument deduction for (?:class|variable) template (?:partial specialization |)(.*?) (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e68a38f0a8ab",1482553231,"Fix crash if substitution fails during deduction of variable template partial specialization argumen...","Fix crash if substitution fails during deduction of variable template partial specialization arguments.\n\nllvm-svn: 290484"}, | [h]={"e68a38f0a8ab",1482553231,"Fix crash if substitution fails during deduction of variable template partial specialization argumen...","Fix crash if substitution fails during deduction of variable template partial specialization arguments.\n\nllvm-svn: 290484"}, | ||
[i]={{ | [i]={{E,858,"/// 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::DeducedTemplateArgumentSubstitution: {\n if (FunctionTemplateDecl *FnTmpl = dyn_cast<FunctionTemplateDecl>(Active->Entity)) {\n // ...\n } else {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_deduced_template_arg_substitution_here) << IsVar << IsTemplate << cast<NamedDecl>(Active->Entity) << getTemplateArgumentBindingsText(Params, Active->TemplateArgs, Active->NumTemplateArgs) << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: during template argument deduction for class template partial specialization \'B<T *>\' [with T = int *]","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: during template argument deduction for class template partial specialization \'B<T **>\' [with T = int]","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: during template argument deduction for variable template partial specialization \'v1<T *>\' [with T = int *]","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: during template argument deduction for variable template partial specialization \'v1<T **>\' [with T = int]"} | ["clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: during template argument deduction for class template partial specialization \'B<T *>\' [with T = int *]","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:29:24: note: during template argument deduction for class template partial specialization \'B<T **>\' [with T = int]","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: during template argument deduction for variable template partial specialization \'v1<T *>\' [with T = int *]","clang/test/CXX/temp/temp.constr/temp.constr.constr/partial-specializations.cpp:78:17: note: during template argument deduction for variable template partial specialization \'v1<T **>\' [with T = int]"} | ||
Line 3,266: | Line 3,278: | ||
}, | }, | ||
["note_deduction_guide_access"]={ | ["note_deduction_guide_access"]={ | ||
[ | [b]={{nil,L,"deduction guide declared %0 by intervening access specifier"}}, | ||
[ | [d]=c, | ||
[ | [e]="deduction guide declared (.*?) by intervening access specifier", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e4899c16480d",1527718423,"PR37631: verify that a member deduction guide has the same access as its template.","PR37631: verify that a member deduction guide has the same access as its template.\n\nllvm-svn: 333599"}, | [h]={"e4899c16480d",1527718423,"PR37631: verify that a member deduction guide has the same access as its template.","PR37631: verify that a member deduction guide has the same access as its template.\n\nllvm-svn: 333599"}, | ||
[i]={{m,3676,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n } else {\n // ...\n // C++ [temp.deduct.guide]p3:\n // A deduction guide [...] for a member class template [shall be\n // declared] with the same access [as the template].\n if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(NonTemplateMember)) {\n // ...\n // Access specifiers are only meaningful if both the template and the\n // deduction guide are from the same scope.\n if (AS != TD->getAccess() && TD->getDeclContext()->getRedeclContext()->Equals(DG->getDeclContext()->getRedeclContext())) {\n // ...\n Diag(LastAccessSpec->getBeginLoc(), diag::note_deduction_guide_access) << AS;"}}, | [i]={{m,3676,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n } else {\n // ...\n // C++ [temp.deduct.guide]p3:\n // A deduction guide [...] for a member class template [shall be\n // declared] with the same access [as the template].\n if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(NonTemplateMember)) {\n // ...\n // Access specifiers are only meaningful if both the template and the\n // deduction guide are from the same scope.\n if (AS != TD->getAccess() && TD->getDeclContext()->getRedeclContext()->Equals(DG->getDeclContext()->getRedeclContext())) {\n // ...\n Diag(LastAccessSpec->getBeginLoc(), diag::note_deduction_guide_access) << AS;"}}, | ||
Line 3,278: | Line 3,290: | ||
}, | }, | ||
["note_deduction_guide_template_access"]={ | ["note_deduction_guide_template_access"]={ | ||
[ | [b]={{nil,L,"member template declared %0 here"}}, | ||
[ | [d]=c, | ||
[ | [e]="member template declared (.*?) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e4899c16480d",1527718423,"PR37631: verify that a member deduction guide has the same access as its template.","PR37631: verify that a member deduction guide has the same access as its template.\n\nllvm-svn: 333599"}, | [h]={"e4899c16480d",1527718423,"PR37631: verify that a member deduction guide has the same access as its template.","PR37631: verify that a member deduction guide has the same access as its template.\n\nllvm-svn: 333599"}, | ||
[i]={{m,3668,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n } else {\n // ...\n // C++ [temp.deduct.guide]p3:\n // A deduction guide [...] for a member class template [shall be\n // declared] with the same access [as the template].\n if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(NonTemplateMember)) {\n // ...\n // Access specifiers are only meaningful if both the template and the\n // deduction guide are from the same scope.\n if (AS != TD->getAccess() && TD->getDeclContext()->getRedeclContext()->Equals(DG->getDeclContext()->getRedeclContext())) {\n // ...\n Diag(TD->getBeginLoc(), diag::note_deduction_guide_template_access) << TD->getAccess();"}}, | [i]={{m,3668,"/// ActOnCXXMemberDeclarator - This is invoked when a C++ class member\n/// declarator is parsed. \'AS\' is the access specifier, \'BW\' specifies the\n/// bitfield width if there is one, \'InitExpr\' specifies the initializer if\n/// one has been parsed, and \'InitStyle\' is set if an in-class initializer is\n/// present (but parsing it has been deferred).\nNamedDecl *Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BW, const VirtSpecifiers &VS, InClassInitStyle InitStyle) {\n // ...\n if (isInstField) {\n // ...\n } else {\n // ...\n // C++ [temp.deduct.guide]p3:\n // A deduction guide [...] for a member class template [shall be\n // declared] with the same access [as the template].\n if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(NonTemplateMember)) {\n // ...\n // Access specifiers are only meaningful if both the template and the\n // deduction guide are from the same scope.\n if (AS != TD->getAccess() && TD->getDeclContext()->getRedeclContext()->Equals(DG->getDeclContext()->getRedeclContext())) {\n // ...\n Diag(TD->getBeginLoc(), diag::note_deduction_guide_template_access) << TD->getAccess();"}}, | ||
Line 3,290: | Line 3,302: | ||
}, | }, | ||
["note_default_arg_instantiation_here"]={ | ["note_default_arg_instantiation_here"]={ | ||
[ | [b]="in instantiation of default argument for \'%0\' required here", | ||
[ | [d]=c, | ||
[ | [e]="in instantiation of default argument for \'(.*?)\' required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | [h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | ||
[i]={{ | [i]={{E,811,"/// 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::DefaultTemplateArgumentInstantiation: {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_default_arg_instantiation_here) << OS.str() << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/instantiation-default-1.cpp"]={"clang/test/SemaTemplate/instantiation-default-1.cpp:36:1: note: in instantiation of default argument for \'Def2<int_ref_t>\' required here"} | ["clang/test/SemaTemplate/instantiation-default-1.cpp"]={"clang/test/SemaTemplate/instantiation-default-1.cpp:36:1: note: in instantiation of default argument for \'Def2<int_ref_t>\' required here"} | ||
Line 3,302: | Line 3,314: | ||
}, | }, | ||
["note_default_argument_declared_here"]={ | ["note_default_argument_declared_here"]={ | ||
[ | [b]="default argument declared here", | ||
[ | [d]=c, | ||
[ | [e]="default argument declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"84613c4eba08",1244825500,"It\'s an error to use a function declared in a class definition as a default argument before the func...","It\'s an error to use a function declared in a class definition as a default argument before the function has been declared.\n\nllvm-svn: 73234"}, | [h]={"84613c4eba08",1244825500,"It\'s an error to use a function declared in a class definition as a default argument before the func...","It\'s an error to use a function declared in a class definition as a default argument before the function has been declared.\n\nllvm-svn: 73234"}, | ||
[i]={{ | [i]={{o,6327,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n Diag(UnparsedDefaultArgLocs[Param], diag::note_default_argument_declared_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/default2.cpp"]={"clang/test/SemaCXX/default2.cpp:118:22: note: default argument declared here","clang/test/SemaCXX/default2.cpp:124:22: note: default argument declared here"} | ["clang/test/SemaCXX/default2.cpp"]={"clang/test/SemaCXX/default2.cpp:118:22: note: default argument declared here","clang/test/SemaCXX/default2.cpp:124:22: note: default argument declared here"} | ||
Line 3,314: | Line 3,326: | ||
}, | }, | ||
["note_default_function_arg_instantiation_here"]={ | ["note_default_function_arg_instantiation_here"]={ | ||
[ | [b]="in instantiation of default function argument expression for \'%0\' required here", | ||
[ | [d]=c, | ||
[ | [e]="in instantiation of default function argument expression for \'(.*?)\' required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"657bad441eda",1252127659,"Use a separate diagnostic for default function argument expressions.","Use a separate diagnostic for default function argument expressions.\n\nllvm-svn: 81062"}, | [h]={"657bad441eda",1252127659,"Use a separate diagnostic for default function argument expressions.","Use a separate diagnostic for default function argument expressions.\n\nllvm-svn: 81062"}, | ||
[i]={{ | [i]={{E,877,"/// 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::DefaultFunctionArgumentInstantiation: {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_default_function_arg_instantiation_here) << OS.str() << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-unavailable.cpp"]={"clang/test/SemaCXX/attr-unavailable.cpp:159:22: note: in instantiation of default function argument expression for \'has_default_arg_template<int>\' required here"} | ["clang/test/SemaCXX/attr-unavailable.cpp"]={"clang/test/SemaCXX/attr-unavailable.cpp:159:22: note: in instantiation of default function argument expression for \'has_default_arg_template<int>\' required here"} | ||
Line 3,326: | Line 3,338: | ||
}, | }, | ||
["note_default_member_initializer_not_yet_parsed"]={ | ["note_default_member_initializer_not_yet_parsed"]={ | ||
[ | [b]={{nil,I,"default member initializer declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="default member initializer declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{o,6457,"ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) {\n // ...\n Diag(Field->getEndLoc(), diag::note_default_member_initializer_not_yet_parsed);"},{E,3520,"/// Instantiate the definition of a field from the given pattern.\n///\n/// \\param PointOfInstantiation The point of instantiation within the\n/// source code.\n/// \\param Instantiation is the declaration whose definition is being\n/// instantiated. This will be a class of a class temploid\n/// specialization, or a local enumeration within a function temploid\n/// specialization.\n/// \\param Pattern The templated declaration from which the instantiation\n/// occurs.\n/// \\param TemplateArgs The template arguments to be substituted into\n/// the pattern.\n///\n/// \\return \\c true if an error occurred, \\c false otherwise.\nbool Sema::InstantiateInClassInitializer(SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs) {\n // ...\n if (!OldInit) {\n // ...\n Diag(Pattern->getEndLoc(), diag::note_default_member_initializer_not_yet_parsed);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:68:14: note: default member initializer declared here","clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:70:14: note: default member initializer declared here"} | ["clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp"]={"clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:68:14: note: default member initializer declared here","clang/test/SemaCXX/cxx1y-initializer-aggregates.cpp:70:14: note: default member initializer declared here"} | ||
Line 3,338: | Line 3,350: | ||
}, | }, | ||
["note_defaulted_comparison_ambiguous"]={ | ["note_defaulted_comparison_ambiguous"]={ | ||
[ | [b]={{nil,n,"defaulted %0 is implicitly deleted because implied %select{|\'==\' |\'<\' }1comparison %select{|for member %3 |for base class %3 }2is ambiguous"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because implied (?:|\'\\=\\=\' |\'\\<\' )comparison (?:|for member (.*?) |for base class (.*?) )is ambiguous", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8200,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Ambiguous:\n if (Diagnose == ExplainDeleted) {\n // ...\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Subobj.Loc, S.PDiag(diag::note_defaulted_comparison_ambiguous) << FD << Kind << Subobj.Kind << Subobj.Decl), S, OCD_AmbiguousCandidates, Args);"}}, | [i]={{m,8200,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Ambiguous:\n if (Diagnose == ExplainDeleted) {\n // ...\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Subobj.Loc, S.PDiag(diag::note_defaulted_comparison_ambiguous) << FD << Kind << Subobj.Kind << Subobj.Decl), S, OCD_AmbiguousCandidates, Args);"}}, | ||
[j]={ | [j]={ | ||
Line 3,350: | Line 3,362: | ||
}, | }, | ||
["note_defaulted_comparison_calls_deleted"]={ | ["note_defaulted_comparison_calls_deleted"]={ | ||
[ | [b]={{nil,n,"defaulted %0 is implicitly deleted because it would invoke a deleted comparison function%select{| for member %2| for base class %2}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because it would invoke a deleted comparison function(?:| for member (.*?)| for base class (.*?))", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8217,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Deleted:\n if (Diagnose == ExplainDeleted) {\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n // ...\n } else {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_calls_deleted) << FD << Subobj.Kind << Subobj.Decl;"}}, | [i]={{m,8217,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Deleted:\n if (Diagnose == ExplainDeleted) {\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n // ...\n } else {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_calls_deleted) << FD << Subobj.Kind << Subobj.Decl;"}}, | ||
[j]={ | [j]={ | ||
Line 3,362: | Line 3,374: | ||
}, | }, | ||
["note_defaulted_comparison_cannot_deduce"]={ | ["note_defaulted_comparison_cannot_deduce"]={ | ||
[ | [b]={{nil,n,"return type of defaulted \'operator<=>\' cannot be deduced because return type %2 of three-way comparison for %select{|member|base class}0 %1 is not a standard comparison category type"}}, | ||
[ | [d]=c, | ||
[ | [e]="return type of defaulted \'operator\\<\\=\\>\' cannot be deduced because return type (.*?) of three\\-way comparison for (?:|member|base class) (.*?) is not a standard comparison category type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | [h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | ||
[i]={{m,8162,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // ...\n if (!Info) {\n if (Diagnose == ExplainDeleted) {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_cannot_deduce) << Subobj.Kind << Subobj.Decl << BestFD->getCallResultType().withoutLocalFastQualifiers();"}}, | [i]={{m,8162,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // ...\n if (!Info) {\n if (Diagnose == ExplainDeleted) {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_cannot_deduce) << Subobj.Kind << Subobj.Decl << BestFD->getCallResultType().withoutLocalFastQualifiers();"}}, | ||
Line 3,374: | Line 3,386: | ||
}, | }, | ||
["note_defaulted_comparison_cannot_deduce_callee"]={ | ["note_defaulted_comparison_cannot_deduce_callee"]={ | ||
[ | [b]={{nil,n,"selected \'operator<=>\' for %select{|member|base class}0 %1 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="selected \'operator\\<\\=\\>\' for (?:|member|base class) (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | [h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | ||
[i]={{m,8153,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // If any callee has an undeduced return type, deduce it now.\n // FIXME: It\'s not clear how a failure here should be handled. For\n // now, we produce an eager diagnostic, because that is forward\n // compatible with most (all?) other reasonable options.\n if (BestFD->getReturnType()->isUndeducedType() && S.DeduceReturnType(BestFD, FD->getLocation(),\n // ...\n // Don\'t produce a duplicate error when asked to explain why the\n // comparison is deleted: we diagnosed that when initially checking\n // the defaulted operator.\n if (Diagnose == NoDiagnostics) {\n // ...\n S.Diag(BestFD->getLocation(), diag::note_defaulted_comparison_cannot_deduce_callee) << Subobj.Kind << Subobj.Decl;"},{m,8166,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // ...\n if (!Info) {\n if (Diagnose == ExplainDeleted) {\n // ...\n S.Diag(BestFD->getLocation(), diag::note_defaulted_comparison_cannot_deduce_callee) << Subobj.Kind << Subobj.Decl;"}}, | [i]={{m,8153,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // If any callee has an undeduced return type, deduce it now.\n // FIXME: It\'s not clear how a failure here should be handled. For\n // now, we produce an eager diagnostic, because that is forward\n // compatible with most (all?) other reasonable options.\n if (BestFD->getReturnType()->isUndeducedType() && S.DeduceReturnType(BestFD, FD->getLocation(),\n // ...\n // Don\'t produce a duplicate error when asked to explain why the\n // comparison is deleted: we diagnosed that when initially checking\n // the defaulted operator.\n if (Diagnose == NoDiagnostics) {\n // ...\n S.Diag(BestFD->getLocation(), diag::note_defaulted_comparison_cannot_deduce_callee) << Subobj.Kind << Subobj.Decl;"},{m,8166,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // ...\n if (!Info) {\n if (Diagnose == ExplainDeleted) {\n // ...\n S.Diag(BestFD->getLocation(), diag::note_defaulted_comparison_cannot_deduce_callee) << Subobj.Kind << Subobj.Decl;"}}, | ||
Line 3,386: | Line 3,398: | ||
}, | }, | ||
["note_defaulted_comparison_cannot_deduce_undeduced_auto"]={ | ["note_defaulted_comparison_cannot_deduce_undeduced_auto"]={ | ||
[ | [b]={{nil,n,"%select{|member|base class}0 %1 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:|member|base class) (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[i]={{m,8150,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // If any callee has an undeduced return type, deduce it now.\n // FIXME: It\'s not clear how a failure here should be handled. For\n // now, we produce an eager diagnostic, because that is forward\n // compatible with most (all?) other reasonable options.\n if (BestFD->getReturnType()->isUndeducedType() && S.DeduceReturnType(BestFD, FD->getLocation(),\n // ...\n // Don\'t produce a duplicate error when asked to explain why the\n // comparison is deleted: we diagnosed that when initially checking\n // the defaulted operator.\n if (Diagnose == NoDiagnostics) {\n // ...\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_cannot_deduce_undeduced_auto) << Subobj.Kind << Subobj.Decl;"}} | [i]={{m,8150,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n if (NeedsDeducing) {\n // If any callee has an undeduced return type, deduce it now.\n // FIXME: It\'s not clear how a failure here should be handled. For\n // now, we produce an eager diagnostic, because that is forward\n // compatible with most (all?) other reasonable options.\n if (BestFD->getReturnType()->isUndeducedType() && S.DeduceReturnType(BestFD, FD->getLocation(),\n // ...\n // Don\'t produce a duplicate error when asked to explain why the\n // comparison is deleted: we diagnosed that when initially checking\n // the defaulted operator.\n if (Diagnose == NoDiagnostics) {\n // ...\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_cannot_deduce_undeduced_auto) << Subobj.Kind << Subobj.Decl;"}} | ||
}, | }, | ||
["note_defaulted_comparison_inaccessible"]={ | ["note_defaulted_comparison_inaccessible"]={ | ||
[ | [b]={{nil,n,"defaulted %0 is implicitly deleted because it would invoke a %select{private|protected}3 %4%select{ member of %6| member of %6 to compare member %2| to compare base class %2}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because it would invoke a (?:private|protected) (.*?)(?: member of (.*?)| member of (.*?) to compare member (.*?)| to compare base class (.*?))", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | [h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | ||
[i]={{m,8105,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (ArgClass && Best->FoundDecl.getDecl() && Best->FoundDecl.getDecl()->isCXXClassMember()) {\n // ...\n if (!S.isMemberAccessibleForDeletion(ArgClass, Best->FoundDecl, ObjectType, Subobj.Loc, Diagnose == ExplainDeleted ? S.PDiag(diag::note_defaulted_comparison_inaccessible) << FD << Subobj.Kind << Subobj.Decl : S.PDiag()))"}}, | [i]={{m,8105,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (ArgClass && Best->FoundDecl.getDecl() && Best->FoundDecl.getDecl()->isCXXClassMember()) {\n // ...\n if (!S.isMemberAccessibleForDeletion(ArgClass, Best->FoundDecl, ObjectType, Subobj.Loc, Diagnose == ExplainDeleted ? S.PDiag(diag::note_defaulted_comparison_inaccessible) << FD << Subobj.Kind << Subobj.Decl : S.PDiag()))"}}, | ||
Line 3,407: | Line 3,419: | ||
}, | }, | ||
["note_defaulted_comparison_no_viable_function"]={ | ["note_defaulted_comparison_no_viable_function"]={ | ||
[ | [b]={{nil,zb,"defaulted %0 is implicitly deleted because there is no viable %select{three-way comparison function|\'operator==\'}1 for %select{|member |base class }2%3"},{M,M,"defaulted %0 is implicitly deleted because there is no viable three-way comparison function for%select{| member| base class}1 %2"},{I,n,"defaulted %0 is implicitly deleted because there is no viable comparison function%select{| for member %2| for base class %2}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because there is no viable (?:three\\-way comparison function|\'operator\\=\\=\') for (?:|member |base class )(.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8239,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_No_Viable_Function:\n // ...\n if (Diagnose == ExplainDeleted) {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_no_viable_function) << FD << (OO == OO_EqualEqual || OO == OO_ExclaimEqual) << Subobj.Kind << Subobj.Decl;"}}, | [i]={{m,8239,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_No_Viable_Function:\n // ...\n if (Diagnose == ExplainDeleted) {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_no_viable_function) << FD << (OO == OO_EqualEqual || OO == OO_ExclaimEqual) << Subobj.Kind << Subobj.Decl;"}}, | ||
[j]={ | [j]={ | ||
Line 3,419: | Line 3,431: | ||
}, | }, | ||
["note_defaulted_comparison_no_viable_function_synthesized"]={ | ["note_defaulted_comparison_no_viable_function_synthesized"]={ | ||
[ | [b]={{nil,n,"three-way comparison cannot be synthesized because there is no viable function for %select{\'==\'|\'<\'}0 comparison"}}, | ||
[ | [d]=c, | ||
[ | [e]="three\\-way comparison cannot be synthesized because there is no viable function for (?:\'\\=\\=\'|\'\\<\') comparison", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8251,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_No_Viable_Function:\n // ...\n if (Diagnose == ExplainDeleted) {\n // ...\n // For a three-way comparison, list both the candidates for the\n // original operator and the candidates for the synthesized operator.\n if (SpaceshipCandidates) {\n // ...\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_no_viable_function_synthesized) << (OO == OO_EqualEqual ? 0 : 1);"}}, | [i]={{m,8251,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_No_Viable_Function:\n // ...\n if (Diagnose == ExplainDeleted) {\n // ...\n // For a three-way comparison, list both the candidates for the\n // original operator and the candidates for the synthesized operator.\n if (SpaceshipCandidates) {\n // ...\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_no_viable_function_synthesized) << (OO == OO_EqualEqual ? 0 : 1);"}}, | ||
[j]={ | [j]={ | ||
Line 3,431: | Line 3,443: | ||
}, | }, | ||
["note_defaulted_comparison_not_constexpr"]={ | ["note_defaulted_comparison_not_constexpr"]={ | ||
[ | [b]={{nil,n,"non-constexpr comparison function would be used to compare %select{|member %1|base class %1}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-constexpr comparison function would be used to compare (?:|member (.*?)|base class (.*?))", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8123,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n // If it\'s not constexpr, explain why not.\n if (Diagnose == ExplainConstexpr && !BestFD->isConstexpr()) {\n if (Subobj.Kind != Subobject::CompleteObject)\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_not_constexpr) << Subobj.Kind << Subobj.Decl;"}}, | [i]={{m,8123,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n // If it\'s not constexpr, explain why not.\n if (Diagnose == ExplainConstexpr && !BestFD->isConstexpr()) {\n if (Subobj.Kind != Subobject::CompleteObject)\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_not_constexpr) << Subobj.Kind << Subobj.Decl;"}}, | ||
[j]={ | [j]={ | ||
Line 3,443: | Line 3,455: | ||
}, | }, | ||
["note_defaulted_comparison_not_constexpr_here"]={ | ["note_defaulted_comparison_not_constexpr_here"]={ | ||
[ | [b]={{nil,n,"non-constexpr comparison function declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-constexpr comparison function declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8126,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n // If it\'s not constexpr, explain why not.\n if (Diagnose == ExplainConstexpr && !BestFD->isConstexpr()) {\n // ...\n S.Diag(BestFD->getLocation(), diag::note_defaulted_comparison_not_constexpr_here);"}}, | [i]={{m,8126,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // ...\n if (FunctionDecl *BestFD = Best->Function) {\n // ...\n // If it\'s not constexpr, explain why not.\n if (Diagnose == ExplainConstexpr && !BestFD->isConstexpr()) {\n // ...\n S.Diag(BestFD->getLocation(), diag::note_defaulted_comparison_not_constexpr_here);"}}, | ||
[j]={ | [j]={ | ||
Line 3,455: | Line 3,467: | ||
}, | }, | ||
["note_defaulted_comparison_not_rewritten_callee"]={ | ["note_defaulted_comparison_not_rewritten_callee"]={ | ||
[ | [b]={{nil,n,"defaulted %0 is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because this non\\-rewritten comparison function would be the best match for the comparison", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8072,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // C++2a [class.compare.secondary]p2 [P2002R0]:\n // The operator function [...] is defined as deleted if [...] the\n // candidate selected by overload resolution is not a rewritten\n // candidate.\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n if (Diagnose == ExplainDeleted) {\n if (Best->Function) {\n S.Diag(Best->Function->getLocation(), diag::note_defaulted_comparison_not_rewritten_callee) << FD;"},{m,8213,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Deleted:\n if (Diagnose == ExplainDeleted) {\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n S.Diag(Best->Function->getLocation(), diag::note_defaulted_comparison_not_rewritten_callee) << FD;"}}, | [i]={{m,8072,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // C++2a [class.compare.secondary]p2 [P2002R0]:\n // The operator function [...] is defined as deleted if [...] the\n // candidate selected by overload resolution is not a rewritten\n // candidate.\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n if (Diagnose == ExplainDeleted) {\n if (Best->Function) {\n S.Diag(Best->Function->getLocation(), diag::note_defaulted_comparison_not_rewritten_callee) << FD;"},{m,8213,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Deleted:\n if (Diagnose == ExplainDeleted) {\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n S.Diag(Best->Function->getLocation(), diag::note_defaulted_comparison_not_rewritten_callee) << FD;"}}, | ||
[j]={ | [j]={ | ||
Line 3,467: | Line 3,479: | ||
}, | }, | ||
["note_defaulted_comparison_not_rewritten_conversion"]={ | ["note_defaulted_comparison_not_rewritten_conversion"]={ | ||
[ | [b]={{nil,zb,"defaulted %0 is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Ic,1615397021,Hc,Cc}, | ||
[i]={{m,8082,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // C++2a [class.compare.secondary]p2 [P2002R0]:\n // The operator function [...] is defined as deleted if [...] the\n // candidate selected by overload resolution is not a rewritten\n // candidate.\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n if (Diagnose == ExplainDeleted) {\n if (Best->Function) {\n // ...\n } else {\n // ...\n S.Diag(Best->Conversions[0].UserDefined.FoundConversionFunction.getDecl()->getLocation(), diag::note_defaulted_comparison_not_rewritten_conversion) << FD;"}}, | [i]={{m,8082,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitBinaryOperator(OverloadedOperatorKind OO, ArrayRef<Expr *> Args, Subobject Subobj, OverloadCandidateSet *SpaceshipCandidates = nullptr) {\n // ...\n case OR_Success: {\n // C++2a [class.compare.secondary]p2 [P2002R0]:\n // The operator function [...] is defined as deleted if [...] the\n // candidate selected by overload resolution is not a rewritten\n // candidate.\n if ((DCK == DefaultedComparisonKind::NotEqual || DCK == DefaultedComparisonKind::Relational) && !Best->RewriteKind) {\n if (Diagnose == ExplainDeleted) {\n if (Best->Function) {\n // ...\n } else {\n // ...\n S.Diag(Best->Conversions[0].UserDefined.FoundConversionFunction.getDecl()->getLocation(), diag::note_defaulted_comparison_not_rewritten_conversion) << FD;"}}, | ||
[j]={ | [j]={ | ||
Line 3,479: | Line 3,491: | ||
}, | }, | ||
["note_defaulted_comparison_reference_member"]={ | ["note_defaulted_comparison_reference_member"]={ | ||
[ | [b]={{nil,n,"defaulted %0 is implicitly deleted because class %1 has a reference member"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because class (.*?) has a reference member", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,8015,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitExpandedSubobject(QualType Type, Subobject Subobj) {\n // C++2a [class.compare.default]p2 [P2002R0]:\n // A defaulted <=> or == operator function for class C is defined as\n // deleted if any non-static data member of C is of reference type\n if (Type->isReferenceType()) {\n if (Diagnose == ExplainDeleted) {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_reference_member) << FD << RD;"}}, | [i]={{m,8015,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visitExpandedSubobject(QualType Type, Subobject Subobj) {\n // C++2a [class.compare.default]p2 [P2002R0]:\n // A defaulted <=> or == operator function for class C is defined as\n // deleted if any non-static data member of C is of reference type\n if (Type->isReferenceType()) {\n if (Diagnose == ExplainDeleted) {\n S.Diag(Subobj.Loc, diag::note_defaulted_comparison_reference_member) << FD << RD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class/class.compare/class.compare.default/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:5:8: note: defaulted \'operator==\' is implicitly deleted because class \'A1\' has a reference member", | ["clang/test/CXX/class/class.compare/class.compare.default/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:5:8: note: defaulted \'operator==\' is implicitly deleted because class \'A1\' has a reference member",Fc,"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:5:8: note: defaulted \'operator==\' is implicitly deleted because class \'A1\' has a reference member","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:5:8: note: defaulted \'operator==\' is implicitly deleted because class \'A1\' has a reference member",Fc,Fc,Fc,Fc,Fc,"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:43:8: note: defaulted \'operator==\' is implicitly deleted because class \'A3\' has a reference member","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:53:10: note: defaulted \'operator==\' is implicitly deleted because class \'B1\' has a reference member","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:53:10: note: defaulted \'operator<=>\' is implicitly deleted because class \'B1\' has a reference member"} | ||
} | } | ||
}, | }, | ||
["note_defaulted_comparison_union"]={ | ["note_defaulted_comparison_union"]={ | ||
[ | [b]={{nil,n,"defaulted %0 is implicitly deleted because %2 is a %select{union-like class|union}1 with variant members"}}, | ||
[ | [d]=c, | ||
[ | [e]="defaulted (.*?) is implicitly deleted because (.*?) is a (?:union\\-like class|union) with variant members", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Hb,1573070592,Kb,Mb}, | ||
[i]={{m,7986,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visit() {\n if ((DCK == DefaultedComparisonKind::Equal || DCK == DefaultedComparisonKind::ThreeWay) && RD->hasVariantMembers()) {\n // C++2a [class.compare.default]p2 [P2002R0]:\n // A defaulted comparison operator function for class C is defined as\n // deleted if [...] C has variant members.\n if (Diagnose == ExplainDeleted) {\n S.Diag(FD->getLocation(), diag::note_defaulted_comparison_union) << FD << RD->isUnion() << RD;"}}, | [i]={{m,7986,"/// A visitor over the notional body of a defaulted comparison that determines\n/// whether that body would be deleted or constexpr.\nclass DefaultedComparisonAnalyzer : public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer, DefaultedComparisonInfo, DefaultedComparisonInfo, DefaultedComparisonSubobject> {\n // ...\n Result visit() {\n if ((DCK == DefaultedComparisonKind::Equal || DCK == DefaultedComparisonKind::ThreeWay) && RD->hasVariantMembers()) {\n // C++2a [class.compare.default]p2 [P2002R0]:\n // A defaulted comparison operator function for class C is defined as\n // deleted if [...] C has variant members.\n if (Diagnose == ExplainDeleted) {\n S.Diag(FD->getLocation(), diag::note_defaulted_comparison_union) << FD << RD->isUnion() << RD;"}}, | ||
[j]={ | [j]={ | ||
Line 3,503: | Line 3,515: | ||
}, | }, | ||
["note_defined_here"]={ | ["note_defined_here"]={ | ||
[ | [b]="%0 defined here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) defined here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"74f7d50f6a5b",1329334432,"When overload resolution picks an implicitly-deleted special member","When overload resolution picks an implicitly-deleted special member\nfunction, provide a specialized diagnostic that indicates the kind of\nspecial member function (default constructor, copy assignment\noperator, etc.) and that it was implicitly deleted. Add a hook where\nwe can provide more detailed information later.\n\nllvm-svn: 150611"}, | [h]={"74f7d50f6a5b",1329334432,"When overload resolution picks an implicitly-deleted special member","When overload resolution picks an implicitly-deleted special member\nfunction, provide a specialized diagnostic that indicates the kind of\nspecial member function (default constructor, copy assignment\noperator, etc.) and that it was implicitly deleted. Add a hook where\nwe can provide more detailed information later.\n\nllvm-svn: 150611"}, | ||
[i]={{"clang/lib/Sema/Sema.cpp",2006,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckDeviceType = [&](QualType Ty) {\n // ...\n if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) || (Ty->isFloat128Type() && !Context.getTargetInfo().hasFloat128Type()) || (Ty->isIbm128Type() && !Context.getTargetInfo().hasIbm128Type()) || (Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 && !Context.getTargetInfo().hasInt128Type()) || (Ty->isBFloat16Type() && !Context.getTargetInfo().hasBFloat16Type() && !LangOpts.CUDAIsDevice) || LongDoubleMismatched) {\n // ...\n if (D)\n targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;"},{"clang/lib/Sema/Sema.cpp",2032,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n if (!TI.hasLongDoubleType() && UnqualTy == Context.LongDoubleTy) {\n // ...\n if (D)\n targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;"},{"clang/lib/Sema/Sema.cpp",2051,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n if (IsRetTy && !TI.hasFPReturn() && (IsDouble || IsFloat)) {\n // ...\n if (D)\n targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;"},{ | [i]={{"clang/lib/Sema/Sema.cpp",2006,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckDeviceType = [&](QualType Ty) {\n // ...\n if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) || (Ty->isFloat128Type() && !Context.getTargetInfo().hasFloat128Type()) || (Ty->isIbm128Type() && !Context.getTargetInfo().hasIbm128Type()) || (Ty->isIntegerType() && Context.getTypeSize(Ty) == 128 && !Context.getTargetInfo().hasInt128Type()) || (Ty->isBFloat16Type() && !Context.getTargetInfo().hasBFloat16Type() && !LangOpts.CUDAIsDevice) || LongDoubleMismatched) {\n // ...\n if (D)\n targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;"},{"clang/lib/Sema/Sema.cpp",2032,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n if (!TI.hasLongDoubleType() && UnqualTy == Context.LongDoubleTy) {\n // ...\n if (D)\n targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;"},{"clang/lib/Sema/Sema.cpp",2051,"void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n auto CheckType = [&](QualType Ty, bool IsRetTy = false) {\n // ...\n if (IsRetTy && !TI.hasFPReturn() && (IsDouble || IsFloat)) {\n // ...\n if (D)\n targetDiag(D->getLocation(), diag::note_defined_here, FD) << D;"},{ab,1700,"bool CoroutineStmtBuilder::makeOnException() {\n // ...\n if (!lookupMember(S, \"unhandled_exception\", PromiseRecordDecl, Loc)) {\n // ...\n S.Diag(PromiseRecordDecl->getLocation(), diag::note_defined_here) << PromiseRecordDecl;"},{q,4783,"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 if (!Mod->DefinitionLoc.isInvalid())\n Diag(Mod->DefinitionLoc, diag::note_defined_here) << Mod->getFullModuleName();"},{T,4645,"bool Sema::checkMSInheritanceAttrOnDefinition(CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel ExplicitModel) {\n // ...\n Diag(RD->getDefinition()->getLocation(), diag::note_defined_here) << RD;"},{m,2453,"bool Sema::CheckImmediateEscalatingFunctionDefinition(FunctionDecl *FD, const sema::FunctionScopeInfo *FSI) {\n // ...\n if (FSI->FoundImmediateEscalatingExpression) {\n // ...\n if (it != UndefinedButUsed.end()) {\n // ...\n Diag(FD->getLocation(), diag::note_defined_here) << FD;"},{P,3135,"Sema::DeclGroupPtrTy Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef<ObjCTypeParamList *> TypeParamLists, unsigned NumElts) {\n // ...\n for (unsigned i = 0; i != NumElts; ++i) {\n // ...\n if (PrevIDecl && TypeParams) {\n if (ObjCTypeParamList *PrevTypeParams = PrevIDecl->getTypeParamList()) {\n // ...\n } else if (ObjCInterfaceDecl *Def = PrevIDecl->getDefinition()) {\n // ...\n Diag(Def->getLocation(), diag::note_defined_here) << ClassName;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,3179,"class LocalVarRefChecker final : public ConstStmtVisitor<LocalVarRefChecker, bool> {\n // ...\n bool VisitDeclRefExpr(const DeclRefExpr *E) {\n if (const auto *VD = dyn_cast<VarDecl>(E->getDecl())) {\n if (VD->hasLocalStorage()) {\n // ...\n SemaRef.Diag(VD->getLocation(), diag::note_defined_here) << VD << VD->getSourceRange();"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,19346,"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 if (VD) {\n // ...\n if (VD->getType()->isReferenceType() && VDDef && VDDef->hasInit()) {\n // ...\n if (Check.Visit(VDDef->getInit())) {\n // ...\n S.Diag(VDDef->getLocation(), diag::note_defined_here) << VDDef;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,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;"},{J,23171,"void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, SourceLocation IdLoc) {\n // ...\n if (auto *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n if (IdLoc.isValid() && Res && *Res == OMPDeclareTargetDeclAttr::MT_Link) {\n // ...\n Diag(FD->getLocation(), diag::note_defined_here) << FD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:18:12: note: \'NSObject\' defined here"} | ["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:18:12: note: \'NSObject\' defined here"} | ||
Line 3,515: | Line 3,527: | ||
}, | }, | ||
["note_delete_conversion"]={ | ["note_delete_conversion"]={ | ||
[ | [b]="conversion to pointer type %0", | ||
[ | [d]=c, | ||
[ | [e]="conversion to pointer type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ccc11811052d",1369163148,"Refactor places which perform contextual implicit conversions to go through a","Refactor places which perform contextual implicit conversions to go through a\ncommon function. The C++1y contextual implicit conversion rules themselves are\nnot yet implemented, however.\n\nThis also fixes a subtle bug where template instantiation context notes were\ndropped for diagnostics coming from conversions for integral constant\nexpressions -- we were implicitly slicing a SemaDiagnosticBuilder into a\nDiagnosticBuilder when producing these diagnostics, and losing their context\nnotes in the process.\n\nllvm-svn: 182406"}, | [h]={"ccc11811052d",1369163148,"Refactor places which perform contextual implicit conversions to go through a","Refactor places which perform contextual implicit conversions to go through a\ncommon function. The C++1y contextual implicit conversion rules themselves are\nnot yet implemented, however.\n\nThis also fixes a subtle bug where template instantiation context notes were\ndropped for diagnostics coming from conversions for integral constant\nexpressions -- we were implicitly slicing a SemaDiagnosticBuilder into a\nDiagnosticBuilder when producing these diagnostics, and losing their context\nnotes in the process.\n\nllvm-svn: 182406"}, | ||
[i]={{ | [i]={{Y,3640,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n // ...\n if (!Ex.get()->isTypeDependent()) {\n // ...\n class DeleteConverter : public ContextualImplicitConverter {\n // ...\n SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_delete_conversion) << ConvTy; }"},{Y,3651,"/// ActOnCXXDelete - Parsed a C++ \'delete\' expression (C++ 5.3.5), as in:\n/// @code ::delete ptr; @endcode\n/// or\n/// @code delete [] ptr; @endcode\nExprResult Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *ExE) {\n // ...\n if (!Ex.get()->isTypeDependent()) {\n // ...\n class DeleteConverter : public ContextualImplicitConverter {\n // ...\n SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_delete_conversion) << ConvTy; }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/conversion-delete-expr.cpp"]={"clang/test/SemaCXX/conversion-delete-expr.cpp:9:3: note: conversion to pointer type \'int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:5:3: note: conversion to pointer type \'char *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:37:3: note: conversion to pointer type \'int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:33:3: note: conversion to pointer type \'const int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:51:3: note: conversion to pointer type \'const int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:47:3: note: conversion to pointer type \'const int *\'"} | ["clang/test/SemaCXX/conversion-delete-expr.cpp"]={"clang/test/SemaCXX/conversion-delete-expr.cpp:9:3: note: conversion to pointer type \'int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:5:3: note: conversion to pointer type \'char *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:37:3: note: conversion to pointer type \'int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:33:3: note: conversion to pointer type \'const int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:51:3: note: conversion to pointer type \'const int *\'","clang/test/SemaCXX/conversion-delete-expr.cpp:47:3: note: conversion to pointer type \'const int *\'"} | ||
Line 3,527: | Line 3,539: | ||
}, | }, | ||
["note_delete_non_virtual"]={ | ["note_delete_non_virtual"]={ | ||
[ | [b]="qualify call to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="qualify call to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5a9259caa9b7",1452894331,"Make -Wdelete-non-virtual-dtor warn on explicit `a->~A()` dtor calls too.","Make -Wdelete-non-virtual-dtor warn on explicit `a->~A()` dtor calls too.\n\n-Wdelete-non-virtual-dtor warns if A is a type with virtual functions but\nwithout virtual dtor has its constructor called via `delete a`. This makes the\nwarning also fire if the dtor is called via `a->~A()`. This would\'ve found a\nsecurity bug in Chromium at compile time. Fixes PR26137.\n\nTo fix the warning, add a virtual destructor, make the class final, or remove\nits other virtual methods. If you want to silence the warning, there\'s also\na fixit that shows how:\n\ntest.cc:12:3: warning: destructor called on \'B\' ... [-Wdelete-non-virtual-dtor]\n b->~B();\n ^\ntest.cc:12:6: note: qualify call to silence this warning\n b->~B();\n ^\n B::\n\nhttp://reviews.llvm.org/D16206\n\nllvm-svn: 257939"}, | [h]={"5a9259caa9b7",1452894331,"Make -Wdelete-non-virtual-dtor warn on explicit `a->~A()` dtor calls too.","Make -Wdelete-non-virtual-dtor warn on explicit `a->~A()` dtor calls too.\n\n-Wdelete-non-virtual-dtor warns if A is a type with virtual functions but\nwithout virtual dtor has its constructor called via `delete a`. This makes the\nwarning also fire if the dtor is called via `a->~A()`. This would\'ve found a\nsecurity bug in Chromium at compile time. Fixes PR26137.\n\nTo fix the warning, add a virtual destructor, make the class final, or remove\nits other virtual methods. If you want to silence the warning, there\'s also\na fixit that shows how:\n\ntest.cc:12:3: warning: destructor called on \'B\' ... [-Wdelete-non-virtual-dtor]\n b->~B();\n ^\ntest.cc:12:6: note: qualify call to silence this warning\n b->~B();\n ^\n B::\n\nhttp://reviews.llvm.org/D16206\n\nllvm-svn: 257939"}, | ||
[i]={{ | [i]={{Y,3979,"void Sema::CheckVirtualDtorCall(CXXDestructorDecl *dtor, SourceLocation Loc, bool IsDelete, bool CallCanBeVirtual, bool WarnOnNonAbstractTypes, SourceLocation DtorLoc) {\n // ...\n if (!IsDelete) {\n // ...\n Diag(DtorLoc, diag::note_delete_non_virtual) << FixItHint::CreateInsertion(DtorLoc, TypeStr + \"::\");"}} | ||
}, | }, | ||
["note_deleted_assign_field"]={ | ["note_deleted_assign_field"]={ | ||
[ | [b]="%select{copy|move}0 assignment operator of %1 is implicitly deleted because field %2 is of %select{reference|const-qualified}4 type %3", | ||
[ | [d]=c, | ||
[ | [e]="(?:copy|move) assignment operator of (.*?) is implicitly deleted because field (.*?) is of (?:reference|const\\-qualified) type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9495,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n } else if (CSM == Sema::CXXCopyConstructor) {\n // ...\n } else if (IsAssignment) {\n // For an assignment operator, data members must not be of reference type.\n if (FieldType->isReferenceType()) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_assign_field) << isMove() << MD->getParent() << FD << FieldType << /*Reference*/ 0;"},{m,9503,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n } else if (CSM == Sema::CXXCopyConstructor) {\n // ...\n } else if (IsAssignment) {\n // ...\n if (!FieldRecord && FieldType.isConstQualified()) {\n // C++11 [class.copy]p23:\n // -- a non-static data member of const non-class type (or array thereof)\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_assign_field) << isMove() << MD->getParent() << FD << FD->getType() << /*Const*/ 1;"}}, | [i]={{m,9495,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n } else if (CSM == Sema::CXXCopyConstructor) {\n // ...\n } else if (IsAssignment) {\n // For an assignment operator, data members must not be of reference type.\n if (FieldType->isReferenceType()) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_assign_field) << isMove() << MD->getParent() << FD << FieldType << /*Reference*/ 0;"},{m,9503,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n } else if (CSM == Sema::CXXCopyConstructor) {\n // ...\n } else if (IsAssignment) {\n // ...\n if (!FieldRecord && FieldType.isConstQualified()) {\n // C++11 [class.copy]p23:\n // -- a non-static data member of const non-class type (or array thereof)\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_assign_field) << isMove() << MD->getParent() << FD << FD->getType() << /*Const*/ 1;"}}, | ||
[j]={ | [j]={ | ||
Line 3,548: | Line 3,560: | ||
}, | }, | ||
["note_deleted_copy_ctor_rvalue_reference"]={ | ["note_deleted_copy_ctor_rvalue_reference"]={ | ||
[ | [b]="copy constructor of %0 is implicitly deleted because field %1 is of rvalue reference type %2", | ||
[ | [d]=c, | ||
[ | [e]="copy constructor of (.*?) is implicitly deleted because field (.*?) is of rvalue reference type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9487,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n } else if (CSM == Sema::CXXCopyConstructor) {\n // For a copy constructor, data members must not be of rvalue reference\n // type.\n if (FieldType->isRValueReferenceType()) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_copy_ctor_rvalue_reference) << MD->getParent() << FD << FieldType;"}}, | [i]={{m,9487,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n } else if (CSM == Sema::CXXCopyConstructor) {\n // For a copy constructor, data members must not be of rvalue reference\n // type.\n if (FieldType->isRValueReferenceType()) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_copy_ctor_rvalue_reference) << MD->getParent() << FD << FieldType;"}}, | ||
[j]={ | [j]={ | ||
Line 3,560: | Line 3,572: | ||
}, | }, | ||
["note_deleted_copy_user_declared_move"]={ | ["note_deleted_copy_user_declared_move"]={ | ||
[ | [b]="copy %select{constructor|assignment operator}0 is implicitly deleted because %1 has a user-declared move %select{constructor|assignment operator}2", | ||
[ | [d]=c, | ||
[ | [e]="copy (?:constructor|assignment operator) is implicitly deleted because (.*?) has a user\\-declared move (?:constructor|assignment operator)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9653,"/// Determine whether a defaulted special member function should be defined as\n/// deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11,\n/// C++11 [class.copy]p23, and C++11 [class.dtor]p5.\nbool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI, bool Diagnose) {\n // ...\n // C++11 [class.copy]p7, p18:\n // If the class definition declares a move constructor or move assignment\n // operator, an implicitly declared copy constructor or copy assignment\n // operator is defined as deleted.\n if (MD->isImplicit() && (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment)) {\n // ...\n if (UserDeclaredMove) {\n Diag(UserDeclaredMove->getLocation(), diag::note_deleted_copy_user_declared_move) << (CSM == CXXCopyAssignment) << RD << UserDeclaredMove->isMoveAssignmentOperator();"}}, | [i]={{m,9653,"/// Determine whether a defaulted special member function should be defined as\n/// deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11,\n/// C++11 [class.copy]p23, and C++11 [class.dtor]p5.\nbool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI, bool Diagnose) {\n // ...\n // C++11 [class.copy]p7, p18:\n // If the class definition declares a move constructor or move assignment\n // operator, an implicitly declared copy constructor or copy assignment\n // operator is defined as deleted.\n if (MD->isImplicit() && (CSM == CXXCopyConstructor || CSM == CXXCopyAssignment)) {\n // ...\n if (UserDeclaredMove) {\n Diag(UserDeclaredMove->getLocation(), diag::note_deleted_copy_user_declared_move) << (CSM == CXXCopyAssignment) << RD << UserDeclaredMove->isMoveAssignmentOperator();"}}, | ||
[j]={ | [j]={ | ||
Line 3,572: | Line 3,584: | ||
}, | }, | ||
["note_deleted_default_ctor_all_const"]={ | ["note_deleted_default_ctor_all_const"]={ | ||
[ | [b]="%select{default constructor of|constructor inherited by}0 %1 is implicitly deleted because all %select{data members|data members of an anonymous union member}2 are const-qualified", | ||
[ | [d]=c, | ||
[ | [e]="(?:default constructor of|constructor inherited by) (.*?) is implicitly deleted because all (?:data members|data members of an anonymous union member) are const\\-qualified", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9537,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (FieldRecord) {\n // Some additional restrictions exist on the variant members.\n if (!inUnion() && FieldRecord->isUnion() && FieldRecord->isAnonymousStructOrUnion()) {\n // ...\n // At least one member in each anonymous union must be non-const\n if (CSM == Sema::CXXDefaultConstructor && AllVariantFieldsAreConst && !FieldRecord->field_empty()) {\n if (Diagnose)\n S.Diag(FieldRecord->getLocation(), diag::note_deleted_default_ctor_all_const) << !!ICI << MD->getParent() << /*anonymous union*/ 1;"},{m,9571,"/// C++11 [class.ctor] p5:\n/// A defaulted default constructor for a class X is defined as deleted if\n/// X is a union and all of its variant members are of const-qualified type.\nbool SpecialMemberDeletionInfo::shouldDeleteForAllConstMembers() {\n // This is a silly definition, because it gives an empty union a deleted\n // default constructor. Don\'t do that.\n if (CSM == Sema::CXXDefaultConstructor && inUnion() && AllFieldsAreConst) {\n // ...\n if (Diagnose)\n S.Diag(MD->getParent()->getLocation(), diag::note_deleted_default_ctor_all_const) << !!ICI << MD->getParent() << /*not anonymous union*/ 0;"}}, | [i]={{m,9537,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (FieldRecord) {\n // Some additional restrictions exist on the variant members.\n if (!inUnion() && FieldRecord->isUnion() && FieldRecord->isAnonymousStructOrUnion()) {\n // ...\n // At least one member in each anonymous union must be non-const\n if (CSM == Sema::CXXDefaultConstructor && AllVariantFieldsAreConst && !FieldRecord->field_empty()) {\n if (Diagnose)\n S.Diag(FieldRecord->getLocation(), diag::note_deleted_default_ctor_all_const) << !!ICI << MD->getParent() << /*anonymous union*/ 1;"},{m,9571,"/// C++11 [class.ctor] p5:\n/// A defaulted default constructor for a class X is defined as deleted if\n/// X is a union and all of its variant members are of const-qualified type.\nbool SpecialMemberDeletionInfo::shouldDeleteForAllConstMembers() {\n // This is a silly definition, because it gives an empty union a deleted\n // default constructor. Don\'t do that.\n if (CSM == Sema::CXXDefaultConstructor && inUnion() && AllFieldsAreConst) {\n // ...\n if (Diagnose)\n S.Diag(MD->getParent()->getLocation(), diag::note_deleted_default_ctor_all_const) << !!ICI << MD->getParent() << /*not anonymous union*/ 0;"}}, | ||
[j]={ | [j]={ | ||
Line 3,584: | Line 3,596: | ||
}, | }, | ||
["note_deleted_default_ctor_uninit_field"]={ | ["note_deleted_default_ctor_uninit_field"]={ | ||
[ | [b]="%select{default constructor of|constructor inherited by}0 %1 is implicitly deleted because field %2 of %select{reference|const-qualified}4 type %3 would not be initialized", | ||
[ | [d]=c, | ||
[ | [e]="(?:default constructor of|constructor inherited by) (.*?) is implicitly deleted because field (.*?) of (?:reference|const\\-qualified) type (.*?) would not be initialized", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9464,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // For a default constructor, all references must be initialized in-class\n // and, if a union, it must have a non-const member.\n if (FieldType->isReferenceType() && !FD->hasInClassInitializer()) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_default_ctor_uninit_field) << !!ICI << MD->getParent() << FD << FieldType << /*Reference*/ 0;"},{m,9475,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n // C++11 [class.ctor]p5 (modified by DR2394): any non-variant non-static\n // data member of const-qualified type (or array thereof) with no\n // brace-or-equal-initializer is not const-default-constructible.\n if (!inUnion() && FieldType.isConstQualified() && !FD->hasInClassInitializer() && (!FieldRecord || !FieldRecord->allowConstDefaultInit())) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_default_ctor_uninit_field) << !!ICI << MD->getParent() << FD << FD->getType() << /*Const*/ 1;"}}, | [i]={{m,9464,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // For a default constructor, all references must be initialized in-class\n // and, if a union, it must have a non-const member.\n if (FieldType->isReferenceType() && !FD->hasInClassInitializer()) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_default_ctor_uninit_field) << !!ICI << MD->getParent() << FD << FieldType << /*Reference*/ 0;"},{m,9475,"/// Check whether we should delete a special member function due to the class\n/// having a particular non-static data member.\nbool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) {\n // ...\n if (CSM == Sema::CXXDefaultConstructor) {\n // ...\n // C++11 [class.ctor]p5 (modified by DR2394): any non-variant non-static\n // data member of const-qualified type (or array thereof) with no\n // brace-or-equal-initializer is not const-default-constructible.\n if (!inUnion() && FieldType.isConstQualified() && !FD->hasInClassInitializer() && (!FieldRecord || !FieldRecord->allowConstDefaultInit())) {\n if (Diagnose)\n S.Diag(FD->getLocation(), diag::note_deleted_default_ctor_uninit_field) << !!ICI << MD->getParent() << FD << FD->getType() << /*Const*/ 1;"}}, | ||
[j]={ | [j]={ | ||
Line 3,596: | Line 3,608: | ||
}, | }, | ||
["note_deleted_dtor_no_operator_delete"]={ | ["note_deleted_dtor_no_operator_delete"]={ | ||
[ | [b]="virtual destructor requires an unambiguous, accessible \'operator delete\'", | ||
[ | [d]=c, | ||
[ | [e]="virtual destructor requires an unambiguous, accessible \'operator delete\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9673,"/// Determine whether a defaulted special member function should be defined as\n/// deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11,\n/// C++11 [class.copy]p23, and C++11 [class.dtor]p5.\nbool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI, bool Diagnose) {\n // ...\n // C++11 [class.dtor]p5:\n // -- for a virtual destructor, lookup of the non-array deallocation function\n // results in an ambiguity or in a function that is deleted or inaccessible\n if (CSM == CXXDestructor && MD->isVirtual()) {\n // ...\n if (FindDeallocationFunction(MD->getLocation(), MD->getParent(), Name, OperatorDelete, /*Diagnose*/ false)) {\n if (Diagnose)\n Diag(RD->getLocation(), diag::note_deleted_dtor_no_operator_delete);"}}, | [i]={{m,9673,"/// Determine whether a defaulted special member function should be defined as\n/// deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11,\n/// C++11 [class.copy]p23, and C++11 [class.dtor]p5.\nbool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI, bool Diagnose) {\n // ...\n // C++11 [class.dtor]p5:\n // -- for a virtual destructor, lookup of the non-array deallocation function\n // results in an ambiguity or in a function that is deleted or inaccessible\n if (CSM == CXXDestructor && MD->isVirtual()) {\n // ...\n if (FindDeallocationFunction(MD->getLocation(), MD->getParent(), Name, OperatorDelete, /*Diagnose*/ false)) {\n if (Diagnose)\n Diag(RD->getLocation(), diag::note_deleted_dtor_no_operator_delete);"}}, | ||
[j]={ | [j]={ | ||
Line 3,608: | Line 3,620: | ||
}, | }, | ||
["note_deleted_special_member_class_subobject"]={ | ["note_deleted_special_member_class_subobject"]={ | ||
[ | [b]={{nil,r,"%select{default constructor of|copy constructor of|move constructor of|copy assignment operator of|move assignment operator of|destructor of|constructor inherited by}0 %1 is implicitly deleted because %select{base class %3|%select{||||variant }4field %3}2 %select{has %select{no|a deleted|multiple|an inaccessible|a non-trivial}4 %select{%select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|%select{default|corresponding|default|default|default}4 constructor}0|destructor}5%select{||s||}4|is an ObjC pointer}6"},{z,nil,"%select{default constructor of|copy constructor of|move constructor of|copy assignment operator of|move assignment operator of|destructor of|constructor inherited by}0 %1 is implicitly deleted because %select{base class %3|%select{||||variant }4field %3}2 has %select{no|a deleted|multiple|an inaccessible|a non-trivial}4 %select{%select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|%select{default|corresponding|default|default|default}4 constructor}0|destructor}5%select{||s||}4"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:default constructor of|copy constructor of|move constructor of|copy assignment operator of|move assignment operator of|destructor of|constructor inherited by) (.*?) is implicitly deleted because (?:base class (.*?)|(?:||||variant )field (.*?)) (?:has (?:no|a deleted|multiple|an inaccessible|a non\\-trivial) (?:(?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|(?:default|corresponding|default|default|default) constructor)|destructor)(?:||s||)|is an ObjC pointer)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={yc,1333140808,wc,xc}, | ||
[i]={{m,9336,"/// Check whether we should delete a special member due to the implicit\n/// definition containing a call to a special member of a subobject.\nbool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR, bool IsDtorCallInCtor) {\n // ...\n if (Diagnose) {\n if (Field) {\n S.Diag(Field->getLocation(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << MD->getParent() << /*IsField*/ true << Field << DiagKind << IsDtorCallInCtor << /*IsObjCPtr*/ false;"},{m,9342,"/// Check whether we should delete a special member due to the implicit\n/// definition containing a call to a special member of a subobject.\nbool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR, bool IsDtorCallInCtor) {\n // ...\n if (Diagnose) {\n if (Field) {\n // ...\n } else {\n // ...\n S.Diag(Base->getBeginLoc(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << MD->getParent() << /*IsField*/ false << Base->getType() << DiagKind << IsDtorCallInCtor << /*IsObjCPtr*/ false;"},{m,9413,"bool SpecialMemberDeletionInfo::shouldDeleteForVariantObjCPtrMember(FieldDecl *FD, QualType FieldType) {\n // ...\n if (Diagnose) {\n // ...\n S.Diag(FD->getLocation(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << ParentClass << /*IsField*/ true << FD << 4 << /*IsDtorCallInCtor*/ false << /*IsObjCPtr*/ true;"},{m,9439,"/// Check whether we should delete a special member function due to the class\n/// having a particular direct or virtual base class.\nbool SpecialMemberDeletionInfo::shouldDeleteForBase(CXXBaseSpecifier *Base) {\n // ...\n if (auto *BaseCtor = SMOR.getMethod()) {\n // Note that we do not check access along this path; other than that,\n // this is the same as shouldDeleteForSubobjectCall(Base, BaseCtor, false);\n // FIXME: Check that the base has a usable destructor! Sink this into\n // shouldDeleteForClassSubobject.\n if (BaseCtor->isDeleted() && Diagnose) {\n S.Diag(Base->getBeginLoc(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << MD->getParent() << /*IsField*/ false << Base->getType() << /*Deleted*/ 1 << /*IsDtorCallInCtor*/ false << /*IsObjCPtr*/ false;"}}, | [i]={{m,9336,"/// Check whether we should delete a special member due to the implicit\n/// definition containing a call to a special member of a subobject.\nbool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR, bool IsDtorCallInCtor) {\n // ...\n if (Diagnose) {\n if (Field) {\n S.Diag(Field->getLocation(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << MD->getParent() << /*IsField*/ true << Field << DiagKind << IsDtorCallInCtor << /*IsObjCPtr*/ false;"},{m,9342,"/// Check whether we should delete a special member due to the implicit\n/// definition containing a call to a special member of a subobject.\nbool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR, bool IsDtorCallInCtor) {\n // ...\n if (Diagnose) {\n if (Field) {\n // ...\n } else {\n // ...\n S.Diag(Base->getBeginLoc(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << MD->getParent() << /*IsField*/ false << Base->getType() << DiagKind << IsDtorCallInCtor << /*IsObjCPtr*/ false;"},{m,9413,"bool SpecialMemberDeletionInfo::shouldDeleteForVariantObjCPtrMember(FieldDecl *FD, QualType FieldType) {\n // ...\n if (Diagnose) {\n // ...\n S.Diag(FD->getLocation(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << ParentClass << /*IsField*/ true << FD << 4 << /*IsDtorCallInCtor*/ false << /*IsObjCPtr*/ true;"},{m,9439,"/// Check whether we should delete a special member function due to the class\n/// having a particular direct or virtual base class.\nbool SpecialMemberDeletionInfo::shouldDeleteForBase(CXXBaseSpecifier *Base) {\n // ...\n if (auto *BaseCtor = SMOR.getMethod()) {\n // Note that we do not check access along this path; other than that,\n // this is the same as shouldDeleteForSubobjectCall(Base, BaseCtor, false);\n // FIXME: Check that the base has a usable destructor! Sink this into\n // shouldDeleteForClassSubobject.\n if (BaseCtor->isDeleted() && Diagnose) {\n S.Diag(Base->getBeginLoc(), diag::note_deleted_special_member_class_subobject) << getEffectiveCSM() << MD->getParent() << /*IsField*/ false << Base->getType() << /*Deleted*/ 1 << /*IsDtorCallInCtor*/ false << /*IsObjCPtr*/ false;"}}, | ||
[j]={ | [j]={ | ||
Line 3,620: | Line 3,632: | ||
}, | }, | ||
["note_deleted_type_mismatch"]={ | ["note_deleted_type_mismatch"]={ | ||
[ | [b]={{nil,z,"function is implicitly deleted because its declared type does not match the type of an implicit %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="function is implicitly deleted because its declared type does not match the type of an implicit (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"9b2c5e7c44fd",1538097403,"[cxx2a] P0641R2: (Some) type mismatches on defaulted functions only","[cxx2a] P0641R2: (Some) type mismatches on defaulted functions only\nrender the function deleted instead of rendering the program ill-formed.\n\nThis change also adds an enabled-by-default warning for the case where\nan explicitly-defaulted special member function of a non-template class\nis implicitly deleted by the type checking rules. (This fires either due\nto this language change or due to pre-C++20 reasons for the member being\nimplicitly deleted). I\'ve tested this on a large codebase and found only\nbugs (where the program means something that\'s clearly different from\nwhat the programmer intended), so this is enabled by default, but we\nshould revisit this if there are problems with this being enabled by\ndefault.\n\nllvm-svn: 343285"}, | [h]={"9b2c5e7c44fd",1538097403,"[cxx2a] P0641R2: (Some) type mismatches on defaulted functions only","[cxx2a] P0641R2: (Some) type mismatches on defaulted functions only\nrender the function deleted instead of rendering the program ill-formed.\n\nThis change also adds an enabled-by-default warning for the case where\nan explicitly-defaulted special member function of a non-template class\nis implicitly deleted by the type checking rules. (This fires either due\nto this language change or due to pre-C++20 reasons for the member being\nimplicitly deleted). I\'ve tested this on a large codebase and found only\nbugs (where the program means something that\'s clearly different from\nwhat the programmer intended), so this is enabled by default, but we\nshould revisit this if there are problems with this being enabled by\ndefault.\n\nllvm-svn: 343285"}, | ||
[i]={{m,7774,"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 Diag(MD->getLocation(), diag::note_deleted_type_mismatch) << CSM;"}}, | [i]={{m,7774,"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 Diag(MD->getLocation(), diag::note_deleted_type_mismatch) << CSM;"}}, | ||
Line 3,632: | Line 3,644: | ||
}, | }, | ||
["note_dependent_function_template_spec_discard_reason"]={ | ["note_dependent_function_template_spec_discard_reason"]={ | ||
[ | [b]={{nil,L,"candidate ignored: %select{not a function template|not a member of the enclosing namespace; did you mean to explicitly qualify the specialization?}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="candidate ignored\\: (?:not a function template|not a member of the enclosing namespace; did you mean to explicitly qualify the specialization\\?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0b75dc5fa2e0",1532032820,"[Sema] Diagnose an invalid dependent function template specialization","[Sema] Diagnose an invalid dependent function template specialization\n\nPreviously, clang marked the specialization as invalid without emitting a\ndiagnostic. This lead to an assert in CodeGen.\n\nrdar://41806724\n\nDifferential revision: https://reviews.llvm.org/D49085\n\nllvm-svn: 337497"}, | [h]={"0b75dc5fa2e0",1532032820,"[Sema] Diagnose an invalid dependent function template specialization","[Sema] Diagnose an invalid dependent function template specialization\n\nPreviously, clang marked the specialization as invalid without emitting a\ndiagnostic. This lead to an assert in CodeGen.\n\nrdar://41806724\n\nDifferential revision: https://reviews.llvm.org/D49085\n\nllvm-svn: 337497"}, | ||
[i]={{ | [i]={{s,9357,"/// Perform semantic analysis for the given dependent function\n/// template specialization.\n///\n/// The only possible way to get a dependent function template specialization\n/// is with a friend declaration, like so:\n///\n/// \\code\n/// template \\<class T> void foo(T);\n/// template \\<class T> class A {\n/// friend void foo<>(T);\n/// };\n/// \\endcode\n///\n/// There really isn\'t any useful analysis we can do here, so we\n/// just store the information.\nbool Sema::CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous) {\n // ...\n if (Previous.empty()) {\n // ...\n for (auto &P : DiscardedCandidates)\n Diag(P.second->getLocation(), diag::note_dependent_function_template_spec_discard_reason) << P.first;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp"]={"clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:364:27: note: candidate ignored: not a function template","clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:372:25: note: candidate ignored: not a member of the enclosing namespace; did you mean to explicitly qualify the specialization?","clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:381:43: note: candidate ignored: not a function template","clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:382:22: note: candidate ignored: not a function template"} | ["clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp"]={"clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:364:27: note: candidate ignored: not a function template","clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:372:25: note: candidate ignored: not a member of the enclosing namespace; did you mean to explicitly qualify the specialization?","clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:381:43: note: candidate ignored: not a function template","clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp:382:22: note: candidate ignored: not a function template"} | ||
Line 3,644: | Line 3,656: | ||
}, | }, | ||
["note_dependent_member_use"]={ | ["note_dependent_member_use"]={ | ||
[ | [b]={{nil,I,"must qualify identifier to find this declaration in dependent base class"}}, | ||
[ | [d]=c, | ||
[ | [e]="must qualify identifier to find this declaration in dependent base class", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{o,2333,"/// Diagnose a lookup that found results in an enclosing class during error\n/// recovery. This usually indicates that the results were found in a dependent\n/// base class that could not be searched as part of a template definition.\n/// Always issues a diagnostic (though this may be only a warning in MS\n/// compatibility mode).\n///\n/// Return \\c true if the error is unrecoverable, or \\c false if the caller\n/// should attempt to recover using these lookup results.\nbool Sema::DiagnoseDependentMemberLookup(const LookupResult &R) {\n // ...\n if (R.getRepresentativeDecl()->getDeclContext()->Equals(R.getNamingClass())) {\n // ...\n } else if (getLangOpts().MSVCCompat) {\n // ...\n NoteID = diag::note_dependent_member_use;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGenCXX/ms-lookup-template-base-classes.cpp"]={"clang/test/CodeGenCXX/ms-lookup-template-base-classes.cpp:5:8: note: must qualify identifier to find this declaration in dependent base class"} | ["clang/test/CodeGenCXX/ms-lookup-template-base-classes.cpp"]={"clang/test/CodeGenCXX/ms-lookup-template-base-classes.cpp:5:8: note: must qualify identifier to find this declaration in dependent base class"} | ||
Line 3,656: | Line 3,668: | ||
}, | }, | ||
["note_dependent_non_type_default_arg_in_partial_spec"]={ | ["note_dependent_non_type_default_arg_in_partial_spec"]={ | ||
[ | [b]="template parameter is used in default argument declared here", | ||
[ | [d]=c, | ||
[ | [e]="template parameter is used in default argument declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6056d5e91886",1391907283,"PR16519, PR18009: When checking a partial specialization for uses of its own","PR16519, PR18009: When checking a partial specialization for uses of its own\ntemplate parameters, don\'t look for parameters of outer templates. If a problem\nis found in a default template argument, point the diagnostic at the partial\nspecialization (with a note pointing at the default argument) instead of\npointing it at the default argument and leaving it unclear which partial\nspecialization os problematic.\n\nllvm-svn: 201031"}, | [h]={"6056d5e91886",1391907283,"PR16519, PR18009: When checking a partial specialization for uses of its own","PR16519, PR18009: When checking a partial specialization for uses of its own\ntemplate parameters, don\'t look for parameters of outer templates. If a problem\nis found in a default template argument, point the diagnostic at the partial\nspecialization (with a note pointing at the default argument) instead of\npointing it at the default argument and leaving it unclear which partial\nspecialization os problematic.\n\nllvm-svn: 201031"}, | ||
[i]={{ | [i]={{s,8549,"/// Subroutine of Sema::CheckTemplatePartialSpecializationArgs\n/// that checks non-type template partial specialization arguments.\nstatic bool CheckNonTypeTemplatePartialSpecializationArgs(Sema &S, SourceLocation TemplateNameLoc, NonTypeTemplateParmDecl *Param, const TemplateArgument *Args, unsigned NumArgs, bool IsDefaultArgument) {\n for (unsigned I = 0; I != NumArgs; ++I) {\n // ...\n if (ParamUseRange.isValid()) {\n if (IsDefaultArgument) {\n // ...\n S.Diag(ParamUseRange.getBegin(), diag::note_dependent_non_type_default_arg_in_partial_spec) << ParamUseRange;"}} | ||
}, | }, | ||
["note_deprecated_this_capture"]={ | ["note_deprecated_this_capture"]={ | ||
[ | [b]={{nil,L,"add an explicit capture of \'this\' to capture \'*this\' by reference"}}, | ||
[ | [d]=c, | ||
[ | [e]="add an explicit capture of \'this\' to capture \'\\*this\' by reference", | ||
[ | [f]=a, | ||
[ | [g]=Nc, | ||
[h]={"d82201e7c66b",1530943128,"P0806R2 Implicit capture of this with a capture-default of [=] is","P0806R2 Implicit capture of this with a capture-default of [=] is\ndeprecated.\n\nAdd a -Wdeprecated warning for this in C++2a onwards. (In C++17 and\nbefore, there isn\'t a reasonable alternative because [=,this] is\nill-formed.)\n\nllvm-svn: 336480"}, | [h]={"d82201e7c66b",1530943128,"P0806R2 Implicit capture of this with a capture-default of [=] is","P0806R2 Implicit capture of this with a capture-default of [=] is\ndeprecated.\n\nAdd a -Wdeprecated warning for this in C++2a onwards. (In C++17 and\nbefore, there isn\'t a reasonable alternative because [=,this] is\nill-formed.)\n\nllvm-svn: 336480"}, | ||
[i]={{"clang/lib/Sema/SemaLambda.cpp",2038,"ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, LambdaScopeInfo *LSI) {\n // ...\n {\n // ...\n for (unsigned I = 0, N = LSI->Captures.size(); I != N; ++I) {\n // ...\n // Map the capture to our AST representation.\n LambdaCapture Capture = [&] {\n if (From.isThisCapture()) {\n // Capturing \'this\' implicitly with a default of \'[=]\' is deprecated,\n // because it results in a reference capture. Don\'t warn prior to\n // C++2a; there\'s nothing that can be done about it before then.\n if (getLangOpts().CPlusPlus20 && IsImplicit && CaptureDefault == LCD_ByCopy) {\n // ...\n Diag(CaptureDefaultLoc, diag::note_deprecated_this_capture) << FixItHint::CreateInsertion(getLocForEndOfToken(CaptureDefaultLoc), \", this\");"}}, | [i]={{"clang/lib/Sema/SemaLambda.cpp",2038,"ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, LambdaScopeInfo *LSI) {\n // ...\n {\n // ...\n for (unsigned I = 0, N = LSI->Captures.size(); I != N; ++I) {\n // ...\n // Map the capture to our AST representation.\n LambdaCapture Capture = [&] {\n if (From.isThisCapture()) {\n // Capturing \'this\' implicitly with a default of \'[=]\' is deprecated,\n // because it results in a reference capture. Don\'t warn prior to\n // C++2a; there\'s nothing that can be done about it before then.\n if (getLangOpts().CPlusPlus20 && IsImplicit && CaptureDefault == LCD_ByCopy) {\n // ...\n Diag(CaptureDefaultLoc, diag::note_deprecated_this_capture) << FixItHint::CreateInsertion(getLocForEndOfToken(CaptureDefaultLoc), \", this\");"}}, | ||
Line 3,677: | Line 3,689: | ||
}, | }, | ||
["note_designated_init_mixed"]={ | ["note_designated_init_mixed"]={ | ||
[ | [b]={{nil,n,"first non-designated initializer is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="first non\\-designated initializer is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5030928d60a1",1567205575,"[c++20] Implement semantic restrictions for C++20 designated","[c++20] Implement semantic restrictions for C++20 designated\ninitializers.\n\nThis has some interesting interactions with our existing extensions to\nsupport C99 designated initializers as an extension in C++. Those are\nresolved as follows:\n\n * We continue to permit the full breadth of C99 designated initializers\n in C++, with the exception that we disallow a partial overwrite of an\n initializer with a non-trivially-destructible type. (Full overwrite\n is OK, because we won\'t run the first initializer at all.)\n\n * The C99 extensions are disallowed in SFINAE contexts and during\n overload resolution, where they could change the meaning of valid\n programs.\n\n * C++20 disallows reordering of initializers. We only check for that for\n the simple cases that the C++20 rules permit (designators of the form\n \'.field_name =\' and continue to allow reordering in other cases).\n It would be nice to improve this behavior in future.\n\n * All C99 designated initializer extensions produce a warning by\n default in C++20 mode. People are going to learn the C++ rules based\n on what Clang diagnoses, so it\'s important we diagnose these properly\n by default.\n\n * In C++ <= 17, we apply the C++20 rules rather than the C99 rules, and\n so still diagnose C99 extensions as described above. We continue to\n accept designated C++20-compatible initializers in C++ <= 17 silently\n by default (but naturally still reject under -pedantic-errors).\n\nThis is not a complete implementation of P0329R4. In particular, that\npaper introduces new non-C99-compatible syntax { .field { init } }, and\nwe do not support that yet.\n\nThis is based on a previous patch by Don Hinton, though I\'ve made\nsubstantial changes when addressing the above interactions.\n\nDifferential Revision: https://reviews.llvm.org/D59754\n\nllvm-svn: 370544"}, | [h]={"5030928d60a1",1567205575,"[c++20] Implement semantic restrictions for C++20 designated","[c++20] Implement semantic restrictions for C++20 designated\ninitializers.\n\nThis has some interesting interactions with our existing extensions to\nsupport C99 designated initializers as an extension in C++. Those are\nresolved as follows:\n\n * We continue to permit the full breadth of C99 designated initializers\n in C++, with the exception that we disallow a partial overwrite of an\n initializer with a non-trivially-destructible type. (Full overwrite\n is OK, because we won\'t run the first initializer at all.)\n\n * The C99 extensions are disallowed in SFINAE contexts and during\n overload resolution, where they could change the meaning of valid\n programs.\n\n * C++20 disallows reordering of initializers. We only check for that for\n the simple cases that the C++20 rules permit (designators of the form\n \'.field_name =\' and continue to allow reordering in other cases).\n It would be nice to improve this behavior in future.\n\n * All C99 designated initializer extensions produce a warning by\n default in C++20 mode. People are going to learn the C++ rules based\n on what Clang diagnoses, so it\'s important we diagnose these properly\n by default.\n\n * In C++ <= 17, we apply the C++20 rules rather than the C99 rules, and\n so still diagnose C99 extensions as described above. We continue to\n accept designated C++20-compatible initializers in C++ <= 17 silently\n by default (but naturally still reject under -pedantic-errors).\n\nThis is not a complete implementation of P0329R4. In particular, that\npaper introduces new non-C99-compatible syntax { .field { init } }, and\nwe do not support that yet.\n\nThis is based on a previous patch by Don Hinton, though I\'ve made\nsubstantial changes when addressing the above interactions.\n\nDifferential Revision: https://reviews.llvm.org/D59754\n\nllvm-svn: 370544"}, | ||
[i]={{ | [i]={{o,7817,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\n // Check that any designated initializers are syntactically valid in the\n // current language mode.\n for (unsigned I = 0, E = InitArgList.size(); I != E; ++I) {\n if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {\n // ...\n if (!DiagnosedMixedDesignator && !isa<DesignatedInitExpr>(InitArgList[0])) {\n // ...\n Diag(InitArgList[0]->getBeginLoc(), diag::note_designated_init_mixed) << InitArgList[0]->getSourceRange();"},{o,7830,"ExprResult Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc) {\n // ...\n // Check that any designated initializers are syntactically valid in the\n // current language mode.\n for (unsigned I = 0, E = InitArgList.size(); I != E; ++I) {\n if (auto *DIE = dyn_cast<DesignatedInitExpr>(InitArgList[I])) {\n // ...\n } else if (getLangOpts().CPlusPlus && !DiagnosedMixedDesignator && isa<DesignatedInitExpr>(InitArgList[0])) {\n // ...\n Diag(InitArgList[I]->getBeginLoc(), diag::note_designated_init_mixed) << InitArgList[I]->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/designated-initializers-base-class.cpp"]={"clang/test/SemaCXX/designated-initializers-base-class.cpp:11:22: note: first non-designated initializer is here"} | ["clang/test/SemaCXX/designated-initializers-base-class.cpp"]={"clang/test/SemaCXX/designated-initializers-base-class.cpp:11:22: note: first non-designated initializer is here"} | ||
Line 3,689: | Line 3,701: | ||
}, | }, | ||
["note_destructor_nontype_here"]={ | ["note_destructor_nontype_here"]={ | ||
[ | [b]={{nil,K,"non-type declaration found by destructor name lookup"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-type declaration found by destructor name lookup", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[i]={{ | [i]={{Y,236,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n auto CheckLookupResult = [&](LookupResult &Found) -> ParsedType {\n // ...\n // As an extension, attempt to \"fix\" an ambiguity by erasing all non-type\n // results, and all non-matching results if we have a search type. It\'s not\n // clear what the right behavior is if destructor lookup hits an ambiguity,\n // but other compilers do generally accept at least some kinds of\n // ambiguity.\n if (Found.isAmbiguous() && NumAcceptableResults == 1) {\n // ...\n while (F.hasNext()) {\n // ...\n if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))\n // ...\n else\n Diag(D->getLocation(), diag::note_destructor_nontype_here);"},{Y,462,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n for (NamedDecl *FoundD : FoundDecls) {\n if (auto *TD = dyn_cast<TypeDecl>(FoundD->getUnderlyingDecl()))\n // ...\n else\n Diag(FoundD->getLocation(), diag::note_destructor_nontype_here) << FoundD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/GH59446.cpp"]={"clang/test/SemaCXX/GH59446.cpp:5:34: note: non-type declaration found by destructor name lookup"} | ["clang/test/SemaCXX/GH59446.cpp"]={"clang/test/SemaCXX/GH59446.cpp:5:34: note: non-type declaration found by destructor name lookup"} | ||
Line 3,701: | Line 3,713: | ||
}, | }, | ||
["note_destructor_type_here"]={ | ["note_destructor_type_here"]={ | ||
[ | [b]={{nil,K,"type %0 found by destructor name lookup"},{n,nil,"type %0 is declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="type (.*?) found by destructor name lookup", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"4cf85a725af0",1299277928,"When clearing a LookupResult structure, clear out the naming class,","When clearing a LookupResult structure, clear out the naming class,\ntoo. Fixes PR7900.\n\nWhile I\'m in this area, improve the diagnostic when the type being\ndestroyed doesn\'t match either of the types we found.\n\nllvm-svn: 127041"}, | [h]={"4cf85a725af0",1299277928,"When clearing a LookupResult structure, clear out the naming class,","When clearing a LookupResult structure, clear out the naming class,\ntoo. Fixes PR7900.\n\nWhile I\'m in this area, improve the diagnostic when the type being\ndestroyed doesn\'t match either of the types we found.\n\nllvm-svn: 127041"}, | ||
[i]={{ | [i]={{Y,233,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n auto CheckLookupResult = [&](LookupResult &Found) -> ParsedType {\n // ...\n // As an extension, attempt to \"fix\" an ambiguity by erasing all non-type\n // results, and all non-matching results if we have a search type. It\'s not\n // clear what the right behavior is if destructor lookup hits an ambiguity,\n // but other compilers do generally accept at least some kinds of\n // ambiguity.\n if (Found.isAmbiguous() && NumAcceptableResults == 1) {\n // ...\n while (F.hasNext()) {\n // ...\n if (auto *TD = dyn_cast<TypeDecl>(D->getUnderlyingDecl()))\n Diag(D->getLocation(), diag::note_destructor_type_here) << Context.getTypeDeclType(TD);"},{Y,402,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n if (SS.isSet()) {\n // ...\n // For compatibility with other compilers and older versions of Clang,\n //\n // nested-name-specifier type-name :: ~ type-name\n //\n // also looks for type-name in the scope. Unfortunately, we can\'t\n // reasonably apply this fallback for dependent nested-name-specifiers.\n if (SS.isValid() && SS.getScopeRep()->getPrefix()) {\n if (ParsedType T = LookupInScope()) {\n // ...\n Diag(FoundDecls.back()->getLocation(), diag::note_destructor_type_here) << GetTypeFromParser(T);"},{Y,459,"ParsedType Sema::getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectTypePtr, bool EnteringContext) {\n // ...\n for (NamedDecl *FoundD : FoundDecls) {\n if (auto *TD = dyn_cast<TypeDecl>(FoundD->getUnderlyingDecl()))\n Diag(FoundD->getLocation(), diag::note_destructor_type_here) << Context.getTypeDeclType(TD);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:5:13: note: type \'Bar\' (aka \'Foo\') found by destructor name lookup"} | ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:5:13: note: type \'Bar\' (aka \'Foo\') found by destructor name lookup"} | ||
Line 3,713: | Line 3,725: | ||
}, | }, | ||
["note_direct_member_here"]={ | ["note_direct_member_here"]={ | ||
[ | [b]={{nil,I,"direct member declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="direct member declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{P,3972,"static void DiagnoseCategoryDirectMembersProtocolConformance(Sema &S, ObjCProtocolDecl *PDecl, ObjCCategoryDecl *CDecl) {\n // ...\n if (!DirectMembers.empty()) {\n // ...\n for (const auto *MD : DirectMembers)\n S.Diag(MD->getLocation(), diag::note_direct_member_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/category-direct-members-protocol-conformance.m"]={"clang/test/SemaObjC/category-direct-members-protocol-conformance.m:13:1: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:48:1: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:50:1: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:77:36: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:93:51: note: direct member declared here"} | ["clang/test/SemaObjC/category-direct-members-protocol-conformance.m"]={"clang/test/SemaObjC/category-direct-members-protocol-conformance.m:13:1: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:48:1: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:50:1: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:77:36: note: direct member declared here","clang/test/SemaObjC/category-direct-members-protocol-conformance.m:93:51: note: direct member declared here"} | ||
Line 3,725: | Line 3,737: | ||
}, | }, | ||
["note_direct_method_declared_at"]={ | ["note_direct_method_declared_at"]={ | ||
[ | [b]={{nil,n,"direct method %0 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="direct method (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining","[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>"}, | [h]={"c094e7dc4b3f",1573050950,"[SYCL] Add sycl_kernel attribute for accelerated code outlining","[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>"}, | ||
[i]={{ | [i]={{p,1326,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // ...\n if (!Method) {\n // ...\n } else {\n // ...\n if (onlyDirect) {\n // ...\n Diag(Method->getLocation(), diag::note_direct_method_declared_at) << Method->getDeclName();"},{p,1336,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // ...\n if (!Method) {\n // ...\n } else {\n // ...\n if (onlyDirect) {\n // ...\n } else if (anyDirect) {\n // ...\n if (LikelyTargetMethod && LikelyTargetMethod->isDirectMethod()) {\n // ...\n Diag(LikelyTargetMethod->getLocation(), diag::note_direct_method_declared_at) << LikelyTargetMethod->getDeclName();"},{p,1344,"ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors) {\n // ...\n if (!Method) {\n // ...\n } else {\n // ...\n if (onlyDirect) {\n // ...\n } else if (anyDirect) {\n // ...\n if (LikelyTargetMethod && LikelyTargetMethod->isDirectMethod()) {\n // ...\n } else if (!LikelyTargetMethod) {\n // ...\n Diag(GlobalDirectMethod->getLocation(), diag::note_direct_method_declared_at) << GlobalDirectMethod->getDeclName();"},{p,2708,"/// \\param ReceiverType The type of the object receiving the\n/// message. When \\p ReceiverTypeInfo is non-NULL, this is the same\n/// type as that refers to. For a superclass send, this is the type of\n/// the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this class 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::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n if (Method && Method->isDirectMethod() && SuperLoc.isValid()) {\n // ...\n Diag(Method->getLocation(), diag::note_direct_method_declared_at) << Method->getDeclName();"},{p,3144,"/// 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 && Method->isDirectMethod()) {\n if (ReceiverType->isObjCIdType() && !isImplicit) {\n // ...\n Diag(Method->getLocation(), diag::note_direct_method_declared_at) << Method->getDeclName();"},{p,3161,"/// 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 && Method->isDirectMethod()) {\n // ...\n // Under ARC, self can\'t be assigned, and doing a direct call to `self`\n // when it\'s a Class is hence safe. For other cases, we can\'t trust `self`\n // is what we think it is, so we reject it.\n if (ReceiverType->isObjCClassType() && !isImplicit && !(Receiver->isObjCSelfExpr() && getLangOpts().ObjCAutoRefCount)) {\n // ...\n Diag(Method->getLocation(), diag::note_direct_method_declared_at) << Method->getDeclName();"},{p,3176,"/// 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 && Method->isDirectMethod()) {\n // ...\n if (SuperLoc.isValid()) {\n // ...\n Diag(Method->getLocation(), diag::note_direct_method_declared_at) << Method->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/method-direct-arc.m"]={"clang/test/SemaObjC/method-direct-arc.m:8:1: note: direct method \'directMethod\' declared here"} | ["clang/test/SemaObjC/method-direct-arc.m"]={"clang/test/SemaObjC/method-direct-arc.m:8:1: note: direct method \'directMethod\' declared here"} | ||
Line 3,737: | Line 3,749: | ||
}, | }, | ||
["note_doc_block_command_previous"]={ | ["note_doc_block_command_previous"]={ | ||
[ | [b]="previous command \'%select{\\|@}0%1\' here", | ||
[ | [d]=c, | ||
[ | [e]="previous command \'(?:\\\\|@)(.*?)\' here", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"5ec0c7536a98",1344272907,"Comment diagnostics: warn on duplicate \\brief and \\return commands.","Comment diagnostics: warn on duplicate \\brief and \\return commands.\n\nDoxygen manual claims that multiple \\brief or \\returns commands will be merged\ntogether, but actual behavior is different (second \\brief command becomes a\npart of a discussion, second \\returns becomes a \"Returns: blah\" paragraph on\nits own). Anyway, it seems to be a bad idea to use multiple \\brief or \\returns\ncommands in a single command.\n\nllvm-svn: 161325"}, | [h]={"5ec0c7536a98",1344272907,"Comment diagnostics: warn on duplicate \\brief and \\return commands.","Comment diagnostics: warn on duplicate \\brief and \\return commands.\n\nDoxygen manual claims that multiple \\brief or \\returns commands will be merged\ntogether, but actual behavior is different (second \\brief command becomes a\npart of a discussion, second \\returns becomes a \"Returns: blah\" paragraph on\nits own). Anyway, it seems to be a bad idea to use multiple \\brief or \\returns\ncommands in a single command.\n\nllvm-svn: 161325"}, | ||
[i]={{ | [i]={{Yb,628,"void Sema::checkBlockCommandDuplicate(const BlockCommandComment *Command) {\n // ...\n if (CommandName == PrevCommandName)\n Diag(PrevCommand->getLocation(), diag::note_doc_block_command_previous) << PrevCommand->getCommandMarker() << PrevCommandName << PrevCommand->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:154:6: note: previous command \'\\brief\' here","clang/test/Sema/warn-documentation.cpp:162:6: note: previous command \'\\short\' here","clang/test/Sema/warn-documentation.cpp:731:6: note: previous command \'\\headerfile\' here"} | ["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:154:6: note: previous command \'\\brief\' here","clang/test/Sema/warn-documentation.cpp:162:6: note: previous command \'\\short\' here","clang/test/Sema/warn-documentation.cpp:731:6: note: previous command \'\\headerfile\' here"} | ||
Line 3,749: | Line 3,761: | ||
}, | }, | ||
["note_doc_block_command_previous_alias"]={ | ["note_doc_block_command_previous_alias"]={ | ||
[ | [b]="previous command \'%select{\\|@}0%1\' (an alias of \'\\%2\') here", | ||
[ | [d]=c, | ||
[ | [e]="previous command \'(?:\\\\|@)(.*?)\' \\(an alias of \'\\\\(.*?)\'\\) here", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"5ec0c7536a98",1344272907,"Comment diagnostics: warn on duplicate \\brief and \\return commands.","Comment diagnostics: warn on duplicate \\brief and \\return commands.\n\nDoxygen manual claims that multiple \\brief or \\returns commands will be merged\ntogether, but actual behavior is different (second \\brief command becomes a\npart of a discussion, second \\returns becomes a \"Returns: blah\" paragraph on\nits own). Anyway, it seems to be a bad idea to use multiple \\brief or \\returns\ncommands in a single command.\n\nllvm-svn: 161325"}, | [h]={"5ec0c7536a98",1344272907,"Comment diagnostics: warn on duplicate \\brief and \\return commands.","Comment diagnostics: warn on duplicate \\brief and \\return commands.\n\nDoxygen manual claims that multiple \\brief or \\returns commands will be merged\ntogether, but actual behavior is different (second \\brief command becomes a\npart of a discussion, second \\returns becomes a \"Returns: blah\" paragraph on\nits own). Anyway, it seems to be a bad idea to use multiple \\brief or \\returns\ncommands in a single command.\n\nllvm-svn: 161325"}, | ||
[i]={{ | [i]={{Yb,634,"void Sema::checkBlockCommandDuplicate(const BlockCommandComment *Command) {\n // ...\n if (CommandName == PrevCommandName)\n // ...\n else\n Diag(PrevCommand->getLocation(), diag::note_doc_block_command_previous_alias) << PrevCommand->getCommandMarker() << PrevCommandName << CommandName;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:170:6: note: previous command \'\\short\' (an alias of \'\\brief\') here"} | ["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:170:6: note: previous command \'\\short\' (an alias of \'\\brief\') here"} | ||
Line 3,761: | Line 3,773: | ||
}, | }, | ||
["note_doc_html_end_tag"]={ | ["note_doc_html_end_tag"]={ | ||
[ | [b]="end tag", | ||
[ | [d]=c, | ||
[ | [e]="end tag", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"e00ffc7bb836",1342140264,"Comment parsing: repaint the bikesched: rename \'HTML open tags\' to \'HTML start tags\' and \'HTML close...","Comment parsing: repaint the bikesched: rename \'HTML open tags\' to \'HTML start tags\' and \'HTML close tags\' to \'HTML end tags\' according to HTML spec.\n\nllvm-svn: 160153"}, | [h]={"e00ffc7bb836",1342140264,"Comment parsing: repaint the bikesched: rename \'HTML open tags\' to \'HTML start tags\' and \'HTML close...","Comment parsing: repaint the bikesched: rename \'HTML open tags\' to \'HTML start tags\' and \'HTML close tags\' to \'HTML end tags\' according to HTML spec.\n\nllvm-svn: 160153"}, | ||
[i]={{ | [i]={{Yb,510,"HTMLEndTagComment *Sema::actOnHTMLEndTag(SourceLocation LocBegin, SourceLocation LocEnd, StringRef TagName) {\n // ...\n while (!HTMLOpenTags.empty()) {\n // ...\n if (OpenLineInvalid || CloseLineInvalid || OpenLine == CloseLine) {\n // ...\n } else {\n // ...\n Diag(HET->getLocation(), diag::note_doc_html_end_tag) << HET->getSourceRange();"}} | ||
}, | }, | ||
["note_doc_html_tag_started_here"]={ | ["note_doc_html_tag_started_here"]={ | ||
[ | [b]="HTML tag started here", | ||
[ | [d]=c, | ||
[ | [e]="HTML tag started here", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"f26054f0fb53",1342042719,"Enable comment parsing and semantic analysis to emit diagnostics. A few","Enable comment parsing and semantic analysis to emit diagnostics. A few\ndiagnostics implemented -- see testcases.\n\nI created a new TableGen file for comment diagnostics,\nDiagnosticCommentKinds.td, because comment diagnostics don\'t logically\nfit into AST diagnostics file. But I don\'t feel strongly about it.\n\nThis also implements support for self-closing HTML tags in comment\nlexer and parser (for example, <br />).\n\nIn order to issue precise diagnostics CommentSema needs to know the\ndeclaration the comment is attached to. There is no easy way to find a decl by \ncomment, so we match comments and decls in lockstep: after parsing one\ndeclgroup we check if we have any new, not yet attached comments. If we do --\nthen we do the usual comment-finding process.\n\nIt is interesting that this automatically handles trailing comments.\nWe pick up not only comments that precede the declaration, but also\ncomments that *follow* the declaration -- thanks to the lookahead in\nthe lexer: after parsing the declgroup we\'ve consumed the semicolon\nand looked ahead through comments.\n\nAdded -Wdocumentation-html flag for semantic HTML errors to allow the user to \ndisable only HTML warnings (but not HTML parse errors, which we emit as\nwarnings in -Wdocumentation).\n\nllvm-svn: 160078"}, | [h]={"f26054f0fb53",1342042719,"Enable comment parsing and semantic analysis to emit diagnostics. A few","Enable comment parsing and semantic analysis to emit diagnostics. A few\ndiagnostics implemented -- see testcases.\n\nI created a new TableGen file for comment diagnostics,\nDiagnosticCommentKinds.td, because comment diagnostics don\'t logically\nfit into AST diagnostics file. But I don\'t feel strongly about it.\n\nThis also implements support for self-closing HTML tags in comment\nlexer and parser (for example, <br />).\n\nIn order to issue precise diagnostics CommentSema needs to know the\ndeclaration the comment is attached to. There is no easy way to find a decl by \ncomment, so we match comments and decls in lockstep: after parsing one\ndeclgroup we check if we have any new, not yet attached comments. If we do --\nthen we do the usual comment-finding process.\n\nIt is interesting that this automatically handles trailing comments.\nWe pick up not only comments that precede the declaration, but also\ncomments that *follow* the declaration -- thanks to the lookahead in\nthe lexer: after parsing the declgroup we\'ve consumed the semicolon\nand looked ahead through comments.\n\nAdded -Wdocumentation-html flag for semantic HTML errors to allow the user to \ndisable only HTML warnings (but not HTML parse errors, which we emit as\nwarnings in -Wdocumentation).\n\nllvm-svn: 160078"}, | ||
[i]={{"clang/lib/AST/CommentParser.cpp",521,"HTMLStartTagComment *Parser::parseHTMLStartTag() {\n // ...\n while (true) {\n // ...\n default:\n // ...\n if (StartLineInvalid || EndLineInvalid || StartLine == EndLine)\n // ...\n else {\n // ...\n Diag(HST->getLocation(), diag::note_doc_html_tag_started_here) << HST->getSourceRange();"}}, | [i]={{"clang/lib/AST/CommentParser.cpp",521,"HTMLStartTagComment *Parser::parseHTMLStartTag() {\n // ...\n while (true) {\n // ...\n default:\n // ...\n if (StartLineInvalid || EndLineInvalid || StartLine == EndLine)\n // ...\n else {\n // ...\n Diag(HST->getLocation(), diag::note_doc_html_tag_started_here) << HST->getSourceRange();"}}, | ||
Line 3,782: | Line 3,794: | ||
}, | }, | ||
["note_doc_param_name_suggestion"]={ | ["note_doc_param_name_suggestion"]={ | ||
[ | [b]="did you mean \'%0\'?", | ||
[ | [d]=c, | ||
[ | [e]="did you mean \'(.*?)\'\\?", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"f26054f0fb53",1342042719,"Enable comment parsing and semantic analysis to emit diagnostics. A few","Enable comment parsing and semantic analysis to emit diagnostics. A few\ndiagnostics implemented -- see testcases.\n\nI created a new TableGen file for comment diagnostics,\nDiagnosticCommentKinds.td, because comment diagnostics don\'t logically\nfit into AST diagnostics file. But I don\'t feel strongly about it.\n\nThis also implements support for self-closing HTML tags in comment\nlexer and parser (for example, <br />).\n\nIn order to issue precise diagnostics CommentSema needs to know the\ndeclaration the comment is attached to. There is no easy way to find a decl by \ncomment, so we match comments and decls in lockstep: after parsing one\ndeclgroup we check if we have any new, not yet attached comments. If we do --\nthen we do the usual comment-finding process.\n\nIt is interesting that this automatically handles trailing comments.\nWe pick up not only comments that precede the declaration, but also\ncomments that *follow* the declaration -- thanks to the lookahead in\nthe lexer: after parsing the declgroup we\'ve consumed the semicolon\nand looked ahead through comments.\n\nAdded -Wdocumentation-html flag for semantic HTML errors to allow the user to \ndisable only HTML warnings (but not HTML parse errors, which we emit as\nwarnings in -Wdocumentation).\n\nllvm-svn: 160078"}, | [h]={"f26054f0fb53",1342042719,"Enable comment parsing and semantic analysis to emit diagnostics. A few","Enable comment parsing and semantic analysis to emit diagnostics. A few\ndiagnostics implemented -- see testcases.\n\nI created a new TableGen file for comment diagnostics,\nDiagnosticCommentKinds.td, because comment diagnostics don\'t logically\nfit into AST diagnostics file. But I don\'t feel strongly about it.\n\nThis also implements support for self-closing HTML tags in comment\nlexer and parser (for example, <br />).\n\nIn order to issue precise diagnostics CommentSema needs to know the\ndeclaration the comment is attached to. There is no easy way to find a decl by \ncomment, so we match comments and decls in lockstep: after parsing one\ndeclgroup we check if we have any new, not yet attached comments. If we do --\nthen we do the usual comment-finding process.\n\nIt is interesting that this automatically handles trailing comments.\nWe pick up not only comments that precede the declaration, but also\ncomments that *follow* the declaration -- thanks to the lookahead in\nthe lexer: after parsing the declgroup we\'ve consumed the semicolon\nand looked ahead through comments.\n\nAdded -Wdocumentation-html flag for semantic HTML errors to allow the user to \ndisable only HTML warnings (but not HTML parse errors, which we emit as\nwarnings in -Wdocumentation).\n\nllvm-svn: 160078"}, | ||
[i]={{ | [i]={{Yb,787,"void Sema::resolveParamCommandIndexes(const FullComment *FC) {\n // ...\n // Second pass over unresolved \\\\param commands: do typo correction.\n // Suggest corrections from a set of parameter declarations that have no\n // corresponding \\\\param.\n for (unsigned i = 0, e = UnresolvedParamCommands.size(); i != e; ++i) {\n // ...\n if (CorrectedParamIndex != ParamCommandComment::InvalidParamIndex) {\n // ...\n if (const IdentifierInfo *CorrectedII = CorrectedPVD->getIdentifier())\n Diag(ArgRange.getBegin(), diag::note_doc_param_name_suggestion) << CorrectedII->getName() << FixItHint::CreateReplacement(ArgRange, CorrectedII->getName());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-documentation-crlf.c"]={"clang/test/Sema/warn-documentation-crlf.c:10:11: note: did you mean \'qwerty\'?"} | ["clang/test/Sema/warn-documentation-crlf.c"]={"clang/test/Sema/warn-documentation-crlf.c:10:11: note: did you mean \'qwerty\'?"} | ||
Line 3,794: | Line 3,806: | ||
}, | }, | ||
["note_doc_param_previous"]={ | ["note_doc_param_previous"]={ | ||
[ | [b]="previous documentation", | ||
[ | [d]=c, | ||
[ | [e]="previous documentation", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"8f0f1b0c41cd",1343166256,"Comment diagnostics: add warning for multiple \\param commands with duplicate","Comment diagnostics: add warning for multiple \\param commands with duplicate\nparameter names.\n\nllvm-svn: 160696"}, | [h]={"8f0f1b0c41cd",1343166256,"Comment diagnostics: add warning for multiple \\param commands with duplicate","Comment diagnostics: add warning for multiple \\param commands with duplicate\nparameter names.\n\nllvm-svn: 160696"}, | ||
[i]={{ | [i]={{Yb,746,"void Sema::resolveParamCommandIndexes(const FullComment *FC) {\n // ...\n // First pass over all \\\\param commands: resolve all parameter names.\n for (Comment::child_iterator I = FC->child_begin(), E = FC->child_end(); I != E; ++I) {\n // ...\n if (ParamVarDocs[ResolvedParamIndex]) {\n // ...\n Diag(PrevCommand->getLocation(), diag::note_doc_param_previous) << PrevCommand->getParamNameRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:314:6: note: previous documentation","clang/test/Sema/warn-documentation.cpp:321:6: note: previous documentation","clang/test/Sema/warn-documentation.cpp:585:6: note: previous documentation"} | ["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:314:6: note: previous documentation","clang/test/Sema/warn-documentation.cpp:321:6: note: previous documentation","clang/test/Sema/warn-documentation.cpp:585:6: note: previous documentation"} | ||
Line 3,806: | Line 3,818: | ||
}, | }, | ||
["note_doc_tparam_name_suggestion"]={ | ["note_doc_tparam_name_suggestion"]={ | ||
[ | [b]="did you mean \'%0\'?", | ||
[ | [d]=c, | ||
[ | [e]="did you mean \'(.*?)\'\\?", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"34df220410b3",1343774226,"Comment parsing: add support for \\tparam command on all levels.","Comment parsing: add support for \\tparam command on all levels.\n\nThe only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this\nbreaks libclang binary compatibility, but should not be a problem since API is\nso new.\n\nThis also fixes PR13372 as a side-effect.\n\nllvm-svn: 161087"}, | [h]={"34df220410b3",1343774226,"Comment parsing: add support for \\tparam command on all levels.","Comment parsing: add support for \\tparam command on all levels.\n\nThe only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this\nbreaks libclang binary compatibility, but should not be a problem since API is\nso new.\n\nThis also fixes PR13372 as a side-effect.\n\nllvm-svn: 161087"}, | ||
[i]={{ | [i]={{Yb,349,"void Sema::actOnTParamCommandParamNameArg(TParamCommandComment *Command, SourceLocation ArgLocBegin, SourceLocation ArgLocEnd, StringRef Arg) {\n // ...\n if (!CorrectedName.empty()) {\n Diag(ArgLocBegin, diag::note_doc_tparam_name_suggestion) << CorrectedName << FixItHint::CreateReplacement(ArgRange, CorrectedName);"}} | ||
}, | }, | ||
["note_doc_tparam_previous"]={ | ["note_doc_tparam_previous"]={ | ||
[ | [b]="previous documentation", | ||
[ | [d]=c, | ||
[ | [e]="previous documentation", | ||
[ | [f]=a, | ||
[ | [g]=Rb, | ||
[h]={"34df220410b3",1343774226,"Comment parsing: add support for \\tparam command on all levels.","Comment parsing: add support for \\tparam command on all levels.\n\nThe only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this\nbreaks libclang binary compatibility, but should not be a problem since API is\nso new.\n\nThis also fixes PR13372 as a side-effect.\n\nllvm-svn: 161087"}, | [h]={"34df220410b3",1343774226,"Comment parsing: add support for \\tparam command on all levels.","Comment parsing: add support for \\tparam command on all levels.\n\nThe only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this\nbreaks libclang binary compatibility, but should not be a problem since API is\nso new.\n\nThis also fixes PR13372 as a side-effect.\n\nllvm-svn: 161087"}, | ||
[i]={{ | [i]={{Yb,324,"void Sema::actOnTParamCommandParamNameArg(TParamCommandComment *Command, SourceLocation ArgLocBegin, SourceLocation ArgLocEnd, StringRef Arg) {\n // ...\n if (resolveTParamReference(Arg, TemplateParameters, &Position)) {\n // ...\n if (PrevCommand) {\n // ...\n Diag(PrevCommand->getLocation(), diag::note_doc_tparam_previous) << PrevCommand->getParamNameRange();"}} | ||
}, | }, | ||
["note_drv_address_sanitizer_debug_runtime"]={ | ["note_drv_address_sanitizer_debug_runtime"]={ | ||
[ | [b]="AddressSanitizer doesn\'t support linking with debug runtime libraries yet", | ||
[ | [d]=c, | ||
[ | [e]="AddressSanitizer doesn\'t support linking with debug runtime libraries yet", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"e0db196556f2",1413328544,"clang-cl: Diagnose the usage of ASAN with a debug runtime library","clang-cl: Diagnose the usage of ASAN with a debug runtime library\n\nSummary:\nAddressSanitizer currently doesn\'t support this configuration, and binaries\nbuilt with it will just get into an infinite loop during startup.\n\nTest Plan: Includes an automated test.\n\nReviewers: samsonov\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D5764\n\nllvm-svn: 219744"}, | [h]={"e0db196556f2",1413328544,"clang-cl: Diagnose the usage of ASAN with a debug runtime library","clang-cl: Diagnose the usage of ASAN with a debug runtime library\n\nSummary:\nAddressSanitizer currently doesn\'t support this configuration, and binaries\nbuilt with it will just get into an infinite loop during startup.\n\nTest Plan: Includes an automated test.\n\nReviewers: samsonov\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D5764\n\nllvm-svn: 219744"}, | ||
[i]={{"clang/lib/Driver/SanitizerArgs.cpp",942,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n if (AllAddedKinds & SanitizerKind::Address) {\n // ...\n if (Arg *WindowsDebugRTArg = Args.getLastArg(options::OPT__SLASH_MTd, options::OPT__SLASH_MT, options::OPT__SLASH_MDd, options::OPT__SLASH_MD, options::OPT__SLASH_LDd, options::OPT__SLASH_LD)) {\n // ...\n case options::OPT__SLASH_MTd:\n case options::OPT__SLASH_MDd:\n case options::OPT__SLASH_LDd:\n if (DiagnoseErrors) {\n // ...\n D.Diag(clang::diag::note_drv_address_sanitizer_debug_runtime);"}} | [i]={{"clang/lib/Driver/SanitizerArgs.cpp",942,"SanitizerArgs::SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, bool DiagnoseErrors) {\n // ...\n if (AllAddedKinds & SanitizerKind::Address) {\n // ...\n if (Arg *WindowsDebugRTArg = Args.getLastArg(options::OPT__SLASH_MTd, options::OPT__SLASH_MT, options::OPT__SLASH_MDd, options::OPT__SLASH_MD, options::OPT__SLASH_LDd, options::OPT__SLASH_LD)) {\n // ...\n case options::OPT__SLASH_MTd:\n case options::OPT__SLASH_MDd:\n case options::OPT__SLASH_LDd:\n if (DiagnoseErrors) {\n // ...\n D.Diag(clang::diag::note_drv_address_sanitizer_debug_runtime);"}} | ||
}, | }, | ||
["note_drv_available_multilibs"]={ | ["note_drv_available_multilibs"]={ | ||
[ | [b]="available multilibs are:%0", | ||
[ | [d]=c, | ||
[ | [e]="available multilibs are\\:(.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"028c1033b1ed",1687186972,"[Driver][BareMetal] Error if no matching multilib","[Driver][BareMetal] Error if no matching multilib\n\nPreviously if no matching multilib was found then the user would\ntypically see an error like \"fatal error: \'stdio.h\' file not found\"\nwhich gives no indication as to the underlying problem.\nWith this change the user will instead see an error like\n clang: error: no multilib found matching flags: --target=thumbv7em-none-unknown-eabi -march=...\n clang: note: available multilibs are:\n --target=armv4t-none-unknown-eabi\n --target=thumbv6m-none-unknown-eabi -mfpu=none\n ...\n\nDifferential Revision: https://reviews.llvm.org/D153292"}, | [h]={"028c1033b1ed",1687186972,"[Driver][BareMetal] Error if no matching multilib","[Driver][BareMetal] Error if no matching multilib\n\nPreviously if no matching multilib was found then the user would\ntypically see an error like \"fatal error: \'stdio.h\' file not found\"\nwhich gives no indication as to the underlying problem.\nWith this change the user will instead see an error like\n clang: error: no multilib found matching flags: --target=thumbv7em-none-unknown-eabi -march=...\n clang: note: available multilibs are:\n --target=armv4t-none-unknown-eabi\n --target=thumbv6m-none-unknown-eabi -mfpu=none\n ...\n\nDifferential Revision: https://reviews.llvm.org/D153292"}, | ||
[i]={{"clang/lib/Driver/ToolChains/BareMetal.cpp",194,"static void findMultilibsFromYAML(const ToolChain &TC, const Driver &D, StringRef MultilibPath, const ArgList &Args, DetectedMultilibs &Result) {\n // ...\n D.Diag(clang::diag::note_drv_available_multilibs) << ss.str();"}} | [i]={{"clang/lib/Driver/ToolChains/BareMetal.cpp",194,"static void findMultilibsFromYAML(const ToolChain &TC, const Driver &D, StringRef MultilibPath, const ArgList &Args, DetectedMultilibs &Result) {\n // ...\n D.Diag(clang::diag::note_drv_available_multilibs) << ss.str();"}} | ||
}, | }, | ||
["note_drv_command_failed_diag_msg"]={ | ["note_drv_command_failed_diag_msg"]={ | ||
[ | [b]="diagnostic msg: %0", | ||
[ | [d]=c, | ||
[ | [e]="diagnostic msg\\: (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"e3805fc11821",1311193592,"When the compiler crashes, the compiler driver now produces diagnostic information ","When the compiler crashes, the compiler driver now produces diagnostic information \nincluding the fully preprocessed source file(s) and command line arguments. The \ndeveloper is asked to attach this diagnostic information to a bug report.\n\nllvm-svn: 135614"}, | [h]={"e3805fc11821",1311193592,"When the compiler crashes, the compiler driver now produces diagnostic information ","When the compiler crashes, the compiler driver now produces diagnostic information \nincluding the fully preprocessed source file(s) and command line arguments. The \ndeveloper is asked to attach this diagnostic information to a bug report.\n\nllvm-svn: 135614"}, | ||
[i]={{ | [i]={{S,1694,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // If lld failed, rerun it again with --reproduce.\n if (IsLLD) {\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << BugReporMsg;"},{S,1695,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // If lld failed, rerun it again with --reproduce.\n if (IsLLD) {\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << TmpName;"},{S,1696,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // If lld failed, rerun it again with --reproduce.\n if (IsLLD) {\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"\\n\\n********************\";"},{S,1715,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n for (InputList::iterator it = Inputs.begin(), ie = Inputs.end(); it != ie;) {\n // ...\n // Ignore input from stdin or any inputs that cannot be preprocessed.\n // Check type first as not all linker inputs have a value.\n if (types::getPreprocessedType(it->first) == types::TY_INVALID) {\n // ...\n } else if (!strcmp(it->second->getValue(), \"-\")) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating preprocessed source(s) - \""},{S,1730,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n if (Inputs.empty()) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating preprocessed source(s) - \""},{S,1746,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n if (ArchNames.size() > 1) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating preprocessed source(s) - cannot generate \""},{S,1764,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // If there were errors building the compilation, quit now.\n if (Trap.hasErrorOccurred()) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating preprocessed source(s).\";"},{S,1775,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // If any of the preprocessing commands failed, clean up and exit.\n if (!FailingCommands.empty()) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating preprocessed source(s).\";"},{S,1782,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n if (TempFiles.empty()) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating preprocessed source(s).\";"},{S,1787,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << BugReporMsg;"},{S,1792,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n for (const char *TempFile : TempFiles) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << TempFile;"},{S,1820,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n if (EC) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Error generating run script: \" << Script << \" \" << EC.message();"},{S,1834,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n if (EC) {\n // ...\n } else {\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << Script;"},{S,1841,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // On darwin, provide information about the .crash diagnostic report.\n if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) {\n // ...\n if (getCrashDiagnosticFile(ReproCrashFilename, CrashDiagDir)) {\n Diag(clang::diag::note_drv_command_failed_diag_msg) << ReproCrashFilename.str();"},{S,1846,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // On darwin, provide information about the .crash diagnostic report.\n if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) {\n // ...\n if (getCrashDiagnosticFile(ReproCrashFilename, CrashDiagDir)) {\n // ...\n } else { // Suggest a directory for the user to look for .crash files.\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"Crash backtrace is located in\";"},{S,1848,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // On darwin, provide information about the .crash diagnostic report.\n if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) {\n // ...\n if (getCrashDiagnosticFile(ReproCrashFilename, CrashDiagDir)) {\n // ...\n } else { // Suggest a directory for the user to look for .crash files.\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << CrashDiagDir.str();"},{S,1850,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n // On darwin, provide information about the .crash diagnostic report.\n if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) {\n // ...\n if (getCrashDiagnosticFile(ReproCrashFilename, CrashDiagDir)) {\n // ...\n } else { // Suggest a directory for the user to look for .crash files.\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"(choose the .crash file that corresponds to your crash)\";"},{S,1855,"// When clang crashes, produce diagnostic information including the fully\n// preprocessed source file(s). Request that the developer attach the\n// diagnostic information to a bug report.\nvoid Driver::generateCompilationDiagnostics(Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) {\n // ...\n Diag(clang::diag::note_drv_command_failed_diag_msg) << \"\\n\\n********************\";"}} | ||
}, | }, | ||
["note_drv_config_file_searched_in"]={ | ["note_drv_config_file_searched_in"]={ | ||
[ | [b]={{nil,V,"was searched for in the directory: %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="was searched for in the directory\\: (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"c92ca91472b9",1514656766,"Enable configuration files in clang","Enable configuration files in clang\n\nClang is inherently a cross compiler and can generate code for any target\nenabled during build. It however requires to specify many parameters in the\ninvocation, which could be hardcoded during configuration process in the\ncase of single-target compiler. The purpose of configuration files is to\nmake specifying clang arguments easier.\n\nA configuration file is a collection of driver options, which are inserted\ninto command line before other options specified in the clang invocation.\nIt groups related options together and allows specifying them in simpler,\nmore flexible and less error prone way than just listing the options\nsomewhere in build scripts. Configuration file may be thought as a \"macro\"\nthat names an option set and is expanded when the driver is called.\n\nUse of configuration files is described in `UserManual.rst`.\n\nDifferential Revision: https://reviews.llvm.org/D24933\n\nllvm-svn: 321587"}, | [h]={"c92ca91472b9",1514656766,"Enable configuration files in clang","Enable configuration files in clang\n\nClang is inherently a cross compiler and can generate code for any target\nenabled during build. It however requires to specify many parameters in the\ninvocation, which could be hardcoded during configuration process in the\ncase of single-target compiler. The purpose of configuration files is to\nmake specifying clang arguments easier.\n\nA configuration file is a collection of driver options, which are inserted\ninto command line before other options specified in the clang invocation.\nIt groups related options together and allows specifying them in simpler,\nmore flexible and less error prone way than just listing the options\nsomewhere in build scripts. Configuration file may be thought as a \"macro\"\nthat names an option set and is expanded when the driver is called.\n\nUse of configuration files is described in `UserManual.rst`.\n\nDifferential Revision: https://reviews.llvm.org/D24933\n\nllvm-svn: 321587"}, | ||
[i]={{ | [i]={{S,1114,"bool Driver::loadConfigFiles() {\n // ...\n if (CLOptions) {\n for (auto CfgFileName : CLOptions->getAllArgValues(options::OPT_config)) {\n // If argument contains directory separator, treat it as a path to\n // configuration file.\n if (llvm::sys::path::has_parent_path(CfgFileName)) {\n // ...\n } else if (!ExpCtx.findConfigFile(CfgFileName, CfgFilePath)) {\n // ...\n for (const StringRef &SearchDir : CfgFileSearchDirs)\n if (!SearchDir.empty())\n Diag(diag::note_drv_config_file_searched_in) << SearchDir;"}} | ||
}, | }, | ||
["note_drv_t_option_is_global"]={ | ["note_drv_t_option_is_global"]={ | ||
[ | [b]={{nil,zb,"the last \'/TC\' or \'/TP\' option takes precedence over earlier instances"},{M,nil,"The last /TC or /TP option takes precedence over earlier instances"}}, | ||
[ | [d]=c, | ||
[ | [e]="the last \'\\/TC\' or \'\\/TP\' option takes precedence over earlier instances", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0d0b19cbe1e3",1376332457,"clang-cl: Expand warning about /TC and /TP override, and expand test","clang-cl: Expand warning about /TC and /TP override, and expand test\n\nllvm-svn: 188190"}, | [h]={"0d0b19cbe1e3",1376332457,"clang-cl: Expand warning about /TC and /TP override, and expand test","clang-cl: Expand warning about /TC and /TP override, and expand test\n\nllvm-svn: 188190"}, | ||
[i]={{ | [i]={{S,2629,"// Construct a the list of inputs and their types.\nvoid Driver::BuildInputs(const ToolChain &TC, DerivedArgList &Args, InputList &Inputs) const {\n // ...\n // The last /TC or /TP option sets the input type to C or C++ globally.\n if (Arg *TCTP = Args.getLastArgNoClaim(options::OPT__SLASH_TC, options::OPT__SLASH_TP)) {\n // ...\n if (ShowNote)\n Diag(clang::diag::note_drv_t_option_is_global);"}} | ||
}, | }, | ||
["note_drv_use_standard"]={ | ["note_drv_use_standard"]={ | ||
[ | [b]={{nil,U,"use \'%0\'%select{| or \'%3\'|, \'%3\', or \'%4\'|, \'%3\', \'%4\', or \'%5\'}2 for \'%1\' standard"}}, | ||
[ | [d]=c, | ||
[ | [e]="use \'(.*?)\'(?:| or \'(.*?)\'|, \'(.*?)\', or \'(.*?)\'|, \'(.*?)\', \'(.*?)\', or \'(.*?)\') for \'(.*?)\' standard", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"c91daf1cf9a4",1487112260,"[Driver] Report available language standards on user error","[Driver] Report available language standards on user error\n\nIn case user did not provide valid standard name for -std option, available\nvalues (with short description) will be reported.\n\nPatch by Paweł Żukowski!\n\nllvm-svn: 295113"}, | [h]={"c91daf1cf9a4",1487112260,"[Driver] Report available language standards on user error","[Driver] Report available language standards on user error\n\nIn case user did not provide valid standard name for -std option, available\nvalues (with short description) will be reported.\n\nPatch by Paweł Żukowski!\n\nllvm-svn: 295113"}, | ||
[i]={{ | [i]={{Zc,3568,"bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, const llvm::Triple &T, std::vector<std::string> &Includes, DiagnosticsEngine &Diags) {\n // ...\n if (const Arg *A = Args.getLastArg(OPT_std_EQ)) {\n // ...\n if (LangStd == LangStandard::lang_unspecified) {\n // ...\n // Report supported standards with short description.\n for (unsigned KindValue = 0; KindValue != LangStandard::lang_unspecified; ++KindValue) {\n // ...\n if (IsInputCompatibleWithStandard(IK, Std)) {\n auto Diag = Diags.Report(diag::note_drv_use_standard);"}} | ||
}, | }, | ||
["note_drv_verify_prefix_spelling"]={ | ["note_drv_verify_prefix_spelling"]={ | ||
[ | [b]={{nil,V,"-verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores"}}, | ||
[ | [d]=c, | ||
[ | [e]="\\-verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"05e46484825f",1513391002,"[VerifyDiagnosticConsumer] support -verify=<prefixes>","[VerifyDiagnosticConsumer] support -verify=<prefixes>\n\nThis mimics FileCheck\'s --check-prefixes option.\n\nThe default prefix is \"expected\". That is, \"-verify\" is equivalent to\n\"-verify=expected\".\n\nThe goal is to permit exercising a single test suite source file with different\ncompiler options producing different sets of diagnostics. While cpp can be\ncombined with the existing -verify to accomplish the same goal, source is often\neasier to maintain when it\'s not cluttered with preprocessor directives or\nduplicate passages of code. For example, this patch also rewrites some existing\nclang tests to demonstrate the benefit of this feature.\n\nPatch by Joel E. Denny, thanks!\n\nDifferential Revision: https://reviews.llvm.org/D39694\n\nllvm-svn: 320908"}, | [h]={"05e46484825f",1513391002,"[VerifyDiagnosticConsumer] support -verify=<prefixes>","[VerifyDiagnosticConsumer] support -verify=<prefixes>\n\nThis mimics FileCheck\'s --check-prefixes option.\n\nThe default prefix is \"expected\". That is, \"-verify\" is equivalent to\n\"-verify=expected\".\n\nThe goal is to permit exercising a single test suite source file with different\ncompiler options producing different sets of diagnostics. While cpp can be\ncombined with the existing -verify to accomplish the same goal, source is often\neasier to maintain when it\'s not cluttered with preprocessor directives or\nduplicate passages of code. For example, this patch also rewrites some existing\nclang tests to demonstrate the benefit of this feature.\n\nPatch by Joel E. Denny, thanks!\n\nDifferential Revision: https://reviews.llvm.org/D39694\n\nllvm-svn: 320908"}, | ||
[i]={{ | [i]={{Zc,2217,"static bool checkVerifyPrefixes(const std::vector<std::string> &VerifyPrefixes, DiagnosticsEngine &Diags) {\n // ...\n for (const auto &Prefix : VerifyPrefixes) {\n // ...\n if (BadChar != Prefix.end() || !isLetter(Prefix[0])) {\n // ...\n Diags.Report(diag::note_drv_verify_prefix_spelling);"}} | ||
}, | }, | ||
["note_due_to_dllexported_class"]={ | ["note_due_to_dllexported_class"]={ | ||
[ | [b]={{nil,L,"due to %0 being dllexported%select{|; try compiling in C++11 mode}1"},{V,nil,"due to \'%0\' being dllexported%select{|; try compiling in C++11 mode}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="due to (.*?) being dllexported(?:|; try compiling in C\\+\\+11 mode)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5870373d1954",1424480844,"Improve diagnostic when failing to synthesize implicit member due to dllexport (PR22591)","Improve diagnostic when failing to synthesize implicit member due to dllexport (PR22591)\n\nThis is only a problem in C++03 mode targeting MS ABI (MinGW doesn\'t\nexport inline methods, and C++11 marks these methods implicitly\ndeleted).\n\nSince targeting the MS ABI in pre-C++11 mode is a rare configuration,\nthis will probably not get fixed, but we can at least have a better\nerror message.\n\nllvm-svn: 230115"}, | [h]={"5870373d1954",1424480844,"Improve diagnostic when failing to synthesize implicit member due to dllexport (PR22591)","Improve diagnostic when failing to synthesize implicit member due to dllexport (PR22591)\n\nThis is only a problem in C++03 mode targeting MS ABI (MinGW doesn\'t\nexport inline methods, and C++11 marks these methods implicitly\ndeleted).\n\nSince targeting the MS ABI in pre-C++11 mode is a rare configuration,\nthis will probably not get fixed, but we can at least have a better\nerror message.\n\nllvm-svn: 230115"}, | ||
[i]={{ | [i]={{E,1003,"/// 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::MarkingClassDllexported:\n Diags.Report(Active->PointOfInstantiation, diag::note_due_to_dllexported_class) << cast<CXXRecordDecl>(Active->Entity) << !getLangOpts().CPlusPlus11;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/default-arg-closures.cpp"]={"clang/test/SemaCXX/default-arg-closures.cpp:13:12: note: due to \'ExportDefaultCtorClosure\' being dllexported"} | ["clang/test/SemaCXX/default-arg-closures.cpp"]={"clang/test/SemaCXX/default-arg-closures.cpp:13:12: note: due to \'ExportDefaultCtorClosure\' being dllexported"} | ||
Line 3,899: | Line 3,911: | ||
}, | }, | ||
["note_duplicate_asm_operand_name"]={ | ["note_duplicate_asm_operand_name"]={ | ||
[ | [b]={{nil,r,"asm operand name \"%0\" first referenced here"}}, | ||
[ | [d]=c, | ||
[ | [e]="asm operand name \"(.*?)\" first referenced here", | ||
[ | [f]=a, | ||
[ | [g]="Inline Assembly Issue", | ||
[h]={"954ec09aed4f",1559178346,"clang support gnu asm goto.","clang support gnu asm goto.\nSyntax:\n asm [volatile] goto ( AssemblerTemplate\n :\n : InputOperands\n : Clobbers\n : GotoLabels)\n\nhttps://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html\n\nNew llvm IR is \"callbr\" for inline asm goto instead \"call\" for inline asm\nFor:\nasm goto(\"testl %0, %0; jne %l1;\" :: \"r\"(cond)::label_true, loop);\nIR:\ncallbr void asm sideeffect \"testl $0, $0; jne ${1:l};\", \"r,X,X,~{dirflag},~{fpsr},~{flags}\"(i32 %0, i8* blockaddress(@foo, %label_true), i8* blockaddress(@foo, %loop)) #1\n to label %asm.fallthrough [label %label_true, label %loop], !srcloc !3\n\nasm.fallthrough: \n\nCompiler need to generate:\n1> a dummy constarint \'X\' for each label.\n2> an unique fallthrough label for each asm goto stmt \" asm.fallthrough%number\".\n\n\nDiagnostic \n1> duplicate asm operand name are used in output, input and label.\n2> goto out of scope.\n\nllvm-svn: 362045"}, | [h]={"954ec09aed4f",1559178346,"clang support gnu asm goto.","clang support gnu asm goto.\nSyntax:\n asm [volatile] goto ( AssemblerTemplate\n :\n : InputOperands\n : Clobbers\n : GotoLabels)\n\nhttps://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html\n\nNew llvm IR is \"callbr\" for inline asm goto instead \"call\" for inline asm\nFor:\nasm goto(\"testl %0, %0; jne %l1;\" :: \"r\"(cond)::label_true, loop);\nIR:\ncallbr void asm sideeffect \"testl $0, $0; jne ${1:l};\", \"r,X,X,~{dirflag},~{fpsr},~{flags}\"(i32 %0, i8* blockaddress(@foo, %label_true), i8* blockaddress(@foo, %loop)) #1\n to label %asm.fallthrough [label %label_true, label %loop], !srcloc !3\n\nasm.fallthrough: \n\nCompiler need to generate:\n1> a dummy constarint \'X\' for each label.\n2> an unique fallthrough label for each asm goto stmt \" asm.fallthrough%number\".\n\n\nDiagnostic \n1> duplicate asm operand name are used in output, input and label.\n2> goto out of scope.\n\nllvm-svn: 362045"}, | ||
[i]={{ | [i]={{Yc,738,"StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg constraints, MultiExprArg Exprs, Expr *asmString, MultiExprArg clobbers, unsigned NumLabels, SourceLocation RParenLoc) {\n // ...\n if (Found != NamedOperandList.end()) {\n // ...\n Diag(Found->second->getBeginLoc(), diag::note_duplicate_asm_operand_name) << Found->first;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:300:24: note: asm operand name \"lab\" first referenced here","clang/test/Sema/asm.c:303:62: note: asm operand name \"lab\" first referenced here","clang/test/Sema/asm.c:309:25: note: asm operand name \"lab\" first referenced here","clang/test/Sema/asm.c:312:25: note: asm operand name \"lab\" first referenced here"} | ["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:300:24: note: asm operand name \"lab\" first referenced here","clang/test/Sema/asm.c:303:62: note: asm operand name \"lab\" first referenced here","clang/test/Sema/asm.c:309:25: note: asm operand name \"lab\" first referenced here","clang/test/Sema/asm.c:312:25: note: asm operand name \"lab\" first referenced here"} | ||
Line 3,911: | Line 3,923: | ||
}, | }, | ||
["note_duplicate_case_prev"]={ | ["note_duplicate_case_prev"]={ | ||
[ | [b]="previous case defined here", | ||
[ | [d]=c, | ||
[ | [e]="previous case defined here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Wb,1236199783,Vb,Ub}, | ||
[i]={{G,1281,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n for (SwitchCase *SC = SS->getSwitchCaseList(); SC && !HasDependentValue; SC = SC->getNextSwitchCase()) {\n if (DefaultStmt *DS = dyn_cast<DefaultStmt>(SC)) {\n if (TheDefaultStmt) {\n // ...\n Diag(TheDefaultStmt->getDefaultLoc(), diag::note_duplicate_case_prev);"},{G,1384,"StmtResult Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *BodyStmt) {\n // ...\n if (!HasDependentValue) {\n // ...\n if (!CaseVals.empty()) {\n for (unsigned i = 0, e = CaseVals.size(); i != e; ++i) {\n // ...\n if (i != 0 && CaseVals[i].first == CaseVals[i - 1].first) {\n // ...\n Diag(CaseVals[i - 1].second->getLHS()->getBeginLoc(), diag::note_duplicate_case_prev);"},{G,1477,"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 // Rescan the ranges, looking for overlap with singleton values and other\n // ranges. Since the range list is sorted, we only need to compare case\n // ranges with their neighbors.\n for (unsigned i = 0, e = CaseRanges.size(); i != e; ++i) {\n // ...\n if (OverlapStmt) {\n // ...\n Diag(OverlapStmt->getLHS()->getBeginLoc(), diag::note_duplicate_case_prev);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/CXX/stmt.stmt/stmt.label/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.label/p1.cpp:23:5: note: previous case defined here"} | ["clang/test/CXX/stmt.stmt/stmt.label/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.label/p1.cpp:23:5: note: previous case defined here"} | ||
Line 3,923: | Line 3,935: | ||
}, | }, | ||
["note_duplicate_element"]={ | ["note_duplicate_element"]={ | ||
[ | [b]="element %0 also has value %1", | ||
[ | [d]=c, | ||
[ | [e]="element (.*?) also has value (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"73e306e548cd",1346358744,"Add -Wduplicate-enum warning. Clang will emit this warning when an implicitly","Add -Wduplicate-enum warning. Clang will emit this warning when an implicitly\ninitiated enum constant has the same value as another enum constant.\n\nFor instance:\nenum test { A, B, C = -1, D, E = 1 };\nClang will warn that:\n A and D both have value 0\n B and E both have value 1\n\nA few exceptions are made to keep the noise down. Enum constants which are\ninitialized to another enum constant, or an enum constant plus or minus 1 will\nnot trigger this warning. Also, anonymous enums are not checked.\n\nllvm-svn: 162938"}, | [h]={"73e306e548cd",1346358744,"Add -Wduplicate-enum warning. Clang will emit this warning when an implicitly","Add -Wduplicate-enum warning. Clang will emit this warning when an implicitly\ninitiated enum constant has the same value as another enum constant.\n\nFor instance:\nenum test { A, B, C = -1, D, E = 1 };\nClang will warn that:\n A and D both have value 0\n B and E both have value 1\n\nA few exceptions are made to keep the noise down. Enum constants which are\ninitialized to another enum constant, or an enum constant plus or minus 1 will\nnot trigger this warning. Also, anonymous enums are not checked.\n\nllvm-svn: 162938"}, | ||
[i]={{ | [i]={{q,19669,"// Emits a warning when an element is implicitly set a value that\n// a previous element has already been set to.\nstatic void CheckForDuplicateEnumValues(Sema &S, ArrayRef<Decl *> Elements, EnumDecl *Enum, QualType EnumType) {\n // ...\n // Emit diagnostics.\n for (const auto &Vec : DupVector) {\n // ...\n // Emit one note for each of the remaining enum constants with\n // the same value.\n for (auto *ECD : llvm::drop_begin(*Vec))\n S.Diag(ECD->getLocation(), diag::note_duplicate_element) << ECD << toString(ECD->getInitVal(), 10) << ECD->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-duplicate-enum.c"]={"clang/test/Sema/warn-duplicate-enum.c:4:3: note: element \'A1\' also has value 0","clang/test/Sema/warn-duplicate-enum.c:10:3: note: element \'B1\' also has value -1","clang/test/Sema/warn-duplicate-enum.c:15:3: note: element \'B6\' also has value 0","clang/test/Sema/warn-duplicate-enum.c:18:23: note: element \'C3\' also has value 0","clang/test/Sema/warn-duplicate-enum.c:26:3: note: element \'D5\' also has value 2"} | ["clang/test/Sema/warn-duplicate-enum.c"]={"clang/test/Sema/warn-duplicate-enum.c:4:3: note: element \'A1\' also has value 0","clang/test/Sema/warn-duplicate-enum.c:10:3: note: element \'B1\' also has value -1","clang/test/Sema/warn-duplicate-enum.c:15:3: note: element \'B6\' also has value 0","clang/test/Sema/warn-duplicate-enum.c:18:23: note: element \'C3\' also has value 0","clang/test/Sema/warn-duplicate-enum.c:26:3: note: element \'D5\' also has value 2"} | ||
Line 3,935: | Line 3,947: | ||
}, | }, | ||
["note_empty_body_on_separate_line"]={ | ["note_empty_body_on_separate_line"]={ | ||
[ | [b]="put the semicolon on a separate line to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="put the semicolon on a separate line to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"800ddf3dda7b",1329257672,"Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)","Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)\n\n* if, switch, range-based for: warn if semicolon is on the same line.\n* for, while: warn if semicolon is on the same line and either next\nstatement is compound statement or next statement has more\nindentation.\n\nReplacing the semicolon with {} or moving the semicolon to the next\nline will always silence the warning.\n\nTests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.\n\nllvm-svn: 150515"}, | [h]={"800ddf3dda7b",1329257672,"Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)","Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)\n\n* if, switch, range-based for: warn if semicolon is on the same line.\n* for, while: warn if semicolon is on the same line and either next\nstatement is compound statement or next statement has more\nindentation.\n\nReplacing the semicolon with {} or moving the semicolon to the next\nline will always silence the warning.\n\nTests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.\n\nllvm-svn: 150515"}, | ||
[i]={{ | [i]={{C,17891,"void Sema::DiagnoseEmptyStmtBody(SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID) {\n // ...\n Diag(NBody->getSemiLoc(), diag::note_empty_body_on_separate_line);"},{C,17956,"void Sema::DiagnoseEmptyLoopBody(const Stmt *S, const Stmt *PossibleBody) {\n // ...\n if (ProbableTypo) {\n // ...\n Diag(NBody->getSemiLoc(), diag::note_empty_body_on_separate_line);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-empty-body.cpp"]={"clang/test/SemaCXX/warn-empty-body.cpp:13:11: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:17:22: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:18:22: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:23:18: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:49:22: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:53:14: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:86:16: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:26:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:31:28: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:36:28: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:43:14: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:56:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:59:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:63:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:69:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:81:16: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:176:26: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:184:12: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:192:19: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:199:19: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:273:9: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:279:20: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:281:19: note: put the semicolon on a separate line to silence this warning"} | ["clang/test/SemaCXX/warn-empty-body.cpp"]={"clang/test/SemaCXX/warn-empty-body.cpp:13:11: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:17:22: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:18:22: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:23:18: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:49:22: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:53:14: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:86:16: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:26:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:31:28: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:36:28: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:43:14: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:56:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:59:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:63:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:69:21: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:81:16: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:176:26: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:184:12: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:192:19: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:199:19: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:273:9: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:279:20: note: put the semicolon on a separate line to silence this warning","clang/test/SemaCXX/warn-empty-body.cpp:281:19: note: put the semicolon on a separate line to silence this warning"} | ||
Line 3,947: | Line 3,959: | ||
}, | }, | ||
["note_empty_parens_default_ctor"]={ | ["note_empty_parens_default_ctor"]={ | ||
[ | [b]="remove parentheses to declare a variable", | ||
[ | [d]=c, | ||
[ | [e]="remove parentheses to declare a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8d06f424480e",1326412409,"Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:","Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:\n\n - If the declarator is at the start of a line, and the previous line contained\n another declarator and ended with a comma, then that comma was probably a\n typo for a semicolon:\n\n int n = 0, m = 1, l = 2, // k = 5;\n myImportantFunctionCall(); // oops!\n\n - If removing the parentheses would correctly initialize the object, then\n produce a note suggesting that fix.\n\n - Otherwise, if there is a simple initializer we can suggest which performs\n value-initialization, then provide a note suggesting a correction to that\n initializer.\n\nSema::Declarator now tracks the location of the comma prior to the declarator in\nthe declaration, if there is one, to facilitate providing the note. The code to\ndetermine an appropriate initializer from the -Wuninitialized warning has been\nfactored out to allow use in both that and -Wvexing-parse.\n\nllvm-svn: 148072"}, | [h]={"8d06f424480e",1326412409,"Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:","Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:\n\n - If the declarator is at the start of a line, and the previous line contained\n another declarator and ended with a comma, then that comma was probably a\n typo for a semicolon:\n\n int n = 0, m = 1, l = 2, // k = 5;\n myImportantFunctionCall(); // oops!\n\n - If removing the parentheses would correctly initialize the object, then\n produce a note suggesting that fix.\n\n - Otherwise, if there is a simple initializer we can suggest which performs\n value-initialization, then provide a note suggesting a correction to that\n initializer.\n\nSema::Declarator now tracks the location of the comma prior to the declarator in\nthe declaration, if there is one, to facilitate providing the note. The code to\ndetermine an appropriate initializer from the -Wuninitialized warning has been\nfactored out to allow use in both that and -Wvexing-parse.\n\nllvm-svn: 148072"}, | ||
[i]={{ | [i]={{H,3908,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n if (FTI.NumParams > 0) {\n // ...\n } else {\n // ...\n // Empty parens mean value-initialization, and no parens mean\n // default initialization. These are equivalent if the default\n // constructor is user-provided or if zero-initialization is a\n // no-op.\n if (RD && RD->hasDefinition() && (RD->isEmpty() || RD->hasUserProvidedDefaultConstructor()))\n S.Diag(DeclType.Loc, diag::note_empty_parens_default_ctor) << FixItHint::CreateRemoval(ParenRange);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/FixIt/fixit-vexing-parse.cpp"]={"clang/test/FixIt/fixit-vexing-parse.cpp:44:9: note: remove parentheses to declare a variable","clang/test/FixIt/fixit-vexing-parse.cpp:45:9: note: remove parentheses to declare a variable","clang/test/FixIt/fixit-vexing-parse.cpp:69:8: note: remove parentheses to declare a variable","clang/test/FixIt/fixit-vexing-parse.cpp:72:8: note: remove parentheses to declare a variable"} | ["clang/test/FixIt/fixit-vexing-parse.cpp"]={"clang/test/FixIt/fixit-vexing-parse.cpp:44:9: note: remove parentheses to declare a variable","clang/test/FixIt/fixit-vexing-parse.cpp:45:9: note: remove parentheses to declare a variable","clang/test/FixIt/fixit-vexing-parse.cpp:69:8: note: remove parentheses to declare a variable","clang/test/FixIt/fixit-vexing-parse.cpp:72:8: note: remove parentheses to declare a variable"} | ||
Line 3,959: | Line 3,971: | ||
}, | }, | ||
["note_empty_parens_function_call"]={ | ["note_empty_parens_function_call"]={ | ||
[ | [b]="change this \',\' to a \';\' to call %0", | ||
[ | [d]=c, | ||
[ | [e]="change this \',\' to a \';\' to call (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8d06f424480e",1326412409,"Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:","Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:\n\n - If the declarator is at the start of a line, and the previous line contained\n another declarator and ended with a comma, then that comma was probably a\n typo for a semicolon:\n\n int n = 0, m = 1, l = 2, // k = 5;\n myImportantFunctionCall(); // oops!\n\n - If removing the parentheses would correctly initialize the object, then\n produce a note suggesting that fix.\n\n - Otherwise, if there is a simple initializer we can suggest which performs\n value-initialization, then provide a note suggesting a correction to that\n initializer.\n\nSema::Declarator now tracks the location of the comma prior to the declarator in\nthe declaration, if there is one, to facilitate providing the note. The code to\ndetermine an appropriate initializer from the -Wuninitialized warning has been\nfactored out to allow use in both that and -Wvexing-parse.\n\nllvm-svn: 148072"}, | [h]={"8d06f424480e",1326412409,"Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:","Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:\n\n - If the declarator is at the start of a line, and the previous line contained\n another declarator and ended with a comma, then that comma was probably a\n typo for a semicolon:\n\n int n = 0, m = 1, l = 2, // k = 5;\n myImportantFunctionCall(); // oops!\n\n - If removing the parentheses would correctly initialize the object, then\n produce a note suggesting that fix.\n\n - Otherwise, if there is a simple initializer we can suggest which performs\n value-initialization, then provide a note suggesting a correction to that\n initializer.\n\nSema::Declarator now tracks the location of the comma prior to the declarator in\nthe declaration, if there is one, to facilitate providing the note. The code to\ndetermine an appropriate initializer from the -Wuninitialized warning has been\nfactored out to allow use in both that and -Wvexing-parse.\n\nllvm-svn: 148072"}, | ||
[i]={{ | [i]={{H,3877,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n // If the declaration looks like:\n // T var1,\n // f();\n // and name lookup finds a function named \'f\', then the \',\' was\n // probably intended to be a \';\'.\n if (!D.isFirstDeclarator() && D.getIdentifier()) {\n // ...\n if (Comma.getFileID() != Name.getFileID() || Comma.getSpellingLineNumber() != Name.getSpellingLineNumber()) {\n // ...\n if (S.LookupName(Result, S.getCurScope()))\n S.Diag(D.getCommaLoc(), diag::note_empty_parens_function_call) << FixItHint::CreateReplacement(D.getCommaLoc(), \";\") << D.getIdentifier();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx-stmt.cpp"]={"clang/test/Parser/cxx-stmt.cpp:63:8: note: change this \',\' to a \';\' to call \'f6\'"} | ["clang/test/Parser/cxx-stmt.cpp"]={"clang/test/Parser/cxx-stmt.cpp:63:8: note: change this \',\' to a \';\' to call \'f6\'"} | ||
Line 3,971: | Line 3,983: | ||
}, | }, | ||
["note_empty_parens_zero_initialize"]={ | ["note_empty_parens_zero_initialize"]={ | ||
[ | [b]="replace parentheses with an initializer to declare a variable", | ||
[ | [d]=c, | ||
[ | [e]="replace parentheses with an initializer to declare a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8d06f424480e",1326412409,"Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:","Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:\n\n - If the declarator is at the start of a line, and the previous line contained\n another declarator and ended with a comma, then that comma was probably a\n typo for a semicolon:\n\n int n = 0, m = 1, l = 2, // k = 5;\n myImportantFunctionCall(); // oops!\n\n - If removing the parentheses would correctly initialize the object, then\n produce a note suggesting that fix.\n\n - Otherwise, if there is a simple initializer we can suggest which performs\n value-initialization, then provide a note suggesting a correction to that\n initializer.\n\nSema::Declarator now tracks the location of the comma prior to the declarator in\nthe declaration, if there is one, to facilitate providing the note. The code to\ndetermine an appropriate initializer from the -Wuninitialized warning has been\nfactored out to allow use in both that and -Wvexing-parse.\n\nllvm-svn: 148072"}, | [h]={"8d06f424480e",1326412409,"Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:","Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its:\n\n - If the declarator is at the start of a line, and the previous line contained\n another declarator and ended with a comma, then that comma was probably a\n typo for a semicolon:\n\n int n = 0, m = 1, l = 2, // k = 5;\n myImportantFunctionCall(); // oops!\n\n - If removing the parentheses would correctly initialize the object, then\n produce a note suggesting that fix.\n\n - Otherwise, if there is a simple initializer we can suggest which performs\n value-initialization, then provide a note suggesting a correction to that\n initializer.\n\nSema::Declarator now tracks the location of the comma prior to the declarator in\nthe declaration, if there is one, to facilitate providing the note. The code to\ndetermine an appropriate initializer from the -Wuninitialized warning has been\nfactored out to allow use in both that and -Wvexing-parse.\n\nllvm-svn: 148072"}, | ||
[i]={{ | [i]={{H,3916,"/// Produce an appropriate diagnostic for an ambiguity between a function\n/// declarator and a C++ direct-initializer.\nstatic void warnAboutAmbiguousFunction(Sema &S, Declarator &D, DeclaratorChunk &DeclType, QualType RT) {\n // ...\n if (FTI.NumParams > 0) {\n // ...\n } else {\n // ...\n // Empty parens mean value-initialization, and no parens mean\n // default initialization. These are equivalent if the default\n // constructor is user-provided or if zero-initialization is a\n // no-op.\n if (RD && RD->hasDefinition() && (RD->isEmpty() || RD->hasUserProvidedDefaultConstructor()))\n // ...\n else {\n // ...\n if (!Init.empty())\n S.Diag(DeclType.Loc, diag::note_empty_parens_zero_initialize) << FixItHint::CreateReplacement(ParenRange, Init);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.link/p9.cpp"]={"clang/test/CXX/basic/basic.link/p9.cpp:9:8: note: replace parentheses with an initializer to declare a variable"} | ["clang/test/CXX/basic/basic.link/p9.cpp"]={"clang/test/CXX/basic/basic.link/p9.cpp:9:8: note: replace parentheses with an initializer to declare a variable"} | ||
Line 3,983: | Line 3,995: | ||
}, | }, | ||
["note_empty_using_if_exists_here"]={ | ["note_empty_using_if_exists_here"]={ | ||
[ | [b]={{nil,M,"using declaration annotated with \'using_if_exists\' here"}}, | ||
[ | [d]=c, | ||
[ | [e]="using declaration annotated with \'using_if_exists\' here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Ic,1615397021,Hc,Cc}, | ||
[i]={{ | [i]={{o,367,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (const auto *EmptyD = dyn_cast<UnresolvedUsingIfExistsDecl>(D)) {\n // ...\n Diag(EmptyD->getLocation(), diag::note_empty_using_if_exists_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/using-if-exists.cpp"]={"clang/test/SemaCXX/using-if-exists.cpp:8:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:32:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:37:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:53:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:53:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:54:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:53:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:89:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:108:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:136:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:136:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:136:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:163:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:177:5: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:216:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:217:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:88:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:89:3: note: using declaration annotated with \'using_if_exists\' here"} | ["clang/test/SemaCXX/using-if-exists.cpp"]={"clang/test/SemaCXX/using-if-exists.cpp:8:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:32:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:37:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:53:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:53:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:54:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:53:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:89:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:108:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:136:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:136:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:136:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:163:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:177:5: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:216:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:217:1: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:88:3: note: using declaration annotated with \'using_if_exists\' here","clang/test/SemaCXX/using-if-exists.cpp:89:3: note: using declaration annotated with \'using_if_exists\' here"} | ||
Line 3,995: | Line 4,007: | ||
}, | }, | ||
["note_enforce_read_only_placement"]={ | ["note_enforce_read_only_placement"]={ | ||
[ | [b]={{nil,F,"type was declared read-only here"}}, | ||
[ | [d]=c, | ||
[ | [e]="type was declared read\\-only here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{ | [i]={{q,7439,"// This function emits warning and a corresponding note based on the\n// ReadOnlyPlacementAttr attribute. The warning checks that all global variable\n// declarations of an annotated type must be const qualified.\nvoid emitReadOnlyPlacementAttrWarning(Sema &S, const VarDecl *VD) {\n // ...\n if (const auto *ConstDecl = RD->getAttr<ReadOnlyPlacementAttr>()) {\n // ...\n S.Diag(ConstDecl->getLocation(), diag::note_enforce_read_only_placement);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-read-only-placement.cpp"]={"clang/test/Sema/attr-read-only-placement.cpp:5:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:5:23: note: type was declared read-only here", | ["clang/test/Sema/attr-read-only-placement.cpp"]={"clang/test/Sema/attr-read-only-placement.cpp:5:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:5:23: note: type was declared read-only here",fd,fd,fd,fd,fd,"clang/test/Sema/attr-read-only-placement.cpp:40:23: note: type was declared read-only here"} | ||
} | } | ||
}, | }, | ||
["note_enters_block_captures_cxx_obj"]={ | ["note_enters_block_captures_cxx_obj"]={ | ||
[ | [b]="jump enters lifetime of block which captures a destructible C++ object", | ||
[ | [d]=c, | ||
[ | [e]="jump enters lifetime of block which captures a destructible C\\+\\+ object", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Sc,1310407494,zc,Qc}, | ||
[i]={{ | [i]={{y,262,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_cxx_destructor:\n Diags = ScopePair(diag::note_enters_block_captures_cxx_obj, diag::note_exits_block_captures_cxx_obj);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/goto.cpp"]={"clang/test/SemaCXX/goto.cpp:121:15: note: jump enters lifetime of block which captures a destructible C++ object"} | ["clang/test/SemaCXX/goto.cpp"]={"clang/test/SemaCXX/goto.cpp:121:15: note: jump enters lifetime of block which captures a destructible C++ object"} | ||
Line 4,019: | Line 4,031: | ||
}, | }, | ||
["note_enters_block_captures_non_trivial_c_struct"]={ | ["note_enters_block_captures_non_trivial_c_struct"]={ | ||
[ | [b]={{nil,L,"jump enters lifetime of block which captures a C struct that is non-trivial to destroy"}}, | ||
[ | [d]=c, | ||
[ | [e]="jump enters lifetime of block which captures a C struct that is non\\-trivial to destroy", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C","[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"}, | [h]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C","[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"}, | ||
[i]={{ | [i]={{y,274,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_nontrivial_c_struct:\n Diags = ScopePair(diag::note_enters_block_captures_non_trivial_c_struct, diag::note_exits_block_captures_non_trivial_c_struct);"}}, | ||
[j]={ | [j]={ | ||
[ | [Ac]={"clang/test/SemaObjC/strong-in-c-struct.m:39:10: note: jump enters lifetime of block which captures a C struct that is non-trivial to destroy"} | ||
} | } | ||
}, | }, | ||
["note_enters_block_captures_strong"]={ | ["note_enters_block_captures_strong"]={ | ||
[ | [b]="jump enters lifetime of block which strongly captures a variable", | ||
[ | [d]=c, | ||
[ | [e]="jump enters lifetime of block which strongly captures a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Sc,1310407494,zc,Qc}, | ||
[i]={{ | [i]={{y,266,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_objc_strong_lifetime:\n Diags = ScopePair(diag::note_enters_block_captures_strong, diag::note_exits_block_captures_strong);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-jump-block.m"]={"clang/test/SemaObjC/arc-jump-block.m:25:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:22:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:25:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:22:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:22:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:87:14: note: jump enters lifetime of block which strongly captures a variable"} | ["clang/test/SemaObjC/arc-jump-block.m"]={"clang/test/SemaObjC/arc-jump-block.m:25:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:22:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:25:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:22:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:22:45: note: jump enters lifetime of block which strongly captures a variable","clang/test/SemaObjC/arc-jump-block.m:87:14: note: jump enters lifetime of block which strongly captures a variable"} | ||
Line 4,043: | Line 4,055: | ||
}, | }, | ||
["note_enters_block_captures_weak"]={ | ["note_enters_block_captures_weak"]={ | ||
[ | [b]="jump enters lifetime of block which weakly captures a variable", | ||
[ | [d]=c, | ||
[ | [e]="jump enters lifetime of block which weakly captures a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Sc,1310407494,zc,Qc}, | ||
[i]={{ | [i]={{y,270,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_objc_weak_lifetime:\n Diags = ScopePair(diag::note_enters_block_captures_weak, diag::note_exits_block_captures_weak);"}} | ||
}, | }, | ||
["note_enters_compound_literal_scope"]={ | ["note_enters_compound_literal_scope"]={ | ||
[ | [b]={{nil,K,"jump enters lifetime of a compound literal that is non-trivial to destruct"}}, | ||
[ | [d]=c, | ||
[ | [e]="jump enters lifetime of a compound literal that is non\\-trivial to destruct", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Dc,1576908663,Uc,Gc}, | ||
[i]={{ | [i]={{y,293,"/// Build scope information for compound literals of C struct types that are\n/// non-trivial to destruct.\nvoid JumpScopeChecker::BuildScopeInformation(CompoundLiteralExpr *CLE, unsigned &ParentScope) {\n unsigned InDiag = diag::note_enters_compound_literal_scope;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ac]={"clang/test/SemaObjC/strong-in-c-struct.m:61:11: note: jump enters lifetime of a compound literal that is non-trivial to destruct"} | ||
} | } | ||
}, | }, | ||
["note_enters_statement_expression"]={ | ["note_enters_statement_expression"]={ | ||
[ | [b]="jump enters a statement expression", | ||
[ | [d]=c, | ||
[ | [e]="jump enters a statement expression", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"202191060602",1688720293,"[Clang] Diagnose jumps into statement expressions","[Clang] Diagnose jumps into statement expressions\n\nSuch jumps are not allowed by GCC and allowing them\ncan lead to situations where we jumps into unevaluated\nstatements.\n\nFixes #63682\n\nReviewed By: aaron.ballman, #clang-language-wg\n\nDifferential Revision: https://reviews.llvm.org/D154696"}, | [h]={"202191060602",1688720293,"[Clang] Diagnose jumps into statement expressions","[Clang] Diagnose jumps into statement expressions\n\nSuch jumps are not allowed by GCC and allowing them\ncan lead to situations where we jumps into unevaluated\nstatements.\n\nFixes #63682\n\nReviewed By: aaron.ballman, #clang-language-wg\n\nDifferential Revision: https://reviews.llvm.org/D154696"}, | ||
[i]={{ | [i]={{y,479,"/// 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::StmtExprClass: {\n // ...\n Scopes.push_back(GotoScope(ParentScope, diag::note_enters_statement_expression,"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/scope-check.c"]={"clang/test/Sema/scope-check.c:128:15: note: jump enters a statement expression","clang/test/Sema/scope-check.c:68:11: note: jump enters a statement expression","clang/test/Sema/scope-check.c:257:11: note: jump enters a statement expression","clang/test/Sema/scope-check.c:244:11: note: jump enters a statement expression","clang/test/Sema/scope-check.c:240:24: note: jump enters a statement expression"} | ["clang/test/Sema/scope-check.c"]={"clang/test/Sema/scope-check.c:128:15: note: jump enters a statement expression","clang/test/Sema/scope-check.c:68:11: note: jump enters a statement expression","clang/test/Sema/scope-check.c:257:11: note: jump enters a statement expression","clang/test/Sema/scope-check.c:244:11: note: jump enters a statement expression","clang/test/Sema/scope-check.c:240:24: note: jump enters a statement expression"} | ||
Line 4,076: | Line 4,088: | ||
}, | }, | ||
["note_entity_declared_at"]={ | ["note_entity_declared_at"]={ | ||
[ | [b]="%0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2afa8780d62a",1401279614,"Consolidate some note diagnostics","Consolidate some note diagnostics\n\nThese note diags have the same message and can be unified further but for now\nlet\'s just bring them together.\n\nIncidental change: Display a source range in the final attr diagnostic.\n\nllvm-svn: 209728"}, | [h]={"2afa8780d62a",1401279614,"Consolidate some note diagnostics","Consolidate some note diagnostics\n\nThese note diags have the same message and can be unified further but for now\nlet\'s just bring them together.\n\nIncidental change: Display a source range in the final attr diagnostic.\n\nllvm-svn: 209728"}, | ||
[i]={{ | [i]={{C,6466,"/// Diagnose use of %s directive in an NSString which is being passed\n/// as formatting string to formatting method.\nstatic void DiagnoseCStringFormatDirectiveInCFAPI(Sema &S, const NamedDecl *FDecl, Expr **Args, unsigned NumArgs) {\n // ...\n if (S.FormatStringHasSArg(FormatString)) {\n // ...\n S.Diag(FDecl->getLocation(), diag::note_entity_declared_at) << FDecl->getDeclName();"},{cd,602,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (Found.empty() && !ErrorRecoveryLookup) {\n // ...\n if (!R.empty()) {\n // ...\n if (NamedDecl *ND = R.getAsSingle<NamedDecl>())\n Diag(ND->getLocation(), diag::note_entity_declared_at) << IdInfo.Identifier;"},{cd,819,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (!Found.empty()) {\n if (TypeDecl *TD = Found.getAsSingle<TypeDecl>()) {\n // ...\n } else if (Found.getAsSingle<TemplateDecl>()) {\n // ...\n } else {\n // ...\n if (NamedDecl *ND = Found.getAsSingle<NamedDecl>())\n Diag(ND->getLocation(), diag::note_entity_declared_at) << IdInfo.Identifier;"},{q,9488,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n // ...\n case InvalidKernelParam:\n // OpenCL v1.2 s6.8 n:\n // A kernel function argument cannot be declared\n // of event_t type.\n // Do not diagnose half type since it is diagnosed as invalid argument\n // type for any function elsewhere.\n if (!PT->isHalfType()) {\n // ...\n while ((Typedef = PT->getAs<TypedefType>())) {\n // ...\n // SourceLocation may be invalid for a built-in type.\n if (Loc.isValid())\n S.Diag(Loc, diag::note_entity_declared_at) << PT;"},{T,1464,"static void handlePreferredName(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (const auto *TT = T->getAs<TypedefType>())\n S.Diag(TT->getDecl()->getLocation(), diag::note_entity_declared_at) << TT->getDecl();"},{m,2783,"/// Check the validity of a C++ base class specifier.\n///\n/// \\returns a new CXXBaseSpecifier if well-formed, emits diagnostics\n/// and returns NULL otherwise.\nCXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc) {\n // ...\n // C++ [class]p3:\n // If a class is marked final and it appears as a base-type-specifier in\n // base-clause, the program is ill-formed.\n if (FinalAttr *FA = CXXBaseDecl->getAttr<FinalAttr>()) {\n // ...\n Diag(CXXBaseDecl->getLocation(), diag::note_entity_declared_at) << CXXBaseDecl->getDeclName() << FA->getRange();"},{m,6300,"static void checkForMultipleExportedDefaultConstructors(Sema &S, CXXRecordDecl *Class) {\n // ...\n for (Decl *Member : Class->decls()) {\n // ...\n if (LastExportedDefaultCtor) {\n // ...\n S.Diag(CD->getLocation(), diag::note_entity_declared_at) << CD->getDeclName();"},{P,3925,"static void DiagnoseVariableSizedIvars(Sema &S, ObjCContainerDecl *OCD) {\n // ...\n if (FirstIvar && (FirstIvar == IntfDecl->all_declared_ivar_begin())) {\n // ...\n if (SuperClass) {\n // ...\n if (IsVariableSizedType(LastIvar->getType())) {\n // ...\n S.Diag(LastIvar->getLocation(), diag::note_entity_declared_at) << LastIvar->getDeclName();"},{o,197,"/// Check whether we\'re in an extern inline function and referring to a\n/// variable or function with internal linkage (C11 6.7.4p3).\n///\n/// This is only a warning because we used to silently accept this code, but\n/// in many cases it will not behave correctly. This is not enabled in C++ mode\n/// because the restriction language is a bit weaker (C++11 [basic.def.odr]p6)\n/// and so while there may still be user mistakes, most of the time we can\'t\n/// prove that there are errors.\nstatic void diagnoseUseOfInternalDeclInInlineFunction(Sema &S, const NamedDecl *D, SourceLocation Loc) {\n // ...\n S.Diag(D->getCanonicalDecl()->getLocation(), diag::note_entity_declared_at) << D;"},{o,348,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (LangOpts.OpenMP && DRD && !CurContext->containsDecl(D) && isa<VarDecl>(D)) {\n // ...\n Diag(D->getLocation(), diag::note_entity_declared_at) << D;"},{o,361,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n // [OpenMP 5.0], 2.19.7.3. declare mapper Directive, Restrictions\n // List-items in map clauses on this construct may only refer to the declared\n // variable var and entities that could be referenced by a procedure defined\n // at the same location.\n // [OpenMP 5.2] Also allow iterator declared variables.\n if (LangOpts.OpenMP && isa<VarDecl>(D) && !isOpenMPDeclareMapperVarDeclAllowed(cast<VarDecl>(D))) {\n // ...\n Diag(D->getLocation(), diag::note_entity_declared_at) << D;"},{o,406,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (isa<ParmVarDecl>(D) && isa<RequiresExprBodyDecl>(D->getDeclContext()) && !isUnevaluatedContext()) {\n // ...\n Diag(D->getLocation(), diag::note_entity_declared_at) << D;"},{o,19155,"void diagnoseUncapturableValueReferenceOrBinding(Sema &S, SourceLocation loc, ValueDecl *var) {\n // ...\n S.Diag(var->getLocation(), diag::note_entity_declared_at) << var;"},{o,19230,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n if (isa<BindingDecl>(Var)) {\n if (!IsLambda || !S.getLangOpts().CPlusPlus) {\n // ...\n } else if (Diagnose && S.getLangOpts().CPlusPlus) {\n // ...\n S.Diag(Var->getLocation(), diag::note_entity_declared_at) << Var;"},{o,19354,"/// 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 // FIXME: We should support capturing structured bindings in OpenMP.\n if (!Invalid && BD && S.LangOpts.OpenMP) {\n if (BuildAndDiagnose) {\n // ...\n S.Diag(Var->getLocation(), diag::note_entity_declared_at) << Var;"},{o,20837,"bool Sema::CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD) {\n // ...\n class CallReturnIncompleteDiagnoser : public TypeDiagnoser {\n // ...\n void diagnose(Sema &S, SourceLocation Loc, QualType T) override {\n // ...\n S.Diag(FD->getLocation(), diag::note_entity_declared_at) << FD->getDeclName();"},{p,1401,"ExprResult Sema::ParseObjCProtocolExpression(IdentifierInfo *ProtocolId, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc) {\n // ...\n if (!PDecl->hasDefinition()) {\n // ...\n Diag(PDecl->getLocation(), diag::note_entity_declared_at) << PDecl;"},{s,7822,"/// Check a template argument against its corresponding\n/// template template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.template].\n/// It returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg) {\n // ...\n // C++1z [temp.arg.template]p3: (DR 150)\n // A template-argument matches a template template-parameter P when P\n // is at least as specialized as the template-argument A.\n // FIXME: We should enable RelaxedTemplateTemplateArgs by default as it is a\n // defect report resolution from C++17 and shouldn\'t be introduced by\n // concepts.\n if (getLangOpts().RelaxedTemplateTemplateArgs) {\n // ...\n if (isTemplateTemplateParameterAtLeastAsSpecializedAs(Params, Template, Arg.getLocation())) {\n // ...\n if (!IsParamAtLeastAsConstrained) {\n // ...\n Diag(Param->getLocation(), diag::note_entity_declared_at) << Param;"},{s,7823,"/// Check a template argument against its corresponding\n/// template template parameter.\n///\n/// This routine implements the semantics of C++ [temp.arg.template].\n/// It returns true if an error occurred, and false otherwise.\nbool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg) {\n // ...\n // C++1z [temp.arg.template]p3: (DR 150)\n // A template-argument matches a template template-parameter P when P\n // is at least as specialized as the template-argument A.\n // FIXME: We should enable RelaxedTemplateTemplateArgs by default as it is a\n // defect report resolution from C++17 and shouldn\'t be introduced by\n // concepts.\n if (getLangOpts().RelaxedTemplateTemplateArgs) {\n // ...\n if (isTemplateTemplateParameterAtLeastAsSpecializedAs(Params, Template, Arg.getLocation())) {\n // ...\n if (!IsParamAtLeastAsConstrained) {\n // ...\n Diag(Template->getLocation(), diag::note_entity_declared_at) << Template;"}} | ||
}, | }, | ||
["note_enum_specialized_here"]={ | ["note_enum_specialized_here"]={ | ||
[ | [b]="enum %0 was explicitly specialized here", | ||
[ | [d]=c, | ||
[ | [e]="enum (.*?) was explicitly specialized here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"169f2190013d",1332793696,"Add a special-case diagnostic for one of the more obnoxious special cases of","Add a special-case diagnostic for one of the more obnoxious special cases of\nunscoped enumeration members: an enumerator name which is visible in the\nout-of-class definition of a member of a templated class might not actually\nexist in the instantiation of that class, if the enumeration is also lexically\ndefined outside the class definition and is explicitly specialized.\n\nDepending on the result of a CWG discussion, we may have a different resolution\nfor a class of problems in this area, but this fixes the immediate issue of a\ncrash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes\nSchaub for digging into the standard wording to find how this case is currently\nspecified to behave.\n\nllvm-svn: 153461"}, | [h]={"169f2190013d",1332793696,"Add a special-case diagnostic for one of the more obnoxious special cases of","Add a special-case diagnostic for one of the more obnoxious special cases of\nunscoped enumeration members: an enumerator name which is visible in the\nout-of-class definition of a member of a templated class might not actually\nexist in the instantiation of that class, if the enumeration is also lexically\ndefined outside the class definition and is explicitly specialized.\n\nDepending on the result of a CWG discussion, we may have a different resolution\nfor a class of problems in this area, but this fixes the immediate issue of a\ncrash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes\nSchaub for digging into the standard wording to find how this case is currently\nspecified to behave.\n\nllvm-svn: 153461"}, | ||
[i]={{ | [i]={{Mc,6337,"/// Find the instantiation of the given declaration within the\n/// current instantiation.\n///\n/// This routine is intended to be used when \\p D is a declaration\n/// referenced from within a template, that needs to mapped into the\n/// corresponding declaration within an instantiation. For example,\n/// given:\n///\n/// \\code\n/// template<typename T>\n/// struct X {\n/// enum Kind {\n/// KnownValue = sizeof(T)\n/// };\n///\n/// bool getKind() const { return KnownValue; }\n/// };\n///\n/// template struct X<int>;\n/// \\endcode\n///\n/// In the instantiation of X<int>::getKind(), we need to map the \\p\n/// EnumConstantDecl for \\p KnownValue (which refers to\n/// X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue).\n/// \\p FindInstantiatedDecl performs this mapping from within the instantiation\n/// of X<int>.\nNamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext) {\n // ...\n if (ParentDC != D->getDeclContext()) {\n // ...\n if (!Result) {\n if (isa<UsingShadowDecl>(D)) {\n // ...\n } else if (hasUncompilableErrorOccurred()) {\n // ...\n } else if (IsBeingInstantiated) {\n // ...\n } else if (EnumConstantDecl *ED = dyn_cast<EnumConstantDecl>(D)) {\n // ...\n Diag(Spec->getLocation(), diag::note_enum_specialized_here) << Context.getTypeDeclType(Spec);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/enum-unscoped-nonexistent.cpp"]={"clang/test/SemaCXX/enum-unscoped-nonexistent.cpp:12:26: note: enum \'S<char>::E\' was explicitly specialized here"} | ["clang/test/SemaCXX/enum-unscoped-nonexistent.cpp"]={"clang/test/SemaCXX/enum-unscoped-nonexistent.cpp:12:26: note: enum \'S<char>::E\' was explicitly specialized here"} | ||
Line 4,097: | Line 4,109: | ||
}, | }, | ||
["note_equality_comparison_silence"]={ | ["note_equality_comparison_silence"]={ | ||
[ | [b]="remove extraneous parentheses around the comparison to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="remove extraneous parentheses around the comparison to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8b6ec6870f65",1296584662,"Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.","Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.\nIt\'s highly likely that the user intended an assignment used as condition.\n\nAddresses rdar://8848646.\n\nllvm-svn: 124668"}, | [h]={"8b6ec6870f65",1296584662,"Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.","Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.\nIt\'s highly likely that the user intended an assignment used as condition.\n\nAddresses rdar://8848646.\n\nllvm-svn: 124668"}, | ||
[i]={{ | [i]={{o,20914,"/// Redundant parentheses over an equality comparison can indicate\n/// that the user intended an assignment used as condition.\nvoid Sema::DiagnoseEqualityWithExtraParens(ParenExpr *ParenE) {\n // ...\n if (BinaryOperator *opE = dyn_cast<BinaryOperator>(E))\n if (opE->getOpcode() == BO_EQ && opE->getLHS()->IgnoreParenImpCasts()->isModifiableLvalue(Context) == Expr::MLV_Valid) {\n // ...\n Diag(Loc, diag::note_equality_comparison_silence) << FixItHint::CreateRemoval(ParenERange.getBegin()) << FixItHint::CreateRemoval(ParenERange.getEnd());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-assignment-condition.cpp"]={"clang/test/SemaCXX/warn-assignment-condition.cpp:109:10: note: remove extraneous parentheses around the comparison to silence this warning","clang/test/SemaCXX/warn-assignment-condition.cpp:128:13: note: remove extraneous parentheses around the comparison to silence this warning","clang/test/SemaCXX/warn-assignment-condition.cpp:137:14: note: remove extraneous parentheses around the comparison to silence this warning"} | ["clang/test/SemaCXX/warn-assignment-condition.cpp"]={"clang/test/SemaCXX/warn-assignment-condition.cpp:109:10: note: remove extraneous parentheses around the comparison to silence this warning","clang/test/SemaCXX/warn-assignment-condition.cpp:128:13: note: remove extraneous parentheses around the comparison to silence this warning","clang/test/SemaCXX/warn-assignment-condition.cpp:137:14: note: remove extraneous parentheses around the comparison to silence this warning"} | ||
Line 4,109: | Line 4,121: | ||
}, | }, | ||
["note_equality_comparison_to_assign"]={ | ["note_equality_comparison_to_assign"]={ | ||
[ | [b]="use \'=\' to turn this equality comparison into an assignment", | ||
[ | [d]=c, | ||
[ | [e]="use \'\\=\' to turn this equality comparison into an assignment", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8b6ec6870f65",1296584662,"Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.","Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.\nIt\'s highly likely that the user intended an assignment used as condition.\n\nAddresses rdar://8848646.\n\nllvm-svn: 124668"}, | [h]={"8b6ec6870f65",1296584662,"Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.","Warn for \"if ((a == b))\" where the equality expression is needlessly wrapped inside parentheses.\nIt\'s highly likely that the user intended an assignment used as condition.\n\nAddresses rdar://8848646.\n\nllvm-svn: 124668"}, | ||
[i]={{ | [i]={{o,20940,"/// Redundant parentheses over an equality comparison can indicate\n/// that the user intended an assignment used as condition.\nvoid Sema::DiagnoseEqualityWithExtraParens(ParenExpr *ParenE) {\n // ...\n if (BinaryOperator *opE = dyn_cast<BinaryOperator>(E))\n if (opE->getOpcode() == BO_EQ && opE->getLHS()->IgnoreParenImpCasts()->isModifiableLvalue(Context) == Expr::MLV_Valid) {\n // ...\n Diag(Loc, diag::note_equality_comparison_to_assign) << FixItHint::CreateReplacement(Loc, \"=\");"},{G,195,"/// Diagnose unused comparisons, both builtin and overloaded operators.\n/// For \'==\' and \'!=\', suggest fixits for \'=\' or \'|=\'.\n///\n/// Adding a cast to void (or other expression wrappers) will prevent the\n/// warning from firing.\nstatic bool DiagnoseUnusedComparison(Sema &S, const Expr *E) {\n // ...\n // If the LHS is a plausible entity to assign to, provide a fixit hint to\n // correct common typos.\n if (CanAssign) {\n if (Kind == Inequality)\n // ...\n else if (Kind == Equality)\n S.Diag(Loc, diag::note_equality_comparison_to_assign) << FixItHint::CreateReplacement(Loc, \"=\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/unused-expr-system-header.c"]={"clang/test/Sema/unused-expr-system-header.c:6:20: note: use \'=\' to turn this equality comparison into an assignment","clang/test/Sema/unused-expr-system-header.c:9:20: note: use \'=\' to turn this equality comparison into an assignment"} | ["clang/test/Sema/unused-expr-system-header.c"]={"clang/test/Sema/unused-expr-system-header.c:6:20: note: use \'=\' to turn this equality comparison into an assignment","clang/test/Sema/unused-expr-system-header.c:9:20: note: use \'=\' to turn this equality comparison into an assignment"} | ||
Line 4,121: | Line 4,133: | ||
}, | }, | ||
["note_equivalent_internal_linkage_decl"]={ | ["note_equivalent_internal_linkage_decl"]={ | ||
[ | [b]="declared here%select{ in module \'%1\'|}0", | ||
[ | [d]=c, | ||
[ | [e]="declared here(?: in module \'(.*?)\'|)", | ||
[ | [f]=a, | ||
[ | [g]=Vc, | ||
[h]={"2dbe4043e8f5",1446665192,"[modules] Generalize the workaround for multiple ambiguous definitions of","[modules] Generalize the workaround for multiple ambiguous definitions of\ninternal linkage entities in different modules from r250884 to apply to all\nnames, not just function names.\n\nThis is really awkward: we don\'t want to merge internal-linkage symbols from\nseparate modules, because they might not actually be defining the same entity.\nBut we don\'t want to reject programs that use such an ambiguous symbol if those\ninternal-linkage symbols are in fact equivalent. For now, we\'re resolving the\nambiguity by picking one of the equivalent definitions as an extension.\n\nllvm-svn: 252063"}, | [h]={"2dbe4043e8f5",1446665192,"[modules] Generalize the workaround for multiple ambiguous definitions of","[modules] Generalize the workaround for multiple ambiguous definitions of\ninternal linkage entities in different modules from r250884 to apply to all\nnames, not just function names.\n\nThis is really awkward: we don\'t want to merge internal-linkage symbols from\nseparate modules, because they might not actually be defining the same entity.\nBut we don\'t want to reject programs that use such an ambiguous symbol if those\ninternal-linkage symbols are in fact equivalent. For now, we\'re resolving the\nambiguity by picking one of the equivalent definitions as an extension.\n\nllvm-svn: 252063"}, | ||
[i]={{ | [i]={{fb,10306,"void Sema::diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef<const NamedDecl *> Equiv) {\n // ...\n Diag(D->getLocation(), diag::note_equivalent_internal_linkage_decl) << !M << (M ? M->getFullModuleName() : \"\");"},{fb,10311,"void Sema::diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef<const NamedDecl *> Equiv) {\n // ...\n for (auto *E : Equiv) {\n // ...\n Diag(E->getLocation(), diag::note_equivalent_internal_linkage_decl) << !M << (M ? M->getFullModuleName() : \"\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/submodules-merge-defs.cpp"]={"clang/test/Modules/Inputs/submodules-merge-defs/defs.h:71:22: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:71:22: note: declared here in module \'stuff.use\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'stuff.use\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'stuff.use\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'stuff.use\'"} | ["clang/test/Modules/submodules-merge-defs.cpp"]={"clang/test/Modules/Inputs/submodules-merge-defs/defs.h:71:22: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:71:22: note: declared here in module \'stuff.use\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'stuff.use\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'stuff.use\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'redef\'","clang/test/Modules/Inputs/submodules-merge-defs/defs.h:51:13: note: declared here in module \'stuff.use\'"} | ||
Line 4,133: | Line 4,145: | ||
}, | }, | ||
["note_evaluate_comparison_first"]={ | ["note_evaluate_comparison_first"]={ | ||
[ | [b]="place parentheses around comparison expression to evaluate it first", | ||
[ | [d]=c, | ||
[ | [e]="place parentheses around comparison expression to evaluate it first", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fe042e6aab26",1366164765,"Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This","Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This\nwill fire on code such as:\n\n cout << x == 0;\n\nwhich the compiler will intrepret as\n\n (cout << x) == 0;\n\nThis warning comes with two fixits attached to notes, one for parentheses to\nsilence the warning, and another to evaluate the comparison first.\n\nllvm-svn: 179662"}, | [h]={"fe042e6aab26",1366164765,"Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This","Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This\nwill fire on code such as:\n\n cout << x == 0;\n\nwhich the compiler will intrepret as\n\n (cout << x) == 0;\n\nThis warning comes with two fixits attached to notes, one for parentheses to\nsilence the warning, and another to evaluate the comparison first.\n\nllvm-svn: 179662"}, | ||
[i]={{ | [i]={{o,16033,"static void DiagnoseShiftCompare(Sema &S, SourceLocation OpLoc, Expr *LHSExpr, Expr *RHSExpr) {\n // ...\n SuggestParentheses(S, OpLoc, S.PDiag(diag::note_evaluate_comparison_first), SourceRange(OCE->getArg(1)->getBeginLoc(), RHSExpr->getEndLoc()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:21: note: place parentheses around comparison expression to evaluate it first","clang/test/Parser/cxx2a-spaceship.cpp:17:21: note: place parentheses around comparison expression to evaluate it first"} | ["clang/test/Parser/cxx2a-spaceship.cpp"]={"clang/test/Parser/cxx2a-spaceship.cpp:13:21: note: place parentheses around comparison expression to evaluate it first","clang/test/Parser/cxx2a-spaceship.cpp:17:21: note: place parentheses around comparison expression to evaluate it first"} | ||
Line 4,145: | Line 4,157: | ||
}, | }, | ||
["note_evaluating_exception_spec_here"]={ | ["note_evaluating_exception_spec_here"]={ | ||
[ | [b]={{nil,z,"in evaluation of exception specification for %q0 needed here"}}, | ||
[ | [d]=c, | ||
[ | [e]="in evaluation of exception specification for (.*?) needed here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5159bbad8b2b",1536186637,"PR38627: Fix handling of exception specification adjustment for","PR38627: Fix handling of exception specification adjustment for\ndestructors.\n\nWe previously tried to patch up the exception specification after\ncompleting the class, which went wrong when the exception specification\nwas needed within the class body (in particular, by a friend\nredeclaration of the destructor in a nested class). We now mark the\ndestructor as having a not-yet-computed exception specification\nimmediately after creating it.\n\nThis requires delaying various checks against the exception\nspecification (where we\'d previously have just got the wrong exception\nspecification, and now find we have an exception specification that we\ncan\'t compute yet) when those checks fire while the class is being\ndefined.\n\nThis also exposed an issue that we were missing a CodeSynthesisContext\nfor computation of exception specifications (otherwise we\'d fail to make\nthe module containing the definition of the class visible when computing\nits members\' exception specs). Adding that incidentally also gives us a\ndiagnostic quality improvement.\n\nThis has also exposed an pre-existing problem: making the exception\nspecification evaluation context a non-SFINAE context (as it should be)\nresults in a bootstrap failure; PR38850 filed for this.\n\nllvm-svn: 341499"}, | [h]={"5159bbad8b2b",1536186637,"PR38627: Fix handling of exception specification adjustment for","PR38627: Fix handling of exception specification adjustment for\ndestructors.\n\nWe previously tried to patch up the exception specification after\ncompleting the class, which went wrong when the exception specification\nwas needed within the class body (in particular, by a friend\nredeclaration of the destructor in a nested class). We now mark the\ndestructor as having a not-yet-computed exception specification\nimmediately after creating it.\n\nThis requires delaying various checks against the exception\nspecification (where we\'d previously have just got the wrong exception\nspecification, and now find we have an exception specification that we\ncan\'t compute yet) when those checks fire while the class is being\ndefined.\n\nThis also exposed an issue that we were missing a CodeSynthesisContext\nfor computation of exception specifications (otherwise we\'d fail to make\nthe module containing the definition of the class visible when computing\nits members\' exception specs). Adding that incidentally also gives us a\ndiagnostic quality improvement.\n\nThis has also exposed an pre-existing problem: making the exception\nspecification evaluation context a non-SFINAE context (as it should be)\nresults in a bootstrap failure; PR38850 filed for this.\n\nllvm-svn: 341499"}, | ||
[i]={{ | [i]={{E,927,"/// 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::ExceptionSpecEvaluation:\n Diags.Report(Active->PointOfInstantiation, diag::note_evaluating_exception_spec_here) << cast<FunctionDecl>(Active->Entity);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/implicit-exception-spec.cpp"]={"clang/test/SemaCXX/implicit-exception-spec.cpp:21:16: note: in evaluation of exception specification for \'InClassInitializers::ConstExpr::ConstExpr\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:28:28: note: in evaluation of exception specification for \'InClassInitializers::TemplateArg::TemplateArg\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:36:7: note: in evaluation of exception specification for \'InClassInitializers::Nested::Inner::Inner\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:35:30: note: in evaluation of exception specification for \'InClassInitializers::Nested::Nested\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:41:13: note: in evaluation of exception specification for \'InClassInitializers::Nested2::Inner::Inner\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:51:30: note: in evaluation of exception specification for \'ExceptionSpecification::Nested::Nested\' needed here"} | ["clang/test/SemaCXX/implicit-exception-spec.cpp"]={"clang/test/SemaCXX/implicit-exception-spec.cpp:21:16: note: in evaluation of exception specification for \'InClassInitializers::ConstExpr::ConstExpr\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:28:28: note: in evaluation of exception specification for \'InClassInitializers::TemplateArg::TemplateArg\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:36:7: note: in evaluation of exception specification for \'InClassInitializers::Nested::Inner::Inner\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:35:30: note: in evaluation of exception specification for \'InClassInitializers::Nested::Nested\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:41:13: note: in evaluation of exception specification for \'InClassInitializers::Nested2::Inner::Inner\' needed here","clang/test/SemaCXX/implicit-exception-spec.cpp:51:30: note: in evaluation of exception specification for \'ExceptionSpecification::Nested::Nested\' needed here"} | ||
Line 4,157: | Line 4,169: | ||
}, | }, | ||
["note_exception_spec_deprecated"]={ | ["note_exception_spec_deprecated"]={ | ||
[ | [b]="use \'%0\' instead", | ||
[ | [d]=c, | ||
[ | [e]="use \'(.*?)\' instead", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"8ca78a16f4a5",1371088971,"Add -Wdeprecated warnings and fixits for things deprecated in C++11:","Add -Wdeprecated warnings and fixits for things deprecated in C++11:\n - \'register\' storage class\n - dynamic exception specifications\n\nOnly the former check is enabled by default for now (the latter might be quite noisy).\n\nllvm-svn: 183881"}, | [h]={"8ca78a16f4a5",1371088971,"Add -Wdeprecated warnings and fixits for things deprecated in C++11:","Add -Wdeprecated warnings and fixits for things deprecated in C++11:\n - \'register\' storage class\n - dynamic exception specifications\n\nOnly the former check is enabled by default for now (the latter might be quite noisy).\n\nllvm-svn: 183881"}, | ||
[i]={{"clang/lib/Parse/ParseDeclCXX.cpp",4013,"static void diagnoseDynamicExceptionSpecification(Parser &P, SourceRange Range, bool IsNoexcept) {\n if (P.getLangOpts().CPlusPlus11) {\n // ...\n P.Diag(Range.getBegin(), diag::note_exception_spec_deprecated) << Replacement << FixItHint::CreateReplacement(Range, Replacement);"}}, | [i]={{"clang/lib/Parse/ParseDeclCXX.cpp",4013,"static void diagnoseDynamicExceptionSpecification(Parser &P, SourceRange Range, bool IsNoexcept) {\n if (P.getLangOpts().CPlusPlus11) {\n // ...\n P.Diag(Range.getBegin(), diag::note_exception_spec_deprecated) << Replacement << FixItHint::CreateReplacement(Range, Replacement);"}}, | ||
Line 4,169: | Line 4,181: | ||
}, | }, | ||
["note_exits___block"]={ | ["note_exits___block"]={ | ||
[ | [b]="jump exits scope of __block variable", | ||
[ | [d]=c, | ||
[ | [e]="jump exits scope of __block variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,153,"/// 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);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-musttail.m"]={"clang/test/Sema/attr-musttail.m:12:15: note: jump exits scope of __block variable"} | ["clang/test/Sema/attr-musttail.m"]={"clang/test/Sema/attr-musttail.m:12:15: note: jump exits scope of __block variable"} | ||
Line 4,181: | Line 4,193: | ||
}, | }, | ||
["note_exits_block_captures_cxx_obj"]={ | ["note_exits_block_captures_cxx_obj"]={ | ||
[ | [b]="jump exits lifetime of block which captures a destructible C++ object", | ||
[ | [d]=c, | ||
[ | [e]="jump exits lifetime of block which captures a destructible C\\+\\+ object", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Sc,1310407494,zc,Qc}, | ||
[i]={{ | [i]={{y,263,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_cxx_destructor:\n Diags = ScopePair(diag::note_enters_block_captures_cxx_obj, diag::note_exits_block_captures_cxx_obj);"}} | ||
}, | }, | ||
["note_exits_block_captures_non_trivial_c_struct"]={ | ["note_exits_block_captures_non_trivial_c_struct"]={ | ||
[ | [b]={{nil,L,"jump exits lifetime of block which captures a C struct that is non-trivial to destroy"}}, | ||
[ | [d]=c, | ||
[ | [e]="jump exits lifetime of block which captures a C struct that is non\\-trivial to destroy", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C","[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"}, | [h]={"7275da0f2ee2",1519802155,"[ObjC] Allow declaring __strong pointer fields in structs in Objective-C","[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"}, | ||
[i]={{ | [i]={{y,275,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_nontrivial_c_struct:\n Diags = ScopePair(diag::note_enters_block_captures_non_trivial_c_struct, diag::note_exits_block_captures_non_trivial_c_struct);"}}, | ||
[j]={ | [j]={ | ||
[ | [Ac]={"clang/test/SemaObjC/strong-in-c-struct.m:53:10: note: jump exits lifetime of block which captures a C struct that is non-trivial to destroy"} | ||
} | } | ||
}, | }, | ||
["note_exits_block_captures_strong"]={ | ["note_exits_block_captures_strong"]={ | ||
[ | [b]="jump exits lifetime of block which strongly captures a variable", | ||
[ | [d]=c, | ||
[ | [e]="jump exits lifetime of block which strongly captures a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Sc,1310407494,zc,Qc}, | ||
[i]={{ | [i]={{y,267,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_objc_strong_lifetime:\n Diags = ScopePair(diag::note_enters_block_captures_strong, diag::note_exits_block_captures_strong);"}} | ||
}, | }, | ||
["note_exits_block_captures_weak"]={ | ["note_exits_block_captures_weak"]={ | ||
[ | [b]="jump exits lifetime of block which weakly captures a variable", | ||
[ | [d]=c, | ||
[ | [e]="jump exits lifetime of block which weakly captures a variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Sc,1310407494,zc,Qc}, | ||
[i]={{ | [i]={{y,271,"/// Build scope information for a captured block literal variables.\nvoid JumpScopeChecker::BuildScopeInformation(VarDecl *D, const BlockDecl *BDecl, unsigned &ParentScope) {\n // ...\n if (destructKind != QualType::DK_none) {\n // ...\n case QualType::DK_objc_weak_lifetime:\n Diags = ScopePair(diag::note_enters_block_captures_weak, diag::note_exits_block_captures_weak);"}} | ||
}, | }, | ||
["note_exits_cleanup"]={ | ["note_exits_cleanup"]={ | ||
[ | [b]="jump exits scope of variable with __attribute__((cleanup))", | ||
[ | [d]=c, | ||
[ | [e]="jump exits scope of variable with __attribute__\\(\\(cleanup\\)\\)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,157,"/// 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);"}} | ||
}, | }, | ||
["note_exits_compound_literal_scope"]={ | ["note_exits_compound_literal_scope"]={ | ||
[ | [b]={{nil,K,"jump exits lifetime of a compound literal that is non-trivial to destruct"}}, | ||
[ | [d]=c, | ||
[ | [e]="jump exits lifetime of a compound literal that is non\\-trivial to destruct", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Dc,1576908663,Uc,Gc}, | ||
[i]={{ | [i]={{y,294,"/// Build scope information for compound literals of C struct types that are\n/// non-trivial to destruct.\nvoid JumpScopeChecker::BuildScopeInformation(CompoundLiteralExpr *CLE, unsigned &ParentScope) {\n // ...\n unsigned OutDiag = diag::note_exits_compound_literal_scope;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ac]={"clang/test/SemaObjC/strong-in-c-struct.m:72:9: note: jump exits lifetime of a compound literal that is non-trivial to destruct"} | ||
} | } | ||
}, | }, | ||
["note_exits_cxx_catch"]={ | ["note_exits_cxx_catch"]={ | ||
[ | [b]="jump exits catch block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits catch block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,420,"/// 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()));"}} | ||
}, | }, | ||
["note_exits_cxx_try"]={ | ["note_exits_cxx_try"]={ | ||
[ | [b]="jump exits try block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits try block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,408,"/// 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()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:224:3: note: jump exits try block"} | ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:224:3: note: jump exits try block"} | ||
Line 4,262: | Line 4,274: | ||
}, | }, | ||
["note_exits_dtor"]={ | ["note_exits_dtor"]={ | ||
[ | [b]="jump exits scope of variable with non-trivial destructor", | ||
[ | [d]=c, | ||
[ | [e]="jump exits scope of variable with non\\-trivial destructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,171,"/// 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);"},{y,174,"/// 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_cxx_destructor:\n OutDiag = diag::note_exits_dtor;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ac]={"clang/test/SemaObjC/strong-in-c-struct.m:30:10: note: jump exits scope of variable with non-trivial destructor","clang/test/SemaObjC/strong-in-c-struct.m:53:10: note: jump exits scope of variable with non-trivial destructor"} | ||
} | } | ||
}, | }, | ||
["note_exits_objc_autoreleasepool"]={ | ["note_exits_objc_autoreleasepool"]={ | ||
[ | [b]="jump exits autoreleasepool block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits autoreleasepool block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={oc,1308178962,nc,mc}, | ||
[i]={{ | [i]={{y,551,"/// 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()));"}} | ||
}, | }, | ||
["note_exits_objc_catch"]={ | ["note_exits_objc_catch"]={ | ||
[ | [b]="jump exits @catch block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits @catch block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,505,"/// 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()));"}} | ||
}, | }, | ||
["note_exits_objc_finally"]={ | ["note_exits_objc_finally"]={ | ||
[ | [b]="jump exits @finally block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits @finally block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,516,"/// 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()));"}} | ||
}, | }, | ||
["note_exits_objc_strong"]={ | ["note_exits_objc_strong"]={ | ||
[ | [b]="jump exits scope of __strong variable", | ||
[ | [d]=c, | ||
[ | [e]="jump exits scope of __strong variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"}, | [h]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"}, | ||
[i]={{ | [i]={{y,163,"/// 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);"}} | ||
}, | }, | ||
["note_exits_objc_synchronized"]={ | ["note_exits_objc_synchronized"]={ | ||
[ | [b]="jump exits @synchronized block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits @synchronized block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,537,"/// 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()));"}} | ||
}, | }, | ||
["note_exits_objc_try"]={ | ["note_exits_objc_try"]={ | ||
[ | [b]="jump exits @try block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits @try block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,494,"/// 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()));"}} | ||
}, | }, | ||
["note_exits_objc_weak"]={ | ["note_exits_objc_weak"]={ | ||
[ | [b]="jump exits scope of __weak variable", | ||
[ | [d]=c, | ||
[ | [e]="jump exits scope of __weak variable", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"}, | [h]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"}, | ||
[i]={{ | [i]={{y,167,"/// 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);"}} | ||
}, | }, | ||
["note_exits_seh_except"]={ | ["note_exits_seh_except"]={ | ||
[ | [b]="jump exits __except block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits __except block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.","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"}, | [h]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.","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"}, | ||
[i]={{ | [i]={{y,444,"/// 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()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:613:5: note: jump exits __except block"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:613:5: note: jump exits __except block"} | ||
Line 4,349: | Line 4,361: | ||
}, | }, | ||
["note_exits_seh_finally"]={ | ["note_exits_seh_finally"]={ | ||
[ | [b]="jump exits __finally block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits __finally block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.","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"}, | [h]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.","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"}, | ||
[i]={{ | [i]={{y,451,"/// 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()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:624:5: note: jump exits __finally block"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:624:5: note: jump exits __finally block"} | ||
Line 4,361: | Line 4,373: | ||
}, | }, | ||
["note_exits_seh_try"]={ | ["note_exits_seh_try"]={ | ||
[ | [b]="jump exits __try block", | ||
[ | [d]=c, | ||
[ | [e]="jump exits __try block", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.","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"}, | [h]={"b14f87226902",1422983168,"Implement jump scope SEHmantic analysis.","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"}, | ||
[i]={{ | [i]={{y,433,"/// 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()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:605:3: note: jump exits __try block","clang/test/SemaCXX/scope-check.cpp:618:3: note: jump exits __try block"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:605:3: note: jump exits __try block","clang/test/SemaCXX/scope-check.cpp:618:3: note: jump exits __try block"} | ||
Line 4,373: | Line 4,385: | ||
}, | }, | ||
["note_exits_temporary_dtor"]={ | ["note_exits_temporary_dtor"]={ | ||
[ | [b]="jump exits scope of lifetime-extended temporary with non-trivial destructor", | ||
[ | [d]=c, | ||
[ | [e]="jump exits scope of lifetime\\-extended temporary with non\\-trivial destructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"c934e4fd2ce2",1386811622,"PR18217: Rewrite JumpDiagnostics\' handling of temporaries, to correctly handle","PR18217: Rewrite JumpDiagnostics\' handling of temporaries, to correctly handle\ndeclarations that might lifetime-extend multiple temporaries. In passing, fix a\ncrasher (PR18217) if an initializer was dependent and exactly the wrong shape,\nand remove a bogus function (Expr::findMaterializedTemporary) now its last use\nis gone.\n\nllvm-svn: 197103"}, | [h]={"c934e4fd2ce2",1386811622,"PR18217: Rewrite JumpDiagnostics\' handling of temporaries, to correctly handle","PR18217: Rewrite JumpDiagnostics\' handling of temporaries, to correctly handle\ndeclarations that might lifetime-extend multiple temporaries. In passing, fix a\ncrasher (PR18217) if an initializer was dependent and exactly the wrong shape,\nand remove a bogus function (Expr::findMaterializedTemporary) now its last use\nis gone.\n\nllvm-svn: 197103"}, | ||
[i]={{ | [i]={{y,588,"/// 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::MaterializeTemporaryExprClass: {\n // ...\n if (MTE->getStorageDuration() == SD_Automatic) {\n // ...\n if (ExtendedObject->getType().isDestructedType()) {\n Scopes.push_back(GotoScope(ParentScope, 0, diag::note_exits_temporary_dtor, ExtendedObject->getExprLoc()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:242:19: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:257:21: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:324:16: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:345:35: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:372:9: note: jump exits scope of lifetime-extended temporary with non-trivial destructor"} | ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:242:19: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:257:21: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:324:16: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:345:35: note: jump exits scope of lifetime-extended temporary with non-trivial destructor","clang/test/SemaCXX/scope-check.cpp:372:9: note: jump exits scope of lifetime-extended temporary with non-trivial destructor"} | ||
Line 4,385: | Line 4,397: | ||
}, | }, | ||
["note_explicit_ctor_deduction_guide_here"]={ | ["note_explicit_ctor_deduction_guide_here"]={ | ||
[ | [b]={{nil,U,"explicit %select{constructor|deduction guide}0 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="explicit (?:constructor|deduction guide) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"60437620db8e",1486667864,"[c++1z] P0091R3: Basic support for deducing class template arguments via deduction-guides.","[c++1z] P0091R3: Basic support for deducing class template arguments via deduction-guides.\n\nllvm-svn: 294613"}, | [h]={"60437620db8e",1486667864,"[c++1z] P0091R3: Basic support for deducing class template arguments via deduction-guides.","[c++1z] P0091R3: Basic support for deducing class template arguments via deduction-guides.\n\nllvm-svn: 294613"}, | ||
[i]={{ | [i]={{N,10001,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ExplicitConstructor: {\n // ...\n S.Diag(CtorDecl->getLocation(), diag::note_explicit_ctor_deduction_guide_here) << false;"},{N,10892,"QualType Sema::DeduceTemplateSpecializationFromInitializer(TypeSourceInfo *TSInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Inits, ParenListExpr *PL) {\n // ...\n case OR_Success:\n // C++ [over.match.list]p1:\n // In copy-list-initialization, if an explicit constructor is chosen, the\n // initialization is ill-formed.\n if (Kind.isCopyInit() && ListInit && cast<CXXDeductionGuideDecl>(Best->Function)->isExplicit()) {\n // ...\n Diag(Best->Function->getLocation(), diag::note_explicit_ctor_deduction_guide_here) << IsDeductionGuide;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/p7.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p7.cpp:12:12: note: explicit constructor declared here"} | ["clang/test/CXX/dcl.decl/dcl.init/p7.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p7.cpp:12:12: note: explicit constructor declared here"} | ||
Line 4,397: | Line 4,409: | ||
}, | }, | ||
["note_explicit_instantiation_candidate"]={ | ["note_explicit_instantiation_candidate"]={ | ||
[ | [b]="explicit instantiation candidate function %q0 template here %1", | ||
[ | [d]=c, | ||
[ | [e]="explicit instantiation candidate function (.*?) template here (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"450f0084a27b",1253904180,"WIP implementation of explicit instantiation of function templates,","WIP implementation of explicit instantiation of function templates,\nmember functions of class template specializations, and static data\nmembers. The mechanics are (mostly) present, but the semantic analysis\nis very weak.\n\nllvm-svn: 82789"}, | [h]={"450f0084a27b",1253904180,"WIP implementation of explicit instantiation of function templates,","WIP implementation of explicit instantiation of function templates,\nmember functions of class template specializations, and static data\nmembers. The mechanics are (mostly) present, but the semantic analysis\nis very weak.\n\nllvm-svn: 82789"}, | ||
[i]={{ | [i]={{s,10649,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!Specialization) {\n // ...\n UnresolvedSetIterator Result = getMostSpecialized(TemplateMatches.begin(), TemplateMatches.end(), FailedCandidates, D.getIdentifierLoc(), PDiag(diag::err_explicit_instantiation_not_known) << Name, PDiag(diag::err_explicit_instantiation_ambiguous) << Name, PDiag(diag::note_explicit_instantiation_candidate));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/template-ambiguous-overload.cpp"]={"clang/test/SemaCXX/template-ambiguous-overload.cpp:13:6: note: explicit instantiation candidate function \'f<0>\' template here [with $0 = 0]","clang/test/SemaCXX/template-ambiguous-overload.cpp:5:6: note: explicit instantiation candidate function \'n::f<0>\' template here [with $0 = 0]"} | ["clang/test/SemaCXX/template-ambiguous-overload.cpp"]={"clang/test/SemaCXX/template-ambiguous-overload.cpp:13:6: note: explicit instantiation candidate function \'f<0>\' template here [with $0 = 0]","clang/test/SemaCXX/template-ambiguous-overload.cpp:5:6: note: explicit instantiation candidate function \'n::f<0>\' template here [with $0 = 0]"} | ||
Line 4,409: | Line 4,421: | ||
}, | }, | ||
["note_explicit_instantiation_definition_here"]={ | ["note_explicit_instantiation_definition_here"]={ | ||
[ | [b]="explicit instantiation definition is here", | ||
[ | [d]=c, | ||
[ | [e]="explicit instantiation definition is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"d6ba93dc6eb6",1255622045,"Check the interactions between explicit instantiations and template","Check the interactions between explicit instantiations and template\nspecializations. Work in progress; there\'s more cleanup required to\nactually use the new CheckSpecializationInstantiationRedecl checker\nuniformly.\n\nllvm-svn: 84185"}, | [h]={"d6ba93dc6eb6",1255622045,"Check the interactions between explicit instantiations and template","Check the interactions between explicit instantiations and template\nspecializations. Work in progress; there\'s more cleanup required to\nactually use the new CheckSpecializationInstantiationRedecl checker\nuniformly.\n\nllvm-svn: 84185"}, | ||
[i]={{ | [i]={{s,9243,"/// 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_ExplicitInstantiationDeclaration:\n // ...\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(DiagLocForExplicitInstantiation(PrevDecl, PrevPointOfInstantiation), diag::note_explicit_instantiation_definition_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here"} | ["clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here","clang/test/CXX/temp/temp.spec/temp.explicit/p10.cpp:28:17: note: explicit instantiation definition is here"} | ||
Line 4,421: | Line 4,433: | ||
}, | }, | ||
["note_explicit_instantiation_here"]={ | ["note_explicit_instantiation_here"]={ | ||
[ | [b]="explicit instantiation refers here", | ||
[ | [d]=c, | ||
[ | [e]="explicit instantiation refers here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"450f0084a27b",1253904180,"WIP implementation of explicit instantiation of function templates,","WIP implementation of explicit instantiation of function templates,\nmember functions of class template specializations, and static data\nmembers. The mechanics are (mostly) present, but the semantic analysis\nis very weak.\n\nllvm-svn: 82789"}, | [h]={"450f0084a27b",1253904180,"WIP implementation of explicit instantiation of function templates,","WIP implementation of explicit instantiation of function templates,\nmember functions of class template specializations, and static data\nmembers. The mechanics are (mostly) present, but the semantic analysis\nis very weak.\n\nllvm-svn: 82789"}, | ||
[i]={{ | [i]={{s,839,"/// 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 if (isa<FunctionDecl>(Instantiation)) {\n // ...\n Note = diag::note_explicit_instantiation_here;"},{s,852,"/// 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 Note = diag::note_explicit_instantiation_here;"},{s,870,"/// 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 } else {\n // ...\n Note = diag::note_explicit_instantiation_here;"},{s,9871,"/// Check the scope of an explicit instantiation.\n///\n/// \\returns true if a serious error occurs, false otherwise.\nstatic bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D, SourceLocation InstLoc, bool WasQualifiedName) {\n // ...\n S.Diag(D->getLocation(), diag::note_explicit_instantiation_here);"},{s,10459,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n if (!Prev || !Prev->isStaticDataMember()) {\n // ...\n for (LookupResult::iterator P = Previous.begin(), PEnd = Previous.end(); P != PEnd; ++P)\n Diag((*P)->getLocation(), diag::note_explicit_instantiation_here);"},{s,10468,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n // ...\n if (!Prev->getInstantiatedFromStaticDataMember()) {\n // ...\n Diag(Prev->getLocation(), diag::note_explicit_instantiation_here);"},{s,10494,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (!R->isFunctionType()) {\n // ...\n if (!PrevTemplate) {\n // ...\n } else {\n // ...\n if (D.getName().getKind() != UnqualifiedIdKind::IK_TemplateId) {\n // ...\n Diag(PrevTemplate->getLocation(), diag::note_explicit_instantiation_here);"},{s,10672,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n // C++11 [except.spec]p4\n // In an explicit instantiation an exception-specification may be specified,\n // but is not required.\n // If an exception-specification is specified in an explicit instantiation\n // directive, it shall be compatible with the exception-specifications of\n // other declarations of that function.\n if (auto *FPT = R->getAs<FunctionProtoType>())\n if (FPT->hasExceptionSpec()) {\n // ...\n bool Result = CheckEquivalentExceptionSpec(PDiag(DiagID) << Specialization->getType(), PDiag(diag::note_explicit_instantiation_here), Specialization->getType()->getAs<FunctionProtoType>(), Specialization->getLocation(), FPT, D.getBeginLoc());"},{s,10687,"DeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, Declarator &D) {\n // ...\n if (Specialization->getTemplateSpecializationKind() == TSK_Undeclared) {\n // ...\n Diag(Specialization->getLocation(), diag::note_explicit_instantiation_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/temp_explicit_cxx0x.cpp"]={"clang/test/SemaTemplate/temp_explicit_cxx0x.cpp:4:31: note: explicit instantiation refers here","clang/test/SemaTemplate/temp_explicit_cxx0x.cpp:14:29: note: explicit instantiation refers here"} | ["clang/test/SemaTemplate/temp_explicit_cxx0x.cpp"]={"clang/test/SemaTemplate/temp_explicit_cxx0x.cpp:4:31: note: explicit instantiation refers here","clang/test/SemaTemplate/temp_explicit_cxx0x.cpp:14:29: note: explicit instantiation refers here"} | ||
Line 4,433: | Line 4,445: | ||
}, | }, | ||
["note_explicit_template_arg_substitution_here"]={ | ["note_explicit_template_arg_substitution_here"]={ | ||
[ | [b]="while substituting explicitly-specified template arguments into function template %0 %1", | ||
[ | [d]=c, | ||
[ | [e]="while substituting explicitly\\-specified template arguments into function template (.*?) (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ff6cbdf806da",1246485666,"Keep track of more information within the template instantiation stack, e.g.,","Keep track of more information within the template instantiation stack, e.g.,\nby distinguishing between substitution that occurs for template\nargument deduction vs. explicitly-specifiad template arguments. This\nis used both to improve diagnostics and to make sure we only provide\nSFINAE in those cases where SFINAE should apply.\n\nIn addition, deal with the sticky issue where SFINAE only considers\nsubstitution of template arguments into the *type* of a function\ntemplate; we need to issue hard errors beyond this point, as\ntest/SemaTemplate/operator-template.cpp illustrates.\n\nllvm-svn: 74651"}, | [h]={"ff6cbdf806da",1246485666,"Keep track of more information within the template instantiation stack, e.g.,","Keep track of more information within the template instantiation stack, e.g.,\nby distinguishing between substitution that occurs for template\nargument deduction vs. explicitly-specifiad template arguments. This\nis used both to improve diagnostics and to make sure we only provide\nSFINAE in those cases where SFINAE should apply.\n\nIn addition, deal with the sticky issue where SFINAE only considers\nsubstitution of template arguments into the *type* of a function\ntemplate; we need to issue hard errors beyond this point, as\ntest/SemaTemplate/operator-template.cpp illustrates.\n\nllvm-svn: 74651"}, | ||
[i]={{ | [i]={{E,820,"/// 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::ExplicitTemplateArgumentSubstitution: {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_explicit_template_arg_substitution_here) << FnTmpl << getTemplateArgumentBindingsText(FnTmpl->getTemplateParameters(), Active->TemplateArgs, Active->NumTemplateArgs) << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.spec/temp.inst/p7.cpp"]={"clang/test/CXX/temp/temp.spec/temp.inst/p7.cpp:11:3: note: while substituting explicitly-specified template arguments into function template \'h\' "} | ["clang/test/CXX/temp/temp.spec/temp.inst/p7.cpp"]={"clang/test/CXX/temp/temp.spec/temp.inst/p7.cpp:11:3: note: while substituting explicitly-specified template arguments into function template \'h\' "} | ||
Line 4,445: | Line 4,457: | ||
}, | }, | ||
["note_explicit_template_spec_does_not_need_header"]={ | ["note_explicit_template_spec_does_not_need_header"]={ | ||
[ | [b]="\'template<>\' header not required for explicitly-specialized class %0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="\'template\\<\\>\' header not required for explicitly\\-specialized class (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"65911498eff3",1258978305,"Tolerate extraneous \"template<>\" headers better, downgrading the","Tolerate extraneous \"template<>\" headers better, downgrading the\ncomplaint to a warning and providing a helpful node in the case where\nthe \"template<>\" header is redundant because the corresponding\ntemplate-id refers to an explicit specialization. C++0x might still\nchange this behavior, and existing practice is all over the place on\nthe number of \"template<>\" headers actually needed.\n\nllvm-svn: 89651"}, | [h]={"65911498eff3",1258978305,"Tolerate extraneous \"template<>\" headers better, downgrading the","Tolerate extraneous \"template<>\" headers better, downgrading the\ncomplaint to a warning and providing a helpful node in the case where\nthe \"template<>\" header is redundant because the corresponding\ntemplate-id refers to an explicit specialization. C++0x might still\nchange this behavior, and existing practice is all over the place on\nthe number of \"template<>\" headers actually needed.\n\nllvm-svn: 89651"}, | ||
[i]={{ | [i]={{s,3591,"/// Match the given template parameter lists to the given scope\n/// specifier, returning the template parameter list that applies to the\n/// name.\n///\n/// \\param DeclStartLoc the start of the declaration that has a scope\n/// specifier or a template parameter list.\n///\n/// \\param DeclLoc The location of the declaration itself.\n///\n/// \\param SS the scope specifier that will be matched to the given template\n/// parameter lists. This scope specifier precedes a qualified name that is\n/// being declared.\n///\n/// \\param TemplateId The template-id following the scope specifier, if there\n/// is one. Used to check for a missing \'template<>\'.\n///\n/// \\param ParamLists the template parameter lists, from the outermost to the\n/// innermost template parameter lists.\n///\n/// \\param IsFriend Whether to apply the slightly different rules for\n/// matching template parameters to scope specifiers in friend\n/// declarations.\n///\n/// \\param IsMemberSpecialization will be set true if the scope specifier\n/// denotes a fully-specialized type, and therefore this is a declaration of\n/// a member specialization.\n///\n/// \\returns the template parameter list, if any, that corresponds to the\n/// name that is preceded by the scope specifier @p SS. This template\n/// parameter list may have template parameters (if we\'re declaring a\n/// template) or may have no template parameters (if we\'re declaring a\n/// template specialization), or may be NULL (if what we\'re declaring isn\'t\n/// itself a template).\nTemplateParameterList *Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef<TemplateParameterList *> ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic) {\n // ...\n // If there were too many template parameter lists, complain about that now.\n if (ParamIdx < ParamLists.size() - 1) {\n // ...\n // If there was a specialization somewhere, such that \'template<>\' is\n // not required, and there were any \'template<>\' headers, note where the\n // specialization occurred.\n if (ExplicitSpecLoc.isValid() && HasAnyExplicitSpecHeader && !SuppressDiagnostic)\n Diag(ExplicitSpecLoc, diag::note_explicit_template_spec_does_not_need_header) << NestedTypes.back();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:124:8: note: \'template<>\' header not required for explicitly-specialized class \'Foo<int>\' declared here"} | ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:124:8: note: \'template<>\' header not required for explicitly-specialized class \'Foo<int>\' declared here"} | ||
Line 4,457: | Line 4,469: | ||
}, | }, | ||
["note_export"]={ | ["note_export"]={ | ||
[ | [b]={{nil,r,"export block begins here"}}, | ||
[ | [d]=c, | ||
[ | [e]="export block begins here", | ||
[ | [f]=a, | ||
[ | [g]=Vc, | ||
[h]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, | [h]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, | ||
[i]={{ | [i]={{xb,811,"/// 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 // [...] its declaration or declaration-seq shall not contain an\n // export-declaration.\n if (auto *ED = getEnclosingExportDecl(D)) {\n // ...\n if (ED->hasBraces())\n Diag(ED->getLocation(), diag::note_export);"},{xb,844,"/// Check that it\'s valid to export \\p D.\nstatic bool checkExportedDecl(Sema &S, Decl *D, SourceLocation BlockStart) {\n // ...\n if (auto *ND = dyn_cast<NamedDecl>(D)) {\n // ...\n if (HasName && ND->getFormalLinkage() == InternalLinkage) {\n // ...\n if (BlockStart.isValid())\n S.Diag(BlockStart, diag::note_export);"},{xb,860,"/// 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 if (BlockStart.isValid())\n S.Diag(BlockStart, diag::note_export);"},{xb,875,"/// Check that it\'s valid to export \\p D.\nstatic bool checkExportedDecl(Sema &S, Decl *D, SourceLocation BlockStart) {\n // ...\n // Recurse into namespace-scope DeclContexts. (Only namespace-scope\n // declarations are exported).\n if (auto *DC = dyn_cast<DeclContext>(D)) {\n // ...\n if (auto *ND = dyn_cast<NamedDecl>(D)) {\n if (!ND->getDeclName()) {\n // ...\n if (BlockStart.isValid())\n S.Diag(BlockStart, diag::note_export);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/export-in-another-export.cppm"]={"clang/test/Modules/export-in-another-export.cppm:3:1: note: export block begins here"} | ["clang/test/Modules/export-in-another-export.cppm"]={"clang/test/Modules/export-in-another-export.cppm:3:1: note: export block begins here"} | ||
Line 4,469: | Line 4,481: | ||
}, | }, | ||
["note_expr_divide_by_zero"]={ | ["note_expr_divide_by_zero"]={ | ||
[ | [b]="division by zero", | ||
[ | [d]=c, | ||
[ | [e]="division by zero", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[h]={Wb,1236199783,Vb,Ub}, | |||
[i]={{l,2805,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n case BO_Div:\n case BO_Rem:\n if (RHS == 0) {\n Info.FFDiag(E, diag::note_expr_divide_by_zero);"},{l,2907,"/// Perform the given binary floating-point operation, in-place, on LHS.\nstatic bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, APFloat &LHS, BinaryOperatorKind Opcode, const APFloat &RHS) {\n // ...\n case BO_Div:\n // [expr.mul]p4:\n // If the second operand of / or % is zero the behavior is undefined.\n if (RHS.isZero())\n Info.CCEDiag(E, diag::note_expr_divide_by_zero);"},{l,14025,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Div: {\n if (RHSFX.getValue() == 0) {\n Info.FFDiag(E, diag::note_expr_divide_by_zero);"},{l,14804,"bool ComplexExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Div:\n if (Result.isComplexFloat()) {\n // ...\n } else {\n if (RHS.getComplexIntReal() == 0 && RHS.getComplexIntImag() == 0)\n return Error(E, diag::note_expr_divide_by_zero);"}}, | [i]={{l,2805,"/// Perform the given binary integer operation.\nstatic bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, BinaryOperatorKind Opcode, APSInt RHS, APSInt &Result) {\n // ...\n case BO_Div:\n case BO_Rem:\n if (RHS == 0) {\n Info.FFDiag(E, diag::note_expr_divide_by_zero);"},{l,2907,"/// Perform the given binary floating-point operation, in-place, on LHS.\nstatic bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, APFloat &LHS, BinaryOperatorKind Opcode, const APFloat &RHS) {\n // ...\n case BO_Div:\n // [expr.mul]p4:\n // If the second operand of / or % is zero the behavior is undefined.\n if (RHS.isZero())\n Info.CCEDiag(E, diag::note_expr_divide_by_zero);"},{l,14025,"bool FixedPointExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Div: {\n if (RHSFX.getValue() == 0) {\n Info.FFDiag(E, diag::note_expr_divide_by_zero);"},{l,14804,"bool ComplexExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {\n // ...\n case BO_Div:\n if (Result.isComplexFloat()) {\n // ...\n } else {\n if (RHS.getComplexIntReal() == 0 && RHS.getComplexIntImag() == 0)\n return Error(E, diag::note_expr_divide_by_zero);"}}, | ||
[j]={ | [j]={ | ||
Line 4,481: | Line 4,493: | ||
}, | }, | ||
["note_expr_evaluates_to"]={ | ["note_expr_evaluates_to"]={ | ||
[ | [b]={{nil,F,"expression evaluates to \'%0 %1 %2\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="expression evaluates to \'(.*?) (.*?) (.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{m,16928,"/// Try to print more useful information about a failed static_assert\n/// with expression \\E\nvoid Sema::DiagnoseStaticAssertDetails(const Expr *E) {\n if (const auto *Op = dyn_cast<BinaryOperator>(E); Op && Op->getOpcode() != BO_LOr) {\n // ...\n if (DiagSide[0].Print && DiagSide[1].Print) {\n Diag(Op->getExprLoc(), diag::note_expr_evaluates_to) << DiagSide[0].ValueString << Op->getOpcodeStr() << DiagSide[1].ValueString << Op->getSourceRange();"}}, | [i]={{m,16928,"/// Try to print more useful information about a failed static_assert\n/// with expression \\E\nvoid Sema::DiagnoseStaticAssertDetails(const Expr *E) {\n if (const auto *Op = dyn_cast<BinaryOperator>(E); Op && Op->getOpcode() != BO_LOr) {\n // ...\n if (DiagSide[0].Print && DiagSide[1].Print) {\n Diag(Op->getExprLoc(), diag::note_expr_evaluates_to) << DiagSide[0].ValueString << Op->getOpcodeStr() << DiagSide[1].ValueString << Op->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
Line 4,493: | Line 4,505: | ||
}, | }, | ||
["note_expr_requirement_constraints_not_satisfied"]={ | ["note_expr_requirement_constraints_not_satisfied"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 type constraint \'%1\' was not satisfied:"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) type constraint \'(.*?)\' was not satisfied\\:", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,970,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_ConstraintsNotSatisfied: {\n // ...\n if (ConstraintExpr->getTemplateArgsAsWritten()->NumTemplateArgs == 1) {\n // ...\n } else {\n S.Diag(ConstraintExpr->getBeginLoc(), diag::note_expr_requirement_constraints_not_satisfied) << (int)First << ConstraintExpr;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp:162:15: note: because type constraint \'same_as<int, typename T2::inner>\' was not satisfied:"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp:162:15: note: because type constraint \'same_as<int, typename T2::inner>\' was not satisfied:"} | ||
Line 4,505: | Line 4,517: | ||
}, | }, | ||
["note_expr_requirement_constraints_not_satisfied_simple"]={ | ["note_expr_requirement_constraints_not_satisfied_simple"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 %1 does not satisfy %2:"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) (.*?) does not satisfy (.*?)\\:", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,965,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_ConstraintsNotSatisfied: {\n // ...\n if (ConstraintExpr->getTemplateArgsAsWritten()->NumTemplateArgs == 1) {\n // ...\n S.Diag(e->getBeginLoc(), diag::note_expr_requirement_constraints_not_satisfied_simple) << (int)First << S.Context.getReferenceQualifiedType(e) << ConstraintExpr->getNamedConcept();"}} | ||
}, | }, | ||
["note_expr_requirement_expr_substitution_error"]={ | ["note_expr_requirement_expr_substitution_error"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' would be invalid: %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' would be invalid\\: (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,929,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_ExprSubstitutionFailure: {\n // ...\n if (!SubstDiag->DiagMessage.empty())\n S.Diag(SubstDiag->DiagLoc, diag::note_expr_requirement_expr_substitution_error) << (int)First << SubstDiag->SubstitutedEntity << SubstDiag->DiagMessage;"}}, | ||
[j]={ | [j]={ | ||
["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:51: note: because \'typename T::type\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:47:54: note: because \'typename T::type\' would be invalid: no type named \'type\' in \'C\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:47:54: note: because \'typename T::type\' would be invalid: typename specifier refers to non-type member \'type\' in \'D\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:70:55: note: because \'typename identity<Ts...>\' would be invalid: too many template arguments for class template \'identity\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:80:57: note: because \'typename identity<Ts...>\' would be invalid: too few template arguments for class template \'identity\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:80:57: note: because \'typename identity<Ts...>\' would be invalid: too few template arguments for class template \'identity\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:97:51: note: because \'typename chars_only<T>\' would be invalid: constraints not satisfied for class template \'chars_only\' [with T = int]","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:111:51: note: because \'typename T::template temp<int>\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:111:63: note: because \'typename T::template temp<int>\' would be invalid: no member named \'temp\' in \'D\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:111:63: note: because \'typename T::template temp<int>\' would be invalid: template name refers to non-type template \'G::template temp\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:132:57: note: because \'typename I<T>::incomplete::inner\' would be invalid: implicit instantiation of undefined member \'I<int>::incomplete\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:171:16: note: because \'typename T::inner\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:171:19: note: because \'typename T::inner\' would be invalid: no type named \'inner\' in \'std_example::has_type\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:166:41: note: because \'typename S<T>\' would be invalid: no type named \'type\' in \'std_example::has_inner\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:168:24: note: because \'typename Ref<T>\' would be invalid: cannot form a reference to \'void\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:198:69: note: because \'T::a\' would be invalid: no member named \'a\' in \'PR48656::T1\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:211:43: note: because \'T::fail\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members"} | ["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:51: note: because \'typename T::type\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:47:54: note: because \'typename T::type\' would be invalid: no type named \'type\' in \'C\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:47:54: note: because \'typename T::type\' would be invalid: typename specifier refers to non-type member \'type\' in \'D\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:70:55: note: because \'typename identity<Ts...>\' would be invalid: too many template arguments for class template \'identity\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:80:57: note: because \'typename identity<Ts...>\' would be invalid: too few template arguments for class template \'identity\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:80:57: note: because \'typename identity<Ts...>\' would be invalid: too few template arguments for class template \'identity\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:97:51: note: because \'typename chars_only<T>\' would be invalid: constraints not satisfied for class template \'chars_only\' [with T = int]","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:111:51: note: because \'typename T::template temp<int>\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:111:63: note: because \'typename T::template temp<int>\' would be invalid: no member named \'temp\' in \'D\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:111:63: note: because \'typename T::template temp<int>\' would be invalid: template name refers to non-type template \'G::template temp\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:132:57: note: because \'typename I<T>::incomplete::inner\' would be invalid: implicit instantiation of undefined member \'I<int>::incomplete\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:171:16: note: because \'typename T::inner\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:171:19: note: because \'typename T::inner\' would be invalid: no type named \'inner\' in \'std_example::has_type\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:166:41: note: because \'typename S<T>\' would be invalid: no type named \'type\' in \'std_example::has_inner\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:168:24: note: because \'typename Ref<T>\' would be invalid: cannot form a reference to \'void\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:198:69: note: because \'T::a\' would be invalid: no member named \'a\' in \'PR48656::T1\'","clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp:211:43: note: because \'T::fail\' would be invalid: type \'int\' cannot be used prior to \'::\' because it has no members"} | ||
Line 4,526: | Line 4,538: | ||
}, | }, | ||
["note_expr_requirement_expr_unknown_substitution_error"]={ | ["note_expr_requirement_expr_unknown_substitution_error"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' would be invalid"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' would be invalid", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,934,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_ExprSubstitutionFailure: {\n // ...\n if (!SubstDiag->DiagMessage.empty())\n // ...\n else\n S.Diag(SubstDiag->DiagLoc, diag::note_expr_requirement_expr_unknown_substitution_error) << (int)First << SubstDiag->SubstitutedEntity;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:15:23: note: because \'convertible_to<expr-type, bool>\' would be invalid"} | ["clang/test/SemaCXX/concept-crash-on-diagnostic.cpp"]={"clang/test/SemaCXX/concept-crash-on-diagnostic.cpp:15:23: note: because \'convertible_to<expr-type, bool>\' would be invalid"} | ||
Line 4,538: | Line 4,550: | ||
}, | }, | ||
["note_expr_requirement_noexcept_not_met"]={ | ["note_expr_requirement_noexcept_not_met"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' may throw an exception"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' may throw an exception", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,940,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_NoexceptNotMet:\n S.Diag(Req->getNoexceptLoc(), diag::note_expr_requirement_noexcept_not_met) << (int)First << Req->getExpr();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp:64:56: note: because \'t ++\' may throw an exception","clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp:185:14: note: because \'g(x)\' may throw an exception"} | ["clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp:64:56: note: because \'t ++\' may throw an exception","clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp:185:14: note: because \'g(x)\' may throw an exception"} | ||
Line 4,550: | Line 4,562: | ||
}, | }, | ||
["note_expr_requirement_type_requirement_substitution_error"]={ | ["note_expr_requirement_type_requirement_substitution_error"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' would be invalid: %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' would be invalid\\: (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,948,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_TypeRequirementSubstitutionFailure: {\n // ...\n if (!SubstDiag->DiagMessage.empty())\n S.Diag(SubstDiag->DiagLoc, diag::note_expr_requirement_type_requirement_substitution_error) << (int)First << SubstDiag->SubstitutedEntity << SubstDiag->DiagMessage;"}} | ||
}, | }, | ||
["note_expr_requirement_type_requirement_unknown_substitution_error"]={ | ["note_expr_requirement_type_requirement_unknown_substitution_error"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' would be invalid"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' would be invalid", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,953,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::ExprRequirement *Req, bool First) {\n // ...\n case concepts::ExprRequirement::SS_TypeRequirementSubstitutionFailure: {\n // ...\n if (!SubstDiag->DiagMessage.empty())\n // ...\n else\n S.Diag(SubstDiag->DiagLoc, diag::note_expr_requirement_type_requirement_unknown_substitution_error) << (int)First << SubstDiag->SubstitutedEntity;"}} | ||
}, | }, | ||
["note_extern_c_begins_here"]={ | ["note_extern_c_begins_here"]={ | ||
[ | [b]="extern \"C\" language linkage specification begins here", | ||
[ | [d]=c, | ||
[ | [e]="extern \"C\" language linkage specification begins here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"560ae565e9fa",1478101594,"Add a note that points to the linkage specifier for the C++ linkage errors","Add a note that points to the linkage specifier for the C++ linkage errors\n\nThis commit improves the \"must have C++ linkage\" error diagnostics that are\nemitted for C++ declarations like templates and literal operators by adding an\nadditional note that points to the appropriate extern \"C\" linkage specifier.\n\nrdar://19021120\n\nDifferential Revision: https://reviews.llvm.org/D26189\n\nllvm-svn: 285823"}, | [h]={"560ae565e9fa",1478101594,"Add a note that points to the linkage specifier for the C++ linkage errors","Add a note that points to the linkage specifier for the C++ linkage errors\n\nThis commit improves the \"must have C++ linkage\" error diagnostics that are\nemitted for C++ declarations like templates and literal operators by adding an\nadditional note that points to the appropriate extern \"C\" linkage specifier.\n\nrdar://19021120\n\nDifferential Revision: https://reviews.llvm.org/D26189\n\nllvm-svn: 285823"}, | ||
[i]={{m,16356,"/// CheckLiteralOperatorDeclaration - Check whether the declaration\n/// of this literal operator function is well-formed. If so, returns\n/// false; otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n if (FnDecl->isExternC()) {\n // ...\n if (const LinkageSpecDecl *LSD = FnDecl->getDeclContext()->getExternCContext())\n Diag(LSD->getExternLoc(), diag::note_extern_c_begins_here);"},{ | [i]={{m,16356,"/// CheckLiteralOperatorDeclaration - Check whether the declaration\n/// of this literal operator function is well-formed. If so, returns\n/// false; otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n if (FnDecl->isExternC()) {\n // ...\n if (const LinkageSpecDecl *LSD = FnDecl->getDeclContext()->getExternCContext())\n Diag(LSD->getExternLoc(), diag::note_extern_c_begins_here);"},{xb,56,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n // ...\n if (!isa<TranslationUnitDecl>(DC)) {\n // ...\n } else if (!M->IsExternC && ExternCLoc.isValid()) {\n // ...\n S.Diag(ExternCLoc, diag::note_extern_c_begins_here);"},{s,8321,"/// Check whether a template can be declared within this scope.\n///\n/// If the template declaration is valid in this scope, returns\n/// false. Otherwise, issues a diagnostic and returns true.\nbool Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) {\n // ...\n if (Ctx && Ctx->isExternCContext()) {\n // ...\n if (const LinkageSpecDecl *LSD = Ctx->getExternCContext())\n Diag(LSD->getExternLoc(), diag::note_extern_c_begins_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/over/over.oper/over.literal/p6.cpp"]={"clang/test/CXX/over/over.oper/over.literal/p6.cpp:4:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:5:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here"} | ["clang/test/CXX/over/over.oper/over.literal/p6.cpp"]={"clang/test/CXX/over/over.oper/over.literal/p6.cpp:4:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:5:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here","clang/test/CXX/over/over.oper/over.literal/p6.cpp:8:1: note: extern \"C\" language linkage specification begins here"} | ||
Line 4,580: | Line 4,592: | ||
}, | }, | ||
["note_extern_c_global_conflict"]={ | ["note_extern_c_global_conflict"]={ | ||
[ | [b]="declared %select{in global scope|with C language linkage}0 here", | ||
[ | [d]=c, | ||
[ | [e]="declared (?:in global scope|with C language linkage) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"902befa2773d",1372457031,"PR7927, PR16247: Reimplement handling of matching extern \"C\" declarations","PR7927, PR16247: Reimplement handling of matching extern \"C\" declarations\nacross scopes.\n\nWhen we declare an extern \"C\" name that is not a redeclaration of an entity in\nthe same scope, check whether it redeclares some extern \"C\" entity from another\nscope, and if not, check whether it conflicts with a (non-extern-\"C\") entity in\nthe translation unit.\n\nWhen we declare a name in the translation unit that is not a redeclaration,\ncheck whether it conflicts with any extern \"C\" entities (possibly from other\nscopes).\n\nllvm-svn: 185229"}, | [h]={"902befa2773d",1372457031,"PR7927, PR16247: Reimplement handling of matching extern \"C\" declarations","PR7927, PR16247: Reimplement handling of matching extern \"C\" declarations\nacross scopes.\n\nWhen we declare an extern \"C\" name that is not a redeclaration of an entity in\nthe same scope, check whether it redeclares some extern \"C\" entity from another\nscope, and if not, check whether it conflicts with a (non-extern-\"C\") entity in\nthe translation unit.\n\nWhen we declare a name in the translation unit that is not a redeclaration,\ncheck whether it conflicts with any extern \"C\" entities (possibly from other\nscopes).\n\nllvm-svn: 185229"}, | ||
[i]={{ | [i]={{q,8465,"/// Check for conflict between this global or extern \"C\" declaration and\n/// previous global or extern \"C\" declarations. This is only used in C++.\ntemplate <typename T> static bool checkGlobalOrExternCConflict(Sema &S, const T *ND, bool IsGlobal, LookupResult &Previous) {\n // ...\n S.Diag(Prev->getLocation(), diag::note_extern_c_global_conflict) << IsGlobal;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/extern-c.cpp"]={"clang/test/SemaCXX/extern-c.cpp:15:18: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:35:18: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:51:18: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:121:5: note: declared in global scope here","clang/test/SemaCXX/extern-c.cpp:127:10: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:178:5: note: declared in global scope here","clang/test/SemaCXX/extern-c.cpp:181:19: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:184:5: note: declared in global scope here","clang/test/SemaCXX/extern-c.cpp:187:21: note: declared with C language linkage here"} | ["clang/test/SemaCXX/extern-c.cpp"]={"clang/test/SemaCXX/extern-c.cpp:15:18: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:35:18: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:51:18: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:121:5: note: declared in global scope here","clang/test/SemaCXX/extern-c.cpp:127:10: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:178:5: note: declared in global scope here","clang/test/SemaCXX/extern-c.cpp:181:19: note: declared with C language linkage here","clang/test/SemaCXX/extern-c.cpp:184:5: note: declared in global scope here","clang/test/SemaCXX/extern-c.cpp:187:21: note: declared with C language linkage here"} | ||
Line 4,592: | Line 4,604: | ||
}, | }, | ||
["note_extra_comma_message_arg"]={ | ["note_extra_comma_message_arg"]={ | ||
[ | [b]="comma separating Objective-C messaging arguments", | ||
[ | [d]=c, | ||
[ | [e]="comma separating Objective\\-C messaging arguments", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"945b2f46b154",1337640224,"objective-c: provide a useful \'fixit\' suggestion when","objective-c: provide a useful \'fixit\' suggestion when\nerrornously using commas to separate ObjC message arguments.\n// rdar://11376372\n\nllvm-svn: 157216"}, | [h]={"945b2f46b154",1337640224,"objective-c: provide a useful \'fixit\' suggestion when","objective-c: provide a useful \'fixit\' suggestion when\nerrornously using commas to separate ObjC message arguments.\n// rdar://11376372\n\nllvm-svn: 157216"}, | ||
[i]={{ | [i]={{vc,3328,"/// Parse the remainder of an Objective-C message following the\n/// \'[\' objc-receiver.\n///\n/// This routine handles sends to super, class messages (sent to a\n/// class name), and instance messages (sent to an object), and the\n/// target is represented by \\p SuperLoc, \\p ReceiverType, or \\p\n/// ReceiverExpr, respectively. Only one of these parameters may have\n/// a valid value.\n///\n/// \\param LBracLoc The location of the opening \'[\'.\n///\n/// \\param SuperLoc If this is a send to \'super\', the location of the\n/// \'super\' keyword that indicates a send to the superclass.\n///\n/// \\param ReceiverType If this is a class message, the type of the\n/// class we are sending a message to.\n///\n/// \\param ReceiverExpr If this is an instance message, the expression\n/// used to compute the receiver object.\n///\n/// objc-message-args:\n/// objc-selector\n/// objc-keywordarg-list\n///\n/// objc-keywordarg-list:\n/// objc-keywordarg\n/// objc-keywordarg-list objc-keywordarg\n///\n/// objc-keywordarg:\n/// selector-name[opt] \':\' objc-keywordexpr\n///\n/// objc-keywordexpr:\n/// nonempty-expr-list\n///\n/// nonempty-expr-list:\n/// assignment-expression\n/// nonempty-expr-list , assignment-expression\n///\nExprResult Parser::ParseObjCMessageExpressionBody(SourceLocation LBracLoc, SourceLocation SuperLoc, ParsedType ReceiverType, Expr *ReceiverExpr) {\n // ...\n if (Tok.is(tok::colon)) {\n // ...\n // Parse the, optional, argument list, comma separated.\n while (Tok.is(tok::comma)) {\n // ...\n if (Res.isInvalid()) {\n if (Tok.is(tok::colon)) {\n Diag(commaLoc, diag::note_extra_comma_message_arg) << FixItHint::CreateRemoval(commaLoc);"}} | ||
}, | }, | ||
["note_fallthrough_insert_semi_fixit"]={ | ["note_fallthrough_insert_semi_fixit"]={ | ||
[ | [b]="did you forget \';\'?", | ||
[ | [d]=c, | ||
[ | [e]="did you forget \';\'\\?", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, | [h]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, | ||
[i]={{"clang/lib/Sema/SemaStmtAttr.cpp",35,"static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (isa<SwitchCase>(St)) {\n // ...\n S.Diag(L, diag::note_fallthrough_insert_semi_fixit) << FixItHint::CreateInsertion(L, \";\");"}}, | [i]={{"clang/lib/Sema/SemaStmtAttr.cpp",35,"static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange Range) {\n // ...\n if (isa<SwitchCase>(St)) {\n // ...\n S.Diag(L, diag::note_fallthrough_insert_semi_fixit) << FixItHint::CreateInsertion(L, \";\");"}}, | ||
Line 4,613: | Line 4,625: | ||
}, | }, | ||
["note_fe_backend_invalid_loc"]={ | ["note_fe_backend_invalid_loc"]={ | ||
[ | [b]="could not determine the original source location for %0:%1:%2", | ||
[ | [d]=c, | ||
[ | [e]="could not determine the original source location for (.*?)\\:(.*?)\\:(.*?)", | ||
[ | [f]=a, | ||
[ | [g]="Backend Issue", | ||
[h]={"5e03a4b8370d",1453915828,"Add backend dignostic printer for unsupported features","Add backend dignostic printer for unsupported features\n\nThe related LLVM patch adds a backend diagnostic type for reporting\nunsupported features, this adds a printer for them to clang.\n\nIn the case where debug location information is not available, I\'ve\nchanged the printer to report the location as the first line of the\nfunction, rather than the closing brace, as the latter does not give the\nuser any information. This also affects optimisation remarks.\n\nDifferential Revision: http://reviews.llvm.org/D16591\n\nllvm-svn: 258950"}, | [h]={"5e03a4b8370d",1453915828,"Add backend dignostic printer for unsupported features","Add backend dignostic printer for unsupported features\n\nThe related LLVM patch adds a backend diagnostic type for reporting\nunsupported features, this adds a printer for them to clang.\n\nIn the case where debug location information is not available, I\'ve\nchanged the printer to report the location as the first line of the\nfunction, rather than the closing brace, as the latter does not give the\nuser any information. This also affects optimisation remarks.\n\nDifferential Revision: http://reviews.llvm.org/D16591\n\nllvm-svn: 258950"}, | ||
[i]={{ | [i]={{td,694,"const FullSourceLoc BackendConsumer::getBestLocationFromDebugLoc(const llvm::DiagnosticInfoWithLocationBase &D, bool &BadDebugInfo, StringRef &Filename, unsigned &Line, unsigned &Column) const {\n // ...\n if (DILoc.isInvalid() && D.isLocationAvailable())\n // ...\n Diags.Report(Loc, diag::note_fe_backend_invalid_loc) << Filename << Line << Column;"},{td,743,"void BackendConsumer::UnsupportedDiagHandler(const llvm::DiagnosticInfoUnsupported &D) {\n // ...\n if (BadDebugInfo)\n // ...\n Diags.Report(Loc, diag::note_fe_backend_invalid_loc) << Filename << Line << Column;"},{td,782,"void BackendConsumer::EmitOptimizationMessage(const llvm::DiagnosticInfoOptimizationBase &D, unsigned DiagID) {\n // ...\n if (BadDebugInfo)\n // ...\n Diags.Report(Loc, diag::note_fe_backend_invalid_loc) << Filename << Line << Column;"},{td,877,"void BackendConsumer::MisExpectDiagHandler(const llvm::DiagnosticInfoMisExpect &D) {\n // ...\n if (BadDebugInfo)\n // ...\n Diags.Report(Loc, diag::note_fe_backend_invalid_loc) << Filename << Line << Column;"}} | ||
}, | }, | ||
["note_fe_backend_resource_limit"]={ | ["note_fe_backend_resource_limit"]={ | ||
[ | [b]={{nil,F,"%0 (%1) exceeds limit (%2) in \'%3\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) \\((.*?)\\) exceeds limit \\((.*?)\\) in \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]="Backend Issue", | ||
[h]={"a033dbbe5c43",1666225776,"[Clang] Give Clang the ability to use a shared stat cache","[Clang] Give Clang the ability to use a shared stat cache\n\nEvery Clang instance uses an internal FileSystemStatCache to avoid\nstating the same content multiple times. However, different instances\nof Clang will contend for filesystem access for their initial stats\nduring HeaderSearch or module validation.\n\nOn some workloads, the time spent in the kernel in these concurrent\nstat calls has been measured to be over 20% of the overall compilation\ntime. This is extremly wassteful when most of the stat calls target\nmostly immutable content like a SDK.\n\nThis commit introduces a new tool `clang-stat-cache` able to generate\nan OnDiskHashmap containing the stat data for a given filesystem\nhierarchy.\n\nThe driver part of this has been modeled after -ivfsoverlay given\nthe similarities with what it influences. It introduces a new\n-ivfsstatcache driver option to instruct Clang to use a stat cache\ngenerated by `clang-stat-cache`. These stat caches are inserted at\nthe bottom of the VFS stack (right above the real filesystem).\n\nDifferential Revision: https://reviews.llvm.org/D136651"} | [h]={"a033dbbe5c43",1666225776,"[Clang] Give Clang the ability to use a shared stat cache","[Clang] Give Clang the ability to use a shared stat cache\n\nEvery Clang instance uses an internal FileSystemStatCache to avoid\nstating the same content multiple times. However, different instances\nof Clang will contend for filesystem access for their initial stats\nduring HeaderSearch or module validation.\n\nOn some workloads, the time spent in the kernel in these concurrent\nstat calls has been measured to be over 20% of the overall compilation\ntime. This is extremly wassteful when most of the stat calls target\nmostly immutable content like a SDK.\n\nThis commit introduces a new tool `clang-stat-cache` able to generate\nan OnDiskHashmap containing the stat data for a given filesystem\nhierarchy.\n\nThe driver part of this has been modeled after -ivfsoverlay given\nthe similarities with what it influences. It introduces a new\n-ivfsstatcache driver option to instruct Clang to use a stat cache\ngenerated by `clang-stat-cache`. These stat caches are inserted at\nthe bottom of the VFS stack (right above the real filesystem).\n\nDifferential Revision: https://reviews.llvm.org/D136651"} | ||
}, | }, | ||
["note_fe_inline_asm_here"]={ | ["note_fe_inline_asm_here"]={ | ||
[ | [b]="instantiated into assembly here", | ||
[ | [d]=c, | ||
[ | [e]="instantiated into assembly here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"5ec32e7fd845",1270579130,"teach clang to install the inline asm diagnostic handler,","teach clang to install the inline asm diagnostic handler,\nallowing backend errors to be mapped through clang\'s \ndiagnostics subsystem, including the backend location info.\n\nWe now get:\n\n$ clang asm.c -c -o t.o -integrated-as\n<inline asm>:1:2: error: unrecognized instruction\n abc incl %eax\n ^\n1 diagnostic generated.\n\nWith colors, and correct \"# diagnostics generated\".\n\nllvm-svn: 100543"}, | [h]={"5ec32e7fd845",1270579130,"teach clang to install the inline asm diagnostic handler,","teach clang to install the inline asm diagnostic handler,\nallowing backend errors to be mapped through clang\'s \ndiagnostics subsystem, including the backend location info.\n\nWe now get:\n\n$ clang asm.c -c -o t.o -integrated-as\n<inline asm>:1:2: error: unrecognized instruction\n abc incl %eax\n ^\n1 diagnostic generated.\n\nWith colors, and correct \"# diagnostics generated\".\n\nllvm-svn: 100543"}, | ||
[i]={{ | [i]={{td,583,"void BackendConsumer::SrcMgrDiagHandler(const llvm::DiagnosticInfoSrcMgr &DI) {\n // ...\n // If this problem has clang-level source location information, report the\n // issue in the source with a note showing the instantiated\n // code.\n if (DI.isInlineAsmDiag()) {\n // ...\n if (LocCookie.isValid()) {\n // ...\n if (D.getLoc().isValid()) {\n DiagnosticBuilder B = Diags.Report(Loc, diag::note_fe_inline_asm_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CodeGen/X86/x86-64-inline-asm.c"]={"<inline asm>:1:23: note: instantiated into assembly here"} | ["clang/test/CodeGen/X86/x86-64-inline-asm.c"]={"<inline asm>:1:23: note: instantiated into assembly here"} | ||
Line 4,642: | Line 4,654: | ||
}, | }, | ||
["note_fe_linking_module"]={ | ["note_fe_linking_module"]={ | ||
[ | [b]={{nil,zb,"linking module \'%0\': %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="linking module \'(.*?)\'\\: (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"1c829ce1e362",1629504872,"[clang][codegen] Set CurLinkModule in CodeGenAction::ExecuteAction","[clang][codegen] Set CurLinkModule in CodeGenAction::ExecuteAction\n\nCodeGenAction::ExecuteAction creates a BackendConsumer for the\npurpose of handling diagnostics. The BackendConsumer\'s\nDiagnosticHandlerImpl method expects CurLinkModule to be set,\nbut this did not happen on the code path that goes through\nExecuteAction. This change makes it so that the BackendConsumer\nconstructor used by ExecuteAction requires the Module to be\nspecified and passes the appropriate module in ExecuteAction.\n\nThe change also adds a test that fails without this change\nand passes with it. To make the test work, the FIXME in the\nhandling of DK_Linker diagnostics was addressed so that warnings\nand notes are no longer silently discarded. Since this introduces\na new warning diagnostic, a flag to control it (-Wlinker-warnings)\nhas also been added.\n\nReviewed By: xur\n\nDifferential Revision: https://reviews.llvm.org/D108603"} | [h]={"1c829ce1e362",1629504872,"[clang][codegen] Set CurLinkModule in CodeGenAction::ExecuteAction","[clang][codegen] Set CurLinkModule in CodeGenAction::ExecuteAction\n\nCodeGenAction::ExecuteAction creates a BackendConsumer for the\npurpose of handling diagnostics. The BackendConsumer\'s\nDiagnosticHandlerImpl method expects CurLinkModule to be set,\nbut this did not happen on the code path that goes through\nExecuteAction. This change makes it so that the BackendConsumer\nconstructor used by ExecuteAction requires the Module to be\nspecified and passes the appropriate module in ExecuteAction.\n\nThe change also adds a test that fails without this change\nand passes with it. To make the test work, the FIXME in the\nhandling of DK_Linker diagnostics was addressed so that warnings\nand notes are no longer silently discarded. Since this introduces\na new warning diagnostic, a flag to control it (-Wlinker-warnings)\nhas also been added.\n\nReviewed By: xur\n\nDifferential Revision: https://reviews.llvm.org/D108603"} | ||
}, | }, | ||
["note_field_designator_found"]={ | ["note_field_designator_found"]={ | ||
[ | [b]="field designator refers here", | ||
[ | [d]=c, | ||
[ | [e]="field designator refers here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Wb,1236199783,Vb,Ub}, | ||
[i]={{ | [i]={{N,2722,"/// 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 if (!KnownField) {\n // ...\n if (!KnownField) {\n // ...\n // Name lookup found something, but it wasn\'t a field.\n if (!Lookup.empty()) {\n // ...\n SemaRef.Diag(Lookup.front()->getLocation(), diag::note_field_designator_found);"}} | ||
}, | }, | ||
["note_file_misc_sloc_usage"]={ | ["note_file_misc_sloc_usage"]={ | ||
[ | [b]={{nil,F,"%0 additional files entered using a total of %1B of space"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) additional files entered using a total of (.*?)B of space", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"9e52db182794",1668037554,"When we run out of source locations, try to produce useful information","When we run out of source locations, try to produce useful information\nindicating why we ran out."}, | [h]={"9e52db182794",1668037554,"When we run out of source locations, try to produce useful information","When we run out of source locations, try to produce useful information\nindicating why we ran out."}, | ||
[i]={{"clang/lib/Basic/SourceManager.cpp",2320,"void SourceManager::noteSLocAddressSpaceUsage(DiagnosticsEngine &Diag, std::optional<unsigned> MaxNotes) const {\n // ...\n // Describe any remaining usage not reported in the per-file usage.\n if (ReportedSize != CountedSize) {\n Diag.Report(SourceLocation(), diag::note_file_misc_sloc_usage) << (SortedUsage.end() - SortedEnd) << CountedSize - ReportedSize;"}} | [i]={{"clang/lib/Basic/SourceManager.cpp",2320,"void SourceManager::noteSLocAddressSpaceUsage(DiagnosticsEngine &Diag, std::optional<unsigned> MaxNotes) const {\n // ...\n // Describe any remaining usage not reported in the per-file usage.\n if (ReportedSize != CountedSize) {\n Diag.Report(SourceLocation(), diag::note_file_misc_sloc_usage) << (SortedUsage.end() - SortedEnd) << CountedSize - ReportedSize;"}} | ||
}, | }, | ||
["note_file_sloc_usage"]={ | ["note_file_sloc_usage"]={ | ||
[ | [b]={{nil,F,"file entered %0 time%s0 using %1B of space%plural{0:|: plus %2B for macro expansions}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="file entered (.*?) time(.*?) using (.*?)B of space(?:| plus (.*?)B for macro expansions)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"9e52db182794",1668037554,"When we run out of source locations, try to produce useful information","When we run out of source locations, try to produce useful information\nindicating why we ran out."}, | [h]={"9e52db182794",1668037554,"When we run out of source locations, try to produce useful information","When we run out of source locations, try to produce useful information\nindicating why we ran out."}, | ||
[i]={{"clang/lib/Basic/SourceManager.cpp",2312,"void SourceManager::noteSLocAddressSpaceUsage(DiagnosticsEngine &Diag, std::optional<unsigned> MaxNotes) const {\n // ...\n for (auto &[Entry, FileInfo] : llvm::make_range(SortedUsage.begin(), SortedEnd)) {\n Diag.Report(FileInfo.Loc, diag::note_file_sloc_usage) << FileInfo.Inclusions << FileInfo.DirectSize << (FileInfo.TotalSize - FileInfo.DirectSize);"}}, | [i]={{"clang/lib/Basic/SourceManager.cpp",2312,"void SourceManager::noteSLocAddressSpaceUsage(DiagnosticsEngine &Diag, std::optional<unsigned> MaxNotes) const {\n // ...\n for (auto &[Entry, FileInfo] : llvm::make_range(SortedUsage.begin(), SortedEnd)) {\n Diag.Report(FileInfo.Loc, diag::note_file_sloc_usage) << FileInfo.Inclusions << FileInfo.DirectSize << (FileInfo.TotalSize - FileInfo.DirectSize);"}}, | ||
Line 4,680: | Line 4,692: | ||
}, | }, | ||
["note_final_dtor_non_final_class_silence"]={ | ["note_final_dtor_non_final_class_silence"]={ | ||
[ | [b]={{nil,n,"mark %0 as \'%select{final|sealed}1\' to silence this warning"}}, | ||
[ | [d]=c, | ||
[ | [e]="mark (.*?) as \'(?:final|sealed)\' to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"94f3f3e7f46a",1567276544,"[NFC] Fix for rL370594","[NFC] Fix for rL370594\n\nllvm-svn: 370595"}, | [h]={"94f3f3e7f46a",1567276544,"[NFC] Fix for rL370594","[NFC] Fix for rL370594\n\nllvm-svn: 370595"}, | ||
[i]={{m,6990,"/// 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 // Warn if the class has a final destructor but is not itself marked final.\n if (!Record->hasAttr<FinalAttr>()) {\n if (const CXXDestructorDecl *dtor = Record->getDestructor()) {\n if (const FinalAttr *FA = dtor->getAttr<FinalAttr>()) {\n // ...\n Diag(Record->getLocation(), diag::note_final_dtor_non_final_class_silence) << Context.getRecordType(Record) << FA->isSpelledAsSealed();"}}, | [i]={{m,6990,"/// 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 // Warn if the class has a final destructor but is not itself marked final.\n if (!Record->hasAttr<FinalAttr>()) {\n if (const CXXDestructorDecl *dtor = Record->getDestructor()) {\n if (const FinalAttr *FA = dtor->getAttr<FinalAttr>()) {\n // ...\n Diag(Record->getLocation(), diag::note_final_dtor_non_final_class_silence) << Context.getRecordType(Record) << FA->isSpelledAsSealed();"}}, | ||
Line 4,692: | Line 4,704: | ||
}, | }, | ||
["note_final_overrider"]={ | ["note_final_overrider"]={ | ||
[ | [b]="final overrider of %q0 in %1", | ||
[ | [d]=c, | ||
[ | [e]="final overrider of (.*?) in (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"4165bd677248",1269388076,"Implement computation of the final overriders for each virtual","Implement computation of the final overriders for each virtual\nfunction within a class hierarchy (C++ [class.virtual]p2).\n\nWe use the final-overrider computation to determine when a particular\nclass is ill-formed because it has multiple final overriders for a\ngiven virtual function (e.g., because two virtual functions override\nthe same virtual function in the same virtual base class). Fixes\nPR5973.\n\nWe also use the final-overrider computation to determine which virtual\nmember functions are pure when determining whether a class is\nabstract or diagnosing the improper use of an abstract class. The\nprior approach to determining whether there were any pure virtual\nfunctions in a class didn\'t cope with virtual base class subobjects\nproperly, and could not easily be fixed to deal with the oddities of\nsubobject hiding. Fixes PR6631.\n\nllvm-svn: 99351"}, | [h]={"4165bd677248",1269388076,"Implement computation of the final overriders for each virtual","Implement computation of the final overriders for each virtual\nfunction within a class hierarchy (C++ [class.virtual]p2).\n\nWe use the final-overrider computation to determine when a particular\nclass is ill-formed because it has multiple final overriders for a\ngiven virtual function (e.g., because two virtual functions override\nthe same virtual function in the same virtual base class). Fixes\nPR5973.\n\nWe also use the final-overrider computation to determine which virtual\nmember functions are pure when determining whether a class is\nabstract or diagnosing the improper use of an abstract class. The\nprior approach to determining whether there were any pure virtual\nfunctions in a class didn\'t cope with virtual base class subobjects\nproperly, and could not easily be fixed to deal with the oddities of\nsubobject hiding. Fixes PR6631.\n\nllvm-svn: 99351"}, | ||
[i]={{ | [i]={{q,19007,"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 for (OverridingMethods::overriding_iterator OM = SO->second.begin(), OMEnd = SO->second.end(); OM != OMEnd; ++OM)\n Diag(OM->Method->getLocation(), diag::note_final_overrider) << (const NamedDecl *)M->first << OM->Method->getParent();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class.derived/class.virtual/p2.cpp"]={"clang/test/CXX/class.derived/class.virtual/p2.cpp:11:16: note: final overrider of \'A::f\' in \'B\'","clang/test/CXX/class.derived/class.virtual/p2.cpp:15:16: note: final overrider of \'A::f\' in \'C\'","clang/test/CXX/class.derived/class.virtual/p2.cpp:11:16: note: final overrider of \'A::f\' in \'B\'","clang/test/CXX/class.derived/class.virtual/p2.cpp:11:16: note: final overrider of \'A::f\' in \'B\'"} | ["clang/test/CXX/class.derived/class.virtual/p2.cpp"]={"clang/test/CXX/class.derived/class.virtual/p2.cpp:11:16: note: final overrider of \'A::f\' in \'B\'","clang/test/CXX/class.derived/class.virtual/p2.cpp:15:16: note: final overrider of \'A::f\' in \'C\'","clang/test/CXX/class.derived/class.virtual/p2.cpp:11:16: note: final overrider of \'A::f\' in \'B\'","clang/test/CXX/class.derived/class.virtual/p2.cpp:11:16: note: final overrider of \'A::f\' in \'B\'"} | ||
Line 4,704: | Line 4,716: | ||
}, | }, | ||
["note_first_module_difference"]={ | ["note_first_module_difference"]={ | ||
[ | [b]={{nil,U,"in first definition, possible difference is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="in first definition, possible difference is here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"ca48d369bac3",1498009393,"[ODRHash] Supply more information when generic error message is emitted.","[ODRHash] Supply more information when generic error message is emitted.\n\nllvm-svn: 305872"}, | [h]={"ca48d369bac3",1498009393,"[ODRHash] Supply more information when generic error message is emitted.","[ODRHash] Supply more information when generic error message is emitted.\n\nllvm-svn: 305872"}, | ||
[i]={{ | [i]={{Q,657,"void ODRDiagsEmitter::diagnoseSubMismatchUnexpected(DiffResult &DR, const NamedDecl *FirstRecord, StringRef FirstModule, const NamedDecl *SecondRecord, StringRef SecondModule) const {\n // ...\n if (DR.FirstDecl) {\n Diag(DR.FirstDecl->getLocation(), diag::note_first_module_difference) << FirstRecord << DR.FirstDecl->getSourceRange();"}} | ||
}, | }, | ||
["note_fixit_applied"]={ | ["note_fixit_applied"]={ | ||
[ | [b]="FIX-IT applied suggested code changes", | ||
[ | [d]=c, | ||
[ | [e]="FIX\\-IT applied suggested code changes", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | [h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | ||
[i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",196,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n Diag(Info.getLocation(), diag::note_fixit_applied);"}}, | [i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",196,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n Diag(Info.getLocation(), diag::note_fixit_applied);"}}, | ||
Line 4,725: | Line 4,737: | ||
}, | }, | ||
["note_fixit_failed"]={ | ["note_fixit_failed"]={ | ||
[ | [b]="FIX-IT unable to apply suggested code changes", | ||
[ | [d]=c, | ||
[ | [e]="FIX\\-IT unable to apply suggested code changes", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | [h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | ||
[i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",192,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n if (!Editor.commit(commit)) {\n // ...\n Diag(Info.getLocation(), diag::note_fixit_failed);"}} | [i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",192,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n if (!Editor.commit(commit)) {\n // ...\n Diag(Info.getLocation(), diag::note_fixit_failed);"}} | ||
}, | }, | ||
["note_fixit_in_macro"]={ | ["note_fixit_in_macro"]={ | ||
[ | [b]="FIX-IT unable to apply suggested code changes in a macro", | ||
[ | [d]=c, | ||
[ | [e]="FIX\\-IT unable to apply suggested code changes in a macro", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | [h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | ||
[i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",180,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n if (!CanRewrite) {\n if (Info.getNumFixItHints() > 0)\n Diag(Info.getLocation(), diag::note_fixit_in_macro);"}} | [i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",180,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n if (!CanRewrite) {\n if (Info.getNumFixItHints() > 0)\n Diag(Info.getLocation(), diag::note_fixit_in_macro);"}} | ||
}, | }, | ||
["note_fixit_unfixed_error"]={ | ["note_fixit_unfixed_error"]={ | ||
[ | [b]="FIX-IT detected an error it cannot fix", | ||
[ | [d]=c, | ||
[ | [e]="FIX\\-IT detected an error it cannot fix", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | [h]={"a42bd8433d56",1238692380,"Provide FIX-IT notes to describe what fix-it is doing behind the","Provide FIX-IT notes to describe what fix-it is doing behind the\nscenes, using the underlying diagnostic client to format the\nmessages.\n\nllvm-svn: 68324"}, | ||
[i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",185,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n if (!CanRewrite) {\n // ...\n // If this was an error, refuse to perform any rewriting.\n if (DiagLevel >= DiagnosticsEngine::Error) {\n if (++NumFailures == 1)\n Diag(Info.getLocation(), diag::note_fixit_unfixed_error);"}} | [i]={{"clang/lib/Frontend/Rewrite/FixItRewriter.cpp",185,"void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) {\n // ...\n if (!CanRewrite) {\n // ...\n // If this was an error, refuse to perform any rewriting.\n if (DiagLevel >= DiagnosticsEngine::Error) {\n if (++NumFailures == 1)\n Diag(Info.getLocation(), diag::note_fixit_unfixed_error);"}} | ||
}, | }, | ||
["note_flexible_array_member"]={ | ["note_flexible_array_member"]={ | ||
[ | [b]="initialized flexible array member %0 is here", | ||
[ | [d]=c, | ||
[ | [e]="initialized flexible array member (.*?) is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Wb,1236199783,Vb,Ub}, | ||
[i]={{ | [i]={{N,2121,"bool InitListChecker::CheckFlexibleArrayInit(const InitializedEntity &Entity, Expr *InitExpr, FieldDecl *Field, bool TopLevelObject) {\n // ...\n if (!VerifyOnly) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_flexible_array_member) << Field;"},{N,2884,"/// 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 // This designator names a flexible array member.\n if (Field->getType()->isIncompleteArrayType()) {\n // ...\n if ((DesigIdx + 1) != DIE->size()) {\n // We can\'t designate an object within the flexible array\n // member (because GCC doesn\'t allow it).\n if (!VerifyOnly) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_flexible_array_member) << *Field;"},{N,2897,"/// 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 // This designator names a flexible array member.\n if (Field->getType()->isIncompleteArrayType()) {\n // ...\n if (!hadError && !isa<InitListExpr>(DIE->getInit()) && !isa<StringLiteral>(DIE->getInit())) {\n // The initializer is not an initializer list.\n if (!VerifyOnly) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_flexible_array_member) << *Field;"},{N,5568,"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 // Incomplete array types indicate flexible array members. Do not allow\n // paren list initializations of structs with these members, as GCC\n // doesn\'t either.\n if (FD->getType()->isIncompleteArrayType()) {\n if (!VerifyOnly) {\n // ...\n S.Diag(FD->getLocation(), diag::note_flexible_array_member) << FD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/flexible-array-init.c"]={"clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here","clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here","clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here","clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here", | ["clang/test/Sema/flexible-array-init.c"]={"clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here","clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here","clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here","clang/test/Sema/flexible-array-init.c:4:7: note: initialized flexible array member \'values\' is here",ac,ac,ac,ac,ac,ac,ac,ac,"clang/test/Sema/flexible-array-init.c:45:16: note: initialized flexible array member \'points\' is here","clang/test/Sema/flexible-array-init.c:70:8: note: initialized flexible array member \'v\' is here","clang/test/Sema/flexible-array-init.c:70:8: note: initialized flexible array member \'v\' is here","clang/test/Sema/flexible-array-init.c:82:6: note: initialized flexible array member \'v\' is here","clang/test/Sema/flexible-array-init.c:88:55: note: initialized flexible array member \'y\' is here"} | ||
} | } | ||
}, | }, | ||
["note_for_range_begin_end"]={ | ["note_for_range_begin_end"]={ | ||
[ | [b]="selected \'%select{begin|end}0\' %select{function|template }1%2 with iterator type %3", | ||
[ | [d]=c, | ||
[ | [e]="selected \'(?:begin|end)\' (?:function|template )(.*?) with iterator type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"02e85f3bc5fc",1302818966,"Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).","Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).\n\nllvm-svn: 129541"}, | [h]={"02e85f3bc5fc",1302818966,"Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).","Add support for C++0x\'s range-based for loops, as specified by the C++11 draft standard (N3291).\n\nllvm-svn: 129541"}, | ||
[i]={{ | [i]={{G,2442,"/// Produce a note indicating which begin/end function was implicitly called\n/// by a C++11 for-range statement. This is often not obvious from the code,\n/// nor from the diagnostics produced when analysing the implicit expressions\n/// required in a for-range statement.\nvoid NoteForRangeBeginEndFunction(Sema &SemaRef, Expr *E, BeginEndFunction BEF) {\n // ...\n SemaRef.Diag(Loc, diag::note_for_range_begin_end) << BEF << IsTemplate << Description << E->getType();"},{"clang/unittests/Format/FormatTest.cpp",10174,"TEST_F(FormatTest, AlignsPipes) {\n // ...\n verifyFormat(\"SemaRef.Diag(Loc, diag::note_for_range_begin_end)\\n\""}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:4:9: note: selected \'begin\' function with iterator type \'Data *\'"} | ["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:4:9: note: selected \'begin\' function with iterator type \'Data *\'"} | ||
Line 4,776: | Line 4,788: | ||
}, | }, | ||
["note_for_range_invalid_iterator"]={ | ["note_for_range_invalid_iterator"]={ | ||
[ | [b]="in implicit call to \'operator%select{!=|*|++}0\' for iterator of type %1", | ||
[ | [d]=c, | ||
[ | [e]="in implicit call to \'operator(?:\\!\\=|\\*|\\+\\+)\' for iterator of type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"22a3fe1b9c95",1346968208,"Clarified diagnostics for range-based for loops with invalid ranges","Clarified diagnostics for range-based for loops with invalid ranges\n\nllvm-svn: 163350"}, | [h]={"22a3fe1b9c95",1346968208,"Clarified diagnostics for range-based for loops with invalid ranges","Clarified diagnostics for range-based for loops with invalid ranges\n\nllvm-svn: 163350"}, | ||
[i]={{ | [i]={{G,3000,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (NotEqExpr.isInvalid()) {\n Diag(RangeLoc, diag::note_for_range_invalid_iterator) << RangeLoc << 0 << BeginRangeRef.get()->getType();"},{G,3023,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (IncrExpr.isInvalid()) {\n Diag(RangeLoc, diag::note_for_range_invalid_iterator) << RangeLoc << 2 << BeginRangeRef.get()->getType();"},{G,3037,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (DerefExpr.isInvalid()) {\n Diag(RangeLoc, diag::note_for_range_invalid_iterator) << RangeLoc << 1 << BeginRangeRef.get()->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/co_await-range-for.cpp"]={"clang/test/SemaCXX/co_await-range-for.cpp:109:25: note: in implicit call to \'operator++\' for iterator of type \'Range<float>\'","clang/test/SemaCXX/co_await-range-for.cpp:117:25: note: in implicit call to \'operator++\' for iterator of type \'Range<long>\'"} | ["clang/test/SemaCXX/co_await-range-for.cpp"]={"clang/test/SemaCXX/co_await-range-for.cpp:109:25: note: in implicit call to \'operator++\' for iterator of type \'Range<float>\'","clang/test/SemaCXX/co_await-range-for.cpp:117:25: note: in implicit call to \'operator++\' for iterator of type \'Range<long>\'"} | ||
Line 4,788: | Line 4,800: | ||
}, | }, | ||
["note_for_range_member_begin_end_ignored"]={ | ["note_for_range_member_begin_end_ignored"]={ | ||
[ | [b]={{nil,z,"member is not a candidate because range type %0 has no \'%select{end|begin}1\' member"}}, | ||
[ | [d]=c, | ||
[ | [e]="member is not a candidate because range type (.*?) has no \'(?:end|begin)\' member", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"236ffdeeb2e0",1537831064,"P0962R1: only use the member form of \'begin\' and \'end\' in a range-based","P0962R1: only use the member form of \'begin\' and \'end\' in a range-based\nfor loop if both members exist.\n\nThis resolves a DR whereby an errant \'begin\' or \'end\' member in a base\nclass could result in a derived class not being usable as a range with\nnon-member \'begin\' and \'end\'.\n\nllvm-svn: 342925"}, | [h]={"236ffdeeb2e0",1537831064,"P0962R1: only use the member form of \'begin\' and \'end\' in a range-based","P0962R1: only use the member form of \'begin\' and \'end\' in a range-based\nfor loop if both members exist.\n\nThis resolves a DR whereby an errant \'begin\' or \'end\' member in a base\nclass could result in a derived class not being usable as a range with\nnon-member \'begin\' and \'end\'.\n\nllvm-svn: 342925"}, | ||
[i]={{ | [i]={{G,2678,"/// Create the initialization, compare, and increment steps for\n/// the range-based for loop expression.\n/// This function does not handle array-based for loops,\n/// which are created in Sema::BuildCXXForRangeStmt.\n///\n/// \\returns a ForRangeStatus indicating success or what kind of error occurred.\n/// BeginExpr and EndExpr are set and FRS_Success is returned on success;\n/// CandidateSet and BEF are set and some non-success value is returned on\n/// failure.\nstatic Sema::ForRangeStatus BuildNonArrayForRange(Sema &SemaRef, Expr *BeginRange, Expr *EndRange, QualType RangeType, VarDecl *BeginVar, VarDecl *EndVar, SourceLocation ColonLoc, SourceLocation CoawaitLoc, OverloadCandidateSet *CandidateSet, ExprResult *BeginExpr, ExprResult *EndExpr, BeginEndFunction *BEF) {\n // ...\n if (CXXRecordDecl *D = RangeType->getAsCXXRecordDecl()) {\n // ...\n if (BeginMemberLookup.empty() != EndMemberLookup.empty()) {\n // Look up the non-member form of the member we didn\'t find, first.\n // This way we prefer a \"no viable \'end\'\" diagnostic over a \"i found\n // a \'begin\' but ignored it because there was no member \'end\'\"\n // diagnostic.\n auto BuildNonmember = [&](BeginEndFunction BEFFound, LookupResult &Found, llvm::function_ref<Sema::ForRangeStatus()> BuildFound, llvm::function_ref<Sema::ForRangeStatus()> BuildNotFound) {\n // ...\n case Sema::FRS_DiagnosticIssued:\n for (NamedDecl *D : OldFound) {\n SemaRef.Diag(D->getLocation(), diag::note_for_range_member_begin_end_ignored) << BeginRange->getType() << BEFFound;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:324:12: note: member is not a candidate because range type \'NE::E\' has no \'end\' member","clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:331:12: note: member is not a candidate because range type \'NF::F\' has no \'begin\' member"} | ["clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp"]={"clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:324:12: note: member is not a candidate because range type \'NE::E\' has no \'end\' member","clang/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp:331:12: note: member is not a candidate because range type \'NF::F\' has no \'begin\' member"} | ||
Line 4,800: | Line 4,812: | ||
}, | }, | ||
["note_force_empty_selector_name"]={ | ["note_force_empty_selector_name"]={ | ||
[ | [b]="or insert whitespace before \':\' to use %0 as parameter name and have an empty entry in the selector", | ||
[ | [d]=c, | ||
[ | [e]="or insert whitespace before \'\\:\' to use (.*?) as parameter name and have an empty entry in the selector", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"84f498433116",1347923399,"objective-C: improve on warnings about misplacement of method","objective-C: improve on warnings about misplacement of method\nargument names. // rdar://12263549\n\nllvm-svn: 164077"}, | [h]={"84f498433116",1347923399,"objective-C: improve on warnings about misplacement of method","objective-C: improve on warnings about misplacement of method\nargument names. // rdar://12263549\n\nllvm-svn: 164077"}, | ||
[i]={{ | [i]={{vc,1511,"/// objc-method-decl:\n/// objc-selector\n/// objc-keyword-selector objc-parmlist[opt]\n/// objc-type-name objc-selector\n/// objc-type-name objc-keyword-selector objc-parmlist[opt]\n///\n/// objc-keyword-selector:\n/// objc-keyword-decl\n/// objc-keyword-selector objc-keyword-decl\n///\n/// objc-keyword-decl:\n/// objc-selector \':\' objc-type-name objc-keyword-attributes[opt] identifier\n/// objc-selector \':\' objc-keyword-attributes[opt] identifier\n/// \':\' objc-type-name objc-keyword-attributes[opt] identifier\n/// \':\' objc-keyword-attributes[opt] identifier\n///\n/// objc-parmlist:\n/// objc-parms objc-ellipsis[opt]\n///\n/// objc-parms:\n/// objc-parms , parameter-declaration\n///\n/// objc-ellipsis:\n/// , ...\n///\n/// objc-keyword-attributes: [OBJC2]\n/// __attribute__((unused))\n///\nDecl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, tok::TokenKind mType, tok::ObjCKeywordKind MethodImplKind, bool MethodDefinition) {\n // ...\n while (true) {\n // ...\n if (!SelIdent) {\n // ...\n if (PP.getLocForEndOfToken(ArgInfo.NameLoc) == ColonLoc) {\n // ...\n Diag(ColonLoc, diag::note_force_empty_selector_name) << ArgInfo.Name;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/unused.m"]={"clang/test/SemaObjC/unused.m:32:21: note: or insert whitespace before \':\' to use \'x\' as parameter name and have an empty entry in the selector","clang/test/SemaObjC/unused.m:36:7: note: or insert whitespace before \':\' to use \'y\' as parameter name and have an empty entry in the selector"} | ["clang/test/SemaObjC/unused.m"]={"clang/test/SemaObjC/unused.m:32:21: note: or insert whitespace before \':\' to use \'x\' as parameter name and have an empty entry in the selector","clang/test/SemaObjC/unused.m:36:7: note: or insert whitespace before \':\' to use \'y\' as parameter name and have an empty entry in the selector"} | ||
Line 4,812: | Line 4,824: | ||
}, | }, | ||
["note_format_fix_specifier"]={ | ["note_format_fix_specifier"]={ | ||
[ | [b]="did you mean to use \'%0\'?", | ||
[ | [d]=c, | ||
[ | [e]="did you mean to use \'(.*?)\'\\?", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"92303592c324",1347076803,"Format strings: %Ld isn\'t available on Darwin or Windows.","Format strings: %Ld isn\'t available on Darwin or Windows.\n\nThis seems to be a GNU libc extension; we offer a fixit to %lld on\nthese platforms.\n\n<rdar://problem/11518237>\n\nllvm-svn: 163452"}, | [h]={"92303592c324",1347076803,"Format strings: %Ld isn\'t available on Darwin or Windows.","Format strings: %Ld isn\'t available on Darwin or Windows.\n\nThis seems to be a GNU libc extension; we offer a fixit to %lld on\nthese platforms.\n\n<rdar://problem/11518237>\n\nllvm-svn: 163452"}, | ||
[i]={{ | [i]={{C,10140,"void CheckFormatHandler::HandleInvalidLengthModifier(const analyze_format_string::FormatSpecifier &FS, const analyze_format_string::ConversionSpecifier &CS, const char *startSpecifier, unsigned specifierLen, unsigned DiagID) {\n // ...\n if (FixedLM) {\n // ...\n S.Diag(getLocationOfByte(LM.getStart()), diag::note_format_fix_specifier) << FixedLM->toString() << FixItHint::CreateReplacement(LMRange, FixedLM->toString());"},{C,10174,"void CheckFormatHandler::HandleNonStandardLengthModifier(const analyze_format_string::FormatSpecifier &FS, const char *startSpecifier, unsigned specifierLen) {\n // ...\n if (FixedLM) {\n // ...\n S.Diag(getLocationOfByte(LM.getStart()), diag::note_format_fix_specifier) << FixedLM->toString() << FixItHint::CreateReplacement(LMRange, FixedLM->toString());"},{C,10202,"void CheckFormatHandler::HandleNonStandardConversionSpecifier(const analyze_format_string::ConversionSpecifier &CS, const char *startSpecifier, unsigned specifierLen) {\n // ...\n if (FixedCS) {\n // ...\n S.Diag(getLocationOfByte(CS.getStart()), diag::note_format_fix_specifier) << FixedCS->toString() << FixItHint::CreateReplacement(CSRange, FixedCS->toString());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/format-strings-non-iso.c"]={"clang/test/Sema/format-strings-non-iso.c:10:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:11:11: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:21:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:22:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:23:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:24:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:25:12: note: did you mean to use \'ll\'?"} | ["clang/test/Sema/format-strings-non-iso.c"]={"clang/test/Sema/format-strings-non-iso.c:10:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:11:11: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:21:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:22:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:23:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:24:12: note: did you mean to use \'ll\'?","clang/test/Sema/format-strings-non-iso.c:25:12: note: did you mean to use \'ll\'?"} | ||
Line 4,824: | Line 4,836: | ||
}, | }, | ||
["note_format_security_fixit"]={ | ["note_format_security_fixit"]={ | ||
[ | [b]="treat the string as an argument to avoid this", | ||
[ | [d]=c, | ||
[ | [e]="treat the string as an argument to avoid this", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"57819fc809d1",1458075398,"Move the fixit for -Wformat-security to a note.","Move the fixit for -Wformat-security to a note.\n\nr263299 added a fixit for the -Wformat-security warning, but that runs\ninto complications with our guideline that error recovery should be done\nas-if the fixit had been applied. Putting the fixit on a note avoids that.\n\nllvm-svn: 263584"}, | [h]={"57819fc809d1",1458075398,"Move the fixit for -Wformat-security to a note.","Move the fixit for -Wformat-security to a note.\n\nr263299 added a fixit for the -Wformat-security warning, but that runs\ninto complications with our guideline that error recovery should be done\nas-if the fixit had been applied. Putting the fixit on a note avoids that.\n\nllvm-svn: 263584"}, | ||
[i]={{ | [i]={{C,9973,"bool Sema::CheckFormatArguments(ArrayRef<const Expr *> Args, Sema::FormatArgumentPassingKind APK, unsigned format_idx, unsigned firstDataArg, FormatStringType Type, VariadicCallType CallType, SourceLocation Loc, SourceRange Range, llvm::SmallBitVector &CheckedVarArgs) {\n // ...\n // If there are no arguments specified, warn with -Wformat-security, otherwise\n // warn only with -Wformat-nonliteral.\n if (Args.size() == firstDataArg) {\n // ...\n case FST_Kprintf:\n case FST_FreeBSDKPrintf:\n case FST_Printf:\n Diag(FormatLoc, diag::note_format_security_fixit) << FixItHint::CreateInsertion(FormatLoc, \"\\\"%s\\\", \");"},{C,9977,"bool Sema::CheckFormatArguments(ArrayRef<const Expr *> Args, Sema::FormatArgumentPassingKind APK, unsigned format_idx, unsigned firstDataArg, FormatStringType Type, VariadicCallType CallType, SourceLocation Loc, SourceRange Range, llvm::SmallBitVector &CheckedVarArgs) {\n // ...\n // If there are no arguments specified, warn with -Wformat-security, otherwise\n // warn only with -Wformat-nonliteral.\n if (Args.size() == firstDataArg) {\n // ...\n case FST_NSString:\n Diag(FormatLoc, diag::note_format_security_fixit) << FixItHint::CreateInsertion(FormatLoc, \"@\\\"%@\\\", \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/format-strings-0x.cpp"]={"clang/test/SemaCXX/format-strings-0x.cpp:17:10: note: treat the string as an argument to avoid this"} | ["clang/test/SemaCXX/format-strings-0x.cpp"]={"clang/test/SemaCXX/format-strings-0x.cpp:17:10: note: treat the string as an argument to avoid this"} | ||
Line 4,836: | Line 4,848: | ||
}, | }, | ||
["note_format_string_defined"]={ | ["note_format_string_defined"]={ | ||
[ | [b]="format string is defined here", | ||
[ | [d]=c, | ||
[ | [e]="format string is defined here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"03cf7b70e0d6",1319762485,"Fix for PR9751 to change the behavior of -Wformat warnings. If the format","Fix for PR9751 to change the behavior of -Wformat warnings. If the format\nstring is part of the function call, then there is no difference. If the\nformat string is not, the warning will point to the call site and a note\nwill point to where the format string is.\n\nFix-it hints for strings are moved to the note if a note is emitted. This will\nprevent changes to format strings that may be used in multiple places.\n\nllvm-svn: 143168"}, | [h]={"03cf7b70e0d6",1319762485,"Fix for PR9751 to change the behavior of -Wformat warnings. If the format","Fix for PR9751 to change the behavior of -Wformat warnings. If the format\nstring is part of the function call, then there is no difference. If the\nformat string is not, the warning will point to the call site and a note\nwill point to where the format string is.\n\nFix-it hints for strings are moved to the note if a note is emitted. This will\nprevent changes to format strings that may be used in multiple places.\n\nllvm-svn: 143168"}, | ||
[i]={{ | [i]={{C,10437,"/// If the format string is not within the function call, emit a note\n/// so that the function call and string are in diagnostic messages.\n///\n/// \\param InFunctionCall if true, the format string is within the function\n/// call and only one diagnostic message will be produced. Otherwise, an\n/// extra note will be emitted pointing to location of the format string.\n///\n/// \\param ArgumentExpr the expression that is passed as the format string\n/// argument in the function call. Used for getting locations when two\n/// diagnostics are emitted.\n///\n/// \\param PDiag the callee should already have provided any strings for the\n/// diagnostic message. This function only adds locations and fixits\n/// to diagnostics.\n///\n/// \\param Loc primary location for diagnostic. If two diagnostics are\n/// required, one will be at Loc and a new SourceLocation will be created for\n/// the other one.\n///\n/// \\param IsStringLocation if true, Loc points to the format string should be\n/// used for the note. Otherwise, Loc points to the argument list and will\n/// be used with PDiag.\n///\n/// \\param StringRange some or all of the string to highlight. This is\n/// templated so it can accept either a CharSourceRange or a SourceRange.\n///\n/// \\param FixIt optional fix it hint for the format string.\ntemplate <typename Range> void CheckFormatHandler::EmitFormatDiagnostic(Sema &S, bool InFunctionCall, const Expr *ArgumentExpr, const PartialDiagnostic &PDiag, SourceLocation Loc, bool IsStringLocation, Range StringRange, ArrayRef<FixItHint> FixIt) {\n if (InFunctionCall) {\n // ...\n } else {\n // ...\n const Sema::SemaDiagnosticBuilder &Note = S.Diag(IsStringLocation ? Loc : StringRange.getBegin(), diag::note_format_string_defined);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:127:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:129:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:136:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:138:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:145:49: note: format string is defined here"} | ["clang/test/SemaObjC/format-strings-objc.m"]={"clang/test/SemaObjC/format-strings-objc.m:127:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:129:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:136:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:138:45: note: format string is defined here","clang/test/SemaObjC/format-strings-objc.m:145:49: note: format string is defined here"} | ||
Line 4,848: | Line 4,860: | ||
}, | }, | ||
["note_forward_class"]={ | ["note_forward_class"]={ | ||
[ | [b]="forward declaration of class here", | ||
[ | [d]=c, | ||
[ | [e]="forward declaration of class here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7cabbe04ebdd",1292460988,"Improve diagnostics when property being looked up","Improve diagnostics when property being looked up\nin a forward @class object. // rdar://8774513\n\nllvm-svn: 121933"}, | [h]={"7cabbe04ebdd",1292460988,"Improve diagnostics when property being looked up","Improve diagnostics when property being looked up\nin a forward @class object. // rdar://8774513\n\nllvm-svn: 121933"}, | ||
[i]={{ | [i]={{yb,552,"/// 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 } else {\n // ...\n S.Diag(UnknownObjCClass->getLocation(), diag::note_forward_class);"},{p,210,"/// Validates ObjCInterfaceDecl availability.\n/// ObjCInterfaceDecl, used to create ObjC literals, should be defined\n/// if clang not in a debugger mode.\nstatic bool ValidateObjCLiteralInterfaceDecl(Sema &S, ObjCInterfaceDecl *Decl, SourceLocation Loc, Sema::ObjCLiteralKind LiteralKind) {\n if (!Decl) {\n // ...\n } else if (!Decl->hasDefinition() && !S.getLangOpts().DebuggerObjCLiteral) {\n // ...\n S.Diag(Decl->getLocation(), diag::note_forward_class);"},{H,9253,"/// The implementation of RequireCompleteType\nbool Sema::RequireCompleteTypeImpl(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser *Diagnoser) {\n // ...\n // If the Objective-C class was a forward declaration, produce a note.\n if (IFace && !IFace->isInvalidDecl() && !IFace->getLocation().isInvalid())\n Diag(IFace->getLocation(), diag::note_forward_class);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/exprs.m"]={"clang/test/SemaObjC/exprs.m:36:8: note: forward declaration of class here"} | ["clang/test/SemaObjC/exprs.m"]={"clang/test/SemaObjC/exprs.m:36:8: note: forward declaration of class here"} | ||
Line 4,860: | Line 4,872: | ||
}, | }, | ||
["note_forward_class_conversion"]={ | ["note_forward_class_conversion"]={ | ||
[ | [b]={{nil,I,"%0 is not defined, but forward declared here; conversion would be valid if it was derived from %1"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not defined, but forward declared here; conversion would be valid if it was derived from (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{N,9493,"/// Emit notes associated with an initialization that failed due to a\n/// \"simple\" conversion failure.\nstatic void emitBadConversionNotes(Sema &S, const InitializedEntity &entity, Expr *op) {\n // ...\n if (fromDecl && destDecl && fromDecl->getDeclKind() == Decl::CXXRecord && destDecl->getDeclKind() == Decl::CXXRecord && !fromDecl->isInvalidDecl() && !destDecl->isInvalidDecl() && !fromDecl->hasDefinition() && destPointeeType.getQualifiers().compatiblyIncludes(fromPointeeType.getQualifiers()))\n S.Diag(fromDecl->getLocation(), diag::note_forward_class_conversion) << S.getASTContext().getTagDeclType(fromDecl) << S.getASTContext().getTagDeclType(destDecl);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/elaborated-type-specifier.cpp"]={"clang/test/SemaCXX/elaborated-type-specifier.cpp:29:10: note: \'S4\' is not defined, but forward declared here; conversion would be valid if it was derived from \'NS::S4\'"} | ["clang/test/SemaCXX/elaborated-type-specifier.cpp"]={"clang/test/SemaCXX/elaborated-type-specifier.cpp:29:10: note: \'S4\' is not defined, but forward declared here; conversion would be valid if it was derived from \'NS::S4\'"} | ||
Line 4,872: | Line 4,884: | ||
}, | }, | ||
["note_forward_declaration"]={ | ["note_forward_declaration"]={ | ||
[ | [b]="forward declaration of %0", | ||
[ | [d]=c, | ||
[ | [e]="forward declaration of (.*?)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Wb,1236199783,Vb,Ub}, | ||
[i]={{s,10328,"// Explicit instantiation of a member class of a class template.\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!RecordDef) {\n // ...\n if (!Def) {\n // ...\n Diag(Pattern->getLocation(), diag::note_forward_declaration) << Pattern;"},{H,9248,"/// 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,9531,"QualType Sema::BuiltinEnumUnderlyingType(QualType BaseType, SourceLocation Loc) {\n // ...\n if (BaseType->isIncompleteType(&FwdDecl)) {\n // ...\n Diag(FwdDecl->getLocation(), diag::note_forward_declaration) << FwdDecl;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/PR6618.cpp"]={"clang/test/SemaCXX/PR6618.cpp:2:7: note: forward declaration of \'bar\'"} | ["clang/test/SemaCXX/PR6618.cpp"]={"clang/test/SemaCXX/PR6618.cpp:2:7: note: forward declaration of \'bar\'"} | ||
Line 4,884: | Line 4,896: | ||
}, | }, | ||
["note_forward_template_decl"]={ | ["note_forward_template_decl"]={ | ||
[ | [b]="forward declaration of template entity is here", | ||
[ | [d]=c, | ||
[ | [e]="forward declaration of template entity is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7dcc97e7ac0a",1461046792,"Warn if function or variable cannot be implicitly instantiated","Warn if function or variable cannot be implicitly instantiated\n\nWith this patch compiler emits warning if it tries to make implicit instantiation\nof a template but cannot find the template definition. The warning can be suppressed\nby explicit instantiation declaration or by command line options\n-Wundefined-var-template and -Wundefined-func-template. The implementation follows\nthe discussion of http://reviews.llvm.org/D12326.\n\nDifferential Revision: http://reviews.llvm.org/D16396\n\nllvm-svn: 266719"}, | [h]={"7dcc97e7ac0a",1461046792,"Warn if function or variable cannot be implicitly instantiated","Warn if function or variable cannot be implicitly instantiated\n\nWith this patch compiler emits warning if it tries to make implicit instantiation\nof a template but cannot find the template definition. The warning can be suppressed\nby explicit instantiation declaration or by command line options\n-Wundefined-var-template and -Wundefined-func-template. The implementation follows\nthe discussion of http://reviews.llvm.org/D12326.\n\nDifferential Revision: http://reviews.llvm.org/D16396\n\nllvm-svn: 266719"}, | ||
[i]={{ | [i]={{Mc,4903,"/// Instantiate the definition of the given function from its\n/// template.\n///\n/// \\param PointOfInstantiation the point at which the instantiation was\n/// required. Note that this is not precisely a \"point of instantiation\"\n/// for the function, but it\'s close.\n///\n/// \\param Function the already-instantiated declaration of a\n/// function template specialization or member function of a class template\n/// specialization.\n///\n/// \\param Recursive if true, recursively instantiates any functions that\n/// are required by this instantiation.\n///\n/// \\param DefinitionRequired if true, then we are performing an explicit\n/// instantiation where the body of the function is required. Complain if\n/// there is no such body.\nvoid Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive, bool DefinitionRequired, bool AtEndOfTU) {\n // ...\n // FIXME: We need to track the instantiation stack in order to know which\n // definitions should be visible within this instantiation.\n if (DiagnoseUninstantiableTemplate(PointOfInstantiation, Function, Function->getInstantiatedFromMemberFunction(), PatternDecl, PatternDef, TSK,\n // ...\n if (DefinitionRequired)\n // ...\n else if (TSK == TSK_ExplicitInstantiationDefinition || (Function->isConstexpr() && !Recursive)) {\n // ...\n } else if (TSK == TSK_ImplicitInstantiation) {\n if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && !getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {\n // ...\n Diag(PatternDecl->getLocation(), diag::note_forward_template_decl);"},{Mc,5529,"/// Instantiate the definition of the given variable from its\n/// template.\n///\n/// \\param PointOfInstantiation the point at which the instantiation was\n/// required. Note that this is not precisely a \"point of instantiation\"\n/// for the variable, but it\'s close.\n///\n/// \\param Var the already-instantiated declaration of a templated variable.\n///\n/// \\param Recursive if true, recursively instantiates any functions that\n/// are required by this instantiation.\n///\n/// \\param DefinitionRequired if true, then we are performing an explicit\n/// instantiation where a definition of the variable is required. Complain\n/// if there is no such definition.\nvoid Sema::InstantiateVariableDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive, bool DefinitionRequired, bool AtEndOfTU) {\n // ...\n // If we don\'t have a definition of the variable template, we won\'t perform\n // any instantiation. Rather, we rely on the user to instantiate this\n // definition (or provide a specialization for it) in another translation\n // unit.\n if (!Def && !DefinitionRequired) {\n if (TSK == TSK_ExplicitInstantiationDefinition) {\n // ...\n } else if (TSK == TSK_ImplicitInstantiation) {\n // Warn about missing definition at the end of translation unit.\n if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && !getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {\n // ...\n Diag(PatternDecl->getLocation(), diag::note_forward_template_decl);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp:6:12: note: forward declaration of template entity is here"} | ["clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp:6:12: note: forward declaration of template entity is here"} | ||
Line 4,896: | Line 4,908: | ||
}, | }, | ||
["note_found_mutex_near_match"]={ | ["note_found_mutex_near_match"]={ | ||
[ | [b]="found near match \'%0\'", | ||
[ | [d]=c, | ||
[ | [e]="found near match \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5ff1644e624e",1347307103,"Thread-safety analysis: differentiate between two forms of analysis; a precise","Thread-safety analysis: differentiate between two forms of analysis; a precise\nanalysis that may give false positives because it is confused by aliasing, and\na less precise analysis that has fewer false positives, but may have false\nnegatives. The more precise warnings are enabled by -Wthread-safety-precise.\nAn additional note clarify the warnings in the precise case.\n\nllvm-svn: 163537"}, | [h]={"5ff1644e624e",1347307103,"Thread-safety analysis: differentiate between two forms of analysis; a precise","Thread-safety analysis: differentiate between two forms of analysis; a precise\nanalysis that may give false positives because it is confused by aliasing, and\na less precise analysis that has fewer false positives, but may have false\nnegatives. The more precise warnings are enabled by -Wthread-safety-precise.\nAn additional note clarify the warnings in the precise case.\n\nllvm-svn: 163537"}, | ||
[i]={{ | [i]={{lb,1979,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexNotHeld(StringRef Kind, const NamedDecl *D, ProtectedOperationKind POK, Name LockName, LockKind LK, SourceLocation Loc, Name *PossibleMatch) override {\n // ...\n if (PossibleMatch) {\n // ...\n PartialDiagnosticAt Note(Loc, S.PDiag(diag::note_found_mutex_near_match) << *PossibleMatch);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:583:8: note: found near match \'fooA.mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:604:12: note: found near match \'BarA.FooPointer->mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:613:20: note: found near match \'BarA.Foo.mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:622:13: note: found near match \'BarA.Foo.mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1338:7: note: found near match \'b1->mu1_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1369:12: note: found near match \'b3->mu1_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1374:6: note: found near match \'b3->mu1_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1401:13: note: found near match \'lock_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1404:13: note: found near match \'lock_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1603:7: note: found near match \'d1->mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2040:6: note: found near match \'bt.fooBase.mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2461:18: note: found near match \'bar.getFoo().mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2467:18: note: found near match \'bar.getFoo2(a).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2473:21: note: found near match \'bar.getFoo3(a, b).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2479:21: note: found near match \'getBarFoo(bar, a).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2485:39: note: found near match \'((0 < a) ? fooArray[1] : fooArray[b]).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2546:7: note: found near match \'f1->mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2588:7: note: found near match \'b1->mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5200:31: note: found near match \'a.mu\'"} | ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:583:8: note: found near match \'fooA.mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:604:12: note: found near match \'BarA.FooPointer->mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:613:20: note: found near match \'BarA.Foo.mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:622:13: note: found near match \'BarA.Foo.mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1338:7: note: found near match \'b1->mu1_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1369:12: note: found near match \'b3->mu1_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1374:6: note: found near match \'b3->mu1_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1401:13: note: found near match \'lock_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1404:13: note: found near match \'lock_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:1603:7: note: found near match \'d1->mu\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2040:6: note: found near match \'bt.fooBase.mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2461:18: note: found near match \'bar.getFoo().mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2467:18: note: found near match \'bar.getFoo2(a).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2473:21: note: found near match \'bar.getFoo3(a, b).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2479:21: note: found near match \'getBarFoo(bar, a).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2485:39: note: found near match \'((0 < a) ? fooArray[1] : fooArray[b]).mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2546:7: note: found near match \'f1->mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2588:7: note: found near match \'b1->mu_\'","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5200:31: note: found near match \'a.mu\'"} | ||
Line 4,908: | Line 4,920: | ||
}, | }, | ||
["note_from_diagnose_if"]={ | ["note_from_diagnose_if"]={ | ||
[ | [b]="from \'diagnose_if\' attribute on %0:", | ||
[ | [d]=c, | ||
[ | [e]="from \'diagnose_if\' attribute on (.*?)\\:", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang.","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"}, | [h]={"177399e2277c",1483935134,"Add the diagnose_if attribute to clang.","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"}, | ||
[i]={{ | [i]={{fb,6953,"template <typename CheckFn> static bool diagnoseDiagnoseIfAttrsWith(Sema &S, const NamedDecl *ND, bool ArgDependent, SourceLocation Loc, CheckFn &&IsSuccessful) {\n // ...\n if (ErrAttr != WarningBegin) {\n // ...\n S.Diag(DIA->getLocation(), diag::note_from_diagnose_if) << DIA->getParent() << DIA->getCond()->getSourceRange();"},{fb,6961,"template <typename CheckFn> static bool diagnoseDiagnoseIfAttrsWith(Sema &S, const NamedDecl *ND, bool ArgDependent, SourceLocation Loc, CheckFn &&IsSuccessful) {\n // ...\n for (const auto *DIA : llvm::make_range(WarningBegin, Attrs.end()))\n if (IsSuccessful(DIA)) {\n // ...\n S.Diag(DIA->getLocation(), diag::note_from_diagnose_if) << DIA->getParent() << DIA->getCond()->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/operator-new-size-diagnose_if.cpp"]={"clang/test/SemaCXX/operator-new-size-diagnose_if.cpp:10:39: note: from \'diagnose_if\' attribute on \'operator new\':","clang/test/SemaCXX/operator-new-size-diagnose_if.cpp:15:41: note: from \'diagnose_if\' attribute on \'operator new[]\':","clang/test/SemaCXX/operator-new-size-diagnose_if.cpp:15:41: note: from \'diagnose_if\' attribute on \'operator new[]\':"} | ["clang/test/SemaCXX/operator-new-size-diagnose_if.cpp"]={"clang/test/SemaCXX/operator-new-size-diagnose_if.cpp:10:39: note: from \'diagnose_if\' attribute on \'operator new\':","clang/test/SemaCXX/operator-new-size-diagnose_if.cpp:15:41: note: from \'diagnose_if\' attribute on \'operator new[]\':","clang/test/SemaCXX/operator-new-size-diagnose_if.cpp:15:41: note: from \'diagnose_if\' attribute on \'operator new[]\':"} | ||
Line 4,920: | Line 4,932: | ||
}, | }, | ||
["note_function_style_cast_add_parentheses"]={ | ["note_function_style_cast_add_parentheses"]={ | ||
[ | [b]={{nil,V,"add enclosing parentheses to perform a function-style cast"}}, | ||
[ | [d]=c, | ||
[ | [e]="add enclosing parentheses to perform a function\\-style cast", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a","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"}, | [h]={"ac63d63543ca",1506729445,"Add a \"vexing parse\" warning for ambiguity between a variable declaration and a","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"}, | ||
[i]={{ | [i]={{H,4031,"/// 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(D.getBeginLoc(), diag::note_function_style_cast_add_parentheses) << FixItHint::CreateInsertion(D.getBeginLoc(), \"(\") << FixItHint::CreateInsertion(S.getLocForEndOfToken(D.getEndLoc()), \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:7: note: add enclosing parentheses to perform a function-style cast","clang/test/Parser/cxx0x-condition.cpp:21:7: note: add enclosing parentheses to perform a function-style cast"} | ["clang/test/Parser/cxx0x-condition.cpp"]={"clang/test/Parser/cxx0x-condition.cpp:17:7: note: add enclosing parentheses to perform a function-style cast","clang/test/Parser/cxx0x-condition.cpp:21:7: note: add enclosing parentheses to perform a function-style cast"} | ||
Line 4,932: | Line 4,944: | ||
}, | }, | ||
["note_function_suggestion"]={ | ["note_function_suggestion"]={ | ||
[ | [b]="did you mean %0?", | ||
[ | [d]=c, | ||
[ | [e]="did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2fb8b91f6f96",1323164772,"Suggest typo corrections for implicit function declarations.","Suggest typo corrections for implicit function declarations.\n\nA mistyped function call becomes an inmplicit function declaration in C.\nSuggest typo correction when one can be found.\n\nllvm-svn: 145930"}, | [h]={"2fb8b91f6f96",1323164772,"Suggest typo corrections for implicit function declarations.","Suggest typo corrections for implicit function declarations.\n\nA mistyped function call becomes an inmplicit function declaration in C.\nSuggest typo correction when one can be found.\n\nllvm-svn: 145930"}, | ||
[i]={{ | [i]={{q,16078,"/// 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 (Corrected) {\n // ...\n if (Diagnose)\n diagnoseTypo(Corrected, PDiag(diag::note_function_suggestion),"}} | ||
}, | }, | ||
["note_function_template_deduction_instantiation_here"]={ | ["note_function_template_deduction_instantiation_here"]={ | ||
[ | [b]="while substituting deduced template arguments into function template %0 %1", | ||
[ | [d]=c, | ||
[ | [e]="while substituting deduced template arguments into function template (.*?) (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ff6cbdf806da",1246485666,"Keep track of more information within the template instantiation stack, e.g.,","Keep track of more information within the template instantiation stack, e.g.,\nby distinguishing between substitution that occurs for template\nargument deduction vs. explicitly-specifiad template arguments. This\nis used both to improve diagnostics and to make sure we only provide\nSFINAE in those cases where SFINAE should apply.\n\nIn addition, deal with the sticky issue where SFINAE only considers\nsubstitution of template arguments into the *type* of a function\ntemplate; we need to issue hard errors beyond this point, as\ntest/SemaTemplate/operator-template.cpp illustrates.\n\nllvm-svn: 74651"}, | [h]={"ff6cbdf806da",1246485666,"Keep track of more information within the template instantiation stack, e.g.,","Keep track of more information within the template instantiation stack, e.g.,\nby distinguishing between substitution that occurs for template\nargument deduction vs. explicitly-specifiad template arguments. This\nis used both to improve diagnostics and to make sure we only provide\nSFINAE in those cases where SFINAE should apply.\n\nIn addition, deal with the sticky issue where SFINAE only considers\nsubstitution of template arguments into the *type* of a function\ntemplate; we need to issue hard errors beyond this point, as\ntest/SemaTemplate/operator-template.cpp illustrates.\n\nllvm-svn: 74651"}, | ||
[i]={{ | [i]={{E,833,"/// 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::DeducedTemplateArgumentSubstitution: {\n if (FunctionTemplateDecl *FnTmpl = dyn_cast<FunctionTemplateDecl>(Active->Entity)) {\n Diags.Report(Active->PointOfInstantiation, diag::note_function_template_deduction_instantiation_here) << FnTmpl << getTemplateArgumentBindingsText(FnTmpl->getTemplateParameters(), Active->TemplateArgs, Active->NumTemplateArgs) << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/instantiation-depth-subst.cpp"]={"clang/test/SemaTemplate/instantiation-depth-subst.cpp:4:46: note: while substituting deduced template arguments into function template \'f\' [with T = S]","clang/test/SemaTemplate/instantiation-depth-subst.cpp:4:46: note: while substituting deduced template arguments into function template \'f\' [with T = S]","clang/test/SemaTemplate/instantiation-depth-subst.cpp:9:9: note: while substituting deduced template arguments into function template \'f\' [with T = S]"} | ["clang/test/SemaTemplate/instantiation-depth-subst.cpp"]={"clang/test/SemaTemplate/instantiation-depth-subst.cpp:4:46: note: while substituting deduced template arguments into function template \'f\' [with T = S]","clang/test/SemaTemplate/instantiation-depth-subst.cpp:4:46: note: while substituting deduced template arguments into function template \'f\' [with T = S]","clang/test/SemaTemplate/instantiation-depth-subst.cpp:9:9: note: while substituting deduced template arguments into function template \'f\' [with T = S]"} | ||
Line 4,953: | Line 4,965: | ||
}, | }, | ||
["note_function_template_spec_here"]={ | ["note_function_template_spec_here"]={ | ||
[ | [b]="in instantiation of function template specialization %q0 requested here", | ||
[ | [d]=c, | ||
[ | [e]="in instantiation of function template specialization (.*?) requested here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"4adbc6d947b0",1245975003,"Implicit instantiation for function template specializations.","Implicit instantiation for function template specializations.\n\nFor a FunctionDecl that has been instantiated due to template argument\ndeduction, we now store the primary template from which it was\ninstantiated and the deduced template arguments. From this\ninformation, we can instantiate the body of the function template.\n\nllvm-svn: 74232"}, | [h]={"4adbc6d947b0",1245975003,"Implicit instantiation for function template specializations.","Implicit instantiation for function template specializations.\n\nFor a FunctionDecl that has been instantiated due to template argument\ndeduction, we now store the primary template from which it was\ninstantiated and the deduced template arguments. From this\ninformation, we can instantiate the body of the function template.\n\nllvm-svn: 74232"}, | ||
[i]={{ | [i]={{E,772,"/// 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 DiagID = diag::note_function_template_spec_here;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:166:17: note: in instantiation of function template specialization \'dependent::n<double>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:105:14: note: in instantiation of function template specialization \'dependent::f<int[3]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:133:5: note: in instantiation of function template specialization \'dependent::h2<int[]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:145:14: note: in instantiation of function template specialization \'dependent::j<int[]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:157:5: note: in instantiation of function template specialization \'dependent::l<int[3], int[4]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:158:5: note: in instantiation of function template specialization \'dependent::l<int[], int[]>\' requested here"} | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:166:17: note: in instantiation of function template specialization \'dependent::n<double>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:105:14: note: in instantiation of function template specialization \'dependent::f<int[3]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:133:5: note: in instantiation of function template specialization \'dependent::h2<int[]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:145:14: note: in instantiation of function template specialization \'dependent::j<int[]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:157:5: note: in instantiation of function template specialization \'dependent::l<int[3], int[4]>\' requested here","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:158:5: note: in instantiation of function template specialization \'dependent::l<int[], int[]>\' requested here"} | ||
Line 4,965: | Line 4,977: | ||
}, | }, | ||
["note_function_template_spec_matched"]={ | ["note_function_template_spec_matched"]={ | ||
[ | [b]="function template %q0 matches specialization %1", | ||
[ | [d]=c, | ||
[ | [e]="function template (.*?) matches specialization (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3a923c2d3799",1253834087,"WIP implementation of explicit function template specialization. This","WIP implementation of explicit function template specialization. This\nfirst implementation recognizes when a function declaration is an\nexplicit function template specialization (based on the presence of a\ntemplate<> header), performs template argument deduction + ambiguity\nresolution to determine which template is being specialized, and hooks\n\nThere are many caveats here:\n - We completely and totally drop any explicitly-specified template\n arguments on the floor\n - We don\'t diagnose any of the extra semantic things that we should\n diagnose. \n - I haven\'t looked to see that we\'re getting the right linkage for\n explicit specializations\n\nOn a happy note, this silences a bunch of errors that show up in\nlibstdc++\'s <iostream>, although Clang still can\'t get through the\nentire header.\n\nllvm-svn: 82728"}, | [h]={"3a923c2d3799",1253834087,"WIP implementation of explicit function template specialization. This","WIP implementation of explicit function template specialization. This\nfirst implementation recognizes when a function declaration is an\nexplicit function template specialization (based on the presence of a\ntemplate<> header), performs template argument deduction + ambiguity\nresolution to determine which template is being specialized, and hooks\n\nThere are many caveats here:\n - We completely and totally drop any explicitly-specified template\n arguments on the floor\n - We don\'t diagnose any of the extra semantic things that we should\n diagnose. \n - I haven\'t looked to see that we\'re getting the right linkage for\n explicit specializations\n\nOn a happy note, this silences a bunch of errors that show up in\nlibstdc++\'s <iostream>, although Clang still can\'t get through the\nentire header.\n\nllvm-svn: 82728"}, | ||
[i]={{ | [i]={{s,9500,"/// Perform semantic analysis for the given function template\n/// specialization.\n///\n/// This routine performs all of the semantic analysis required for an\n/// explicit function template specialization. On successful completion,\n/// the function declaration \\p FD will become a function template\n/// specialization.\n///\n/// \\param FD the function declaration, which will be updated to become a\n/// function template specialization.\n///\n/// \\param ExplicitTemplateArgs the explicitly-provided template arguments,\n/// if any. Note that this may be valid info even when 0 arguments are\n/// explicitly provided as in, e.g., \\c void sort<>(char*, char*);\n/// as it anyway contains info on the angle brackets locations.\n///\n/// \\param Previous the set of declarations that may be specialized by\n/// this function specialization.\n///\n/// \\param QualifiedFriend whether this is a lookup for a qualified friend\n/// declaration with no explicit template argument list that might be\n/// befriending a function template specialization.\nbool Sema::CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend) {\n // ...\n UnresolvedSetIterator Result = getMostSpecialized(Candidates.begin(), Candidates.end(), FailedCandidates, FD->getLocation(), PDiag(diag::err_function_template_spec_no_match) << FD->getDeclName(), PDiag(diag::err_function_template_spec_ambiguous) << FD->getDeclName() << (ExplicitTemplateArgs != nullptr), PDiag(diag::note_function_template_spec_matched));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/function-template-specialization.cpp"]={"clang/test/SemaTemplate/function-template-specialization.cpp:26:27: note: function template \'f1<int>\' matches specialization [with T = int]","clang/test/SemaTemplate/function-template-specialization.cpp:20:22: note: function template \'f1<17>\' matches specialization [with N = 17]","clang/test/SemaTemplate/function-template-specialization.cpp:19:34: note: function template \'f1<int, 17>\' matches specialization [with T = int, N = 17]"} | ["clang/test/SemaTemplate/function-template-specialization.cpp"]={"clang/test/SemaTemplate/function-template-specialization.cpp:26:27: note: function template \'f1<int>\' matches specialization [with T = int]","clang/test/SemaTemplate/function-template-specialization.cpp:20:22: note: function template \'f1<17>\' matches specialization [with N = 17]","clang/test/SemaTemplate/function-template-specialization.cpp:19:34: note: function template \'f1<int, 17>\' matches specialization [with T = int, N = 17]"} | ||
Line 4,977: | Line 4,989: | ||
}, | }, | ||
["note_function_to_function_call"]={ | ["note_function_to_function_call"]={ | ||
[ | [b]="suffix with parentheses to turn this into a function call", | ||
[ | [d]=c, | ||
[ | [e]="suffix with parentheses to turn this into a function call", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3bb8b56a5d90",1393382166,"PR16074, implement warnings to catch pointer to boolean true and pointer to","PR16074, implement warnings to catch pointer to boolean true and pointer to\nnull comparison when the pointer is known to be non-null.\n\nThis catches the array to pointer decay, function to pointer decay and\naddress of variables. This does not catch address of function since this\nhas been previously used to silence a warning.\n\nPointer to bool conversion is under -Wbool-conversion.\nPointer to null comparison is under -Wtautological-pointer-compare, a sub-group\nof -Wtautological-compare.\n\nvoid foo() {\n int arr[5];\n int x;\n // warn on these conditionals\n if (foo);\n if (arr);\n if (&x);\n if (foo == null);\n if (arr == null);\n if (&x == null);\n\n if (&foo); // no warning\n}\n\nllvm-svn: 202216"}, | [h]={"3bb8b56a5d90",1393382166,"PR16074, implement warnings to catch pointer to boolean true and pointer to","PR16074, implement warnings to catch pointer to boolean true and pointer to\nnull comparison when the pointer is known to be non-null.\n\nThis catches the array to pointer decay, function to pointer decay and\naddress of variables. This does not catch address of function since this\nhas been previously used to silence a warning.\n\nPointer to bool conversion is under -Wbool-conversion.\nPointer to null comparison is under -Wtautological-pointer-compare, a sub-group\nof -Wtautological-compare.\n\nvoid foo() {\n int arr[5];\n int x;\n // warn on these conditionals\n if (foo);\n if (arr);\n if (&x);\n if (foo == null);\n if (arr == null);\n if (&x == null);\n\n if (&foo); // no warning\n}\n\nllvm-svn: 202216"}, | ||
[i]={{ | [i]={{C,15621,"/// 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 Diag(E->getExprLoc(), diag::note_function_to_function_call) << FixItHint::CreateInsertion(getLocForEndOfToken(E->getEndLoc()), \"()\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-tautological-compare.cpp"]={"clang/test/SemaCXX/warn-tautological-compare.cpp:82:9: note: suffix with parentheses to turn this into a function call","clang/test/SemaCXX/warn-tautological-compare.cpp:86:9: note: suffix with parentheses to turn this into a function call","clang/test/SemaCXX/warn-tautological-compare.cpp:99:20: note: suffix with parentheses to turn this into a function call","clang/test/SemaCXX/warn-tautological-compare.cpp:106:9: note: suffix with parentheses to turn this into a function call"} | ["clang/test/SemaCXX/warn-tautological-compare.cpp"]={"clang/test/SemaCXX/warn-tautological-compare.cpp:82:9: note: suffix with parentheses to turn this into a function call","clang/test/SemaCXX/warn-tautological-compare.cpp:86:9: note: suffix with parentheses to turn this into a function call","clang/test/SemaCXX/warn-tautological-compare.cpp:99:20: note: suffix with parentheses to turn this into a function call","clang/test/SemaCXX/warn-tautological-compare.cpp:106:9: note: suffix with parentheses to turn this into a function call"} | ||
Line 4,989: | Line 5,001: | ||
}, | }, | ||
["note_function_warning_silence"]={ | ["note_function_warning_silence"]={ | ||
[ | [b]="prefix with the address-of operator to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="prefix with the address\\-of operator to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"3bb8b56a5d90",1393382166,"PR16074, implement warnings to catch pointer to boolean true and pointer to","PR16074, implement warnings to catch pointer to boolean true and pointer to\nnull comparison when the pointer is known to be non-null.\n\nThis catches the array to pointer decay, function to pointer decay and\naddress of variables. This does not catch address of function since this\nhas been previously used to silence a warning.\n\nPointer to bool conversion is under -Wbool-conversion.\nPointer to null comparison is under -Wtautological-pointer-compare, a sub-group\nof -Wtautological-compare.\n\nvoid foo() {\n int arr[5];\n int x;\n // warn on these conditionals\n if (foo);\n if (arr);\n if (&x);\n if (foo == null);\n if (arr == null);\n if (&x == null);\n\n if (&foo); // no warning\n}\n\nllvm-svn: 202216"}, | [h]={"3bb8b56a5d90",1393382166,"PR16074, implement warnings to catch pointer to boolean true and pointer to","PR16074, implement warnings to catch pointer to boolean true and pointer to\nnull comparison when the pointer is known to be non-null.\n\nThis catches the array to pointer decay, function to pointer decay and\naddress of variables. This does not catch address of function since this\nhas been previously used to silence a warning.\n\nPointer to bool conversion is under -Wbool-conversion.\nPointer to null comparison is under -Wtautological-pointer-compare, a sub-group\nof -Wtautological-compare.\n\nvoid foo() {\n int arr[5];\n int x;\n // warn on these conditionals\n if (foo);\n if (arr);\n if (&x);\n if (foo == null);\n if (arr == null);\n if (&x == null);\n\n if (&foo); // no warning\n}\n\nllvm-svn: 202216"}, | ||
[i]={{ | [i]={{C,15592,"/// 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 Diag(E->getExprLoc(), diag::note_function_warning_silence) << FixItHint::CreateInsertion(E->getBeginLoc(), \"&\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/condition.cpp"]={"clang/test/SemaCXX/condition.cpp:53:7: note: prefix with the address-of operator to silence this warning"} | ["clang/test/SemaCXX/condition.cpp"]={"clang/test/SemaCXX/condition.cpp:53:7: note: prefix with the address-of operator to silence this warning"} | ||
Line 5,001: | Line 5,013: | ||
}, | }, | ||
["note_getter_unavailable"]={ | ["note_getter_unavailable"]={ | ||
[ | [b]="or because setter is declared here, but no getter method %0 is found", | ||
[ | [d]=c, | ||
[ | [e]="or because setter is declared here, but no getter method (.*?) is found", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"c5d61df0a96e",1266604230,"Issue extended diagnostic when property dot-syntax is used and ","Issue extended diagnostic when property dot-syntax is used and \nthere is a setter but no getter (part of radar 7664555).\n\nllvm-svn: 96687"}, | [h]={"c5d61df0a96e",1266604230,"Issue extended diagnostic when property dot-syntax is used and ","Issue extended diagnostic when property dot-syntax is used and \nthere is a setter but no getter (part of radar 7664555).\n\nllvm-svn: 96687"}, | ||
[i]={{ | [i]={{p,2152,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (Setter)\n Diag(Setter->getLocation(), diag::note_getter_unavailable) << MemberName << BaseExpr->getSourceRange();"}} | ||
}, | }, | ||
["note_global_module_introducer_missing"]={ | ["note_global_module_introducer_missing"]={ | ||
[ | [b]={{nil,r,"add \'module;\' to the start of the file to introduce a global module fragment"}}, | ||
[ | [d]=c, | ||
[ | [e]="add \'module;\' to the start of the file to introduce a global module fragment", | ||
[ | [f]=a, | ||
[ | [g]=Vc, | ||
[h]={"d652bdd05f1c",1555229219,"[c++20] Parsing support for module-declarations, import-declarations,","[c++20] Parsing support for module-declarations, import-declarations,\nand the global and private module fragment.\n\nFor now, the private module fragment introducer is ignored, but use of\nthe global module fragment introducer should be properly enforced.\n\nllvm-svn: 358353"}, | [h]={"d652bdd05f1c",1555229219,"[c++20] Parsing support for module-declarations, import-declarations,","[c++20] Parsing support for module-declarations, import-declarations,\nand the global and private module fragment.\n\nFor now, the private module fragment introducer is ignored, but use of\nthe global module fragment introducer should be properly enforced.\n\nllvm-svn: 358353"}, | ||
[i]={{ | [i]={{xb,255,"Sema::DeclGroupPtrTy Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState) {\n // ...\n // In C++20, the module-declaration must be the first declaration if there\n // is no global module fragment.\n if (getLangOpts().CPlusPlusModules && !IsFirstDecl && !SeenGMF) {\n // ...\n if (BeginLoc.isValid()) {\n Diag(BeginLoc, diag::note_global_module_introducer_missing) << FixItHint::CreateInsertion(BeginLoc, \"module;\\n\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.link/p1.cpp"]={"clang/test/CXX/basic/basic.link/p1.cpp:1:1: note: add \'module;\' to the start of the file to introduce a global module fragment"} | ["clang/test/CXX/basic/basic.link/p1.cpp"]={"clang/test/CXX/basic/basic.link/p1.cpp:1:1: note: add \'module;\' to the start of the file to introduce a global module fragment"} | ||
Line 5,022: | Line 5,034: | ||
}, | }, | ||
["note_goto_ms_asm_label"]={ | ["note_goto_ms_asm_label"]={ | ||
[ | [b]="inline assembly label %0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="inline assembly label (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"31097581aad8",1411352514,"ms-inline-asm: Scope inline asm labels to functions","ms-inline-asm: Scope inline asm labels to functions\n\nSummary:\nThis fixes PR20023. In order to implement this scoping rule, we piggy\nback on the existing LabelDecl machinery, by creating LabelDecl\'s that\nwill carry the \"internal\" name of the inline assembly label, which we\nwill rewrite the asm label to.\n\nReviewers: rnk\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4589\n\nllvm-svn: 218230"}, | [h]={"31097581aad8",1411352514,"ms-inline-asm: Scope inline asm labels to functions","ms-inline-asm: Scope inline asm labels to functions\n\nSummary:\nThis fixes PR20023. In order to implement this scoping rule, we piggy\nback on the existing LabelDecl machinery, by creating LabelDecl\'s that\nwill carry the \"internal\" name of the inline assembly label, which we\nwill rewrite the asm label to.\n\nReviewers: rnk\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D4589\n\nllvm-svn: 218230"}, | ||
[i]={{ | [i]={{y,997,"void JumpScopeChecker::CheckGotoStmt(GotoStmt *GS) {\n if (GS->getLabel()->isMSAsmLabel()) {\n // ...\n S.Diag(GS->getLabel()->getLocation(), diag::note_goto_ms_asm_label) << GS->getLabel()->getIdentifier();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/ms-inline-asm.c"]={"clang/test/Sema/ms-inline-asm.c:115:5: note: inline assembly label \'foo\' declared here","clang/test/Sema/ms-inline-asm.c:122:9: note: inline assembly label \'foo\' declared here","clang/test/Sema/ms-inline-asm.c:130:5: note: inline assembly label \'foo\' declared here","clang/test/Sema/ms-inline-asm.c:137:9: note: inline assembly label \'foo\' declared here"} | ["clang/test/Sema/ms-inline-asm.c"]={"clang/test/Sema/ms-inline-asm.c:115:5: note: inline assembly label \'foo\' declared here","clang/test/Sema/ms-inline-asm.c:122:9: note: inline assembly label \'foo\' declared here","clang/test/Sema/ms-inline-asm.c:130:5: note: inline assembly label \'foo\' declared here","clang/test/Sema/ms-inline-asm.c:137:9: note: inline assembly label \'foo\' declared here"} | ||
Line 5,034: | Line 5,046: | ||
}, | }, | ||
["note_guarded_by_declared_here"]={ | ["note_guarded_by_declared_here"]={ | ||
[ | [b]={{nil,M,"guarded_by declared here"},{I,nil,"Guarded_by declared here."}}, | ||
[ | [d]=c, | ||
[ | [e]="guarded_by declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"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"}, | [h]={"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"}, | ||
[i]={{ | [i]={{lb,1983,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexNotHeld(StringRef Kind, const NamedDecl *D, ProtectedOperationKind POK, Name LockName, LockKind LK, SourceLocation Loc, Name *PossibleMatch) override {\n // ...\n if (PossibleMatch) {\n // ...\n if (Verbose && POK == POK_VarAccess) {\n PartialDiagnosticAt VNote(D->getLocation(), S.PDiag(diag::note_guarded_by_declared_here) << D->getDeclName());"},{lb,2011,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleMutexNotHeld(StringRef Kind, const NamedDecl *D, ProtectedOperationKind POK, Name LockName, LockKind LK, SourceLocation Loc, Name *PossibleMatch) override {\n // ...\n if (PossibleMatch) {\n // ...\n } else {\n // ...\n if (Verbose && POK == POK_VarAccess) {\n PartialDiagnosticAt Note(D->getLocation(), S.PDiag(diag::note_guarded_by_declared_here));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-thread-safety-verbose.cpp"]={"clang/test/SemaCXX/warn-thread-safety-verbose.cpp:24:7: note: guarded_by declared here","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:24:7: note: guarded_by declared here","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:24:7: note: guarded_by declared here"} | ["clang/test/SemaCXX/warn-thread-safety-verbose.cpp"]={"clang/test/SemaCXX/warn-thread-safety-verbose.cpp:24:7: note: guarded_by declared here","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:24:7: note: guarded_by declared here","clang/test/SemaCXX/warn-thread-safety-verbose.cpp:24:7: note: guarded_by declared here"} | ||
Line 5,046: | Line 5,058: | ||
}, | }, | ||
["note_header_guard"]={ | ["note_header_guard"]={ | ||
[ | [b]="%0 is defined here; did you mean %1?", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is defined here; did you mean (.*?)\\?", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"33a4b3db0de5",1371072057,"Introducing -Wheader-guard, a warning that checks header guards actually work","Introducing -Wheader-guard, a warning that checks header guards actually work\nproperly. This warning checks that the #ifndef and #define directives at\nthe beginning of a header refer to the same macro name. Includes a fix-it\nhint to correct the header guard.\n\nllvm-svn: 183867"}, | [h]={"33a4b3db0de5",1371072057,"Introducing -Wheader-guard, a warning that checks header guards actually work","Introducing -Wheader-guard, a warning that checks header guards actually work\nproperly. This warning checks that the #ifndef and #define directives at\nthe beginning of a header refer to the same macro name. Includes a fix-it\nhint to correct the header guard.\n\nllvm-svn: 183867"}, | ||
[i]={{"clang/lib/Lex/PPLexerChange.cpp",399,"/// 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 // See if this file had a controlling macro.\n if (CurPPLexer) { // Not ending a macro, ignore it.\n if (const IdentifierInfo *ControllingMacro = CurPPLexer->MIOpt.GetControllingMacroAtEndOfFile()) {\n // Okay, this has a controlling macro, remember in HeaderFileInfo.\n if (const FileEntry *FE = CurPPLexer->getFileEntry()) {\n // ...\n if (const IdentifierInfo *DefinedMacro = CurPPLexer->MIOpt.GetDefinedMacro()) {\n if (!isMacroDefined(ControllingMacro) && DefinedMacro != ControllingMacro && CurLexer->isFirstTimeLexingFile()) {\n // ...\n if (ED <= MaxHalfLength) {\n // ...\n Diag(CurPPLexer->MIOpt.GetDefinedLocation(), diag::note_header_guard) << CurPPLexer->MIOpt.GetDefinedLocation() << DefinedMacro << ControllingMacro << FixItHint::CreateReplacement(CurPPLexer->MIOpt.GetDefinedLocation(), ControllingMacro->getName());"}}, | [i]={{"clang/lib/Lex/PPLexerChange.cpp",399,"/// 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 // See if this file had a controlling macro.\n if (CurPPLexer) { // Not ending a macro, ignore it.\n if (const IdentifierInfo *ControllingMacro = CurPPLexer->MIOpt.GetControllingMacroAtEndOfFile()) {\n // Okay, this has a controlling macro, remember in HeaderFileInfo.\n if (const FileEntry *FE = CurPPLexer->getFileEntry()) {\n // ...\n if (const IdentifierInfo *DefinedMacro = CurPPLexer->MIOpt.GetDefinedMacro()) {\n if (!isMacroDefined(ControllingMacro) && DefinedMacro != ControllingMacro && CurLexer->isFirstTimeLexingFile()) {\n // ...\n if (ED <= MaxHalfLength) {\n // ...\n Diag(CurPPLexer->MIOpt.GetDefinedLocation(), diag::note_header_guard) << CurPPLexer->MIOpt.GetDefinedLocation() << DefinedMacro << ControllingMacro << FixItHint::CreateReplacement(CurPPLexer->MIOpt.GetDefinedLocation(), ControllingMacro->getName());"}}, | ||
Line 5,058: | Line 5,070: | ||
}, | }, | ||
["note_hidden_overloaded_virtual_declared_here"]={ | ["note_hidden_overloaded_virtual_declared_here"]={ | ||
[ | [b]={{nil,z,"hidden overloaded virtual function %q0 declared here%select{|: different classes%diff{ ($ vs $)|}2,3|: different number of parameters (%2 vs %3)|: type mismatch at %ordinal2 parameter%diff{ ($ vs $)|}3,4|: different return type%diff{ ($ vs $)|}2,3|: different qualifiers (%2 vs %3)|: different exception specifications}1"},{"7.1",nil,"hidden overloaded virtual function %q0 declared here%select{|: different classes%diff{ ($ vs $)|}2,3|: different number of parameters (%2 vs %3)|: type mismatch at %ordinal2 parameter%diff{ ($ vs $)|}3,4|: different return type%diff{ ($ vs $)|}2,3|: different qualifiers (%select{none|const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict}2 vs %select{none|const|restrict|const and restrict|volatile|const and volatile|volatile and restrict|const, volatile, and restrict}3)|: different exception specifications}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="hidden overloaded virtual function (.*?) declared here(?:|\\: different classes(?: \\((.*?) vs (.*?)\\)|)|\\: different number of parameters \\((.*?) vs (.*?)\\)|\\: type mismatch at (.*?) parameter(?: \\((.*?) vs (.*?)\\)|)|\\: different return type(?: \\((.*?) vs (.*?)\\)|)|\\: different qualifiers \\((.*?) vs (.*?)\\)|\\: different exception specifications)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7272d9cf36cd",1296756075,"Implement -Woverloaded-virtual.","Implement -Woverloaded-virtual.\n\nThe difference with gcc is that it warns if you overload virtual methods only if\nthe method doesn\'t also override any method. This is to cut down on the number of warnings\nand make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.\nIf we want to warn that not all overloads are overriden we can have an additional\nwarning like -Wpartial-override.\n\n-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.\n\nllvm-svn: 124805"}, | [h]={"7272d9cf36cd",1296756075,"Implement -Woverloaded-virtual.","Implement -Woverloaded-virtual.\n\nThe difference with gcc is that it warns if you overload virtual methods only if\nthe method doesn\'t also override any method. This is to cut down on the number of warnings\nand make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.\nIf we want to warn that not all overloads are overriden we can have an additional\nwarning like -Wpartial-override.\n\n-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.\n\nllvm-svn: 124805"}, | ||
[i]={{m,10272,"void Sema::NoteHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl<CXXMethodDecl *> &OverloadedMethods) {\n for (unsigned i = 0, e = OverloadedMethods.size(); i != e; ++i) {\n // ...\n PartialDiagnostic PD = PDiag(diag::note_hidden_overloaded_virtual_declared_here) << overloadedMD;"}}, | [i]={{m,10272,"void Sema::NoteHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl<CXXMethodDecl *> &OverloadedMethods) {\n for (unsigned i = 0, e = OverloadedMethods.size(); i != e; ++i) {\n // ...\n PartialDiagnostic PD = PDiag(diag::note_hidden_overloaded_virtual_declared_here) << overloadedMD;"}}, | ||
Line 5,070: | Line 5,082: | ||
}, | }, | ||
["note_hidden_tag"]={ | ["note_hidden_tag"]={ | ||
[ | [b]="type declaration hidden", | ||
[ | [d]=c, | ||
[ | [e]="type declaration hidden", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6538c930503a",1255153699,"Qualified lookup through using declarations. Diagnose a new type of ambiguity.","Qualified lookup through using declarations. Diagnose a new type of ambiguity.\nSplit the various ambiguous result enumerators into their own enum. Tests\nfor most of C++ [namespace.qual].\n\nllvm-svn: 83700"}, | [h]={"6538c930503a",1255153699,"Qualified lookup through using declarations. Diagnose a new type of ambiguity.","Qualified lookup through using declarations. Diagnose a new type of ambiguity.\nSplit the various ambiguous result enumerators into their own enum. Tests\nfor most of C++ [namespace.qual].\n\nllvm-svn: 83700"}, | ||
[i]={{ | [i]={{lc,2845,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousTagHiding: {\n // ...\n for (auto *D : Result)\n if (TagDecl *TD = dyn_cast<TagDecl>(D)) {\n // ...\n Diag(TD->getLocation(), diag::note_hidden_tag);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:7:10: note: type declaration hidden"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:7:10: note: type declaration hidden"} | ||
Line 5,082: | Line 5,094: | ||
}, | }, | ||
["note_hiding_object"]={ | ["note_hiding_object"]={ | ||
[ | [b]="declaration hides type", | ||
[ | [d]=c, | ||
[ | [e]="declaration hides type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6538c930503a",1255153699,"Qualified lookup through using declarations. Diagnose a new type of ambiguity.","Qualified lookup through using declarations. Diagnose a new type of ambiguity.\nSplit the various ambiguous result enumerators into their own enum. Tests\nfor most of C++ [namespace.qual].\n\nllvm-svn: 83700"}, | [h]={"6538c930503a",1255153699,"Qualified lookup through using declarations. Diagnose a new type of ambiguity.","Qualified lookup through using declarations. Diagnose a new type of ambiguity.\nSplit the various ambiguous result enumerators into their own enum. Tests\nfor most of C++ [namespace.qual].\n\nllvm-svn: 83700"}, | ||
[i]={{ | [i]={{lc,2850,"/// Produce a diagnostic describing the ambiguity that resulted\n/// from name lookup.\n///\n/// \\param Result The result of the ambiguous lookup to be diagnosed.\nvoid Sema::DiagnoseAmbiguousLookup(LookupResult &Result) {\n // ...\n case LookupResult::AmbiguousTagHiding: {\n // ...\n for (auto *D : Result)\n if (!isa<TagDecl>(D))\n Diag(D->getLocation(), diag::note_hiding_object);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:17:9: note: declaration hides type"} | ["clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p5.cpp:17:9: note: declaration hides type"} | ||
Line 5,094: | Line 5,106: | ||
}, | }, | ||
["note_ice_conversion_here"]={ | ["note_ice_conversion_here"]={ | ||
[ | [b]="conversion to %select{integral|enumeration}0 type %1 declared here", | ||
[ | [d]=c, | ||
[ | [e]="conversion to (?:integral|enumeration) type (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"f4c51d9d7613",1328349193,"In C++11 mode, when an integral constant expression is desired and we have a","In C++11 mode, when an integral constant expression is desired and we have a\nvalue of class type, look for a unique conversion operator converting to\nintegral or unscoped enumeration type and use that. Implements [expr.const]p5.\n\nSema::VerifyIntegerConstantExpression now performs the conversion and returns\nthe converted result. Some important callers of Expr::isIntegralConstantExpr\nhave been switched over to using it (including all of those required for C++11\nconformance); this switch brings a side-benefit of improved diagnostics and, in\nseveral cases, simpler code. However, some language extensions and attributes\nhave not been moved across and will not perform implicit conversions on\nconstant expressions of literal class type where an ICE is required.\n\nIn passing, fix static_assert to perform a contextual conversion to bool on its\nargument.\n\nllvm-svn: 149776"}, | [h]={"f4c51d9d7613",1328349193,"In C++11 mode, when an integral constant expression is desired and we have a","In C++11 mode, when an integral constant expression is desired and we have a\nvalue of class type, look for a unique conversion operator converting to\nintegral or unscoped enumeration type and use that. Implements [expr.const]p5.\n\nSema::VerifyIntegerConstantExpression now performs the conversion and returns\nthe converted result. Some important callers of Expr::isIntegralConstantExpr\nhave been switched over to using it (including all of those required for C++11\nconformance); this switch brings a side-benefit of improved diagnostics and, in\nseveral cases, simpler code. However, some language extensions and attributes\nhave not been moved across and will not perform implicit conversions on\nconstant expressions of literal class type where an ICE is required.\n\nIn passing, fix static_assert to perform a contextual conversion to bool on its\nargument.\n\nllvm-svn: 149776"}, | ||
[i]={{ | [i]={{o,17877,"ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold) {\n // ...\n if (getLangOpts().CPlusPlus11) {\n // ...\n class CXX11ConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_ice_conversion_here) << ConvTy->isEnumeralType() << ConvTy; }"},{o,17950,"ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold) {\n // ...\n if (getLangOpts().CPlusPlus11) {\n // ...\n class CXX11ConvertDiagnoser : public ICEConvertDiagnoser {\n // ...\n SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) override { return S.Diag(Conv->getLocation(), diag::note_ice_conversion_here) << ConvTy->isEnumeralType() << ConvTy; }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.const/p5-0x.cpp"]={"clang/test/CXX/expr/expr.const/p5-0x.cpp:10:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:11:13: note: conversion to integral type \'long\' declared here", | ["clang/test/CXX/expr/expr.const/p5-0x.cpp"]={"clang/test/CXX/expr/expr.const/p5-0x.cpp:10:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:11:13: note: conversion to integral type \'long\' declared here",nd,sd,ud,nd,sd,ud,nd,sd,ud,nd,sd,ud,nd,sd,ud} | ||
} | } | ||
}, | }, | ||
["note_illegal_field_declared_here"]={ | ["note_illegal_field_declared_here"]={ | ||
[ | [b]="field of illegal %select{type|pointer type}0 %1 declared here", | ||
[ | [d]=c, | ||
[ | [e]="field of illegal (?:type|pointer type) (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL","Error on more illegal kernel argument types for OpenCL\n\nbool, half, pointers and structs / unions containing any\nof these are not allowed. Does not yet reject size_t and\nrelated integer types that are also disallowed.\n\nllvm-svn: 186908"}, | [h]={"efb38192b0b2",1374542616,"Error on more illegal kernel argument types for OpenCL","Error on more illegal kernel argument types for OpenCL\n\nbool, half, pointers and structs / unions containing any\nof these are not allowed. Does not yet reject size_t and\nrelated integer types that are also disallowed.\n\nllvm-svn: 186908"}, | ||
[i]={{ | [i]={{q,9599,"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(FD->getLocation(), diag::note_illegal_field_declared_here) << QT->isPointerType() << QT;"},{"clang/lib/Sema/SemaSYCL.cpp",63,"void Sema::deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet<QualType> Visited, ValueDecl *DeclToCheck) {\n // ...\n auto Check = [&](QualType TypeToCheck, const ValueDecl *D) {\n // ...\n // Checks for other types can also be done here.\n if (ErrorFound) {\n if (NeedToEmitNotes) {\n if (auto *FD = dyn_cast<FieldDecl>(D))\n SYCLDiagIfDeviceCode(FD->getLocation(), diag::note_illegal_field_declared_here) << FD->getType()->isPointerType() << FD->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaSYCL/zero-length-arrays.cpp"]={"clang/test/SemaSYCL/zero-length-arrays.cpp:72:11: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:77:26: note: field of illegal type \'int[0]\' declared here", | ["clang/test/SemaSYCL/zero-length-arrays.cpp"]={"clang/test/SemaSYCL/zero-length-arrays.cpp:72:11: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:77:26: note: field of illegal type \'int[0]\' declared here",ld,ld,gc,gc,gc,gc,"clang/test/SemaSYCL/zero-length-arrays.cpp:36:7: note: field of illegal type \'int[0]\' declared here",ld,"clang/test/SemaSYCL/zero-length-arrays.cpp:16:7: note: field of illegal type \'int[0]\' declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:16:7: note: field of illegal type \'int[0]\' declared here",ld,gc,gc,gc,gc,"clang/test/SemaSYCL/zero-length-arrays.cpp:16:7: note: field of illegal type \'int[0]\' declared here",ld} | ||
} | } | ||
}, | }, | ||
["note_immediate_function_reason"]={ | ["note_immediate_function_reason"]={ | ||
[ | [b]="%0 is an immediate %select{function|constructor}5 because %select{its body|the%select{| default}7 initializer of %8}6 %select{evaluates the address of %select{an immediate|a consteval}2 function %1|contains a call to %select{an immediate|a consteval}2 %select{function|constructor}4 %1 and that call is not a constant expression}3", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is an immediate (?:function|constructor) because (?:its body|the(?:| default) initializer of (.*?)) (?:evaluates the address of (?:an immediate|a consteval) function (.*?)|contains a call to (?:an immediate|a consteval) (?:function|constructor) (.*?) and that call is not a constant expression)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{m,2492,"void Sema::DiagnoseImmediateEscalatingReason(FunctionDecl *FD) {\n // ...\n struct ImmediateEscalatingExpressionsVisitor : public RecursiveASTVisitor<ImmediateEscalatingExpressionsVisitor> {\n // ...\n void Diag(const Expr *E, const FunctionDecl *Fn, bool IsCall) {\n // ...\n SemaRef.Diag(Loc, diag::note_immediate_function_reason) << ImmediateFn << Fn << Fn->isConsteval() << IsCall << isa<CXXConstructorDecl>(Fn) << ImmediateFnIsConstructor << (CurrentInit != nullptr) << (CurrentInit && !CurrentInit->isWritten()) << (CurrentInit ? CurrentInit->getAnyMember() : nullptr) << Range;"}}, | [i]={{m,2492,"void Sema::DiagnoseImmediateEscalatingReason(FunctionDecl *FD) {\n // ...\n struct ImmediateEscalatingExpressionsVisitor : public RecursiveASTVisitor<ImmediateEscalatingExpressionsVisitor> {\n // ...\n void Diag(const Expr *E, const FunctionDecl *Fn, bool IsCall) {\n // ...\n SemaRef.Diag(Loc, diag::note_immediate_function_reason) << ImmediateFn << Fn << Fn->isConsteval() << IsCall << isa<CXXConstructorDecl>(Fn) << ImmediateFnIsConstructor << (CurrentInit != nullptr) << (CurrentInit && !CurrentInit->isWritten()) << (CurrentInit ? CurrentInit->getAnyMember() : nullptr) << Range;"}}, | ||
[j]={ | [j]={ | ||
Line 5,130: | Line 5,142: | ||
}, | }, | ||
["note_implementation_declared"]={ | ["note_implementation_declared"]={ | ||
[ | [b]="class implementation is declared here", | ||
[ | [d]=c, | ||
[ | [e]="class implementation is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e16cdb407a3f",1270241585,"diagnose declaring class extension after its implementation","diagnose declaring class extension after its implementation\n(radar 7822210).\n\nllvm-svn: 100226"}, | [h]={"e16cdb407a3f",1270241585,"diagnose declaring class extension after its implementation","diagnose declaring class extension after its implementation\n(radar 7822210).\n\nllvm-svn: 100226"}, | ||
[i]={{ | [i]={{P,1853,"ObjCCategoryDecl *Sema::ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList) {\n // ...\n if (!CategoryName && IDecl->getImplementation()) {\n // ...\n Diag(IDecl->getImplementation()->getLocation(), diag::note_implementation_declared);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/class-extension-after-implementation.m"]={"clang/test/SemaObjC/class-extension-after-implementation.m:6:17: note: class implementation is declared here"} | ["clang/test/SemaObjC/class-extension-after-implementation.m"]={"clang/test/SemaObjC/class-extension-after-implementation.m:6:17: note: class implementation is declared here"} | ||
Line 5,142: | Line 5,154: | ||
}, | }, | ||
["note_implemented_by_class"]={ | ["note_implemented_by_class"]={ | ||
[ | [b]="when implemented by class %0", | ||
[ | [d]=c, | ||
[ | [e]="when implemented by class (.*?)", | ||
[ | [f]=a, | ||
[ | [g]="ARC Weak References", | ||
[h]={"6a41337132b6",1366830785,"Objective-C arc: Improve disgnostics when \'weak\'","Objective-C arc: Improve disgnostics when \'weak\'\nproperty cannot be synthesized because its backing\nivar does not support weak references.\n// rdar://13676793\n\nllvm-svn: 180211"}, | [h]={"6a41337132b6",1366830785,"Objective-C arc: Improve disgnostics when \'weak\'","Objective-C arc: Improve disgnostics when \'weak\'\nproperty cannot be synthesized because its backing\nivar does not support weak references.\n// rdar://13676793\n\nllvm-svn: 180211"}, | ||
[i]={{ | [i]={{cb,1267,"/// 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 // ...\n } else {\n // ...\n if (const ObjCObjectPointerType *ObjT = PropertyIvarType->getAs<ObjCObjectPointerType>()) {\n // ...\n if (ObjI && ObjI->isArcWeakrefUnavailable()) {\n // ...\n Diag(ClassImpDecl->getLocation(), diag::note_implemented_by_class) << ClassImpDecl->getName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-unavailable-for-weakref.m"]={"clang/test/SemaObjC/arc-unavailable-for-weakref.m:63:17: note: when implemented by class I","clang/test/SemaObjC/arc-unavailable-for-weakref.m:75:17: note: when implemented by class I1","clang/test/SemaObjC/arc-unavailable-for-weakref.m:87:17: note: when implemented by class I2"} | ["clang/test/SemaObjC/arc-unavailable-for-weakref.m"]={"clang/test/SemaObjC/arc-unavailable-for-weakref.m:63:17: note: when implemented by class I","clang/test/SemaObjC/arc-unavailable-for-weakref.m:75:17: note: when implemented by class I1","clang/test/SemaObjC/arc-unavailable-for-weakref.m:87:17: note: when implemented by class I2"} | ||
Line 5,154: | Line 5,166: | ||
}, | }, | ||
["note_implicit_delete_this_in_destructor_here"]={ | ["note_implicit_delete_this_in_destructor_here"]={ | ||
[ | [b]={{nil,V,"while checking implicit \'delete this\' for virtual destructor"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking implicit \'delete this\' for virtual destructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5b34958b46dc",1507859736,"Support for destroying operator delete, per C++2a proposal P0722.","Support for destroying operator delete, per C++2a proposal P0722.\n\nThis feature is not (yet) approved by the C++ committee, so this is liable to\nbe reverted or significantly modified based on committee feedback.\n\nNo functionality change intended for existing code (a new type must be defined\nin namespace std to take advantage of this feature).\n\nllvm-svn: 315662"}, | [h]={"5b34958b46dc",1507859736,"Support for destroying operator delete, per C++2a proposal P0722.","Support for destroying operator delete, per C++2a proposal P0722.\n\nThis feature is not (yet) approved by the C++ committee, so this is liable to\nbe reverted or significantly modified based on committee feedback.\n\nNo functionality change intended for existing code (a new type must be defined\nin namespace std to take advantage of this feature).\n\nllvm-svn: 315662"}, | ||
[i]={{m,10838,"/// CheckDestructor - Checks a fully-formed destructor definition for\n/// well-formedness, issuing any diagnostics required. Returns true\n/// on error.\nbool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {\n // ...\n if (!Destructor->getOperatorDelete() && Destructor->isVirtual()) {\n // ...\n // If we have a virtual destructor, look up the deallocation function\n if (FunctionDecl *OperatorDelete = FindDeallocationFunctionForDestructor(Loc, RD)) {\n // ...\n // If the notional \'delete this\' expression requires a non-trivial\n // conversion from \'this\' to the type of a destroying operator delete\'s\n // first parameter, perform that conversion now.\n if (OperatorDelete->isDestroyingOperatorDelete()) {\n // ...\n if (!declaresSameEntity(ParamType->getAsCXXRecordDecl(), RD)) {\n // ...\n if (This.isInvalid()) {\n // ...\n Diag(Loc, diag::note_implicit_delete_this_in_destructor_here);"}}, | [i]={{m,10838,"/// CheckDestructor - Checks a fully-formed destructor definition for\n/// well-formedness, issuing any diagnostics required. Returns true\n/// on error.\nbool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {\n // ...\n if (!Destructor->getOperatorDelete() && Destructor->isVirtual()) {\n // ...\n // If we have a virtual destructor, look up the deallocation function\n if (FunctionDecl *OperatorDelete = FindDeallocationFunctionForDestructor(Loc, RD)) {\n // ...\n // If the notional \'delete this\' expression requires a non-trivial\n // conversion from \'this\' to the type of a destroying operator delete\'s\n // first parameter, perform that conversion now.\n if (OperatorDelete->isDestroyingOperatorDelete()) {\n // ...\n if (!declaresSameEntity(ParamType->getAsCXXRecordDecl(), RD)) {\n // ...\n if (This.isInvalid()) {\n // ...\n Diag(Loc, diag::note_implicit_delete_this_in_destructor_here);"}}, | ||
Line 5,166: | Line 5,178: | ||
}, | }, | ||
["note_implicit_member_target_infer_collision"]={ | ["note_implicit_member_target_infer_collision"]={ | ||
[ | [b]="implicit %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}0 inferred target collision: call to both %select{__device__|__global__|__host__|__host__ __device__}1 and %select{__device__|__global__|__host__|__host__ __device__}2 members", | ||
[ | [d]=c, | ||
[ | [e]="implicit (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) inferred target collision\\: call to both (?:__device__|__global__|__host__|__host__ __device__) and (?:__device__|__global__|__host__|__host__ __device__) members", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"9a220fca4a6f",1412023109,"CUDA: Fix incorrect target inference for implicit members.","CUDA: Fix incorrect target inference for implicit members.\n\nAs PR20495 demonstrates, Clang currenlty infers the CUDA target (host/device,\netc) for implicit members (constructors, etc.) incorrectly. This causes errors\nand even assertions in Clang when compiling code (assertions in C++11 mode where\nimplicit move constructors are added into the mix).\n\nFix the problem by inferring the target from the methods the implicit member\nshould call (depending on its base classes and fields).\n\nllvm-svn: 218624"}, | [h]={"9a220fca4a6f",1412023109,"CUDA: Fix incorrect target inference for implicit members.","CUDA: Fix incorrect target inference for implicit members.\n\nAs PR20495 demonstrates, Clang currenlty infers the CUDA target (host/device,\netc) for implicit members (constructors, etc.) incorrectly. This causes errors\nand even assertions in Clang when compiling code (assertions in C++11 mode where\nimplicit move constructors are added into the mix).\n\nFix the problem by inferring the target from the methods the implicit member\nshould call (depending on its base classes and fields).\n\nllvm-svn: 218624"}, | ||
[i]={{"clang/lib/Sema/SemaCUDA.cpp",389,"bool Sema::inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose) {\n // ...\n for (const auto *B : Bases) {\n // ...\n if (!InferredTarget) {\n // ...\n } else {\n // ...\n if (ResolutionError) {\n if (Diagnose) {\n Diag(ClassDecl->getLocation(), diag::note_implicit_member_target_infer_collision) << (unsigned)CSM << *InferredTarget << BaseMethodTarget;"},{"clang/lib/Sema/SemaCUDA.cpp",432,"bool Sema::inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose) {\n // ...\n // Same as for bases, but now for special members of fields.\n for (const auto *F : ClassDecl->fields()) {\n // ...\n if (!InferredTarget) {\n // ...\n } else {\n // ...\n if (ResolutionError) {\n if (Diagnose) {\n Diag(ClassDecl->getLocation(), diag::note_implicit_member_target_infer_collision) << (unsigned)CSM << *InferredTarget << FieldMethodTarget;"}}, | [i]={{"clang/lib/Sema/SemaCUDA.cpp",389,"bool Sema::inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose) {\n // ...\n for (const auto *B : Bases) {\n // ...\n if (!InferredTarget) {\n // ...\n } else {\n // ...\n if (ResolutionError) {\n if (Diagnose) {\n Diag(ClassDecl->getLocation(), diag::note_implicit_member_target_infer_collision) << (unsigned)CSM << *InferredTarget << BaseMethodTarget;"},{"clang/lib/Sema/SemaCUDA.cpp",432,"bool Sema::inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose) {\n // ...\n // Same as for bases, but now for special members of fields.\n for (const auto *F : ClassDecl->fields()) {\n // ...\n if (!InferredTarget) {\n // ...\n } else {\n // ...\n if (ResolutionError) {\n if (Diagnose) {\n Diag(ClassDecl->getLocation(), diag::note_implicit_member_target_infer_collision) << (unsigned)CSM << *InferredTarget << FieldMethodTarget;"}}, | ||
Line 5,178: | Line 5,190: | ||
}, | }, | ||
["note_implicit_param_decl"]={ | ["note_implicit_param_decl"]={ | ||
[ | [b]="%0 is an implicit parameter", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is an implicit parameter", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"c6ebda167f52",1361482844,"Teach serialized diagnostics about notes without locations.","Teach serialized diagnostics about notes without locations.\n\nAlong the way, improve a diagnostic for \"previous declaration here\" for implicit parameters.\n\nFixes <rdar://problem/13211384>.\n\nllvm-svn: 175802"}, | [h]={"c6ebda167f52",1361482844,"Teach serialized diagnostics about notes without locations.","Teach serialized diagnostics about notes without locations.\n\nAlong the way, improve a diagnostic for \"previous declaration here\" for implicit parameters.\n\nFixes <rdar://problem/13211384>.\n\nllvm-svn: 175802"}, | ||
[i]={{ | [i]={{o,2288,"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;"},{o,2505,"/// 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;"}} | ||
}, | }, | ||
["note_implicit_top_level_module_import_here"]={ | ["note_implicit_top_level_module_import_here"]={ | ||
[ | [b]="submodule of top-level module \'%0\' implicitly imported here", | ||
[ | [d]=c, | ||
[ | [e]="submodule of top\\-level module \'(.*?)\' implicitly imported here", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"8b7c0398b6a3",1439829570,"[modules] PR20507: Avoid silent textual inclusion.","[modules] PR20507: Avoid silent textual inclusion.\n\nSummary:\nIf a module was unavailable (either a missing requirement on the module\nbeing imported, or a missing file anywhere in the top-level module (and\nnot dominated by an unsatisfied `requires`)), we would silently treat\ninclusions as textual. This would cause all manner of crazy and\nconfusing errors (and would also silently \"work\" sometimes, making the\nproblem difficult to track down).\n\nI\'m really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(),\nRequirement, MissingHeader)` function; it seems to do too many things at\nonce, but for now I\'ve done things in a sort of awkward way.\n\nThe changes to test/Modules/Inputs/declare-use/module.map\nwere necessitated because the thing that was meant to be tested there\n(introduced in r197805) was predicated on silently falling back to textual\ninclusion, which we no longer do.\n\nThe changes to test/Modules/Inputs/macro-reexport/module.modulemap\nare just an overlooked missing header that seems to have been missing since\nthis code was committed (r213922), which is now caught.\n\nReviewers: rsmith, benlangmuir, djasper\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D10423\n\nllvm-svn: 245228"}, | [h]={"8b7c0398b6a3",1439829570,"[modules] PR20507: Avoid silent textual inclusion.","[modules] PR20507: Avoid silent textual inclusion.\n\nSummary:\nIf a module was unavailable (either a missing requirement on the module\nbeing imported, or a missing file anywhere in the top-level module (and\nnot dominated by an unsatisfied `requires`)), we would silently treat\ninclusions as textual. This would cause all manner of crazy and\nconfusing errors (and would also silently \"work\" sometimes, making the\nproblem difficult to track down).\n\nI\'m really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(),\nRequirement, MissingHeader)` function; it seems to do too many things at\nonce, but for now I\'ve done things in a sort of awkward way.\n\nThe changes to test/Modules/Inputs/declare-use/module.map\nwere necessitated because the thing that was meant to be tested there\n(introduced in r197805) was predicated on silently falling back to textual\ninclusion, which we no longer do.\n\nThe changes to test/Modules/Inputs/macro-reexport/module.modulemap\nare just an overlooked missing header that seems to have been missing since\nthis code was committed (r213922), which is now caught.\n\nReviewers: rsmith, benlangmuir, djasper\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D10423\n\nllvm-svn: 245228"}, | ||
[i]={{"clang/lib/Lex/PPDirectives.cpp",2265,"/// 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 // Determine whether we should try to import the module for this #include, if\n // there is one. Don\'t do so if precompiled module support is disabled or we\n // are processing this module textually (because we\'re building the module).\n if (MaybeTranslateInclude && (UsableHeaderUnit || UsableClangHeaderModule)) {\n // If this include corresponds to a module but that module is\n // unavailable, diagnose the situation and bail out.\n // FIXME: Remove this; loadModule does the same check (but produces\n // slightly worse diagnostics).\n if (checkModuleIsAvailable(getLangOpts(), getTargetInfo(), getDiagnostics(), SuggestedModule.getModule())) {\n Diag(FilenameTok.getLocation(), diag::note_implicit_top_level_module_import_here) << SuggestedModule.getModule()->getTopLevelModuleName();"}}, | [i]={{"clang/lib/Lex/PPDirectives.cpp",2265,"/// 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 // Determine whether we should try to import the module for this #include, if\n // there is one. Don\'t do so if precompiled module support is disabled or we\n // are processing this module textually (because we\'re building the module).\n if (MaybeTranslateInclude && (UsableHeaderUnit || UsableClangHeaderModule)) {\n // If this include corresponds to a module but that module is\n // unavailable, diagnose the situation and bail out.\n // FIXME: Remove this; loadModule does the same check (but produces\n // slightly worse diagnostics).\n if (checkModuleIsAvailable(getLangOpts(), getTargetInfo(), getDiagnostics(), SuggestedModule.getModule())) {\n Diag(FilenameTok.getLocation(), diag::note_implicit_top_level_module_import_here) << SuggestedModule.getModule()->getTopLevelModuleName();"}}, | ||
Line 5,199: | Line 5,211: | ||
}, | }, | ||
["note_implicitly_deleted"]={ | ["note_implicitly_deleted"]={ | ||
[ | [b]="explicitly defaulted function was implicitly deleted here", | ||
[ | [d]=c, | ||
[ | [e]="explicitly defaulted function was implicitly deleted here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6f1e2c6d19a7",1333400365,"Finish PR10217: Ensure we say that a special member was implicitly, not","Finish PR10217: Ensure we say that a special member was implicitly, not\nexplicitly, deleted in all relevant cases, and explain why.\n\nllvm-svn: 153894"}, | [h]={"6f1e2c6d19a7",1333400365,"Finish PR10217: Ensure we say that a special member was implicitly, not","Finish PR10217: Ensure we say that a special member was implicitly, not\nexplicitly, deleted in all relevant cases, and explain why.\n\nllvm-svn: 153894"}, | ||
[i]={{ | [i]={{o,123,"/// Emit a note explaining that this function is deleted.\nvoid Sema::NoteDeletedFunction(FunctionDecl *Decl) {\n // ...\n if (Decl->isDefaulted()) {\n // If the method was explicitly defaulted, point at that declaration.\n if (!Decl->isImplicit())\n Diag(Decl->getLocation(), diag::note_implicitly_deleted);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/dr1301.cpp"]={"clang/test/SemaCXX/dr1301.cpp:20:3: note: explicitly defaulted function was implicitly deleted here"} | ["clang/test/SemaCXX/dr1301.cpp"]={"clang/test/SemaCXX/dr1301.cpp:20:3: note: explicitly defaulted function was implicitly deleted here"} | ||
Line 5,211: | Line 5,223: | ||
}, | }, | ||
["note_imported_by_pch_module_not_found"]={ | ["note_imported_by_pch_module_not_found"]={ | ||
[ | [b]={{nil,V,"consider adding \'%0\' to the header search path"}}, | ||
[ | [d]=c, | ||
[ | [e]="consider adding \'(.*?)\' to the header search path", | ||
[ | [f]=a, | ||
[ | [g]=Kc, | ||
[h]={"a66a325bbc51",1510889051,"[PCH+Modules] Improve diagnosticts to help out users pass an extra header search path","[PCH+Modules] Improve diagnosticts to help out users pass an extra header search path\n\nWhen mixing PCH and Implicit Modules, missing a header search path\ncan lead to the implicit built PCM to complaint about not finding its\nmatching module map.\n\nInstead of adding more magic to implicit modules engine, add a note to\nhelp the user add the appropriate path.\n\nrdar://problem/33388847\n\nllvm-svn: 318503"}, | [h]={"a66a325bbc51",1510889051,"[PCH+Modules] Improve diagnosticts to help out users pass an extra header search path","[PCH+Modules] Improve diagnosticts to help out users pass an extra header search path\n\nWhen mixing PCH and Implicit Modules, missing a header search path\ncan lead to the implicit built PCM to complaint about not finding its\nmatching module map.\n\nInstead of adding more magic to implicit modules engine, add a note to\nhelp the user add the appropriate path.\n\nrdar://problem/33388847\n\nllvm-svn: 318503"}, | ||
[i]={{ | [i]={{Jc,4023,"ASTReader::ASTReadResult ASTReader::ReadModuleMapFileBlock(RecordData &Record, ModuleFile &F, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n if (PP.getPreprocessorOpts().ModulesCheckRelocated && F.Kind == MK_ImplicitModule && ModuleMgr.begin()->Kind != MK_MainFile) {\n // ...\n // Don\'t emit module relocation error if we have -fno-validate-pch\n if (!bool(PP.getPreprocessorOpts().DisablePCHOrModuleValidation & DisableValidationForModuleKind::Module) && !ModMap) {\n if (!canRecoverFromOutOfDate(F.FileName, ClientLoadCapabilities)) {\n if (auto ASTFE = M ? M->getASTFile() : std::nullopt) {\n // ...\n } else {\n // ...\n // In case it was imported by a PCH, there\'s a chance the user is\n // just missing to include the search path to the directory containing\n // the modulemap.\n if (ImportedBy && ImportedBy->Kind == MK_PCH)\n Diag(diag::note_imported_by_pch_module_not_found) << llvm::sys::path::parent_path(F.ModuleMapPath);"}} | ||
}, | }, | ||
["note_in_binding_decl_init"]={ | ["note_in_binding_decl_init"]={ | ||
[ | [b]="in implicit initialization of binding declaration %0", | ||
[ | [d]=c, | ||
[ | [e]="in implicit initialization of binding declaration (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7873de0cf65f",1470954346,"P0217R3: Perform semantic checks and initialization for the bindings in a","P0217R3: Perform semantic checks and initialization for the bindings in a\ndecomposition declaration for arrays, aggregate-like structs, tuple-like\ntypes, and (as an extension) for complex and vector types.\n\nllvm-svn: 278435"}, | [h]={"7873de0cf65f",1470954346,"P0217R3: Perform semantic checks and initialization for the bindings in a","P0217R3: Perform semantic checks and initialization for the bindings in a\ndecomposition declaration for arrays, aggregate-like structs, tuple-like\ntypes, and (as an extension) for complex and vector types.\n\nllvm-svn: 278435"}, | ||
[i]={{ | [i]={{E,997,"/// 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::InitializingStructuredBinding:\n Diags.Report(Active->PointOfInstantiation, diag::note_in_binding_decl_init) << cast<BindingDecl>(Active->Entity);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:29:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:36:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:42:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:48:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:54:13: note: in implicit initialization of binding declaration \'a1\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:154:9: note: in implicit initialization of binding declaration \'d\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:165:9: note: in implicit initialization of binding declaration \'e\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:175:9: note: in implicit initialization of binding declaration \'x\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:208:11: note: in implicit initialization of binding declaration \'a\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:212:11: note: in implicit initialization of binding declaration \'a\'"} | ["clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:29:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:36:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:42:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:48:9: note: in implicit initialization of binding declaration \'a0\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:54:13: note: in implicit initialization of binding declaration \'a1\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:154:9: note: in implicit initialization of binding declaration \'d\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:165:9: note: in implicit initialization of binding declaration \'e\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:175:9: note: in implicit initialization of binding declaration \'x\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:208:11: note: in implicit initialization of binding declaration \'a\'","clang/test/CXX/dcl.decl/dcl.decomp/p3.cpp:212:11: note: in implicit initialization of binding declaration \'a\'"} | ||
Line 5,232: | Line 5,244: | ||
}, | }, | ||
["note_in_class_initializer_float_type_cxx11"]={ | ["note_in_class_initializer_float_type_cxx11"]={ | ||
[ | [b]="add \'constexpr\'", | ||
[ | [d]=c, | ||
[ | [e]="add \'constexpr\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8505c29593fb",1359498368,"Move -Wstatic-float-init fixit into a note & don\'t recover as if constexpr","Move -Wstatic-float-init fixit into a note & don\'t recover as if constexpr\n\nllvm-svn: 173841"}, | [h]={"8505c29593fb",1359498368,"Move -Wstatic-float-init fixit into a note & don\'t recover as if constexpr","Move -Wstatic-float-init fixit into a note & don\'t recover as if constexpr\n\nllvm-svn: 173841"}, | ||
[i]={{ | [i]={{q,13518,"/// AddInitializerToDecl - Adds the initializer Init to the\n/// declaration dcl. If DirectInit is true, this is C++ direct\n/// initialization rather than copy initialization.\nvoid Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {\n // ...\n if (VDecl->isLocalVarDecl()) {\n // ...\n } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && VDecl->getLexicalDeclContext()->isRecord()) {\n // ...\n // Do nothing on dependent types.\n if (DclT->isDependentType()) {\n // ...\n } else if (VDecl->isConstexpr()) {\n // ...\n } else if (!DclT.isConstQualified()) {\n // ...\n } else if (DclT->isIntegralOrEnumerationType()) {\n // ...\n } else if (DclT->isFloatingType()) { // also permits complex, which is ok\n // In C++98, this is a GNU extension. In C++11, it is not, but we support\n // it anyway and provide a fixit to add the \'constexpr\'.\n if (getLangOpts().CPlusPlus11) {\n // ...\n Diag(VDecl->getBeginLoc(), diag::note_in_class_initializer_float_type_cxx11) << FixItHint::CreateInsertion(VDecl->getBeginLoc(), \"constexpr \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:23:5: note: add \'constexpr\'","clang/test/SemaCXX/cxx0x-class.cpp:24:5: note: add \'constexpr\'"} | ["clang/test/SemaCXX/cxx0x-class.cpp"]={"clang/test/SemaCXX/cxx0x-class.cpp:23:5: note: add \'constexpr\'","clang/test/SemaCXX/cxx0x-class.cpp:24:5: note: add \'constexpr\'"} | ||
Line 5,244: | Line 5,256: | ||
}, | }, | ||
["note_in_declaration_of_implicit_equality_comparison"]={ | ["note_in_declaration_of_implicit_equality_comparison"]={ | ||
[ | [b]={{nil,n,"while declaring the corresponding implicit \'operator==\' for this defaulted \'operator<=>\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="while declaring the corresponding implicit \'operator\\=\\=\' for this defaulted \'operator\\<\\=\\>\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | [h]={"fe17b30a7957",1575504770,"[attributes][analyzer] Add annotations for handles.","[attributes][analyzer] Add annotations for handles.\n\nThese annotations will be used in an upcomming static analyzer check\nthat finds handle leaks, use after releases, and double releases.\n\nDifferential Revision: https://reviews.llvm.org/D70469"}, | ||
[i]={{ | [i]={{E,963,"/// 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::DeclaringImplicitEqualityComparison:\n Diags.Report(Active->Entity->getLocation(), diag::note_in_declaration_of_implicit_equality_comparison);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class/class.compare/class.compare.default/p4.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:56:24: note: while declaring the corresponding implicit \'operator==\' for this defaulted \'operator<=>\'"} | ["clang/test/CXX/class/class.compare/class.compare.default/p4.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:56:24: note: while declaring the corresponding implicit \'operator==\' for this defaulted \'operator<=>\'"} | ||
Line 5,256: | Line 5,268: | ||
}, | }, | ||
["note_in_declaration_of_implicit_special_member"]={ | ["note_in_declaration_of_implicit_special_member"]={ | ||
[ | [b]={{nil,U,"while declaring the implicit %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}1 for %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="while declaring the implicit (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) for (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1338122b255e",1487886223,"Add context note to diagnostics that occur while declaring an implicit special member function.","Add context note to diagnostics that occur while declaring an implicit special member function.\n\nllvm-svn: 296020"}, | [h]={"1338122b255e",1487886223,"Add context note to diagnostics that occur while declaring an implicit special member function.","Add context note to diagnostics that occur while declaring an implicit special member function.\n\nllvm-svn: 296020"}, | ||
[i]={{ | [i]={{E,957,"/// 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::DeclaringSpecialMember:\n Diags.Report(Active->PointOfInstantiation, diag::note_in_declaration_of_implicit_special_member) << cast<CXXRecordDecl>(Active->Entity) << Active->SpecialMember;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/implicit-member-functions.cpp"]={"clang/test/SemaCXX/implicit-member-functions.cpp:69:10: note: while declaring the implicit copy constructor for \'B\'"} | ["clang/test/SemaCXX/implicit-member-functions.cpp"]={"clang/test/SemaCXX/implicit-member-functions.cpp:69:10: note: while declaring the implicit copy constructor for \'B\'"} | ||
Line 5,268: | Line 5,280: | ||
}, | }, | ||
["note_in_for_range"]={ | ["note_in_for_range"]={ | ||
[ | [b]="when looking up \'%select{begin|end}0\' function for range expression of type %1", | ||
[ | [d]=c, | ||
[ | [e]="when looking up \'(?:begin|end)\' function for range expression of type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0f38443616f5",1345510321,"Better diagnostics for range-based for loops with bad range types.","Better diagnostics for range-based for loops with bad range types.\n\nThe old error message stating that \'begin\' was an undeclared identifier\nis replaced with a new message explaining that the error is in the range\nexpression, along with which of the begin() and end() functions was\nproblematic if relevant.\n\nAdditionally, if the range was a pointer type or defines operator*,\nattempt to dereference the range, and offer a FixIt if the modified range\nworks.\n\nllvm-svn: 162248"}, | [h]={"0f38443616f5",1345510321,"Better diagnostics for range-based for loops with bad range types.","Better diagnostics for range-based for loops with bad range types.\n\nThe old error message stating that \'begin\' was an undeclared identifier\nis replaced with a new message explaining that the error is in the range\nexpression, along with which of the begin() and end() functions was\nproblematic if relevant.\n\nAdditionally, if the range was a pointer type or defines operator*,\nattempt to dereference the range, and offer a FixIt if the modified range\nworks.\n\nllvm-svn: 162248"}, | ||
[i]={{ | [i]={{G,2593,"/// Create the initialization, compare, and increment steps for\n/// the range-based for loop expression.\n/// This function does not handle array-based for loops,\n/// which are created in Sema::BuildCXXForRangeStmt.\n///\n/// \\returns a ForRangeStatus indicating success or what kind of error occurred.\n/// BeginExpr and EndExpr are set and FRS_Success is returned on success;\n/// CandidateSet and BEF are set and some non-success value is returned on\n/// failure.\nstatic Sema::ForRangeStatus BuildNonArrayForRange(Sema &SemaRef, Expr *BeginRange, Expr *EndRange, QualType RangeType, VarDecl *BeginVar, VarDecl *EndVar, SourceLocation ColonLoc, SourceLocation CoawaitLoc, OverloadCandidateSet *CandidateSet, ExprResult *BeginExpr, ExprResult *EndExpr, BeginEndFunction *BEF) {\n // ...\n auto BuildBegin = [&] {\n // ...\n if (RangeStatus != Sema::FRS_Success) {\n if (RangeStatus == Sema::FRS_DiagnosticIssued)\n SemaRef.Diag(BeginRange->getBeginLoc(), diag::note_in_for_range) << ColonLoc << BEF_begin << BeginRange->getType();"},{G,2622,"/// Create the initialization, compare, and increment steps for\n/// the range-based for loop expression.\n/// This function does not handle array-based for loops,\n/// which are created in Sema::BuildCXXForRangeStmt.\n///\n/// \\returns a ForRangeStatus indicating success or what kind of error occurred.\n/// BeginExpr and EndExpr are set and FRS_Success is returned on success;\n/// CandidateSet and BEF are set and some non-success value is returned on\n/// failure.\nstatic Sema::ForRangeStatus BuildNonArrayForRange(Sema &SemaRef, Expr *BeginRange, Expr *EndRange, QualType RangeType, VarDecl *BeginVar, VarDecl *EndVar, SourceLocation ColonLoc, SourceLocation CoawaitLoc, OverloadCandidateSet *CandidateSet, ExprResult *BeginExpr, ExprResult *EndExpr, BeginEndFunction *BEF) {\n // ...\n auto BuildEnd = [&] {\n // ...\n if (RangeStatus != Sema::FRS_Success) {\n if (RangeStatus == Sema::FRS_DiagnosticIssued)\n SemaRef.Diag(EndRange->getBeginLoc(), diag::note_in_for_range) << ColonLoc << BEF_end << EndRange->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:62:15: note: when looking up \'end\' function for range expression of type \'DeletedEnd\'","clang/test/SemaCXX/for-range-dereference.cpp:78:15: note: when looking up \'begin\' function for range expression of type \'DeletedADLBegin\'"} | ["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:62:15: note: when looking up \'end\' function for range expression of type \'DeletedEnd\'","clang/test/SemaCXX/for-range-dereference.cpp:78:15: note: when looking up \'begin\' function for range expression of type \'DeletedADLBegin\'"} | ||
Line 5,280: | Line 5,292: | ||
}, | }, | ||
["note_in_omitted_aggregate_initializer"]={ | ["note_in_omitted_aggregate_initializer"]={ | ||
[ | [b]="in implicit initialization of %select{array element %1 with omitted initializer|field %1 with omitted initializer|trailing array elements in runtime-sized array new}0", | ||
[ | [d]=c, | ||
[ | [e]="in implicit initialization of (?:array element (.*?) with omitted initializer|field (.*?) with omitted initializer|trailing array elements in runtime\\-sized array new)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6c3bbf42712e",1401780534,"PR11410: Extend diagnostic to cover all cases of aggregate initialization, not","PR11410: Extend diagnostic to cover all cases of aggregate initialization, not\njust the extremely specific case of a trailing array element that couldn\'t be\ninitialized because the default constructor for the element type is deleted.\n\nAlso reword the diagnostic to better match our other context diagnostics and to\nprepare for the implementation of core issue 1070.\n\nllvm-svn: 210083"}, | [h]={"6c3bbf42712e",1401780534,"PR11410: Extend diagnostic to cover all cases of aggregate initialization, not","PR11410: Extend diagnostic to cover all cases of aggregate initialization, not\njust the extremely specific case of a trailing array element that couldn\'t be\ninitialized because the default constructor for the element type is deleted.\n\nAlso reword the diagnostic to better match our other context diagnostics and to\nprepare for the implementation of core issue 1070.\n\nllvm-svn: 210083"}, | ||
[i]={{ | [i]={{N,620,"ExprResult InitListChecker::PerformEmptyInit(SourceLocation Loc, const InitializedEntity &Entity) {\n // ...\n if (!InitSeq) {\n if (!VerifyOnly) {\n // ...\n if (Entity.getKind() == InitializedEntity::EK_Member)\n SemaRef.Diag(Entity.getDecl()->getLocation(), diag::note_in_omitted_aggregate_initializer) << /*field*/ 1 << Entity.getDecl();"},{N,626,"ExprResult InitListChecker::PerformEmptyInit(SourceLocation Loc, const InitializedEntity &Entity) {\n // ...\n if (!InitSeq) {\n if (!VerifyOnly) {\n // ...\n if (Entity.getKind() == InitializedEntity::EK_Member)\n // ...\n else if (Entity.getKind() == InitializedEntity::EK_ArrayElement) {\n // ...\n SemaRef.Diag(Loc, diag::note_in_omitted_aggregate_initializer) << (IsTrailingArrayNewMember ? 2 : /*array element*/ 0) << Entity.getElementIndex();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/new-delete-cxx0x.cpp"]={"clang/test/SemaCXX/new-delete-cxx0x.cpp:46:24: note: in implicit initialization of array element 2 with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:47:24: note: in implicit initialization of trailing array elements in runtime-sized array new","clang/test/SemaCXX/new-delete-cxx0x.cpp:48:20: note: in implicit initialization of trailing array elements in runtime-sized array new","clang/test/SemaCXX/new-delete-cxx0x.cpp:52:5: note: in implicit initialization of field \'t\' with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:58:24: note: in implicit initialization of array element 1 with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:52:5: note: in implicit initialization of field \'t\' with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:63:24: note: in implicit initialization of trailing array elements in runtime-sized array new","clang/test/SemaCXX/new-delete-cxx0x.cpp:52:5: note: in implicit initialization of field \'t\' with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:64:27: note: in implicit initialization of trailing array elements in runtime-sized array new"} | ["clang/test/SemaCXX/new-delete-cxx0x.cpp"]={"clang/test/SemaCXX/new-delete-cxx0x.cpp:46:24: note: in implicit initialization of array element 2 with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:47:24: note: in implicit initialization of trailing array elements in runtime-sized array new","clang/test/SemaCXX/new-delete-cxx0x.cpp:48:20: note: in implicit initialization of trailing array elements in runtime-sized array new","clang/test/SemaCXX/new-delete-cxx0x.cpp:52:5: note: in implicit initialization of field \'t\' with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:58:24: note: in implicit initialization of array element 1 with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:52:5: note: in implicit initialization of field \'t\' with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:63:24: note: in implicit initialization of trailing array elements in runtime-sized array new","clang/test/SemaCXX/new-delete-cxx0x.cpp:52:5: note: in implicit initialization of field \'t\' with omitted initializer","clang/test/SemaCXX/new-delete-cxx0x.cpp:64:27: note: in implicit initialization of trailing array elements in runtime-sized array new"} | ||
Line 5,292: | Line 5,304: | ||
}, | }, | ||
["note_in_reference_temporary_list_initializer"]={ | ["note_in_reference_temporary_list_initializer"]={ | ||
[ | [b]="in initialization of temporary of type %0 created to list-initialize this reference", | ||
[ | [d]=c, | ||
[ | [e]="in initialization of temporary of type (.*?) created to list\\-initialize this reference", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8d082d187e57",1409868819,"PR20844: If we fail to list-initialize a reference, map to the referenced type","PR20844: If we fail to list-initialize a reference, map to the referenced type\nbefore retrying the initialization to produce diagnostics. Otherwise, we may\nfail to produce any diagnostics, and silently produce invalid AST in a -Asserts\nbuild. Also add a note to this codepath to make it more clear why we were\ntrying to create a temporary.\n\nllvm-svn: 217197"}, | [h]={"8d082d187e57",1409868819,"PR20844: If we fail to list-initialize a reference, map to the referenced type","PR20844: If we fail to list-initialize a reference, map to the referenced type\nbefore retrying the initialization to produce diagnostics. Otherwise, we may\nfail to produce any diagnostics, and silently produce invalid AST in a -Asserts\nbuild. Also add a note to this codepath to make it more clear why we were\ntrying to create a temporary.\n\nllvm-svn: 217197"}, | ||
[i]={{ | [i]={{N,9523,"static void diagnoseListInit(Sema &S, const InitializedEntity &Entity, InitListExpr *InitList) {\n // ...\n if (DestType->isReferenceType()) {\n // ...\n S.Diag(Loc, diag::note_in_reference_temporary_list_initializer) << T;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:137:6: note: in initialization of temporary of type \'A\' created to list-initialize this reference"} | ["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:137:6: note: in initialization of temporary of type \'A\' created to list-initialize this reference"} | ||
Line 5,304: | Line 5,316: | ||
}, | }, | ||
["note_include_header_or_declare"]={ | ["note_include_header_or_declare"]={ | ||
[ | [b]="include the header <%0> or explicitly provide a declaration for \'%1\'", | ||
[ | [d]=c, | ||
[ | [e]="include the header \\<(.*?)\\> or explicitly provide a declaration for \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5d96e0a3a795",1405112031,"Consolidate header inclusion diagnostics","Consolidate header inclusion diagnostics\n\nMake argument orders match, unify diagnostic IDs and reword the message to be a\nlittle less saccharine.\n\nllvm-svn: 212845"}, | [h]={"5d96e0a3a795",1405112031,"Consolidate header inclusion diagnostics","Consolidate header inclusion diagnostics\n\nMake argument orders match, unify diagnostic IDs and reword the message to be a\nlittle less saccharine.\n\nllvm-svn: 212845"}, | ||
[i]={{ | [i]={{C,11989,"// 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_include_header_or_declare) << HeaderName << FunctionName;"},{q,2471,"/// LazilyCreateBuiltin - The specified Builtin-ID was first used at\n/// file scope. lazily create a decl for it. ForRedeclaration is true\n/// if we\'re creating this built-in in anticipation of redeclaring the\n/// built-in.\nNamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc) {\n // ...\n if (!ForRedeclaration && (Context.BuiltinInfo.isPredefinedLibFunction(ID) || Context.BuiltinInfo.isHeaderDependentFunction(ID))) {\n // ...\n if (const char *Header = Context.BuiltinInfo.getHeaderName(ID))\n Diag(Loc, diag::note_include_header_or_declare) << Header << Context.BuiltinInfo.getName(ID);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/ivar-lookup-resolution-builtin.m"]={"clang/test/SemaObjC/ivar-lookup-resolution-builtin.m:31:10: note: include the header <strings.h> or explicitly provide a declaration for \'index\'"} | ["clang/test/SemaObjC/ivar-lookup-resolution-builtin.m"]={"clang/test/SemaObjC/ivar-lookup-resolution-builtin.m:31:10: note: include the header <strings.h> or explicitly provide a declaration for \'index\'"} | ||
Line 5,316: | Line 5,328: | ||
}, | }, | ||
["note_incompatible_analyzer_plugin_api"]={ | ["note_incompatible_analyzer_plugin_api"]={ | ||
[ | [b]="current API version is \'%0\', but plugin was compiled with version \'%1\'", | ||
[ | [d]=c, | ||
[ | [e]="current API version is \'(.*?)\', but plugin was compiled with version \'(.*?)\'", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"075d73bcced3",1313556963,"[analyzer] Add a warning for an incompatible plugin version.","[analyzer] Add a warning for an incompatible plugin version.\n\nllvm-svn: 137813"}, | [h]={"075d73bcced3",1313556963,"[analyzer] Add a warning for an incompatible plugin version.","[analyzer] Add a warning for an incompatible plugin version.\n\nllvm-svn: 137813"}, | ||
[i]={{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",90,"#include \"clang/StaticAnalyzer/Checkers/Checkers.inc\"\n // ...\n // Register checkers from plugins.\n for (const std::string &Plugin : Plugins) {\n // ...\n if (!isCompatibleAPIVersion(PluginAPIVersion)) {\n // ...\n Diags.Report(diag::note_incompatible_analyzer_plugin_api) << CLANG_ANALYZER_API_VERSION_STRING << PluginAPIVersion;"}} | [i]={{"clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp",90,"#include \"clang/StaticAnalyzer/Checkers/Checkers.inc\"\n // ...\n // Register checkers from plugins.\n for (const std::string &Plugin : Plugins) {\n // ...\n if (!isCompatibleAPIVersion(PluginAPIVersion)) {\n // ...\n Diags.Report(diag::note_incompatible_analyzer_plugin_api) << CLANG_ANALYZER_API_VERSION_STRING << PluginAPIVersion;"}} | ||
}, | }, | ||
["note_incomplete_class_and_qualified_id"]={ | ["note_incomplete_class_and_qualified_id"]={ | ||
[ | [b]="conformance of forward class %0 to protocol %1 can not be confirmed", | ||
[ | [d]=c, | ||
[ | [e]="conformance of forward class (.*?) to protocol (.*?) can not be confirmed", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"01d96986d843",1480719628,"More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.","More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.\nIn passing, add a warning group for \"ignored qualifier in inline assembly\" warnings.\n\nllvm-svn: 288548"}, | [h]={"01d96986d843",1480719628,"More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.","More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.\nIn passing, add a warning group for \"ignored qualifier in inline assembly\" warnings.\n\nllvm-svn: 288548"}, | ||
[i]={{ | [i]={{o,17792,"bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained) {\n // ...\n if ((DiagKind == diag::warn_incompatible_qualified_id || DiagKind == diag::err_incompatible_qualified_id) && PDecl && IFace && !IFace->hasDefinition())\n Diag(IFace->getLocation(), diag::note_incomplete_class_and_qualified_id) << IFace << PDecl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/comptypes-legal.m"]={"clang/test/SemaObjC/comptypes-legal.m:45:8: note: conformance of forward class \'ForwarClass\' to protocol \'NSCopying\' can not be confirmed","clang/test/SemaObjC/comptypes-legal.m:45:8: note: conformance of forward class \'ForwarClass\' to protocol \'NSCopying\' can not be confirmed","clang/test/SemaObjC/comptypes-legal.m:45:8: note: conformance of forward class \'ForwarClass\' to protocol \'NSCopying\' can not be confirmed"} | ["clang/test/SemaObjC/comptypes-legal.m"]={"clang/test/SemaObjC/comptypes-legal.m:45:8: note: conformance of forward class \'ForwarClass\' to protocol \'NSCopying\' can not be confirmed","clang/test/SemaObjC/comptypes-legal.m:45:8: note: conformance of forward class \'ForwarClass\' to protocol \'NSCopying\' can not be confirmed","clang/test/SemaObjC/comptypes-legal.m:45:8: note: conformance of forward class \'ForwarClass\' to protocol \'NSCopying\' can not be confirmed"} | ||
Line 5,337: | Line 5,349: | ||
}, | }, | ||
["note_indirect_goto_target"]={ | ["note_indirect_goto_target"]={ | ||
[ | [b]={{nil,r,"possible target of %select{indirect|asm}0 goto statement"},{z,nil,"possible target of indirect goto statement"}}, | ||
[ | [d]=c, | ||
[ | [e]="possible target of (?:indirect|asm) goto statement", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Bb,1273625893,Ab,ob}, | ||
[i]={{ | [i]={{y,865,"/// Produce primary diagnostic for an indirect jump statement.\nstatic void DiagnoseIndirectOrAsmJumpStmt(Sema &S, Stmt *Jump, LabelDecl *Target, bool &Diagnosed) {\n // ...\n S.Diag(Target->getStmt()->getIdentLoc(), diag::note_indirect_goto_target) << IsAsmGoto;"},{y,913,"/// Diagnose an indirect jump which is known to cross scopes.\nvoid JumpScopeChecker::DiagnoseIndirectOrAsmJump(Stmt *Jump, unsigned JumpScope, LabelDecl *Target, unsigned TargetScope) {\n // ...\n // Diagnose this jump if it would be ill-formed in C++98.\n if (!Diagnosed && !ToScopesCXX98Compat.empty()) {\n // ...\n S.Diag(Target->getStmt()->getIdentLoc(), diag::note_indirect_goto_target) << IsAsmGoto;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ac]={"clang/test/SemaObjC/strong-in-c-struct.m:28:1: note: possible target of indirect goto statement","clang/test/SemaObjC/strong-in-c-struct.m:51:1: note: possible target of indirect goto statement","clang/test/SemaObjC/strong-in-c-struct.m:70:1: note: possible target of indirect goto statement"} | ||
} | } | ||
}, | }, | ||
["note_indirection_through_null"]={ | ["note_indirection_through_null"]={ | ||
[ | [b]="consider using __builtin_trap() or qualifying pointer with \'volatile\'", | ||
[ | [d]=c, | ||
[ | [e]="consider using __builtin_trap\\(\\) or qualifying pointer with \'volatile\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"395610654363",1278483263,"implement PR7569, warning about assignment to null, which ","implement PR7569, warning about assignment to null, which \npeople seem to write when they want a deterministic trap.\nSuggest instead that they use a volatile pointer or \n__builtin_trap.\n\nllvm-svn: 107756"}, | [h]={"395610654363",1278483263,"implement PR7569, warning about assignment to null, which ","implement PR7569, warning about assignment to null, which \npeople seem to write when they want a deterministic trap.\nSuggest instead that they use a volatile pointer or \n__builtin_trap.\n\nllvm-svn: 107756"}, | ||
[i]={{ | [i]={{o,579,"static void CheckForNullPointerDereference(Sema &S, Expr *E) {\n // ...\n if (UO && UO->getOpcode() == UO_Deref && UO->getSubExpr()->getType()->isPointerType()) {\n // ...\n if ((!isTargetAddressSpace(AS) || (isTargetAddressSpace(AS) && toTargetAddressSpace(AS) == 0)) && UO->getSubExpr()->IgnoreParenCasts()->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull) && !UO->getType().isVolatileQualified()) {\n // ...\n S.DiagRuntimeBehavior(UO->getOperatorLoc(), UO, S.PDiag(diag::note_indirection_through_null));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/expressions.c"]={"clang/test/Parser/expressions.c:42:18: note: consider using __builtin_trap() or qualifying pointer with \'volatile\'"} | ["clang/test/Parser/expressions.c"]={"clang/test/Parser/expressions.c:42:18: note: consider using __builtin_trap() or qualifying pointer with \'volatile\'"} | ||
Line 5,361: | Line 5,373: | ||
}, | }, | ||
["note_inequality_comparison_to_or_assign"]={ | ["note_inequality_comparison_to_or_assign"]={ | ||
[ | [b]="use \'|=\' to turn this inequality comparison into an or-assignment", | ||
[ | [d]=c, | ||
[ | [e]="use \'\\|\\=\' to turn this inequality comparison into an or\\-assignment", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ae51ecc57b34",1313570284,"Introduce a new warning, -Wtop-level-comparison. This warning is","Introduce a new warning, -Wtop-level-comparison. This warning is\na complement to the warnings we provide in condition expressions. Much\nlike we warn on conditions such as:\n\n int x, y;\n ...\n if (x = y) ... // Almost always a typo of \'==\'\n\nThis warning applies the complementary logic to \"top-level\" statements,\nor statements whose value is not consumed or used in some way:\n\n int x, y;\n ...\n x == y; // Almost always a type for \'=\'\n\nWe also mirror the \'!=\' vs. \'|=\' logic.\n\nThe warning is designed to fire even for overloaded operators for two reasons:\n\n1) Especially in the presence of widespread templates that assume\n operator== and operator!= perform the expected comparison operations,\n it seems unreasonable to suppress warnings on the offchance that\n a user has written a class that abuses these operators, embedding\n side-effects or other magic within them.\n2) There is a trivial source modification to silence the warning for\n truly exceptional cases:\n\n (void)(x == y); // No warning\n\nA (greatly reduced) form of this warning has already caught a number of\nbugs in our codebase, so there is precedent for it actually firing. That\nsaid, its currently off by default, but enabled under -Wall.\n\nThere are several fixmes left here that I\'m working on in follow-up\npatches, including de-duplicating warnings from -Wunused, sharing code\nwith -Wunused\'s implementation (and creating a nice place to hook\ndiagnostics on \"top-level\" statements), and handling cases where a proxy\nobject with a bool conversion is returned, hiding the operation in the\ncleanup AST nodes.\n\nSuggestions for any of this code more than welcome. Also, I\'d really\nlove suggestions for better naming than \"top-level\".\n\nllvm-svn: 137819"}, | [h]={"ae51ecc57b34",1313570284,"Introduce a new warning, -Wtop-level-comparison. This warning is","Introduce a new warning, -Wtop-level-comparison. This warning is\na complement to the warnings we provide in condition expressions. Much\nlike we warn on conditions such as:\n\n int x, y;\n ...\n if (x = y) ... // Almost always a typo of \'==\'\n\nThis warning applies the complementary logic to \"top-level\" statements,\nor statements whose value is not consumed or used in some way:\n\n int x, y;\n ...\n x == y; // Almost always a type for \'=\'\n\nWe also mirror the \'!=\' vs. \'|=\' logic.\n\nThe warning is designed to fire even for overloaded operators for two reasons:\n\n1) Especially in the presence of widespread templates that assume\n operator== and operator!= perform the expected comparison operations,\n it seems unreasonable to suppress warnings on the offchance that\n a user has written a class that abuses these operators, embedding\n side-effects or other magic within them.\n2) There is a trivial source modification to silence the warning for\n truly exceptional cases:\n\n (void)(x == y); // No warning\n\nA (greatly reduced) form of this warning has already caught a number of\nbugs in our codebase, so there is precedent for it actually firing. That\nsaid, its currently off by default, but enabled under -Wall.\n\nThere are several fixmes left here that I\'m working on in follow-up\npatches, including de-duplicating warnings from -Wunused, sharing code\nwith -Wunused\'s implementation (and creating a nice place to hook\ndiagnostics on \"top-level\" statements), and handling cases where a proxy\nobject with a bool conversion is returned, hiding the operation in the\ncleanup AST nodes.\n\nSuggestions for any of this code more than welcome. Also, I\'d really\nlove suggestions for better naming than \"top-level\".\n\nllvm-svn: 137819"}, | ||
[i]={{ | [i]={{G,192,"/// Diagnose unused comparisons, both builtin and overloaded operators.\n/// For \'==\' and \'!=\', suggest fixits for \'=\' or \'|=\'.\n///\n/// Adding a cast to void (or other expression wrappers) will prevent the\n/// warning from firing.\nstatic bool DiagnoseUnusedComparison(Sema &S, const Expr *E) {\n // ...\n // If the LHS is a plausible entity to assign to, provide a fixit hint to\n // correct common typos.\n if (CanAssign) {\n if (Kind == Inequality)\n S.Diag(Loc, diag::note_inequality_comparison_to_or_assign) << FixItHint::CreateReplacement(Loc, \"|=\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-unused-comparison.cpp"]={"clang/test/SemaCXX/warn-unused-comparison.cpp:20:5: note: use \'|=\' to turn this inequality comparison into an or-assignment","clang/test/SemaCXX/warn-unused-comparison.cpp:35:5: note: use \'|=\' to turn this inequality comparison into an or-assignment"} | ["clang/test/SemaCXX/warn-unused-comparison.cpp"]={"clang/test/SemaCXX/warn-unused-comparison.cpp:20:5: note: use \'|=\' to turn this inequality comparison into an or-assignment","clang/test/SemaCXX/warn-unused-comparison.cpp:35:5: note: use \'|=\' to turn this inequality comparison into an or-assignment"} | ||
Line 5,373: | Line 5,385: | ||
}, | }, | ||
["note_init_list_at_beginning_of_macro_argument"]={ | ["note_init_list_at_beginning_of_macro_argument"]={ | ||
[ | [b]="cannot use initializer list at the beginning of a macro argument", | ||
[ | [d]=c, | ||
[ | [e]="cannot use initializer list at the beginning of a macro argument", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"79b45389c3cd",1374602509,"Add new diagnostic messages when too many arguments are presented to a","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"}, | [h]={"79b45389c3cd",1374602509,"Add new diagnostic messages when too many arguments are presented to a","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"}, | ||
[i]={{ | [i]={{Ib,946,"/// 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 if (!GenerateNewArgTokens(*this, ArgTokens, FixedArgTokens, FixedNumArgs, ParenHints, InitLists)) {\n if (!InitLists.empty()) {\n DiagnosticBuilder DB = Diag(MacroName, diag::note_init_list_at_beginning_of_macro_argument);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_with_initializer_list.cpp"]={"clang/test/Preprocessor/macro_with_initializer_list.cpp:150:3: note: cannot use initializer list at the beginning of a macro argument","clang/test/Preprocessor/macro_with_initializer_list.cpp:156:3: note: cannot use initializer list at the beginning of a macro argument","clang/test/Preprocessor/macro_with_initializer_list.cpp:177:3: note: cannot use initializer list at the beginning of a macro argument"} | ["clang/test/Preprocessor/macro_with_initializer_list.cpp"]={"clang/test/Preprocessor/macro_with_initializer_list.cpp:150:3: note: cannot use initializer list at the beginning of a macro argument","clang/test/Preprocessor/macro_with_initializer_list.cpp:156:3: note: cannot use initializer list at the beginning of a macro argument","clang/test/Preprocessor/macro_with_initializer_list.cpp:177:3: note: cannot use initializer list at the beginning of a macro argument"} | ||
Line 5,385: | Line 5,397: | ||
}, | }, | ||
["note_init_list_narrowing_silence"]={ | ["note_init_list_narrowing_silence"]={ | ||
[ | [b]="insert an explicit cast to silence this issue", | ||
[ | [d]=c, | ||
[ | [e]="insert an explicit cast to silence this issue", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b0869036c114",1400289198,"Tweak diagnostic wording for init list narrowing","Tweak diagnostic wording for init list narrowing\n\nThe conventional form is \'<action> to silence this warning\'.\n\nAlso call the diagnostic an \'issue\' rather than a \'message\' because the latter\nterm is more widely used with reference to message expressions.\n\nllvm-svn: 209052"}, | [h]={"b0869036c114",1400289198,"Tweak diagnostic wording for init list narrowing","Tweak diagnostic wording for init list narrowing\n\nThe conventional form is \'<action> to silence this warning\'.\n\nAlso call the diagnostic an \'issue\' rather than a \'message\' because the latter\nterm is more widely used with reference to message expressions.\n\nllvm-svn: 209052"}, | ||
[i]={{ | [i]={{N,10463,"static void DiagnoseNarrowingInInitList(Sema &S, const ImplicitConversionSequence &ICS, QualType PreNarrowingType, QualType EntityType, const Expr *PostInit) {\n // ...\n S.Diag(PostInit->getBeginLoc(), diag::note_init_list_narrowing_silence) << PostInit->getSourceRange() << FixItHint::CreateInsertion(PostInit->getBeginLoc(), OS.str()) << FixItHint::CreateInsertion(S.getLocForEndOfToken(PostInit->getEndLoc()), \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx0x-initializer-scalars.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:48:21: note: insert an explicit cast to silence this issue","clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:49:24: note: insert an explicit cast to silence this issue"} | ["clang/test/SemaCXX/cxx0x-initializer-scalars.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:48:21: note: insert an explicit cast to silence this issue","clang/test/SemaCXX/cxx0x-initializer-scalars.cpp:49:24: note: insert an explicit cast to silence this issue"} | ||
Line 5,397: | Line 5,409: | ||
}, | }, | ||
["note_init_with_default_member_initializer"]={ | ["note_init_with_default_member_initializer"]={ | ||
[ | [b]="initializing field %0 with default member initializer", | ||
[ | [d]=c, | ||
[ | [e]="initializing field (.*?) with default member initializer", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages","[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154290"}, | [h]={"47ccfd7a89e2",1667306232,"[Clang] Implement P2741R3 - user-generated static_assert messages","[Clang] Implement P2741R3 - user-generated static_assert messages\n\nReviewed By: #clang-language-wg, aaron.ballman\n\nDifferential Revision: https://reviews.llvm.org/D154290"}, | ||
[i]={{ | [i]={{N,8295,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n for (unsigned I = 0; I != Path.size(); ++I) {\n // ...\n case IndirectLocalPathEntry::DefaultInit: {\n // ...\n Diag(FD->getLocation(), diag::note_init_with_default_member_initializer) << FD << nextPathEntryRange(Path, I + 1, L);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p5.cpp"]={"clang/test/CXX/temp/temp.param/p5.cpp:5:9: note: initializing field \'r\' with default member initializer","clang/test/CXX/temp/temp.param/p5.cpp:11:9: note: initializing field \'r\' with default member initializer"} | ["clang/test/CXX/temp/temp.param/p5.cpp"]={"clang/test/CXX/temp/temp.param/p5.cpp:5:9: note: initializing field \'r\' with default member initializer","clang/test/CXX/temp/temp.param/p5.cpp:11:9: note: initializing field \'r\' with default member initializer"} | ||
Line 5,409: | Line 5,421: | ||
}, | }, | ||
["note_initializer_out_of_order"]={ | ["note_initializer_out_of_order"]={ | ||
[ | [b]={{nil,M,"%select{field|base class}0 %1 will be initialized after %select{field|base}2 %3"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:field|base class) (.*?) will be initialized after (?:field|base) (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{m,5616,"static void DiagnoseBaseOrMemInitializerOrder(Sema &SemaRef, const CXXConstructorDecl *Constructor, ArrayRef<CXXCtorInitializer *> Inits) {\n // ...\n // More than 1 item to warn, create notes letting the user know which ones\n // are bad.\n for (unsigned WarnIndex : WarnIndexes) {\n // ...\n auto D = SemaRef.Diag(PrevInit->getSourceLocation(), diag::note_initializer_out_of_order);"}}, | [i]={{m,5616,"static void DiagnoseBaseOrMemInitializerOrder(Sema &SemaRef, const CXXConstructorDecl *Constructor, ArrayRef<CXXCtorInitializer *> Inits) {\n // ...\n // More than 1 item to warn, create notes letting the user know which ones\n // are bad.\n for (unsigned WarnIndex : WarnIndexes) {\n // ...\n auto D = SemaRef.Diag(PrevInit->getSourceLocation(), diag::note_initializer_out_of_order);"}}, | ||
[j]={ | [j]={ | ||
Line 5,421: | Line 5,433: | ||
}, | }, | ||
["note_insert_break_fixit"]={ | ["note_insert_break_fixit"]={ | ||
[ | [b]="insert \'break;\' to avoid fall-through", | ||
[ | [d]=c, | ||
[ | [e]="insert \'break;\' to avoid fall\\-through", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, | [h]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, | ||
[i]={{ | [i]={{lb,1328,"static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) {\n // ...\n for (const CFGBlock *B : llvm::reverse(*Cfg)) {\n // ...\n if (!AnnotatedCnt) {\n // ...\n S.Diag(L, diag::note_insert_break_fixit) << FixItHint::CreateInsertion(L, \"break; \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp:12:5: note: insert \'break;\' to avoid fall-through"} | ["clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp:12:5: note: insert \'break;\' to avoid fall-through"} | ||
Line 5,433: | Line 5,445: | ||
}, | }, | ||
["note_insert_fallthrough_fixit"]={ | ["note_insert_fallthrough_fixit"]={ | ||
[ | [b]="insert \'%0;\' to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="insert \'(.*?);\' to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, | [h]={"84837d5b5aa0",1336069659,"Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between","Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between\ncases in switch statements. Also add a [[clang::fallthrough]] attribute, which\ncan be used to suppress the warning in the case of intentional fallthrough.\n\nPatch by Alexander Kornienko!\n\nThe handling of C++11 attribute namespaces in this patch is temporary, and will\nbe replaced with a cleaner mechanism in a subsequent patch.\n\nllvm-svn: 156086"}, | ||
[i]={{ | [i]={{lb,1324,"static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) {\n // ...\n for (const CFGBlock *B : llvm::reverse(*Cfg)) {\n // ...\n if (!AnnotatedCnt) {\n // ...\n if (!(B->empty() && Term && isa<BreakStmt>(Term))) {\n // ...\n S.Diag(L, diag::note_insert_fallthrough_fixit) << AnnotationSpelling << FixItHint::CreateInsertion(L, TextToInsert);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:15:7: note: insert \'[[clang::fallthrough]];\' to silence this warning","clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:8:5: note: insert \'[[clang::fallthrough]];\' to silence this warning"} | ["clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:15:7: note: insert \'[[clang::fallthrough]];\' to silence this warning","clang/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp:8:5: note: insert \'[[clang::fallthrough]];\' to silence this warning"} | ||
Line 5,445: | Line 5,457: | ||
}, | }, | ||
["note_inst_declaration_hint"]={ | ["note_inst_declaration_hint"]={ | ||
[ | [b]="add an explicit instantiation declaration to suppress this warning if %q0 is explicitly instantiated in another translation unit", | ||
[ | [d]=c, | ||
[ | [e]="add an explicit instantiation declaration to suppress this warning if (.*?) is explicitly instantiated in another translation unit", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7dcc97e7ac0a",1461046792,"Warn if function or variable cannot be implicitly instantiated","Warn if function or variable cannot be implicitly instantiated\n\nWith this patch compiler emits warning if it tries to make implicit instantiation\nof a template but cannot find the template definition. The warning can be suppressed\nby explicit instantiation declaration or by command line options\n-Wundefined-var-template and -Wundefined-func-template. The implementation follows\nthe discussion of http://reviews.llvm.org/D12326.\n\nDifferential Revision: http://reviews.llvm.org/D16396\n\nllvm-svn: 266719"}, | [h]={"7dcc97e7ac0a",1461046792,"Warn if function or variable cannot be implicitly instantiated","Warn if function or variable cannot be implicitly instantiated\n\nWith this patch compiler emits warning if it tries to make implicit instantiation\nof a template but cannot find the template definition. The warning can be suppressed\nby explicit instantiation declaration or by command line options\n-Wundefined-var-template and -Wundefined-func-template. The implementation follows\nthe discussion of http://reviews.llvm.org/D12326.\n\nDifferential Revision: http://reviews.llvm.org/D16396\n\nllvm-svn: 266719"}, | ||
[i]={{ | [i]={{Mc,4905,"/// Instantiate the definition of the given function from its\n/// template.\n///\n/// \\param PointOfInstantiation the point at which the instantiation was\n/// required. Note that this is not precisely a \"point of instantiation\"\n/// for the function, but it\'s close.\n///\n/// \\param Function the already-instantiated declaration of a\n/// function template specialization or member function of a class template\n/// specialization.\n///\n/// \\param Recursive if true, recursively instantiates any functions that\n/// are required by this instantiation.\n///\n/// \\param DefinitionRequired if true, then we are performing an explicit\n/// instantiation where the body of the function is required. Complain if\n/// there is no such body.\nvoid Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive, bool DefinitionRequired, bool AtEndOfTU) {\n // ...\n // FIXME: We need to track the instantiation stack in order to know which\n // definitions should be visible within this instantiation.\n if (DiagnoseUninstantiableTemplate(PointOfInstantiation, Function, Function->getInstantiatedFromMemberFunction(), PatternDecl, PatternDef, TSK,\n // ...\n if (DefinitionRequired)\n // ...\n else if (TSK == TSK_ExplicitInstantiationDefinition || (Function->isConstexpr() && !Recursive)) {\n // ...\n } else if (TSK == TSK_ImplicitInstantiation) {\n if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && !getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {\n // ...\n if (getLangOpts().CPlusPlus11)\n Diag(PointOfInstantiation, diag::note_inst_declaration_hint) << Function;"},{Mc,5531,"/// Instantiate the definition of the given variable from its\n/// template.\n///\n/// \\param PointOfInstantiation the point at which the instantiation was\n/// required. Note that this is not precisely a \"point of instantiation\"\n/// for the variable, but it\'s close.\n///\n/// \\param Var the already-instantiated declaration of a templated variable.\n///\n/// \\param Recursive if true, recursively instantiates any functions that\n/// are required by this instantiation.\n///\n/// \\param DefinitionRequired if true, then we are performing an explicit\n/// instantiation where a definition of the variable is required. Complain\n/// if there is no such definition.\nvoid Sema::InstantiateVariableDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive, bool DefinitionRequired, bool AtEndOfTU) {\n // ...\n // If we don\'t have a definition of the variable template, we won\'t perform\n // any instantiation. Rather, we rely on the user to instantiate this\n // definition (or provide a specialization for it) in another translation\n // unit.\n if (!Def && !DefinitionRequired) {\n if (TSK == TSK_ExplicitInstantiationDefinition) {\n // ...\n } else if (TSK == TSK_ImplicitInstantiation) {\n // Warn about missing definition at the end of translation unit.\n if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && !getSourceManager().isInSystemHeader(PatternDecl->getBeginLoc())) {\n // ...\n if (getLangOpts().CPlusPlus11)\n Diag(PointOfInstantiation, diag::note_inst_declaration_hint) << Var;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp:28:26: note: add an explicit instantiation declaration to suppress this warning if \'X<long>::member3\' is explicitly instantiated in another translation unit"} | ["clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp"]={"clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp:28:26: note: add an explicit instantiation declaration to suppress this warning if \'X<long>::member3\' is explicitly instantiated in another translation unit"} | ||
Line 5,457: | Line 5,469: | ||
}, | }, | ||
["note_instantiation_contexts_suppressed"]={ | ["note_instantiation_contexts_suppressed"]={ | ||
[ | [b]="(skipping %0 context%s0 in backtrace; use -ftemplate-backtrace-limit=0 to see all)", | ||
[ | [d]=c, | ||
[ | [e]="\\(skipping (.*?) context(.*?) in backtrace; use \\-ftemplate\\-backtrace\\-limit\\=0 to see all\\)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ffed1cb33910",1271747904,"Introduce a limit on the depth of the template instantiation backtrace","Introduce a limit on the depth of the template instantiation backtrace\nwe will print with each error that occurs during template\ninstantiation. When the backtrace is longer than that, we will print\nN/2 of the innermost backtrace entries and N/2 of the outermost\nbacktrace entries, then skip the middle entries with a note such as:\n\n note: suppressed 2 template instantiation contexts; use\n -ftemplate-backtrace-limit=N to change the number of template\n instantiation entries shown\n\nThis should eliminate some excessively long backtraces that aren\'t\nproviding any value.\n\nllvm-svn: 101882"}, | [h]={"ffed1cb33910",1271747904,"Introduce a limit on the depth of the template instantiation backtrace","Introduce a limit on the depth of the template instantiation backtrace\nwe will print with each error that occurs during template\ninstantiation. When the backtrace is longer than that, we will print\nN/2 of the innermost backtrace entries and N/2 of the outermost\nbacktrace entries, then skip the middle entries with a note such as:\n\n note: suppressed 2 template instantiation contexts; use\n -ftemplate-backtrace-limit=N to change the number of template\n instantiation entries shown\n\nThis should eliminate some excessively long backtraces that aren\'t\nproviding any value.\n\nllvm-svn: 101882"}, | ||
[i]={{ | [i]={{E,754,"/// 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 // Skip this instantiation?\n if (InstantiationIdx >= SkipStart && InstantiationIdx < SkipEnd) {\n if (InstantiationIdx == SkipStart) {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_instantiation_contexts_suppressed) << unsigned(CodeSynthesisContexts.size() - Limit);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/invalid-requirement-requires-expr.cpp"]={"clang/test/SemaCXX/invalid-requirement-requires-expr.cpp:18:16: note: (skipping 5 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)"} | ["clang/test/SemaCXX/invalid-requirement-requires-expr.cpp"]={"clang/test/SemaCXX/invalid-requirement-requires-expr.cpp:18:16: note: (skipping 5 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)"} | ||
Line 5,469: | Line 5,481: | ||
}, | }, | ||
["note_instantiation_required_here"]={ | ["note_instantiation_required_here"]={ | ||
[ | [b]="%select{implicit|explicit}0 instantiation first required here", | ||
[ | [d]=c, | ||
[ | [e]="(?:implicit|explicit) instantiation first required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"06db9f50a2d6",1255378708,"Diagnose the declaration of explicit specializations after an implicit","Diagnose the declaration of explicit specializations after an implicit\ninstantiation has already been required. To do so, keep track of the\npoint of instantiation for anything that can be instantiated.\n\nllvm-svn: 83890"}, | [h]={"06db9f50a2d6",1255378708,"Diagnose the declaration of explicit specializations after an implicit","Diagnose the declaration of explicit specializations after an implicit\ninstantiation has already been required. To do so, keep track of the\npoint of instantiation for anything that can be instantiated.\n\nllvm-svn: 83890"}, | ||
[i]={{ | [i]={{s,4678,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n // C++ [temp.expl.spec]p6:\n // If a template, a member template or the member of a class template is\n // explicitly specialized then that specialization shall be declared\n // before the first use of that specialization that would cause an implicit\n // instantiation to take place, in every translation unit in which such a\n // use occurs; no diagnostic is required.\n if (PrevDecl && PrevDecl->getPointOfInstantiation().isValid()) {\n // ...\n if (!Okay) {\n // ...\n Diag(PrevDecl->getPointOfInstantiation(), diag::note_instantiation_required_here) << (PrevDecl->getTemplateSpecializationKind() != TSK_ImplicitInstantiation);"},{s,8883,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n // C++ [temp.expl.spec]p6:\n // If a template, a member template or the member of a class template is\n // explicitly specialized then that specialization shall be declared\n // before the first use of that specialization that would cause an implicit\n // instantiation to take place, in every translation unit in which such a\n // use occurs; no diagnostic is required.\n if (PrevDecl && PrevDecl->getPointOfInstantiation().isValid()) {\n // ...\n if (!Okay) {\n // ...\n Diag(PrevDecl->getPointOfInstantiation(), diag::note_instantiation_required_here) << (PrevDecl->getTemplateSpecializationKind() != TSK_ImplicitInstantiation);"},{s,9202,"/// Diagnose cases where we have an explicit template specialization\n/// before/after an explicit template instantiation, producing diagnostics\n/// for those cases where they are required and determining whether the\n/// new specialization/instantiation will have any effect.\n///\n/// \\param NewLoc the location of the new explicit specialization or\n/// instantiation.\n///\n/// \\param NewTSK the kind of the new explicit specialization or instantiation.\n///\n/// \\param PrevDecl the previous declaration of the entity.\n///\n/// \\param PrevTSK the kind of the old explicit specialization or instantiatin.\n///\n/// \\param PrevPointOfInstantiation if valid, indicates where the previous\n/// declaration was instantiated (either implicitly or explicitly).\n///\n/// \\param HasNoEffect will be set to true to indicate that the new\n/// specialization or instantiation has no effect and should be ignored.\n///\n/// \\returns true if there was an error that should prevent the introduction of\n/// the new declaration into the AST, false otherwise.\nbool Sema::CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPointOfInstantiation, bool &HasNoEffect) {\n // ...\n case TSK_ExplicitSpecialization:\n // ...\n case TSK_ExplicitInstantiationDeclaration:\n case TSK_ExplicitInstantiationDefinition:\n // ...\n Diag(PrevPointOfInstantiation, diag::note_instantiation_required_here) << (PrevTSK != TSK_ImplicitInstantiation);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:18:7: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:19:7: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:20:19: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:21:19: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:16:25: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:50:3: note: implicit instantiation first required here"} | ["clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:18:7: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:19:7: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:20:19: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:21:19: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:16:25: note: implicit instantiation first required here","clang/test/CXX/temp/temp.spec/temp.expl.spec/p6.cpp:50:3: note: implicit instantiation first required here"} | ||
Line 5,481: | Line 5,493: | ||
}, | }, | ||
["note_invalid_consteval_initializer"]={ | ["note_invalid_consteval_initializer"]={ | ||
[ | [b]="in the default initializer of %0", | ||
[ | [d]=c, | ||
[ | [e]="in the default initializer of (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{ | [i]={{o,18268,"static void EvaluateAndDiagnoseImmediateInvocation(Sema &SemaRef, Sema::ImmediateInvocationCandidate Candidate) {\n // ...\n if (!Result || !Notes.empty()) {\n // ...\n if (auto Context = SemaRef.InnermostDeclarationWithDelayedImmediateInvocations()) {\n SemaRef.Diag(Context->Loc, diag::note_invalid_consteval_initializer) << Context->Decl;"},{o,18451,"static void HandleImmediateInvocations(Sema &SemaRef, Sema::ExpressionEvaluationContextRecord &Rec) {\n // ...\n for (auto *DR : Rec.ReferenceToConsteval) {\n // ...\n if (!Rec.InImmediateEscalatingFunctionContext || (SemaRef.inTemplateInstantiation() && !ImmediateEscalating)) {\n // ...\n if (auto Context = SemaRef.InnermostDeclarationWithDelayedImmediateInvocations()) {\n SemaRef.Diag(Context->Loc, diag::note_invalid_consteval_initializer) << Context->Decl;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx2a-consteval-default-params.cpp"]={"clang/test/SemaCXX/cxx2a-consteval-default-params.cpp:23:6: note: in the default initializer of \'defaulted\'"} | ["clang/test/SemaCXX/cxx2a-consteval-default-params.cpp"]={"clang/test/SemaCXX/cxx2a-consteval-default-params.cpp:23:6: note: in the default initializer of \'defaulted\'"} | ||
Line 5,493: | Line 5,505: | ||
}, | }, | ||
["note_invalid_consteval_initializer_here"]={ | ["note_invalid_consteval_initializer_here"]={ | ||
[ | [b]={{nil,F,"initialized here %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="initialized here (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub} | ||
}, | }, | ||
["note_invalid_subexpr_in_const_expr"]={ | ["note_invalid_subexpr_in_const_expr"]={ | ||
[ | [b]="subexpression not valid in a constant expression", | ||
[ | [d]=c, | ||
[ | [e]="subexpression not valid in a constant expression", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"f57d8cb13121",1323471481,"C++11 constant expressions: Don\'t use CheckICE in C++11; instead, determine","C++11 constant expressions: Don\'t use CheckICE in C++11; instead, determine\nwhether an expression is a (core) constant expression as a side-effect of\nevaluation. This takes us from accepting far too few expressions as ICEs to\naccepting slightly too many -- fixes for the remaining cases are coming next.\n\nThe diagnostics produced when an expression is found to be non-constant are\ncurrently quite poor (with generic wording but reasonable source locations),\nand will be improved in subsequent commits.\n\nllvm-svn: 146289"}, | [h]={"f57d8cb13121",1323471481,"C++11 constant expressions: Don\'t use CheckICE in C++11; instead, determine","C++11 constant expressions: Don\'t use CheckICE in C++11; instead, determine\nwhether an expression is a (core) constant expression as a side-effect of\nevaluation. This takes us from accepting far too few expressions as ICEs to\naccepting slightly too many -- fixes for the remaining cases are coming next.\n\nThe diagnostics produced when an expression is found to be non-constant are\ncurrently quite poor (with generic wording but reasonable source locations),\nand will be improved in subsequent commits.\n\nllvm-svn: 146289"}, | ||
[i]={{l,2372,"/// Check that this core constant expression is of literal type, and if not,\n/// produce an appropriate diagnostic.\nstatic bool CheckLiteralType(EvalInfo &Info, const Expr *E, const LValue *This = nullptr) {\n // ...\n // Prvalue constant expressions must be of literal types.\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,2739,"static bool EvalAndBitcastToAPInt(EvalInfo &Info, const Expr *E, llvm::APInt &Res) {\n // ...\n if (SVal.isVector()) {\n // ...\n for (unsigned i = 0; i < SVal.getVectorLength(); i++) {\n // ...\n if (Elt.isInt()) {\n // ...\n } else if (Elt.isFloat()) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,2752,"static bool EvalAndBitcastToAPInt(EvalInfo &Info, const Expr *E, llvm::APInt &Res) {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,3723,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n } else {\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,5561,"/// CheckTrivialDefaultConstructor - Check whether a constructor is a trivial\n/// default constructor. If so, we\'ll fold it whether or not it\'s marked as\n/// constexpr. If it is marked as constexpr, we will never implicitly define it,\n/// so we need special handling.\nstatic bool CheckTrivialDefaultConstructor(EvalInfo &Info, SourceLocation Loc, const CXXConstructorDecl *CD, bool IsValueInitialization) {\n // ...\n // Value-initialization does not call a trivial default constructor, so such a\n // call is a core constant expression whether or not the constructor is\n // constexpr.\n if (!CD->isConstexpr() && !IsValueInitialization) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Info.CCEDiag(Loc, diag::note_invalid_subexpr_in_const_expr);"},{l,5583,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n // Bail out if the function declaration itself is invalid. We will\n // have produced a relevant diagnostic while parsing it, so just\n // note the problematic sub-expression.\n if (Declaration->isInvalidDecl()) {\n Info.FFDiag(CallLoc, diag::note_invalid_subexpr_in_const_expr);"},{l,5595,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Definition && Definition->isInvalidDecl()) {\n Info.FFDiag(CallLoc, diag::note_invalid_subexpr_in_const_expr);"},{l,5626,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Info.FFDiag(CallLoc, diag::note_invalid_subexpr_in_const_expr);"},{l,7481,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool Error(const Expr *E) { return Error(E, diag::note_invalid_subexpr_in_const_expr); }"},{l,9304,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrchr:\n case Builtin::BIwcschr:\n case Builtin::BImemchr:\n case Builtin::BIwmemchr:\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,9412,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BImemcpy:\n case Builtin::BImemmove:\n case Builtin::BIwmemcpy:\n case Builtin::BIwmemmove:\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,11242,"static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info) {\n // ...\n if (!Val.isInt()) {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12116,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_constant_p: {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12289,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrlen:\n case Builtin::BIwcslen:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12314,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrcmp:\n case Builtin::BIwcscmp:\n case Builtin::BIstrncmp:\n case Builtin::BIwcsncmp:\n case Builtin::BImemcmp:\n case Builtin::BIbcmp:\n case Builtin::BIwmemcmp:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12937,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n auto Error = [&](const Expr *E) {\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,15148,"static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {\n // ...\n if (E->isGLValue() || T->isFunctionType()) {\n // ...\n } else if (T->isVectorType()) {\n // ...\n } else if (T->isIntegralOrEnumerationType()) {\n // ...\n } else if (T->hasPointerRepresentation()) {\n // ...\n } else if (T->isRealFloatingType()) {\n // ...\n } else if (T->isAnyComplexType()) {\n // ...\n } else if (T->isFixedPointType()) {\n // ...\n } else if (T->isMemberPointerType()) {\n // ...\n } else if (T->isArrayType()) {\n // ...\n } else if (T->isRecordType()) {\n // ...\n } else if (T->isVoidType()) {\n // ...\n } else if (T->isAtomicType()) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{ | [i]={{l,2372,"/// Check that this core constant expression is of literal type, and if not,\n/// produce an appropriate diagnostic.\nstatic bool CheckLiteralType(EvalInfo &Info, const Expr *E, const LValue *This = nullptr) {\n // ...\n // Prvalue constant expressions must be of literal types.\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,2739,"static bool EvalAndBitcastToAPInt(EvalInfo &Info, const Expr *E, llvm::APInt &Res) {\n // ...\n if (SVal.isVector()) {\n // ...\n for (unsigned i = 0; i < SVal.getVectorLength(); i++) {\n // ...\n if (Elt.isInt()) {\n // ...\n } else if (Elt.isFloat()) {\n // ...\n } else {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,2752,"static bool EvalAndBitcastToAPInt(EvalInfo &Info, const Expr *E, llvm::APInt &Res) {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,3723,"/// Find the designated sub-object of an rvalue.\ntemplate <typename SubobjectHandler> typename SubobjectHandler::result_type findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, const SubobjectDesignator &Sub, SubobjectHandler &handler) {\n // ...\n // Walk the designator\'s path to find the subobject.\n for (unsigned I = 0, N = Sub.Entries.size(); /**/; ++I) {\n // ...\n // If this is our last pass, check that the final object type is OK.\n if (I == N || (I == N - 1 && ObjType->isAnyComplexType())) {\n // Accesses to volatile objects are prohibited.\n if (ObjType.isVolatileQualified() && isFormalAccess(handler.AccessKind)) {\n if (Info.getLangOpts().CPlusPlus) {\n // ...\n } else {\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,5561,"/// CheckTrivialDefaultConstructor - Check whether a constructor is a trivial\n/// default constructor. If so, we\'ll fold it whether or not it\'s marked as\n/// constexpr. If it is marked as constexpr, we will never implicitly define it,\n/// so we need special handling.\nstatic bool CheckTrivialDefaultConstructor(EvalInfo &Info, SourceLocation Loc, const CXXConstructorDecl *CD, bool IsValueInitialization) {\n // ...\n // Value-initialization does not call a trivial default constructor, so such a\n // call is a core constant expression whether or not the constructor is\n // constexpr.\n if (!CD->isConstexpr() && !IsValueInitialization) {\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Info.CCEDiag(Loc, diag::note_invalid_subexpr_in_const_expr);"},{l,5583,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n // Bail out if the function declaration itself is invalid. We will\n // have produced a relevant diagnostic while parsing it, so just\n // note the problematic sub-expression.\n if (Declaration->isInvalidDecl()) {\n Info.FFDiag(CallLoc, diag::note_invalid_subexpr_in_const_expr);"},{l,5595,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Definition && Definition->isInvalidDecl()) {\n Info.FFDiag(CallLoc, diag::note_invalid_subexpr_in_const_expr);"},{l,5626,"/// CheckConstexprFunction - Check that a function can be called in a constant\n/// expression.\nstatic bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Declaration, const FunctionDecl *Definition, const Stmt *Body) {\n // ...\n if (Info.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Info.FFDiag(CallLoc, diag::note_invalid_subexpr_in_const_expr);"},{l,7481,"template <class Derived> class ExprEvaluatorBase : public ConstStmtVisitor<Derived, bool> {\n // ...\n bool Error(const Expr *E) { return Error(E, diag::note_invalid_subexpr_in_const_expr); }"},{l,9304,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrchr:\n case Builtin::BIwcschr:\n case Builtin::BImemchr:\n case Builtin::BIwmemchr:\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,9412,"bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BImemcpy:\n case Builtin::BImemmove:\n case Builtin::BIwmemcpy:\n case Builtin::BIwmemmove:\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,11242,"static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info) {\n // ...\n if (!Val.isInt()) {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12116,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BI__builtin_constant_p: {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12289,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrlen:\n case Builtin::BIwcslen:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12314,"bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, unsigned BuiltinOp) {\n // ...\n case Builtin::BIstrcmp:\n case Builtin::BIwcscmp:\n case Builtin::BIstrncmp:\n case Builtin::BIwcsncmp:\n case Builtin::BImemcmp:\n case Builtin::BIbcmp:\n case Builtin::BIwmemcmp:\n // A call to strlen is not a constant expression.\n if (Info.getLangOpts().CPlusPlus11)\n // ...\n else\n Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,12937,"template <class SuccessCB, class AfterCB> static bool EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E, SuccessCB &&Success, AfterCB &&DoAfter) {\n // ...\n auto Error = [&](const Expr *E) {\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{l,15148,"static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {\n // ...\n if (E->isGLValue() || T->isFunctionType()) {\n // ...\n } else if (T->isVectorType()) {\n // ...\n } else if (T->isIntegralOrEnumerationType()) {\n // ...\n } else if (T->hasPointerRepresentation()) {\n // ...\n } else if (T->isRealFloatingType()) {\n // ...\n } else if (T->isAnyComplexType()) {\n // ...\n } else if (T->isFixedPointType()) {\n // ...\n } else if (T->isMemberPointerType()) {\n // ...\n } else if (T->isArrayType()) {\n // ...\n } else if (T->isRecordType()) {\n // ...\n } else if (T->isVoidType()) {\n // ...\n } else if (T->isAtomicType()) {\n // ...\n } else if (Info.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{x,337,"bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {\n // ...\n if (!F->isConstexpr()) {\n // ...\n if (S.getLangOpts().CPlusPlus11) {\n // ...\n } else {\n S.FFDiag(Loc, diag::note_invalid_subexpr_in_const_expr);"},{q,14202,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n // Check whether the initializer is sufficiently constant.\n if (getLangOpts().CPlusPlus && !type->isDependentType() && Init && !Init->isValueDependent() && (GlobalStorage || var->isConstexpr() || var->mightBeUsableInConstantExpressions(Context))) {\n // ...\n if (!getLangOpts().CPlusPlus11) {\n // ...\n // Compute and cache the constant value, and remember that we have a\n // constant initializer.\n if (HasConstInit) {\n // ...\n } else if (CacheCulprit) {\n Notes.emplace_back(CacheCulprit->getExprLoc(), PDiag(diag::note_invalid_subexpr_in_const_expr));"},{q,14217,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n // Check whether the initializer is sufficiently constant.\n if (getLangOpts().CPlusPlus && !type->isDependentType() && Init && !Init->isValueDependent() && (GlobalStorage || var->isConstexpr() || var->mightBeUsableInConstantExpressions(Context))) {\n // ...\n if (HasConstInit) {\n // ...\n } else if (var->isConstexpr()) {\n // ...\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {"},{o,17998,"ExprResult Sema::VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold) {\n // ...\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {"},{fb,5986,"/// EvaluateConvertedConstantExpression - Evaluate an Expression\n/// That is a converted constant expression\n/// (which was built with BuildConvertedConstantExpression)\nstatic ExprResult EvaluateConvertedConstantExpression(Sema &S, Expr *E, QualType T, APValue &Value, Sema::CCEKind CCE, bool RequireInt, const APValue &PreNarrowingValue) {\n // ...\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {"},{s,6573,"/// Determine whether the given template argument is a null pointer\n/// value of the appropriate type.\nstatic NullPointerValueKind isNullPointerValueTemplateArgument(Sema &S, NonTypeTemplateParmDecl *Param, QualType ParamType, Expr *Arg, Decl *Entity = nullptr) {\n // ...\n if (!Arg->EvaluateAsRValue(EvalResult, S.Context) || EvalResult.HasSideEffects) {\n // ...\n if (Notes.size() == 1 && Notes[0].second.getDiagID() == diag::note_invalid_subexpr_in_const_expr) {"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p8-cxx20.cpp"]={"clang/test/CXX/temp/temp.param/p8-cxx20.cpp:38:9: note: subexpression not valid in a constant expression"} | ["clang/test/CXX/temp/temp.param/p8-cxx20.cpp"]={"clang/test/CXX/temp/temp.param/p8-cxx20.cpp:38:9: note: subexpression not valid in a constant expression"} | ||
Line 5,513: | Line 5,525: | ||
}, | }, | ||
["note_invalid_ucn_name_candidate"]={ | ["note_invalid_ucn_name_candidate"]={ | ||
[ | [b]={{nil,O,"did you mean %0 (\'%2\' U+%1)?"}}, | ||
[ | [d]=c, | ||
[ | [e]="did you mean (.*?) \\(\'(.*?)\' U\\+(.*?)\\)\\?", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{"clang/lib/Lex/LiteralSupport.cpp",574,"static void DiagnoseInvalidUnicodeCharacterName(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc Loc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, llvm::StringRef Name) {\n // ...\n for (const auto &Match : Matches) {\n // ...\n Diag(Diags, Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd,\n diag::note_invalid_ucn_name_candidate)"}}, | [i]={{"clang/lib/Lex/LiteralSupport.cpp",574,"static void DiagnoseInvalidUnicodeCharacterName(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc Loc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, llvm::StringRef Name) {\n // ...\n for (const auto &Match : Matches) {\n // ...\n Diag(Diags, Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd,\n diag::note_invalid_ucn_name_candidate)"}}, | ||
[j]={ | [j]={ | ||
Line 5,525: | Line 5,537: | ||
}, | }, | ||
["note_invalid_ucn_name_loose_matching"]={ | ["note_invalid_ucn_name_loose_matching"]={ | ||
[ | [b]={{nil,O,"characters names in Unicode escape sequences are sensitive to case and whitespaces"}}, | ||
[ | [d]=c, | ||
[ | [e]="characters names in Unicode escape sequences are sensitive to case and whitespaces", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{"clang/lib/Lex/Lexer.cpp",3428,"std::optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (!Match) {\n // ...\n if (Diagnose) {\n // ...\n if (LooseMatch) {\n Diag(StartName, diag::note_invalid_ucn_name_loose_matching) << FixItHint::CreateReplacement(makeCharRange(*this, StartName, CurPtr - CharSize), LooseMatch->Name);"},{"clang/lib/Lex/LiteralSupport.cpp",544,"static void DiagnoseInvalidUnicodeCharacterName(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc Loc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, llvm::StringRef Name) {\n // ...\n if (Res) {\n Diag(Diags, Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd, diag::note_invalid_ucn_name_loose_matching) << FixItHint::CreateReplacement(MakeCharSourceRange(Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd), Res->Name);"}}, | [i]={{"clang/lib/Lex/Lexer.cpp",3428,"std::optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr, const char *SlashLoc, Token *Result) {\n // ...\n if (!Match) {\n // ...\n if (Diagnose) {\n // ...\n if (LooseMatch) {\n Diag(StartName, diag::note_invalid_ucn_name_loose_matching) << FixItHint::CreateReplacement(makeCharRange(*this, StartName, CurPtr - CharSize), LooseMatch->Name);"},{"clang/lib/Lex/LiteralSupport.cpp",544,"static void DiagnoseInvalidUnicodeCharacterName(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc Loc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, llvm::StringRef Name) {\n // ...\n if (Res) {\n Diag(Diags, Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd, diag::note_invalid_ucn_name_loose_matching) << FixItHint::CreateReplacement(MakeCharSourceRange(Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd), Res->Name);"}}, | ||
[j]={ | [j]={ | ||
Line 5,537: | Line 5,549: | ||
}, | }, | ||
["note_it_delegates_to"]={ | ["note_it_delegates_to"]={ | ||
[ | [b]="it delegates to", | ||
[ | [d]=c, | ||
[ | [e]="it delegates to", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6118d6642b8f",1304488644,"Implement a better version of delegating constructor cycle detection.","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"}, | [h]={"6118d6642b8f",1304488644,"Implement a better version of delegating constructor cycle detection.","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"}, | ||
[i]={{m,18544,"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 // Don\'t add a note for a function delegating directly to itself.\n if (TCanonical != Canonical)\n S.Diag(Target->getLocation(), diag::note_it_delegates_to);"}}, | [i]={{m,18544,"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 // Don\'t add a note for a function delegating directly to itself.\n if (TCanonical != Canonical)\n S.Diag(Target->getLocation(), diag::note_it_delegates_to);"}}, | ||
Line 5,549: | Line 5,561: | ||
}, | }, | ||
["note_ivar_decl"]={ | ["note_ivar_decl"]={ | ||
[ | [b]="instance variable is declared here", | ||
[ | [d]=c, | ||
[ | [e]="instance variable is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5921b83f5413",1269370942,"Improve diagnostic for @property/ivar type mismatch by including the types of the","Improve diagnostic for @property/ivar type mismatch by including the types of the\nivar and @property respectively.\n\nllvm-svn: 99312"}, | [h]={"5921b83f5413",1269370942,"Improve diagnostic for @property/ivar type mismatch by including the types of the","Improve diagnostic for @property/ivar type mismatch by including the types of the\nivar and @property respectively.\n\nllvm-svn: 99312"}, | ||
[i]={{ | [i]={{o,636,"static void DiagnoseDirectIsaAccess(Sema &S, const ObjCIvarRefExpr *OIRE, SourceLocation AssignLoc, const Expr *RHS) {\n // ...\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>())\n if (ObjCInterfaceDecl *IDecl = OTy->getInterface()) {\n // ...\n if (!ClassDeclared->getSuperClass() && (*ClassDeclared->ivar_begin()) == IV) {\n // ...\n S.Diag(IV->getLocation(), diag::note_ivar_decl);"},{cb,1290,"/// 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(originalIvar->getLocation(), diag::note_ivar_decl);"},{cb,1379,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // ...\n if (!compat) {\n // ...\n Diag(Ivar->getLocation(), diag::note_ivar_decl);"},{cb,1394,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // ...\n if (!compat) {\n // ...\n } else {\n // ...\n if (lhsType != rhsType && lhsType->isArithmeticType()) {\n // ...\n Diag(Ivar->getLocation(), diag::note_ivar_decl);"},{cb,1403,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // ...\n // __weak is explicit. So it works on Canonical type.\n if ((PropType.isObjCGCWeak() && !IvarType.isObjCGCWeak() && getLangOpts().getGC() != LangOptions::NonGC)) {\n // ...\n Diag(Ivar->getLocation(), diag::note_ivar_decl);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:5:6: note: instance variable is declared here"} | ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:5:6: note: instance variable is declared here"} | ||
Line 5,561: | Line 5,573: | ||
}, | }, | ||
["note_lambda_capture_initializer"]={ | ["note_lambda_capture_initializer"]={ | ||
[ | [b]={{nil,I,"%select{implicitly |}2captured%select{| by reference}3%select{%select{ due to use|}2 here| via initialization of lambda capture %0}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:implicitly |)captured(?:| by reference)(?:(?: due to use|) here| via initialization of lambda capture (.*?))", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{N,8315,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n for (unsigned I = 0; I != Path.size(); ++I) {\n // ...\n case IndirectLocalPathEntry::LambdaCaptureInit:\n // ...\n Diag(Elem.Capture->getLocation(), diag::note_lambda_capture_initializer) << VD << VD->isInitCapture() << Elem.Capture->isExplicit() << (Elem.Capture->getCaptureKind() == LCK_ByRef) << VD << nextPathEntryRange(Path, I + 1, L);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp:60:17: note: captured by reference via initialization of lambda capture \'c\'"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p11-1y.cpp:60:17: note: captured by reference via initialization of lambda capture \'c\'"} | ||
Line 5,573: | Line 5,585: | ||
}, | }, | ||
["note_lambda_decl"]={ | ["note_lambda_decl"]={ | ||
[ | [b]="lambda expression begins here", | ||
[ | [d]=c, | ||
[ | [e]="lambda expression begins here", | ||
[ | [f]=a, | ||
[ | [g]=Nc, | ||
[h]={"24af85047046",1328309257,"Implement implicit capture for lambda expressions.","Implement implicit capture for lambda expressions.\n\nStill left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases.\n\nllvm-svn: 149718"}, | [h]={"24af85047046",1328309257,"Implement implicit capture for lambda expressions.","Implement implicit capture for lambda expressions.\n\nStill left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases.\n\nllvm-svn: 149718"}, | ||
[i]={{m,1446,"static bool checkMemberDecomposition(Sema &S, ArrayRef<BindingDecl *> Bindings, ValueDecl *Src, QualType DecompType, const CXXRecordDecl *OrigRD) {\n // ...\n for (auto *FD : RD->fields()) {\n // ...\n // All the non-static data members are required to be nameable, so they\n // must all have names.\n if (!FD->getDeclName()) {\n if (RD->isLambda()) {\n // ...\n S.Diag(RD->getLocation(), diag::note_lambda_decl);"},{m,9599,"/// Determine whether a defaulted special member function should be defined as\n/// deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11,\n/// C++11 [class.copy]p23, and C++11 [class.dtor]p5.\nbool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI, bool Diagnose) {\n // ...\n // C++11 [expr.lambda.prim]p19:\n // The closure type associated with a lambda-expression has a\n // deleted (8.4.3) default constructor and a deleted copy\n // assignment operator.\n // C++2a adds back these operators if the lambda has no lambda-capture.\n if (RD->isLambda() && !RD->lambdaIsDefaultConstructibleAndAssignable() && (CSM == CXXDefaultConstructor || CSM == CXXCopyAssignment)) {\n if (Diagnose)\n Diag(RD->getLocation(), diag::note_lambda_decl);"},{ | [i]={{m,1446,"static bool checkMemberDecomposition(Sema &S, ArrayRef<BindingDecl *> Bindings, ValueDecl *Src, QualType DecompType, const CXXRecordDecl *OrigRD) {\n // ...\n for (auto *FD : RD->fields()) {\n // ...\n // All the non-static data members are required to be nameable, so they\n // must all have names.\n if (!FD->getDeclName()) {\n if (RD->isLambda()) {\n // ...\n S.Diag(RD->getLocation(), diag::note_lambda_decl);"},{m,9599,"/// Determine whether a defaulted special member function should be defined as\n/// deleted, as specified in C++11 [class.ctor]p5, C++11 [class.copy]p11,\n/// C++11 [class.copy]p23, and C++11 [class.dtor]p5.\nbool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI, bool Diagnose) {\n // ...\n // C++11 [expr.lambda.prim]p19:\n // The closure type associated with a lambda-expression has a\n // deleted (8.4.3) default constructor and a deleted copy\n // assignment operator.\n // C++2a adds back these operators if the lambda has no lambda-capture.\n if (RD->isLambda() && !RD->lambdaIsDefaultConstructibleAndAssignable() && (CSM == CXXDefaultConstructor || CSM == CXXCopyAssignment)) {\n if (Diagnose)\n Diag(RD->getLocation(), diag::note_lambda_decl);"},{o,19745,"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(LSI->Lambda->getBeginLoc(), diag::note_lambda_decl);"},{o,20814,"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 if (LSI->Lambda) {\n Diag(LSI->Lambda->getBeginLoc(), diag::note_lambda_decl);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18: note: lambda expression begins here","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18: note: lambda expression begins here"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18: note: lambda expression begins here","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18: note: lambda expression begins here"} | ||
Line 5,585: | Line 5,597: | ||
}, | }, | ||
["note_lambda_default_capture_fixit"]={ | ["note_lambda_default_capture_fixit"]={ | ||
[ | [b]={{nil,M,"default capture by %select{value|reference}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="default capture by (?:value|reference)", | ||
[ | [f]=a, | ||
[ | [g]=Nc, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{o,19534,"/// Create up to 4 fix-its for explicit reference and value capture of \\p Var or\n/// default capture. Fixes may be omitted if they aren\'t allowed by the\n/// standard, for example we can\'t emit a default copy capture fix-it if we\n/// already explicitly copy capture capture another variable.\nstatic void buildLambdaCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI, ValueDecl *Var) {\n // ...\n if (ShouldOfferCopyFix) {\n // ...\n // We can\'t use default capture by copy if any captures already specified\n // capture by copy.\n if (CanDefaultCopyCapture && llvm::none_of(LSI->Captures, [](Capture &C) { return !C.isThisCapture() && !C.isInitCapture() && C.isCopyCapture(); })) {\n // ...\n Sema.Diag(DefaultInsertLoc, diag::note_lambda_default_capture_fixit) << /*value*/ 0 << FixItHint::CreateInsertion(DefaultInsertLoc, FixBuffer);"},{o,19665,"/// Create up to 4 fix-its for explicit reference and value capture of \\p Var or\n/// default capture. Fixes may be omitted if they aren\'t allowed by the\n/// standard, for example we can\'t emit a default copy capture fix-it if we\n/// already explicitly copy capture capture another variable.\nstatic void buildLambdaCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI, ValueDecl *Var) {\n // ...\n // We can\'t use default capture by reference if any captures already specified\n // capture by reference.\n if (llvm::none_of(LSI->Captures, [](Capture &C) { return !C.isInitCapture() && C.isReferenceCapture() && !C.isThisCapture(); })) {\n // ...\n Sema.Diag(DefaultInsertLoc, diag::note_lambda_default_capture_fixit) << /*reference*/ 1 << FixItHint::CreateInsertion(DefaultInsertLoc, FixBuffer);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx20-decomposition.cpp"]={"clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by reference"} | ["clang/test/SemaCXX/cxx20-decomposition.cpp"]={"clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: default capture by reference"} | ||
Line 5,597: | Line 5,609: | ||
}, | }, | ||
["note_lambda_substitution_here"]={ | ["note_lambda_substitution_here"]={ | ||
[ | [b]="while substituting into a lambda expression here", | ||
[ | [d]=c, | ||
[ | [e]="while substituting into a lambda expression here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{ | [i]={{E,1019,"/// 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::LambdaExpressionSubstitution:\n Diags.Report(Active->PointOfInstantiation, diag::note_lambda_substitution_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/lambda-pack-expansion.cpp"]={"clang/test/SemaCXX/lambda-pack-expansion.cpp:10:3: note: while substituting into a lambda expression here"} | ["clang/test/SemaCXX/lambda-pack-expansion.cpp"]={"clang/test/SemaCXX/lambda-pack-expansion.cpp:10:3: note: while substituting into a lambda expression here"} | ||
Line 5,609: | Line 5,621: | ||
}, | }, | ||
["note_lambda_this_capture_fixit"]={ | ["note_lambda_this_capture_fixit"]={ | ||
[ | [b]={{nil,M,"explicitly capture \'this\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="explicitly capture \'this\'", | ||
[ | [f]=a, | ||
[ | [g]=Nc, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{Y,1276,"static void buildLambdaThisCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI) {\n // ...\n Sema.Diag(DiagLoc, diag::note_lambda_this_capture_fixit) << FixItHint::CreateInsertion(DiagLoc, LSI->NumExplicitCaptures > 0 ? \", this\" : \"this\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/lambda-expressions.cpp"]={"clang/test/SemaCXX/lambda-expressions.cpp:15:8: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:16:24: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:23:8: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:25:8: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:380:14: note: explicitly capture \'this\'"} | ["clang/test/SemaCXX/lambda-expressions.cpp"]={"clang/test/SemaCXX/lambda-expressions.cpp:15:8: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:16:24: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:23:8: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:25:8: note: explicitly capture \'this\'","clang/test/SemaCXX/lambda-expressions.cpp:380:14: note: explicitly capture \'this\'"} | ||
Line 5,621: | Line 5,633: | ||
}, | }, | ||
["note_lambda_to_block_conv"]={ | ["note_lambda_to_block_conv"]={ | ||
[ | [b]="implicit capture of lambda object due to conversion to block pointer here", | ||
[ | [d]=c, | ||
[ | [e]="implicit capture of lambda object due to conversion to block pointer here", | ||
[ | [f]=a, | ||
[ | [g]=Nc, | ||
[h]={"d3b672c38545",1329354376,"Implicitly define a lambda\'s conversion functions (to function","Implicitly define a lambda\'s conversion functions (to function\npointers and block pointers). We use dummy definitions to keep the\ninvariant that an implicit, used definition has a body; IR generation\nwill substitute the actual contents, since they can\'t be represented\nas C++. \n\nFor the block pointer case, compute the copy-initialization needed to\ncapture the lambda object in the block, which IR generation will need\nlater.\n\nllvm-svn: 150645"}, | [h]={"d3b672c38545",1329354376,"Implicitly define a lambda\'s conversion functions (to function","Implicitly define a lambda\'s conversion functions (to function\npointers and block pointers). We use dummy definitions to keep the\ninvariant that an implicit, used definition has a body; IR generation\nwill substitute the actual contents, since they can\'t be represented\nas C++. \n\nFor the block pointer case, compute the copy-initialization needed to\ncapture the lambda object in the block, which IR generation will need\nlater.\n\nllvm-svn: 150645"}, | ||
[i]={{m,15692,"void Sema::DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLocation, CXXConversionDecl *Conv) {\n // ...\n if (BuildBlock.isInvalid()) {\n Diag(CurrentLocation, diag::note_lambda_to_block_conv);"},{m,15701,"void Sema::DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLocation, CXXConversionDecl *Conv) {\n // ...\n if (Return.isInvalid()) {\n Diag(CurrentLocation, diag::note_lambda_to_block_conv);"},{ | [i]={{m,15692,"void Sema::DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLocation, CXXConversionDecl *Conv) {\n // ...\n if (BuildBlock.isInvalid()) {\n Diag(CurrentLocation, diag::note_lambda_to_block_conv);"},{m,15701,"void Sema::DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLocation, CXXConversionDecl *Conv) {\n // ...\n if (Return.isInvalid()) {\n Diag(CurrentLocation, diag::note_lambda_to_block_conv);"},{Y,8078,"ExprResult Sema::BuildCXXMemberCallExpr(Expr *E, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates) {\n // ...\n if (Method->getParent()->isLambda() && Method->getConversionType()->isBlockPointerType()) {\n // ...\n if (isa<LambdaExpr>(SubE)) {\n // ...\n // FIXME: This note should be produced by a CodeSynthesisContext.\n if (BlockExp.isInvalid())\n Diag(Exp.get()->getExprLoc(), diag::note_lambda_to_block_conv);"}} | ||
}, | }, | ||
["note_lambda_variable_capture_fixit"]={ | ["note_lambda_variable_capture_fixit"]={ | ||
[ | [b]={{nil,M,"capture %0 by %select{value|reference}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="capture (.*?) by (?:value|reference)", | ||
[ | [f]=a, | ||
[ | [g]=Nc, | ||
[h]={ | [h]={pb,1590001902,vb,Db}, | ||
[i]={{ | [i]={{o,19486,"/// Create up to 4 fix-its for explicit reference and value capture of \\p Var or\n/// default capture. Fixes may be omitted if they aren\'t allowed by the\n/// standard, for example we can\'t emit a default copy capture fix-it if we\n/// already explicitly copy capture capture another variable.\nstatic void buildLambdaCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI, ValueDecl *Var) {\n // ...\n if (Var->getDeclName().isIdentifier() && !Var->getName().empty()) {\n // ...\n if (ShouldOfferCopyFix) {\n // ...\n Sema.Diag(VarInsertLoc, diag::note_lambda_variable_capture_fixit) << Var << /*value*/ 0 << FixItHint::CreateInsertion(VarInsertLoc, FixBuffer);"},{o,19521,"/// Create up to 4 fix-its for explicit reference and value capture of \\p Var or\n/// default capture. Fixes may be omitted if they aren\'t allowed by the\n/// standard, for example we can\'t emit a default copy capture fix-it if we\n/// already explicitly copy capture capture another variable.\nstatic void buildLambdaCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI, ValueDecl *Var) {\n // ...\n if (Var->getDeclName().isIdentifier() && !Var->getName().empty()) {\n // ...\n Sema.Diag(VarInsertLoc, diag::note_lambda_variable_capture_fixit) << Var << /*reference*/ 1 << FixItHint::CreateInsertion(VarInsertLoc, FixBuffer);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx20-decomposition.cpp"]={"clang/test/SemaCXX/cxx20-decomposition.cpp:172:14: note: capture \'b\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:172:14: note: capture \'b\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:172:11: note: capture \'b\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:172:11: note: capture \'b\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:37: note: capture \'a\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:37: note: capture \'a\' by reference"} | ["clang/test/SemaCXX/cxx20-decomposition.cpp"]={"clang/test/SemaCXX/cxx20-decomposition.cpp:172:14: note: capture \'b\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:172:14: note: capture \'b\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:172:11: note: capture \'b\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:172:11: note: capture \'b\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:38: note: capture \'a\' by reference","clang/test/SemaCXX/cxx20-decomposition.cpp:177:37: note: capture \'a\' by value","clang/test/SemaCXX/cxx20-decomposition.cpp:177:37: note: capture \'a\' by reference"} | ||
Line 5,642: | Line 5,654: | ||
}, | }, | ||
["note_lifetime_extending_member_declared_here"]={ | ["note_lifetime_extending_member_declared_here"]={ | ||
[ | [b]={{nil,L,"%select{%select{reference|\'std::initializer_list\'}0 member|member with %select{reference|\'std::initializer_list\'}0 subobject}1 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:(?:reference|\'std\\:\\:initializer_list\') member|member with (?:reference|\'std\\:\\:initializer_list\') subobject) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0a9969b36b16",1531786301,"Restructure checking for, and warning on, lifetime extension.","Restructure checking for, and warning on, lifetime extension.\n\nThis change implements C++ DR1696, which makes initialization of a\nreference member of a class from a temporary object ill-formed. The\nstandard wording here is imprecise, but we interpret it as meaning that\nany time a mem-initializer would result in lifetime extension, the\nprogram is ill-formed.\n\nllvm-svn: 337226"}, | [h]={"0a9969b36b16",1531786301,"Restructure checking for, and warning on, lifetime extension.","Restructure checking for, and warning on, lifetime extension.\n\nThis change implements C++ DR1696, which makes initialization of a\nreference member of a class from a temporary object ill-formed. The\nstandard wording here is imprecise, but we interpret it as meaning that\nany time a mem-initializer would result in lifetime extension, the\nprogram is ill-formed.\n\nllvm-svn: 337226"}, | ||
[i]={{ | [i]={{N,8190,"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 // ...\n // Don\'t bother adding a note pointing to the field if we\'re inside\n // its default member initializer; our primary diagnostic points to\n // the same place in that case.\n if (Path.empty() || Path.back().Kind != IndirectLocalPathEntry::DefaultInit) {\n Diag(ExtendingDecl->getLocation(), diag::note_lifetime_extending_member_declared_here) << RK << IsSubobjectMember;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-dangling-field.cpp"]={"clang/test/SemaCXX/warn-dangling-field.cpp:12:8: note: reference member declared here","clang/test/SemaCXX/warn-dangling-field.cpp:22:12: note: reference member declared here","clang/test/SemaCXX/warn-dangling-field.cpp:32:5: note: reference member declared here","clang/test/SemaCXX/warn-dangling-field.cpp:45:6: note: member with reference subobject declared here","clang/test/SemaCXX/warn-dangling-field.cpp:40:12: note: reference member declared here"} | ["clang/test/SemaCXX/warn-dangling-field.cpp"]={"clang/test/SemaCXX/warn-dangling-field.cpp:12:8: note: reference member declared here","clang/test/SemaCXX/warn-dangling-field.cpp:22:12: note: reference member declared here","clang/test/SemaCXX/warn-dangling-field.cpp:32:5: note: reference member declared here","clang/test/SemaCXX/warn-dangling-field.cpp:45:6: note: member with reference subobject declared here","clang/test/SemaCXX/warn-dangling-field.cpp:40:12: note: reference member declared here"} | ||
Line 5,654: | Line 5,666: | ||
}, | }, | ||
["note_local_decl_close_match"]={ | ["note_local_decl_close_match"]={ | ||
[ | [b]="local declaration nearly matches", | ||
[ | [d]=c, | ||
[ | [e]="local declaration nearly matches", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"114394f8246f",1376022901,"Implement [class.friend]p11\'s special name lookup rules for friend declarations","Implement [class.friend]p11\'s special name lookup rules for friend declarations\nof local classes. We were previously handling this by performing qualified\nlookup within a function declaration(!!); replace it with the proper scope\nlookup.\n\nllvm-svn: 188050"}, | [h]={"114394f8246f",1376022901,"Implement [class.friend]p11\'s special name lookup rules for friend declarations","Implement [class.friend]p11\'s special name lookup rules for friend declarations\nof local classes. We were previously handling this by performing qualified\nlookup within a function declaration(!!); replace it with the proper scope\nlookup.\n\nllvm-svn: 188050"}, | ||
[i]={{ | [i]={{q,9092,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n for (SmallVectorImpl<std::pair<FunctionDecl *, unsigned>>::iterator NearMatch = NearMatches.begin(), NearMatchEnd = NearMatches.end(); NearMatch != NearMatchEnd; ++NearMatch) {\n // ...\n // FIXME: These notes are poorly worded for the local friend case.\n if (unsigned Idx = NearMatch->second) {\n // ...\n } else if (FDisConst != NewFDisConst) {\n // ...\n } else\n SemaRef.Diag(FD->getLocation(), IsMember ? diag::note_member_def_close_match : diag::note_local_decl_close_match);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/class.access/class.friend/p11.cpp"]={"clang/test/CXX/class.access/class.friend/p11.cpp:29:10: note: local declaration nearly matches"} | ["clang/test/CXX/class.access/class.friend/p11.cpp"]={"clang/test/CXX/class.access/class.friend/p11.cpp:29:10: note: local declaration nearly matches"} | ||
Line 5,666: | Line 5,678: | ||
}, | }, | ||
["note_local_decl_close_param_match"]={ | ["note_local_decl_close_param_match"]={ | ||
[ | [b]="type of %ordinal0 parameter of local declaration does not match definition%diff{ ($ vs $)|}1,2", | ||
[ | [d]=c, | ||
[ | [e]="type of (.*?) parameter of local declaration does not match definition(?: \\((.*?) vs (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"114394f8246f",1376022901,"Implement [class.friend]p11\'s special name lookup rules for friend declarations","Implement [class.friend]p11\'s special name lookup rules for friend declarations\nof local classes. We were previously handling this by performing qualified\nlookup within a function declaration(!!); replace it with the proper scope\nlookup.\n\nllvm-svn: 188050"}, | [h]={"114394f8246f",1376022901,"Implement [class.friend]p11\'s special name lookup rules for friend declarations","Implement [class.friend]p11\'s special name lookup rules for friend declarations\nof local classes. We were previously handling this by performing qualified\nlookup within a function declaration(!!); replace it with the proper scope\nlookup.\n\nllvm-svn: 188050"}, | ||
[i]={{ | [i]={{q,9076,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n for (SmallVectorImpl<std::pair<FunctionDecl *, unsigned>>::iterator NearMatch = NearMatches.begin(), NearMatchEnd = NearMatches.end(); NearMatch != NearMatchEnd; ++NearMatch) {\n // ...\n // FIXME: These notes are poorly worded for the local friend case.\n if (unsigned Idx = NearMatch->second) {\n // ...\n SemaRef.Diag(Loc, IsMember ? diag::note_member_def_close_param_match : diag::note_local_decl_close_param_match) << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType();"}} | ||
}, | }, | ||
["note_local_var_initializer"]={ | ["note_local_var_initializer"]={ | ||
[ | [b]={{nil,L,"%select{via initialization of|binding reference}0 variable %select{%2 |}1here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:via initialization of|binding reference) variable (?:(.*?) |)here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"afe48f9d68e4",1532380882,"Fold -Wreturn-stack-address into general initialization lifetime","Fold -Wreturn-stack-address into general initialization lifetime\nchecking.\n\nllvm-svn: 337743"}, | [h]={"afe48f9d68e4",1532380882,"Fold -Wreturn-stack-address into general initialization lifetime","Fold -Wreturn-stack-address into general initialization lifetime\nchecking.\n\nllvm-svn: 337743"}, | ||
[i]={{ | [i]={{N,8302,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n for (unsigned I = 0; I != Path.size(); ++I) {\n // ...\n case IndirectLocalPathEntry::VarInit: {\n // ...\n Diag(VD->getLocation(), diag::note_local_var_initializer) << VD->getType()->isReferenceType() << VD->isImplicit() << VD->getDeclName() << nextPathEntryRange(Path, I + 1, L);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Analysis/stack-block-returned.cpp"]={"clang/test/Analysis/stack-block-returned.cpp:7:15: note: binding reference variable \'qq\' here"} | ["clang/test/Analysis/stack-block-returned.cpp"]={"clang/test/Analysis/stack-block-returned.cpp:7:15: note: binding reference variable \'qq\' here"} | ||
Line 5,687: | Line 5,699: | ||
}, | }, | ||
["note_lock_exclusive_and_shared"]={ | ["note_lock_exclusive_and_shared"]={ | ||
[ | [b]="the other acquisition of %0 \'%1\' is here", | ||
[ | [d]=c, | ||
[ | [e]="the other acquisition of (.*?) \'(.*?)\' is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"46b057681a7f",1315505978,"Thread safety: shared vs. exclusive locks","Thread safety: shared vs. exclusive locks\n\nllvm-svn: 139307"}, | [h]={"46b057681a7f",1315505978,"Thread safety: shared vs. exclusive locks","Thread safety: shared vs. exclusive locks\n\nllvm-svn: 139307"}, | ||
[i]={{ | [i]={{lb,1936,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n void handleExclusiveAndShared(StringRef Kind, Name LockName, SourceLocation Loc1, SourceLocation Loc2) override {\n // ...\n PartialDiagnosticAt Note(Loc2, S.PDiag(diag::note_lock_exclusive_and_shared) << Kind << LockName);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:642:10: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:675:12: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:701:10: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:716:12: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:727:12: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2852:23: note: the other acquisition of mutex \'mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2896:23: note: the other acquisition of mutex \'mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:4810:11: note: the other acquisition of mutex \'mu_\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:4821:11: note: the other acquisition of mutex \'mu_\' is here"} | ["clang/test/SemaCXX/warn-thread-safety-analysis.cpp"]={"clang/test/SemaCXX/warn-thread-safety-analysis.cpp:642:10: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:675:12: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:701:10: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:716:12: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:727:12: note: the other acquisition of mutex \'sls_mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2852:23: note: the other acquisition of mutex \'mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2896:23: note: the other acquisition of mutex \'mu\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:4810:11: note: the other acquisition of mutex \'mu_\' is here","clang/test/SemaCXX/warn-thread-safety-analysis.cpp:4821:11: note: the other acquisition of mutex \'mu_\' is here"} | ||
Line 5,699: | Line 5,711: | ||
}, | }, | ||
["note_locked_here"]={ | ["note_locked_here"]={ | ||
[ | [b]="%0 acquired here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) acquired here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"922866783b07",1328244326,"Thread safety analysis:","Thread safety analysis:\n * When we detect that a CFG block has inconsistent lock sets, point the\n diagnostic at the location where we found the inconsistency, and point a note\n at somewhere the inconsistently-locked mutex was locked.\n * Fix the wording of the normal (non-loop, non-end-of-function) case of this\n diagnostic to not suggest that the mutex is going out of scope.\n * Fix the diagnostic emission code to keep a warning and its note together when\n sorting the diagnostics into source location order.\n\nllvm-svn: 149669"}, | [h]={"922866783b07",1328244326,"Thread safety analysis:","Thread safety analysis:\n * When we detect that a CFG block has inconsistent lock sets, point the\n diagnostic at the location where we found the inconsistency, and point a note\n at somewhere the inconsistently-locked mutex was locked.\n * Fix the wording of the normal (non-loop, non-end-of-function) case of this\n diagnostic to not suggest that the mutex is going out of scope.\n * Fix the diagnostic emission code to keep a warning and its note together when\n sorting the diagnostics into source location order.\n\nllvm-svn: 149669"}, | ||
[i]={{ | [i]={{lb,1831,"class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler {\n // ...\n OptionalNotes makeLockedHereNote(SourceLocation LocLocked, StringRef Kind) { return LocLocked.isValid() ? getNotes(PartialDiagnosticAt(LocLocked, S.PDiag(diag::note_locked_here) << Kind)) : getNotes(); }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/warn-thread-safety-analysis.mm"]={"clang/test/SemaObjCXX/warn-thread-safety-analysis.mm:24:9: note: mutex acquired here"} | ["clang/test/SemaObjCXX/warn-thread-safety-analysis.mm"]={"clang/test/SemaObjCXX/warn-thread-safety-analysis.mm:24:9: note: mutex acquired here"} | ||
Line 5,711: | Line 5,723: | ||
}, | }, | ||
["note_logical_instead_of_bitwise_change_operator"]={ | ["note_logical_instead_of_bitwise_change_operator"]={ | ||
[ | [b]="use \'%0\' for a bitwise operation", | ||
[ | [d]=c, | ||
[ | [e]="use \'(.*?)\' for a bitwise operation", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0a0ba9d883f5",1313430606,"Add fixit notes for -Wconstant-logical-operand.","Add fixit notes for -Wconstant-logical-operand.\n\nllvm-svn: 137620"}, | [h]={"0a0ba9d883f5",1313430606,"Add fixit notes for -Wconstant-logical-operand.","Add fixit notes for -Wconstant-logical-operand.\n\nllvm-svn: 137620"}, | ||
[i]={{ | [i]={{o,13943,"// C99 6.5.[13,14]\ninline QualType Sema::CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n // Diagnose cases where the user write a logical and/or but probably meant a\n // bitwise one. We do this when the LHS is a non-bool integer and the RHS\n // is a constant.\n if (!EnumConstantInBoolContext && LHS.get()->getType()->isIntegerType() && !LHS.get()->getType()->isBooleanType() && RHS.get()->getType()->isIntegerType() && !RHS.get()->isValueDependent() &&\n // ...\n if (RHS.get()->EvaluateAsInt(EVResult, Context)) {\n // ...\n if ((getLangOpts().Bool && !RHS.get()->getType()->isBooleanType() && !RHS.get()->getExprLoc().isMacroID()) || (Result != 0 && Result != 1)) {\n // ...\n Diag(Loc, diag::note_logical_instead_of_bitwise_change_operator) << (Opc == BO_LAnd ? \"&\" : \"|\") << FixItHint::CreateReplacement(SourceRange(Loc, getLocForEndOfToken(Loc)), Opc == BO_LAnd ? \"&\" : \"|\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:78:47: note: use \'&\' for a bitwise operation"} | ["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:78:47: note: use \'&\' for a bitwise operation"} | ||
Line 5,723: | Line 5,735: | ||
}, | }, | ||
["note_logical_instead_of_bitwise_remove_constant"]={ | ["note_logical_instead_of_bitwise_remove_constant"]={ | ||
[ | [b]="remove constant to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="remove constant to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0a0ba9d883f5",1313430606,"Add fixit notes for -Wconstant-logical-operand.","Add fixit notes for -Wconstant-logical-operand.\n\nllvm-svn: 137620"}, | [h]={"0a0ba9d883f5",1313430606,"Add fixit notes for -Wconstant-logical-operand.","Add fixit notes for -Wconstant-logical-operand.\n\nllvm-svn: 137620"}, | ||
[i]={{ | [i]={{o,14100,"// C99 6.5.[13,14]\ninline QualType Sema::CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n // Diagnose cases where the user write a logical and/or but probably meant a\n // bitwise one. We do this when the LHS is a non-bool integer and the RHS\n // is a constant.\n if (!EnumConstantInBoolContext && LHS.get()->getType()->isIntegerType() && !LHS.get()->getType()->isBooleanType() && RHS.get()->getType()->isIntegerType() && !RHS.get()->isValueDependent() &&\n // ...\n if (RHS.get()->EvaluateAsInt(EVResult, Context)) {\n // ...\n if ((getLangOpts().Bool && !RHS.get()->getType()->isBooleanType() && !RHS.get()->getExprLoc().isMacroID()) || (Result != 0 && Result != 1)) {\n // ...\n if (Opc == BO_LAnd)\n // ...\n Diag(Loc, diag::note_logical_instead_of_bitwise_remove_constant) << FixItHint::CreateRemoval(SourceRange(getLocForEndOfToken(LHS.get()->getEndLoc()), RHS.get()->getEndLoc()));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:78:47: note: remove constant to silence this warning"} | ["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:78:47: note: remove constant to silence this warning"} | ||
Line 5,735: | Line 5,747: | ||
}, | }, | ||
["note_logical_not_fix"]={ | ["note_logical_not_fix"]={ | ||
[ | [b]="add parentheses after the \'!\' to evaluate the %select{comparison|bitwise operator}0 first", | ||
[ | [d]=c, | ||
[ | [e]="add parentheses after the \'\\!\' to evaluate the (?:comparison|bitwise operator) first", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"bb4b894e0b2d",1370890327,"Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.","Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.\n\nThis warning triggers on the logical not of a non-boolean expression on the\nleft hand side of comparison. Often, the user meant to negate the comparison,\nnot just the left hand side of the comparison. Two notes are also emitted,\nthe first with a fix-it to add parentheses around the comparison, and the other\nto put parenthesis around the not expression to silence the warning.\n\nbool not_equal(int x, int y) {\n return !x == y; // warn here\n}\n\n return !(x == y); // first fix-it, to negate comparison.\n\n return (!x) == y; // second fix-it, to silence warning.\n\nllvm-svn: 183688"}, | [h]={"bb4b894e0b2d",1370890327,"Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.","Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.\n\nThis warning triggers on the logical not of a non-boolean expression on the\nleft hand side of comparison. Often, the user meant to negate the comparison,\nnot just the left hand side of the comparison. Two notes are also emitted,\nthe first with a fix-it to add parentheses around the comparison, and the other\nto put parenthesis around the not expression to silence the warning.\n\nbool not_equal(int x, int y) {\n return !x == y; // warn here\n}\n\n return !(x == y); // first fix-it, to negate comparison.\n\n return (!x) == y; // second fix-it, to silence warning.\n\nllvm-svn: 183688"}, | ||
[i]={{ | [i]={{o,12557,"/// Warns on !x < y, !x & y where !(x < y), !(x & y) was probably intended.\nstatic void diagnoseLogicalNotOnLHSofCheck(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n S.Diag(UO->getOperatorLoc(), diag::note_logical_not_fix) << IsBitwiseOp << FixItHint::CreateInsertion(FirstOpen, \"(\") << FixItHint::CreateInsertion(FirstClose, \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-logical-not-compare.c"]={"clang/test/Sema/warn-logical-not-compare.c:9:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:21:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:33:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:45:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:57:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:69:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:96:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:122:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:134:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:146:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:158:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:187:11: note: add parentheses after the \'!\' to evaluate the comparison first"} | ["clang/test/Sema/warn-logical-not-compare.c"]={"clang/test/Sema/warn-logical-not-compare.c:9:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:21:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:33:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:45:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:57:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:69:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:96:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:122:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:134:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:146:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:158:9: note: add parentheses after the \'!\' to evaluate the comparison first","clang/test/Sema/warn-logical-not-compare.c:187:11: note: add parentheses after the \'!\' to evaluate the comparison first"} | ||
Line 5,747: | Line 5,759: | ||
}, | }, | ||
["note_logical_not_silence_with_parens"]={ | ["note_logical_not_silence_with_parens"]={ | ||
[ | [b]="add parentheses around left hand side expression to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="add parentheses around left hand side expression to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"bb4b894e0b2d",1370890327,"Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.","Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.\n\nThis warning triggers on the logical not of a non-boolean expression on the\nleft hand side of comparison. Often, the user meant to negate the comparison,\nnot just the left hand side of the comparison. Two notes are also emitted,\nthe first with a fix-it to add parentheses around the comparison, and the other\nto put parenthesis around the not expression to silence the warning.\n\nbool not_equal(int x, int y) {\n return !x == y; // warn here\n}\n\n return !(x == y); // first fix-it, to negate comparison.\n\n return (!x) == y; // second fix-it, to silence warning.\n\nllvm-svn: 183688"}, | [h]={"bb4b894e0b2d",1370890327,"Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.","Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.\n\nThis warning triggers on the logical not of a non-boolean expression on the\nleft hand side of comparison. Often, the user meant to negate the comparison,\nnot just the left hand side of the comparison. Two notes are also emitted,\nthe first with a fix-it to add parentheses around the comparison, and the other\nto put parenthesis around the not expression to silence the warning.\n\nbool not_equal(int x, int y) {\n return !x == y; // warn here\n}\n\n return !(x == y); // first fix-it, to negate comparison.\n\n return (!x) == y; // second fix-it, to silence warning.\n\nllvm-svn: 183688"}, | ||
[i]={{ | [i]={{o,12624,"/// Warns on !x < y, !x & y where !(x < y), !(x & y) was probably intended.\nstatic void diagnoseLogicalNotOnLHSofCheck(Sema &S, ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc) {\n // ...\n S.Diag(UO->getOperatorLoc(), diag::note_logical_not_silence_with_parens) << FixItHint::CreateInsertion(SecondOpen, \"(\") << FixItHint::CreateInsertion(SecondClose, \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-logical-not-compare.c"]={"clang/test/Sema/warn-logical-not-compare.c:9:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:21:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:33:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:45:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:57:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:69:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:96:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:122:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:134:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:146:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:158:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:187:11: note: add parentheses around left hand side expression to silence this warning"} | ["clang/test/Sema/warn-logical-not-compare.c"]={"clang/test/Sema/warn-logical-not-compare.c:9:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:21:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:33:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:45:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:57:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:69:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:96:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:122:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:134:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:146:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:158:9: note: add parentheses around left hand side expression to silence this warning","clang/test/Sema/warn-logical-not-compare.c:187:11: note: add parentheses around left hand side expression to silence this warning"} | ||
Line 5,759: | Line 5,771: | ||
}, | }, | ||
["note_loop_iteration_here"]={ | ["note_loop_iteration_here"]={ | ||
[ | [b]="%select{decremented|incremented}0 here", | ||
[ | [d]=c, | ||
[ | [e]="(?:decremented|incremented) here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"4e7c9628917a",1375824714,"Add a new warning to -Wloop-analysis to detect suspicious increments or","Add a new warning to -Wloop-analysis to detect suspicious increments or\ndecrements inside for loops. Idea for this warning proposed in PR15636:\n\nhttp://llvm.org/bugs/show_bug.cgi?id=15636\n\nllvm-svn: 187817"}, | [h]={"4e7c9628917a",1375824714,"Add a new warning to -Wloop-analysis to detect suspicious increments or","Add a new warning to -Wloop-analysis to detect suspicious increments or\ndecrements inside for loops. Idea for this warning proposed in PR15636:\n\nhttp://llvm.org/bugs/show_bug.cgi?id=15636\n\nllvm-svn: 187817"}, | ||
[i]={{ | [i]={{G,2107,"// Emit a warning when a loop increment/decrement appears twice per loop\n// iteration. The conditions which trigger this warning are:\n// 1) The last statement in the loop body and the third expression in the\n// for loop are both increment or both decrement of the same variable\n// 2) No continue statements in the loop body.\nvoid CheckForRedundantIteration(Sema &S, Expr *Third, Stmt *Body) {\n // ...\n S.Diag(LoopDRE->getLocation(), diag::note_loop_iteration_here) << LoopIncrement;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-loop-analysis.cpp:158:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:162:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:166:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:170:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:174:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:178:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:182:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:186:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:207:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:221:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:225:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:229:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:233:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:237:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:241:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:245:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:249:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:270:10: note: decremented here"} | ["clang/test/SemaCXX/warn-loop-analysis.cpp"]={"clang/test/SemaCXX/warn-loop-analysis.cpp:158:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:162:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:166:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:170:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:174:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:178:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:182:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:186:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:207:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:221:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:225:10: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:229:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:233:12: note: incremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:237:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:241:10: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:245:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:249:12: note: decremented here","clang/test/SemaCXX/warn-loop-analysis.cpp:270:10: note: decremented here"} | ||
Line 5,771: | Line 5,783: | ||
}, | }, | ||
["note_macro_expansion_here"]={ | ["note_macro_expansion_here"]={ | ||
[ | [b]={{nil,r,"expansion of macro %0 requested here"}}, | ||
[ | [d]=c, | ||
[ | [e]="expansion of macro (.*?) requested here", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"023dd1eefad3",1550117597,"Print a note to the called macro when diagnosing err_embedded_directive","Print a note to the called macro when diagnosing err_embedded_directive\n\nFixes PR40713, see there for the motivation for this.\n\nDifferential Revision: https://reviews.llvm.org/D58161\n\nllvm-svn: 354009"}, | [h]={"023dd1eefad3",1550117597,"Print a note to the called macro when diagnosing err_embedded_directive","Print a note to the called macro when diagnosing err_embedded_directive\n\nFixes PR40713, see there for the motivation for this.\n\nDifferential Revision: https://reviews.llvm.org/D58161\n\nllvm-svn: 354009"}, | ||
[i]={{"clang/lib/Lex/PPDirectives.cpp",1177,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n // C99 6.10.3p11: Is this preprocessor directive in macro invocation? e.g.:\n // #define A(x) #x\n // A(abc\n // #warning blah\n // def)\n // If so, the user is relying on undefined behavior, emit a diagnostic. Do\n // not support this for #include-like directives, since that can result in\n // terrible diagnostics, and does not work in GCC.\n if (InMacroArgs) {\n if (IdentifierInfo *II = Result.getIdentifierInfo()) {\n // ...\n case tok::pp_include:\n case tok::pp_import:\n case tok::pp_include_next:\n case tok::pp___include_macros:\n case tok::pp_pragma:\n // ...\n Diag(*ArgMacro, diag::note_macro_expansion_here) << ArgMacro->getIdentifierInfo();"}}, | [i]={{"clang/lib/Lex/PPDirectives.cpp",1177,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n // C99 6.10.3p11: Is this preprocessor directive in macro invocation? e.g.:\n // #define A(x) #x\n // A(abc\n // #warning blah\n // def)\n // If so, the user is relying on undefined behavior, emit a diagnostic. Do\n // not support this for #include-like directives, since that can result in\n // terrible diagnostics, and does not work in GCC.\n if (InMacroArgs) {\n if (IdentifierInfo *II = Result.getIdentifierInfo()) {\n // ...\n case tok::pp_include:\n case tok::pp_import:\n case tok::pp_include_next:\n case tok::pp___include_macros:\n case tok::pp_pragma:\n // ...\n Diag(*ArgMacro, diag::note_macro_expansion_here) << ArgMacro->getIdentifierInfo();"}}, | ||
Line 5,783: | Line 5,795: | ||
}, | }, | ||
["note_macro_here"]={ | ["note_macro_here"]={ | ||
[ | [b]="macro %0 defined here", | ||
[ | [d]=c, | ||
[ | [e]="macro (.*?) defined here", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"19b02cd7fc91",1340409548,"Minor improvements to some C99 variadic-macro-related diagnostics.","Minor improvements to some C99 variadic-macro-related diagnostics.\n\nllvm-svn: 159054"}, | [h]={"19b02cd7fc91",1340409548,"Minor improvements to some C99 variadic-macro-related diagnostics.","Minor improvements to some C99 variadic-macro-related diagnostics.\n\nllvm-svn: 159054"}, | ||
[i]={{ | [i]={{Ib,816,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n while (Tok.isNot(tok::r_paren)) {\n // ...\n while (true) {\n // ...\n if (Tok.isOneOf(tok::eof, tok::eod)) { // \"#if f(<eof>\" & \"#if f(\\n\"\n if (!ContainsCodeCompletionTok) {\n // ...\n Diag(MI->getDefinitionLoc(), diag::note_macro_here) << MacroName.getIdentifierInfo();"},{Ib,930,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n // If this is not a variadic macro, and too many args were specified, emit\n // an error.\n if (!isVariadic && NumActuals > MinArgsExpected && !ContainsCodeCompletionTok) {\n // ...\n Diag(MI->getDefinitionLoc(), diag::note_macro_here) << MacroName.getIdentifierInfo();"},{Ib,1002,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n if (NumActuals < MinArgsExpected) {\n // There are several cases where too few arguments is ok, handle them now.\n if (NumActuals == 0 && MinArgsExpected == 1) {\n // ...\n } else if ((FoundElidedComma || MI->isVariadic()) && (NumActuals + 1 == MinArgsExpected || // A(x, ...) -> A(X)\n // ...\n // Varargs where the named vararg parameter is missing: OK as extension.\n // #define A(x, ...)\n // A(\"blah\")\n //\n // If the macro contains the comma pasting extension, the diagnostic\n // is suppressed; we know we\'ll get another diagnostic later.\n if (!MI->hasCommaPasting()) {\n // ...\n Diag(MI->getDefinitionLoc(), diag::note_macro_here) << MacroName.getIdentifierInfo();"},{Ib,1016,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n if (NumActuals < MinArgsExpected) {\n // There are several cases where too few arguments is ok, handle them now.\n if (NumActuals == 0 && MinArgsExpected == 1) {\n // ...\n } else if ((FoundElidedComma || MI->isVariadic()) && (NumActuals + 1 == MinArgsExpected || // A(x, ...) -> A(X)\n // ...\n } else if (!ContainsCodeCompletionTok) {\n // ...\n Diag(MI->getDefinitionLoc(), diag::note_macro_here) << MacroName.getIdentifierInfo();"},{Ib,1038,"/// ReadFunctionLikeMacroArgs - After reading \"MACRO\" and knowing that the next\n/// token is the \'(\' of the macro, this method is invoked to read all of the\n/// actual arguments specified for the macro invocation. This returns null on\n/// error.\nMacroArgs *Preprocessor::ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI, SourceLocation &MacroEnd) {\n // ...\n if (NumActuals < MinArgsExpected) {\n // ...\n } else if (NumActuals > MinArgsExpected && !MI->isVariadic() && !ContainsCodeCompletionTok) {\n // ...\n Diag(MI->getDefinitionLoc(), diag::note_macro_here) << MacroName.getIdentifierInfo();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:4:9: note: macro \'zero\' defined here","clang/test/Preprocessor/macro_fn.c:4:9: note: macro \'zero\' defined here","clang/test/Preprocessor/macro_fn.c:5:9: note: macro \'one\' defined here","clang/test/Preprocessor/macro_fn.c:5:9: note: macro \'one\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:8:9: note: macro \'one_dot\' defined here","clang/test/Preprocessor/macro_fn.c:8:9: note: macro \'one_dot\' defined here"} | ["clang/test/Preprocessor/macro_fn.c"]={"clang/test/Preprocessor/macro_fn.c:4:9: note: macro \'zero\' defined here","clang/test/Preprocessor/macro_fn.c:4:9: note: macro \'zero\' defined here","clang/test/Preprocessor/macro_fn.c:5:9: note: macro \'one\' defined here","clang/test/Preprocessor/macro_fn.c:5:9: note: macro \'one\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:6:9: note: macro \'two\' defined here","clang/test/Preprocessor/macro_fn.c:8:9: note: macro \'one_dot\' defined here","clang/test/Preprocessor/macro_fn.c:8:9: note: macro \'one_dot\' defined here"} | ||
Line 5,795: | Line 5,807: | ||
}, | }, | ||
["note_main_change_return_type"]={ | ["note_main_change_return_type"]={ | ||
[ | [b]="change return type to \'int\'", | ||
[ | [d]=c, | ||
[ | [e]="change return type to \'int\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"ae73417b6955",1358382373,"Implement a fixit for -Wmain-return-type","Implement a fixit for -Wmain-return-type\n\nllvm-svn: 172684"}, | [h]={"ae73417b6955",1358382373,"Implement a fixit for -Wmain-return-type","Implement a fixit for -Wmain-return-type\n\nllvm-svn: 172684"}, | ||
[i]={{ | [i]={{q,12131,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (getLangOpts().GNUMode && !getLangOpts().CPlusPlus) {\n // ...\n // GCC in C mode accepts qualified \'int\'.\n if (Context.hasSameUnqualifiedType(FT->getReturnType(), Context.IntTy))\n // ...\n else {\n // ...\n if (RTRange.isValid())\n Diag(RTRange.getBegin(), diag::note_main_change_return_type) << FixItHint::CreateReplacement(RTRange, \"int\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: note: change return type to \'int\'"} | ["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: note: change return type to \'int\'"} | ||
Line 5,807: | Line 5,819: | ||
}, | }, | ||
["note_main_remove_noreturn"]={ | ["note_main_remove_noreturn"]={ | ||
[ | [b]="remove \'_Noreturn\'", | ||
[ | [d]=c, | ||
[ | [e]="remove \'_Noreturn\'", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7ec6f3ddeb4c",1358767503,"Add a fixit for _Noreturn main,","Add a fixit for _Noreturn main,\nadd tests for fixits removing static and inline from main\n\nllvm-svn: 173024"}, | [h]={"7ec6f3ddeb4c",1358767503,"Add a fixit for _Noreturn main,","Add a fixit for _Noreturn main,\nadd tests for fixits removing static and inline from main\n\nllvm-svn: 173024"}, | ||
[i]={{ | [i]={{q,12086,"void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {\n // ...\n if (DS.isNoreturnSpecified()) {\n // ...\n Diag(NoreturnLoc, diag::note_main_remove_noreturn) << FixItHint::CreateRemoval(NoreturnRange);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: note: remove \'_Noreturn\'"} | ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: note: remove \'_Noreturn\'"} | ||
Line 5,819: | Line 5,831: | ||
}, | }, | ||
["note_matching"]={ | ["note_matching"]={ | ||
[ | [b]="to match this %0", | ||
[ | [d]=c, | ||
[ | [e]="to match this (.*?)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{"clang/lib/Lex/PPDirectives.cpp",3023,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n if (VAOCtx.isInVAOpt()) {\n // ...\n Diag(VAOCtx.getUnmatchedOpeningParenLoc(), diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/PPExpressions.cpp",155,"/// EvaluateDefined - Process a \'defined(sym)\' expression.\nstatic bool EvaluateDefined(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n // If we are in parens, ensure we have a trailing ).\n if (LParenLoc.isValid()) {\n // ...\n if (PeekTok.isNot(tok::r_paren)) {\n // ...\n PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/PPExpressions.cpp",459,"/// 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::l_paren: {\n // ...\n // If this is a silly value like (X), which doesn\'t need parens, check for\n // !(defined X).\n if (PeekTok.is(tok::r_paren)) {\n // ...\n } else {\n // ...\n if (PeekTok.isNot(tok::r_paren)) {\n // ...\n PP.Diag(Start, diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/PPExpressions.cpp",817,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::question: {\n // Parse the : part of the expression.\n if (PeekTok.isNot(tok::colon)) {\n // ...\n PP.Diag(OpLoc, diag::note_matching) << tok::question;"},{ | [h]={Wb,1236199783,Vb,Ub}, | ||
[i]={{"clang/lib/Lex/PPDirectives.cpp",3023,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n if (VAOCtx.isInVAOpt()) {\n // ...\n Diag(VAOCtx.getUnmatchedOpeningParenLoc(), diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/PPExpressions.cpp",155,"/// EvaluateDefined - Process a \'defined(sym)\' expression.\nstatic bool EvaluateDefined(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n // If we are in parens, ensure we have a trailing ).\n if (LParenLoc.isValid()) {\n // ...\n if (PeekTok.isNot(tok::r_paren)) {\n // ...\n PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/PPExpressions.cpp",459,"/// 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::l_paren: {\n // ...\n // If this is a silly value like (X), which doesn\'t need parens, check for\n // !(defined X).\n if (PeekTok.is(tok::r_paren)) {\n // ...\n } else {\n // ...\n if (PeekTok.isNot(tok::r_paren)) {\n // ...\n PP.Diag(Start, diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/PPExpressions.cpp",817,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::question: {\n // Parse the : part of the expression.\n if (PeekTok.isNot(tok::colon)) {\n // ...\n PP.Diag(OpLoc, diag::note_matching) << tok::question;"},{Ib,1242,"/// EvaluateHasIncludeCommon - Process a \'__has_include(\"path\")\'\n/// or \'__has_include_next(\"path\")\' expression.\n/// Returns true if successful.\nstatic bool EvaluateHasIncludeCommon(Token &Tok, IdentifierInfo *II, Preprocessor &PP, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Ensure we have a trailing ).\n if (Tok.isNot(tok::r_paren)) {\n // ...\n PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;"},{Ib,1385,"/// Process single-argument builtin feature-like macros that return\n/// integer values.\nstatic void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream &OS, Token &Tok, IdentifierInfo *II, Preprocessor &PP, bool ExpandArgs, llvm::function_ref<int(Token &Tok, bool &HasLexedNextTok)> Op) {\n // ...\n already_lexed:\n // ...\n // Diagnose missing \')\'.\n if (!SuppressDiagnostic) {\n // ...\n PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;"},{Ib,1894,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n } else if (II == Ident__has_constexpr_builtin) {\n // ...\n } else if (II == Ident__is_identifier) {\n // ...\n } else if (II == Ident__has_attribute) {\n // ...\n } else if (II == Ident__has_declspec) {\n // ...\n } else if (II == Ident__has_cpp_attribute || II == Ident__has_c_attribute) {\n // ...\n } else if (II == Ident__has_include || II == Ident__has_include_next) {\n // ...\n } else if (II == Ident__has_warning) {\n // ...\n } else if (II == Ident__building_module) {\n // ...\n } else if (II == Ident__MODULE__) {\n // ...\n } else if (II == Ident__identifier) {\n // ...\n if (RParen.isNot(tok::r_paren)) {\n // ...\n Diag(LParenLoc, diag::note_matching) << tok::l_paren;"},{"clang/lib/Lex/Preprocessor.cpp",1038,"/// Lex a header-name token (including one formed from header-name-tokens if\n/// \\p AllowConcatenation is \\c true).\n///\n/// \\param FilenameTok Filled in with the next token. On success, this will\n/// be either a header_name token. On failure, it will be whatever other\n/// token was found instead.\n/// \\param AllowMacroExpansion If \\c true, allow the header name to be formed\n/// by macro expansion (concatenating tokens as necessary if the first\n/// token is a \'<\').\n/// \\return \\c true if we reached EOD or EOF while looking for a > token in\n/// a concatenated header name and diagnosed it. \\c false otherwise.\nbool Preprocessor::LexHeaderName(Token &FilenameTok, bool AllowMacroExpansion) {\n // ...\n if (FilenameTok.is(tok::less) && AllowMacroExpansion) {\n // ...\n // Consume tokens until we find a \'>\'.\n // FIXME: A header-name could be formed starting or ending with an\n // alternative token. It\'s not clear whether that\'s ill-formed in all\n // cases.\n while (FilenameTok.isNot(tok::greater)) {\n // ...\n if (FilenameTok.isOneOf(tok::eod, tok::eof)) {\n // ...\n Diag(Start, diag::note_matching) << tok::less;"},{"clang/lib/Parse/ParseCXXInlineMethods.cpp",959,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // Skip over the mem-initializer-id, if possible.\n if (Tok.is(tok::kw_decltype)) {\n // ...\n if (!ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/true)) {\n // ...\n Diag(OpenLoc, diag::note_matching) << tok::l_paren;"},{"clang/lib/Parse/ParseCXXInlineMethods.cpp",1067,"/// Consume tokens and store them in the passed token container until\n/// we\'ve passed the try keyword and constructor initializers and have consumed\n/// the opening brace of the function body. The opening brace will be consumed\n/// if and only if there was no error.\n///\n/// \\return True on error.\nbool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) {\n // ...\n while (true) {\n // ...\n if (!ConsumeAndStoreUntil(CloseKind, Toks, /*StopAtSemi=*/true)) {\n // ...\n Diag(OpenLoc, diag::note_matching) << kind;"},{"clang/lib/Parse/ParseExpr.cpp",524,"/// Parse a binary expression that starts with \\p LHS and has a\n/// precedence of at least \\p MinPrec.\nExprResult Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {\n // ...\n while (true) {\n // ...\n if (NextTokPrec == prec::Conditional) {\n // ...\n if (!TryConsumeToken(tok::colon, ColonLoc)) {\n // ...\n Diag(OpToken, diag::note_matching) << tok::question;"},{"clang/lib/Parse/ParseExpr.cpp",2050,"/// Once the leading part of a postfix-expression is parsed, this\n/// method parses any suffixes that apply.\n///\n/// \\verbatim\n/// postfix-expression: [C99 6.5.2]\n/// primary-expression\n/// postfix-expression \'[\' expression \']\'\n/// postfix-expression \'[\' braced-init-list \']\'\n/// postfix-expression \'[\' expression-list [opt] \']\' [C++23 12.4.5]\n/// postfix-expression \'(\' argument-expression-list[opt] \')\'\n/// postfix-expression \'.\' identifier\n/// postfix-expression \'->\' identifier\n/// postfix-expression \'++\'\n/// postfix-expression \'--\'\n/// \'(\' type-name \')\' \'{\' initializer-list \'}\'\n/// \'(\' type-name \')\' \'{\' initializer-list \',\' \'}\'\n///\n/// argument-expression-list: [C99 6.5.2]\n/// argument-expression ...[opt]\n/// argument-expression-list \',\' assignment-expression ...[opt]\n/// \\endverbatim\nExprResult Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {\n // ...\n while (true) {\n // ...\n case tok::l_paren: // p-e: p-e \'(\' argument-expression-list[opt] \')\'\n case tok::lesslessless: { // p-e: p-e \'<<<\' argument-expression-list \'>>>\'\n // ...\n if (OpKind == tok::lesslessless) {\n // ...\n if (TryConsumeToken(tok::greatergreatergreater, CloseLoc)) {\n } else if (LHS.isInvalid()) {\n // ...\n } else {\n // ...\n Diag(OpenLoc, diag::note_matching) << tok::lesslessless;"},{"clang/lib/Parse/ParseExprCXX.cpp",1608,"/// ParseCXXCasts - This handles the various ways to cast expressions to another\n/// type.\n///\n/// postfix-expression: [C++ 5.2p1]\n/// \'dynamic_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'static_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'reinterpret_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n/// \'const_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\n///\n/// C++ for OpenCL s2.3.1 adds:\n/// \'addrspace_cast\' \'<\' type-name \'>\' \'(\' expression \')\'\nExprResult Parser::ParseCXXCasts() {\n // ...\n if (ExpectAndConsume(tok::greater))\n return ExprError(Diag(LAngleBracketLoc, diag::note_matching) << tok::less);"},{"clang/lib/Parse/ParseOpenMP.cpp",1990,"void Parser::parseOMPEndDirective(OpenMPDirectiveKind BeginKind, OpenMPDirectiveKind ExpectedKind, OpenMPDirectiveKind FoundKind, SourceLocation BeginLoc, SourceLocation FoundLoc, bool SkipUntilOpenMPEnd) {\n // ...\n Diag(BeginLoc, diag::note_matching) << (\"\'#pragma omp \" + getOpenMPDirectiveName(BeginKind) + \"\'\").str();"},{"clang/lib/Parse/Parser.cpp",2726,"bool BalancedDelimiterTracker::diagnoseMissingClose() {\n // ...\n P.Diag(LOpen, diag::note_matching) << Kind;"},{"clang/lib/Parse/ParseStmt.cpp",1874,"/// ParseDoStatement\n/// do-statement: [C99 6.8.5.2]\n/// \'do\' statement \'while\' \'(\' expression \')\' \';\'\n/// Note: this lets the caller parse the end \';\'.\nStmtResult Parser::ParseDoStatement() {\n // ...\n if (Tok.isNot(tok::kw_while)) {\n if (!Body.isInvalid()) {\n // ...\n Diag(DoLoc, diag::note_matching) << \"\'do\'\";"},{"clang/lib/Parse/ParseStmtAsm.cpp",518,"/// ParseMicrosoftAsmStatement. When -fms-extensions/-fasm-blocks is enabled,\n/// this routine is called to collect the tokens for an MS asm statement.\n///\n/// [MS] ms-asm-statement:\n/// ms-asm-block\n/// ms-asm-block ms-asm-statement\n///\n/// [MS] ms-asm-block:\n/// \'__asm\' ms-asm-line \'\\n\'\n/// \'__asm\' \'{\' ms-asm-instruction-block[opt] \'}\' \';\'[opt]\n///\n/// [MS] ms-asm-instruction-block\n/// ms-asm-line\n/// ms-asm-line \'\\n\' ms-asm-instruction-block\n///\nStmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {\n // ...\n if (BraceNesting && BraceCount != savedBraceCount) {\n // __asm without closing brace (this can happen at EOF).\n for (unsigned i = 0; i < BraceNesting; ++i) {\n // ...\n Diag(LBraceLocs.back(), diag::note_matching) << tok::l_brace;"},{"clang/lib/Parse/ParseTemplate.cpp",1124,"/// Parses a \'>\' at the end of a template list.\n///\n/// If this function encounters \'>>\', \'>>>\', \'>=\', or \'>>=\', it tries\n/// to determine if these tokens were supposed to be a \'>\' followed by\n/// \'>\', \'>>\', \'>=\', or \'>=\'. It emits an appropriate diagnostic if necessary.\n///\n/// \\param RAngleLoc the location of the consumed \'>\'.\n///\n/// \\param ConsumeLastToken if true, the \'>\' is consumed.\n///\n/// \\param ObjCGenericList if true, this is the \'>\' closing an Objective-C\n/// type parameter or type argument list, rather than a C++ template parameter\n/// or argument list.\n///\n/// \\returns true, if current token does not start with \'>\', false otherwise.\nbool Parser::ParseGreaterThanInTemplateList(SourceLocation LAngleLoc, SourceLocation &RAngleLoc, bool ConsumeLastToken, bool ObjCGenericList) {\n // ...\n default:\n // ...\n Diag(LAngleLoc, diag::note_matching) << tok::less;"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:58:1: note: to match this \'[\'"} | ["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:58:1: note: to match this \'[\'"} | ||
Line 5,831: | Line 5,843: | ||
}, | }, | ||
["note_max_tokens_total_override"]={ | ["note_max_tokens_total_override"]={ | ||
[ | [b]={{nil,K,"total token limit set here"}}, | ||
[ | [d]=c, | ||
[ | [e]="total token limit set here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, | [h]={"739b410f1ff5",1570627358,"Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit","Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"}, | ||
[i]={{"clang/lib/Parse/Parser.cpp",704,"/// ParseTopLevelDecl - Parse one top-level declaration, return whatever the\n/// action tells us to. This returns true if the EOF was encountered.\n///\n/// top-level-declaration:\n/// declaration\n/// [C++20] module-import-declaration\nbool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result, Sema::ModuleImportState &ImportState) {\n // ...\n case tok::eof:\n case tok::annot_repl_input_end:\n // Check whether -fmax-tokens= was reached.\n if (PP.getMaxTokens() != 0 && PP.getTokenCount() > PP.getMaxTokens()) {\n // ...\n if (OverrideLoc.isValid()) {\n PP.Diag(OverrideLoc, diag::note_max_tokens_total_override);"}}, | [i]={{"clang/lib/Parse/Parser.cpp",704,"/// ParseTopLevelDecl - Parse one top-level declaration, return whatever the\n/// action tells us to. This returns true if the EOF was encountered.\n///\n/// top-level-declaration:\n/// declaration\n/// [C++20] module-import-declaration\nbool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result, Sema::ModuleImportState &ImportState) {\n // ...\n case tok::eof:\n case tok::annot_repl_input_end:\n // Check whether -fmax-tokens= was reached.\n if (PP.getMaxTokens() != 0 && PP.getTokenCount() > PP.getMaxTokens()) {\n // ...\n if (OverrideLoc.isValid()) {\n PP.Diag(OverrideLoc, diag::note_max_tokens_total_override);"}}, | ||
Line 5,843: | Line 5,855: | ||
}, | }, | ||
["note_meant_to_use_typename"]={ | ["note_meant_to_use_typename"]={ | ||
[ | [b]={{nil,L,"did you mean to use \'typename\'?"}}, | ||
[ | [d]=c, | ||
[ | [e]="did you mean to use \'typename\'\\?", | ||
[ | [f]=a, | ||
[ | [g]="Generics Issue", | ||
[h]={"3a98e51823be",1518100678,"[Parser][FixIt] Better diagnostics for \"typedef\" instead of \"typename\" typo","[Parser][FixIt] Better diagnostics for \"typedef\" instead of \"typename\" typo\n\nrdar://problem/10214588\n\nDifferential Revision: https://reviews.llvm.org/D42170\n\nllvm-svn: 324607"}, | [h]={"3a98e51823be",1518100678,"[Parser][FixIt] Better diagnostics for \"typedef\" instead of \"typename\" typo","[Parser][FixIt] Better diagnostics for \"typedef\" instead of \"typename\" typo\n\nrdar://problem/10214588\n\nDifferential Revision: https://reviews.llvm.org/D42170\n\nllvm-svn: 324607"}, | ||
[i]={{"clang/lib/Parse/ParseTemplate.cpp",659,"/// ParseTemplateParameter - Parse a template-parameter (C++ [temp.param]).\n///\n/// template-parameter: [C++ temp.param]\n/// type-parameter\n/// parameter-declaration\n///\n/// type-parameter: (See below)\n/// type-parameter-key ...[opt] identifier[opt]\n/// type-parameter-key identifier[opt] = type-id\n/// (C++2a) type-constraint ...[opt] identifier[opt]\n/// (C++2a) type-constraint identifier[opt] = type-id\n/// \'template\' \'<\' template-parameter-list \'>\' type-parameter-key\n/// ...[opt] identifier[opt]\n/// \'template\' \'<\' template-parameter-list \'>\' type-parameter-key\n/// identifier[opt] \'=\' id-expression\n///\n/// type-parameter-key:\n/// class\n/// typename\n///\nNamedDecl *Parser::ParseTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n case TPResult::True:\n // Is there just a typo in the input code? (\'typedef\' instead of\n // \'typename\')\n if (Tok.is(tok::kw_typedef)) {\n // ...\n Diag(Tok.getLocation(), diag::note_meant_to_use_typename) << FixItHint::CreateReplacement(CharSourceRange::getCharRange(Tok.getLocation(), Tok.getEndLoc()), \"typename\");"}}, | [i]={{"clang/lib/Parse/ParseTemplate.cpp",659,"/// ParseTemplateParameter - Parse a template-parameter (C++ [temp.param]).\n///\n/// template-parameter: [C++ temp.param]\n/// type-parameter\n/// parameter-declaration\n///\n/// type-parameter: (See below)\n/// type-parameter-key ...[opt] identifier[opt]\n/// type-parameter-key identifier[opt] = type-id\n/// (C++2a) type-constraint ...[opt] identifier[opt]\n/// (C++2a) type-constraint identifier[opt] = type-id\n/// \'template\' \'<\' template-parameter-list \'>\' type-parameter-key\n/// ...[opt] identifier[opt]\n/// \'template\' \'<\' template-parameter-list \'>\' type-parameter-key\n/// identifier[opt] \'=\' id-expression\n///\n/// type-parameter-key:\n/// class\n/// typename\n///\nNamedDecl *Parser::ParseTemplateParameter(unsigned Depth, unsigned Position) {\n // ...\n case TPResult::True:\n // Is there just a typo in the input code? (\'typedef\' instead of\n // \'typename\')\n if (Tok.is(tok::kw_typedef)) {\n // ...\n Diag(Tok.getLocation(), diag::note_meant_to_use_typename) << FixItHint::CreateReplacement(CharSourceRange::getCharRange(Tok.getLocation(), Tok.getEndLoc()), \"typename\");"}}, | ||
Line 5,855: | Line 5,867: | ||
}, | }, | ||
["note_member_declared_at"]={ | ["note_member_declared_at"]={ | ||
[ | [b]="member is declared here", | ||
[ | [d]=c, | ||
[ | [e]="member is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2afa8780d62a",1401279614,"Consolidate some note diagnostics","Consolidate some note diagnostics\n\nThese note diags have the same message and can be unified further but for now\nlet\'s just bring them together.\n\nIncidental change: Display a source range in the final attr diagnostic.\n\nllvm-svn: 209728"}, | [h]={"2afa8780d62a",1401279614,"Consolidate some note diagnostics","Consolidate some note diagnostics\n\nThese note diags have the same message and can be unified further but for now\nlet\'s just bring them together.\n\nIncidental change: Display a source range in the final attr diagnostic.\n\nllvm-svn: 209728"}, | ||
[i]={{"clang/lib/Sema/SemaAccess.cpp",1280,"/// Diagnose the path which caused the given declaration or base class\n/// to become inaccessible.\nstatic void DiagnoseAccessPath(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n // ...\n if (entity.isMemberAccess())\n S.Diag(entity.getTargetDecl()->getLocation(), diag::note_member_declared_at);"},{ | [i]={{"clang/lib/Sema/SemaAccess.cpp",1280,"/// Diagnose the path which caused the given declaration or base class\n/// to become inaccessible.\nstatic void DiagnoseAccessPath(Sema &S, const EffectiveContext &EC, AccessTarget &entity) {\n // ...\n if (entity.isMemberAccess())\n S.Diag(entity.getTargetDecl()->getLocation(), diag::note_member_declared_at);"},{o,2327,"/// Diagnose a lookup that found results in an enclosing class during error\n/// recovery. This usually indicates that the results were found in a dependent\n/// base class that could not be searched as part of a template definition.\n/// Always issues a diagnostic (though this may be only a warning in MS\n/// compatibility mode).\n///\n/// Return \\c true if the error is unrecoverable, or \\c false if the caller\n/// should attempt to recover using these lookup results.\nbool Sema::DiagnoseDependentMemberLookup(const LookupResult &R) {\n // ...\n unsigned NoteID = diag::note_member_declared_at;"},{N,9898,"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 S.Diag(Entity.getDecl()->getLocation(), diag::note_member_declared_at);"},{s,845,"/// 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 if (isa<FunctionDecl>(Instantiation)) {\n // ...\n } else {\n // ...\n Note = diag::note_member_declared_at;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp:32:12: note: member is declared here"} | ["clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/p14-0x.cpp:32:12: note: member is declared here"} | ||
Line 5,867: | Line 5,879: | ||
}, | }, | ||
["note_member_declared_here"]={ | ["note_member_declared_here"]={ | ||
[ | [b]="member %0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="member (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"861eb80a3b9d",1272228908,"Improve the diagnostic when we find something we did not expect in a","Improve the diagnostic when we find something we did not expect in a\nmember expression (p-> or x.), by showing the type we looked into and\nwhat we did actually find.\n\nllvm-svn: 102315"}, | [h]={"861eb80a3b9d",1272228908,"Improve the diagnostic when we find something we did not expect in a","Improve the diagnostic when we find something we did not expect in a\nmember expression (p-> or x.), by showing the type we looked into and\nwhat we did actually find.\n\nllvm-svn: 102315"}, | ||
[i]={{ | [i]={{ab,1270,"bool CoroutineStmtBuilder::makeReturnOnAllocFailure() {\n // ...\n if (ReturnStmt.isInvalid()) {\n S.Diag(Found.getFoundDecl()->getLocation(), diag::note_member_declared_here) << DN;"},{ab,1729,"static void noteMemberDeclaredHere(Sema &S, Expr *E, FunctionScopeInfo &Fn) {\n if (auto *MbrRef = dyn_cast<CXXMemberCallExpr>(E)) {\n // ...\n S.Diag(MethodDecl->getLocation(), diag::note_member_declared_here) << MethodDecl;"},{Y,2944,"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 for (auto &Match : Matches)\n Diag(Match.second->getLocation(), diag::note_member_declared_here) << DeleteName;"},{Y,3303,"bool Sema::FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose, bool WantSize, bool WantAligned) {\n // ...\n // We found multiple suitable operators; complain about the ambiguity.\n // FIXME: The standard doesn\'t say to do this; it appears that the intent\n // is that this should never happen.\n if (!Matches.empty()) {\n if (Diagnose) {\n // ...\n for (auto &Match : Matches)\n Diag(Match.FD->getLocation(), diag::note_member_declared_here) << Name;"},{Y,3317,"bool Sema::FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose, bool WantSize, bool WantAligned) {\n // ...\n // We did find operator delete/operator delete[] declarations, but\n // none of them were suitable.\n if (!Found.empty()) {\n if (Diagnose) {\n // ...\n for (NamedDecl *D : Found)\n Diag(D->getUnderlyingDecl()->getLocation(), diag::note_member_declared_here) << Name;"},{"clang/lib/Sema/SemaExprMember.cpp",1182,"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 Diag(MemberDecl->getLocation(), diag::note_member_declared_here) << MemberName;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutine-no-valid-dealloc.cpp"]={"clang/test/SemaCXX/coroutine-no-valid-dealloc.cpp:20:10: note: member \'operator delete\' declared here","clang/test/SemaCXX/coroutine-no-valid-dealloc.cpp:20:10: note: member \'operator delete\' declared here"} | ["clang/test/SemaCXX/coroutine-no-valid-dealloc.cpp"]={"clang/test/SemaCXX/coroutine-no-valid-dealloc.cpp:20:10: note: member \'operator delete\' declared here","clang/test/SemaCXX/coroutine-no-valid-dealloc.cpp:20:10: note: member \'operator delete\' declared here"} | ||
Line 5,879: | Line 5,891: | ||
}, | }, | ||
["note_member_def_close_const_match"]={ | ["note_member_def_close_const_match"]={ | ||
[ | [b]="member declaration does not match because it %select{is|is not}0 const qualified", | ||
[ | [d]=c, | ||
[ | [e]="member declaration does not match because it (?:is|is not) const qualified", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1a6eb99d45e5",1318269697,"Give nicer note when a member redeclaration has or lacks \'const\'","Give nicer note when a member redeclaration has or lacks \'const\'\n\nllvm-svn: 141555"}, | [h]={"1a6eb99d45e5",1318269697,"Give nicer note when a member redeclaration has or lacks \'const\'","Give nicer note when a member redeclaration has or lacks \'const\'\n\nllvm-svn: 141555"}, | ||
[i]={{ | [i]={{q,9080,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n for (SmallVectorImpl<std::pair<FunctionDecl *, unsigned>>::iterator NearMatch = NearMatches.begin(), NearMatchEnd = NearMatches.end(); NearMatch != NearMatchEnd; ++NearMatch) {\n // ...\n // FIXME: These notes are poorly worded for the local friend case.\n if (unsigned Idx = NearMatch->second) {\n // ...\n } else if (FDisConst != NewFDisConst) {\n SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_const_match) << NewFDisConst << FD->getSourceRange().getEnd() << (NewFDisConst ? FixItHint::CreateRemoval(ExtraArgs.D.getFunctionTypeInfo().getConstQualifierLoc()) : FixItHint::CreateInsertion(ExtraArgs.D.getFunctionTypeInfo().getRParenLoc().getLocWithOffset(1), \" const\"));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/function-redecl.cpp"]={"clang/test/SemaCXX/function-redecl.cpp:74:8: note: member declaration does not match because it is const qualified","clang/test/SemaCXX/function-redecl.cpp:94:7: note: member declaration does not match because it is const qualified","clang/test/SemaCXX/function-redecl.cpp:95:8: note: member declaration does not match because it is not const qualified"} | ["clang/test/SemaCXX/function-redecl.cpp"]={"clang/test/SemaCXX/function-redecl.cpp:74:8: note: member declaration does not match because it is const qualified","clang/test/SemaCXX/function-redecl.cpp:94:7: note: member declaration does not match because it is const qualified","clang/test/SemaCXX/function-redecl.cpp:95:8: note: member declaration does not match because it is not const qualified"} | ||
Line 5,891: | Line 5,903: | ||
}, | }, | ||
["note_member_def_close_match"]={ | ["note_member_def_close_match"]={ | ||
[ | [b]="member declaration nearly matches", | ||
[ | [d]=c, | ||
[ | [e]="member declaration nearly matches", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | [h]={"5a8987ca5113",1237025389,"Update tablegen diagnostic files to be in sync with the def files.","Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"}, | ||
[i]={{ | [i]={{q,9091,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n for (SmallVectorImpl<std::pair<FunctionDecl *, unsigned>>::iterator NearMatch = NearMatches.begin(), NearMatchEnd = NearMatches.end(); NearMatch != NearMatchEnd; ++NearMatch) {\n // ...\n // FIXME: These notes are poorly worded for the local friend case.\n if (unsigned Idx = NearMatch->second) {\n // ...\n } else if (FDisConst != NewFDisConst) {\n // ...\n } else\n SemaRef.Diag(FD->getLocation(), IsMember ? diag::note_member_def_close_match : diag::note_local_decl_close_match);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-target-mv.cpp"]={"clang/test/SemaCXX/attr-target-mv.cpp:188:53: note: member declaration nearly matches","clang/test/SemaCXX/attr-target-mv.cpp:189:54: note: member declaration nearly matches"} | ["clang/test/SemaCXX/attr-target-mv.cpp"]={"clang/test/SemaCXX/attr-target-mv.cpp:188:53: note: member declaration nearly matches","clang/test/SemaCXX/attr-target-mv.cpp:189:54: note: member declaration nearly matches"} | ||
Line 5,903: | Line 5,915: | ||
}, | }, | ||
["note_member_def_close_param_match"]={ | ["note_member_def_close_param_match"]={ | ||
[ | [b]="type of %ordinal0 parameter of member declaration does not match definition%diff{ ($ vs $)|}1,2", | ||
[ | [d]=c, | ||
[ | [e]="type of (.*?) parameter of member declaration does not match definition(?: \\((.*?) vs (.*?)\\)|)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7d9bc633d246",1312479600,"Match type names and give more info for out-of-line function definition errors.","Match type names and give more info for out-of-line function definition errors.\n\nHaving a function declaration and definition with different types for a\nparameter where the types have same (textual) name can occur when an unqualified\ntype name resolves to types in different namespaces in each location.\n\nThe error messages have been extended by adding notes that point to the first\nparameter of the function definition that doesn\'t match the declaration, instead\nof a generic \"member declaration nearly matches\". The generic message is still\nused in cases where the mismatch is not in the paramenter list, such as\nmismatched cv qualifiers on the member function itself.\n\nllvm-svn: 136891"}, | [h]={"7d9bc633d246",1312479600,"Match type names and give more info for out-of-line function definition errors.","Match type names and give more info for out-of-line function definition errors.\n\nHaving a function declaration and definition with different types for a\nparameter where the types have same (textual) name can occur when an unqualified\ntype name resolves to types in different namespaces in each location.\n\nThe error messages have been extended by adding notes that point to the first\nparameter of the function definition that doesn\'t match the declaration, instead\nof a generic \"member declaration nearly matches\". The generic message is still\nused in cases where the mismatch is not in the paramenter list, such as\nmismatched cv qualifiers on the member function itself.\n\nllvm-svn: 136891"}, | ||
[i]={{ | [i]={{q,9075,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n for (SmallVectorImpl<std::pair<FunctionDecl *, unsigned>>::iterator NearMatch = NearMatches.begin(), NearMatchEnd = NearMatches.end(); NearMatch != NearMatchEnd; ++NearMatch) {\n // ...\n // FIXME: These notes are poorly worded for the local friend case.\n if (unsigned Idx = NearMatch->second) {\n // ...\n SemaRef.Diag(Loc, IsMember ? diag::note_member_def_close_param_match : diag::note_local_decl_close_param_match) << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/out-of-line-def-mismatch.cpp"]={"clang/test/SemaCXX/out-of-line-def-mismatch.cpp:10:17: note: type of 1st parameter of member declaration does not match definition (\'S1 *\' (aka \'N2::S1 *\') vs \'S1 *\' (aka \'N2::N1::S1 *\'))","clang/test/SemaCXX/out-of-line-def-mismatch.cpp:11:38: note: type of 3rd parameter of member declaration does not match definition (\'const S1 *\' (aka \'const N2::S1 *\') vs \'const S1 *\' (aka \'const N2::N1::S1 *\'))","clang/test/SemaCXX/out-of-line-def-mismatch.cpp:12:23: note: type of 1st parameter of member declaration does not match definition (\'const S1 *\' vs \'S1\')","clang/test/SemaCXX/out-of-line-def-mismatch.cpp:13:17: note: type of 1st parameter of member declaration does not match definition (\'unsigned int\' vs \'unsigned int *\')"} | ["clang/test/SemaCXX/out-of-line-def-mismatch.cpp"]={"clang/test/SemaCXX/out-of-line-def-mismatch.cpp:10:17: note: type of 1st parameter of member declaration does not match definition (\'S1 *\' (aka \'N2::S1 *\') vs \'S1 *\' (aka \'N2::N1::S1 *\'))","clang/test/SemaCXX/out-of-line-def-mismatch.cpp:11:38: note: type of 3rd parameter of member declaration does not match definition (\'const S1 *\' (aka \'const N2::S1 *\') vs \'const S1 *\' (aka \'const N2::N1::S1 *\'))","clang/test/SemaCXX/out-of-line-def-mismatch.cpp:12:23: note: type of 1st parameter of member declaration does not match definition (\'const S1 *\' vs \'S1\')","clang/test/SemaCXX/out-of-line-def-mismatch.cpp:13:17: note: type of 1st parameter of member declaration does not match definition (\'unsigned int\' vs \'unsigned int *\')"} | ||
Line 5,915: | Line 5,927: | ||
}, | }, | ||
["note_member_first_declared_here"]={ | ["note_member_first_declared_here"]={ | ||
[ | [b]={{nil,U,"member %0 first declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="member (.*?) first declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fc50f62caafd",1495724379,"[coroutines] Diagnose when promise types fail to declare either return_void or return_value.","[coroutines] Diagnose when promise types fail to declare either return_void or return_value.\n\nSummary:\nAccording to the PDTS it\'s perfectly legal to have a promise type that defines neither `return_value` nor `return_void`. However a coroutine that uses such a promise type will almost always have UB, because it can never `co_return`.\n\nThis patch changes Clang to diagnose such cases as an error. It also cleans up some of the diagnostic messages relating to member lookup in the promise type.\n\nReviewers: GorNishanov, rsmith\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D33534\n\nllvm-svn: 303868"}, | [h]={"fc50f62caafd",1495724379,"[coroutines] Diagnose when promise types fail to declare either return_void or return_value.","[coroutines] Diagnose when promise types fail to declare either return_void or return_value.\n\nSummary:\nAccording to the PDTS it\'s perfectly legal to have a promise type that defines neither `return_value` nor `return_void`. However a coroutine that uses such a promise type will almost always have UB, because it can never `co_return`.\n\nThis patch changes Clang to diagnose such cases as an error. It also cleans up some of the diagnostic messages relating to member lookup in the promise type.\n\nReviewers: GorNishanov, rsmith\n\nReviewed By: GorNishanov\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D33534\n\nllvm-svn: 303868"}, | ||
[i]={{ | [i]={{ab,1635,"bool CoroutineStmtBuilder::makeOnFallthrough() {\n // ...\n if (HasRVoid && HasRValue) {\n // ...\n S.Diag(LRVoid.getRepresentativeDecl()->getLocation(), diag::note_member_first_declared_here) << LRVoid.getLookupName();"},{ab,1638,"bool CoroutineStmtBuilder::makeOnFallthrough() {\n // ...\n if (HasRVoid && HasRValue) {\n // ...\n S.Diag(LRValue.getRepresentativeDecl()->getLocation(), diag::note_member_first_declared_here) << LRValue.getLookupName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:632:8: note: member \'return_void\' first declared here","clang/test/SemaCXX/coroutines.cpp:633:8: note: member \'return_value\' first declared here","clang/test/SemaCXX/coroutines.cpp:632:8: note: member \'return_void\' first declared here","clang/test/SemaCXX/coroutines.cpp:633:8: note: member \'return_value\' first declared here"} | ["clang/test/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:632:8: note: member \'return_void\' first declared here","clang/test/SemaCXX/coroutines.cpp:633:8: note: member \'return_value\' first declared here","clang/test/SemaCXX/coroutines.cpp:632:8: note: member \'return_void\' first declared here","clang/test/SemaCXX/coroutines.cpp:633:8: note: member \'return_value\' first declared here"} | ||
Line 5,927: | Line 5,939: | ||
}, | }, | ||
["note_member_reference_arrow_from_operator_arrow"]={ | ["note_member_reference_arrow_from_operator_arrow"]={ | ||
[ | [b]="\'->\' applied to return value of the operator->() declared here", | ||
[ | [d]=c, | ||
[ | [e]="\'\\-\\>\' applied to return value of the operator\\-\\>\\(\\) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0c51de4ab1ae",1375292304,"Improve the diagnostic experience, including adding recovery, for","Improve the diagnostic experience, including adding recovery, for\nchanging \'->\' to \'.\' when there is no operator-> defined for a class.\n\nllvm-svn: 187504"}, | [h]={"0c51de4ab1ae",1375292304,"Improve the diagnostic experience, including adding recovery, for","Improve the diagnostic experience, including adding recovery, for\nchanging \'->\' to \'.\' when there is no operator-> defined for a class.\n\nllvm-svn: 187504"}, | ||
[i]={{ | [i]={{Y,7619,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n // ...\n if (Result.isInvalid()) {\n if (NoArrowOperatorFound) {\n // ...\n if (Decl *CD = (CE ? CE->getCalleeDecl() : nullptr)) {\n Diag(CD->getBeginLoc(), diag::note_member_reference_arrow_from_operator_arrow);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaHLSL/prohibit_pointer.hlsl"]={"clang/test/SemaHLSL/prohibit_pointer.hlsl:70:3: note: \'->\' applied to return value of the operator->() declared here"} | ["clang/test/SemaHLSL/prohibit_pointer.hlsl"]={"clang/test/SemaHLSL/prohibit_pointer.hlsl:70:3: note: \'->\' applied to return value of the operator->() declared here"} | ||
Line 5,939: | Line 5,951: | ||
}, | }, | ||
["note_member_synthesized_at"]={ | ["note_member_synthesized_at"]={ | ||
[ | [b]="implicit %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}0 for %1 first required here", | ||
[ | [d]=c, | ||
[ | [e]="in (?:implicit|defaulted) (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) for (.*?) first required here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"26a807d37a67",1259616290,"When we\'re trying to define an implicit virtual destructor, make sure that we have a valid delete op...","When we\'re trying to define an implicit virtual destructor, make sure that we have a valid delete operator.\n\nllvm-svn: 90156"}, | [h]={"26a807d37a67",1259616290,"When we\'re trying to define an implicit virtual destructor, make sure that we have a valid delete op...","When we\'re trying to define an implicit virtual destructor, make sure that we have a valid delete operator.\n\nllvm-svn: 90156"}, | ||
[i]={{ | [i]={{E,975,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::DefiningSynthesizedFunction: {\n // ...\n if (DFK.isSpecialMember()) {\n // ...\n Diags.Report(Active->PointOfInstantiation, diag::note_member_synthesized_at) << MD->isExplicitlyDefaulted() << DFK.asSpecialMember() << Context.getTagDeclType(MD->getParent());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/ms-implicit-complete-dtor.cpp"]={"clang/test/SemaCXX/ms-implicit-complete-dtor.cpp:20:22: note: in implicit destructor for \'t1::C\' first required here","clang/test/SemaCXX/ms-implicit-complete-dtor.cpp:36:30: note: in implicit destructor for \'t2::C\' first required here","clang/test/SemaCXX/ms-implicit-complete-dtor.cpp:50:37: note: in implicit destructor for \'t3::Derived2\' first required here"} | ["clang/test/SemaCXX/ms-implicit-complete-dtor.cpp"]={"clang/test/SemaCXX/ms-implicit-complete-dtor.cpp:20:22: note: in implicit destructor for \'t1::C\' first required here","clang/test/SemaCXX/ms-implicit-complete-dtor.cpp:36:30: note: in implicit destructor for \'t2::C\' first required here","clang/test/SemaCXX/ms-implicit-complete-dtor.cpp:50:37: note: in implicit destructor for \'t3::Derived2\' first required here"} | ||
Line 5,951: | Line 5,963: | ||
}, | }, | ||
["note_memsize_comparison_cast_silence"]={ | ["note_memsize_comparison_cast_silence"]={ | ||
[ | [b]="explicitly cast the argument to size_t to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="explicitly cast the argument to size_t to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b0869036c114",1400289198,"Tweak diagnostic wording for init list narrowing","Tweak diagnostic wording for init list narrowing\n\nThe conventional form is \'<action> to silence this warning\'.\n\nAlso call the diagnostic an \'issue\' rather than a \'message\' because the latter\nterm is more widely used with reference to message expressions.\n\nllvm-svn: 209052"}, | [h]={"b0869036c114",1400289198,"Tweak diagnostic wording for init list narrowing","Tweak diagnostic wording for init list narrowing\n\nThe conventional form is \'<action> to silence this warning\'.\n\nAlso call the diagnostic an \'issue\' rather than a \'message\' because the latter\nterm is more widely used with reference to message expressions.\n\nllvm-svn: 209052"}, | ||
[i]={{ | [i]={{C,12175,"/// Takes the expression passed to the size_t parameter of functions\n/// such as memcmp, strncat, etc and warns if it\'s a comparison.\n///\n/// This is to catch typos like `if (memcmp(&a, &b, sizeof(a) > 0))`.\nstatic bool CheckMemorySizeofForComparison(Sema &S, const Expr *E, IdentifierInfo *FnName, SourceLocation FnLoc, SourceLocation RParenLoc) {\n // ...\n S.Diag(SizeRange.getBegin(), diag::note_memsize_comparison_cast_silence) << FixItHint::CreateInsertion(SizeRange.getBegin(), \"(size_t)(\") << FixItHint::CreateInsertion(S.getLocForEndOfToken(SizeRange.getEnd()), \")\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-memsize-comparison.cpp"]={"clang/test/SemaCXX/warn-memsize-comparison.cpp:19:21: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:25:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:32:22: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:38:22: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:44:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:50:27: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:56:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:63:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:69:19: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:75:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:81:23: note: explicitly cast the argument to size_t to silence this warning"} | ["clang/test/SemaCXX/warn-memsize-comparison.cpp"]={"clang/test/SemaCXX/warn-memsize-comparison.cpp:19:21: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:25:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:32:22: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:38:22: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:44:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:50:27: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:56:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:63:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:69:19: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:75:23: note: explicitly cast the argument to size_t to silence this warning","clang/test/SemaCXX/warn-memsize-comparison.cpp:81:23: note: explicitly cast the argument to size_t to silence this warning"} | ||
Line 5,963: | Line 5,975: | ||
}, | }, | ||
["note_memsize_comparison_paren"]={ | ["note_memsize_comparison_paren"]={ | ||
[ | [b]="did you mean to compare the result of %0 instead?", | ||
[ | [d]=c, | ||
[ | [e]="did you mean to compare the result of (.*?) instead\\?", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b0869036c114",1400289198,"Tweak diagnostic wording for init list narrowing","Tweak diagnostic wording for init list narrowing\n\nThe conventional form is \'<action> to silence this warning\'.\n\nAlso call the diagnostic an \'issue\' rather than a \'message\' because the latter\nterm is more widely used with reference to message expressions.\n\nllvm-svn: 209052"}, | [h]={"b0869036c114",1400289198,"Tweak diagnostic wording for init list narrowing","Tweak diagnostic wording for init list narrowing\n\nThe conventional form is \'<action> to silence this warning\'.\n\nAlso call the diagnostic an \'issue\' rather than a \'message\' because the latter\nterm is more widely used with reference to message expressions.\n\nllvm-svn: 209052"}, | ||
[i]={{ | [i]={{C,12170,"/// Takes the expression passed to the size_t parameter of functions\n/// such as memcmp, strncat, etc and warns if it\'s a comparison.\n///\n/// This is to catch typos like `if (memcmp(&a, &b, sizeof(a) > 0))`.\nstatic bool CheckMemorySizeofForComparison(Sema &S, const Expr *E, IdentifierInfo *FnName, SourceLocation FnLoc, SourceLocation RParenLoc) {\n // ...\n S.Diag(FnLoc, diag::note_memsize_comparison_paren) << FnName << FixItHint::CreateInsertion(S.getLocForEndOfToken(Size->getLHS()->getEndLoc()), \")\") << FixItHint::CreateRemoval(RParenLoc);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-memsize-comparison.cpp"]={"clang/test/SemaCXX/warn-memsize-comparison.cpp:19:7: note: did you mean to compare the result of \'memset\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:25:7: note: did you mean to compare the result of \'memmove\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:32:7: note: did you mean to compare the result of \'memcpy\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:38:7: note: did you mean to compare the result of \'memcmp\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:44:7: note: did you mean to compare the result of \'strncmp\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:50:7: note: did you mean to compare the result of \'strncasecmp\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:56:7: note: did you mean to compare the result of \'strncpy\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:63:7: note: did you mean to compare the result of \'strncat\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:69:7: note: did you mean to compare the result of \'strndup\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:75:7: note: did you mean to compare the result of \'strlcpy\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:81:7: note: did you mean to compare the result of \'strlcat\' instead?"} | ["clang/test/SemaCXX/warn-memsize-comparison.cpp"]={"clang/test/SemaCXX/warn-memsize-comparison.cpp:19:7: note: did you mean to compare the result of \'memset\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:25:7: note: did you mean to compare the result of \'memmove\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:32:7: note: did you mean to compare the result of \'memcpy\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:38:7: note: did you mean to compare the result of \'memcmp\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:44:7: note: did you mean to compare the result of \'strncmp\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:50:7: note: did you mean to compare the result of \'strncasecmp\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:56:7: note: did you mean to compare the result of \'strncpy\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:63:7: note: did you mean to compare the result of \'strncat\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:69:7: note: did you mean to compare the result of \'strndup\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:75:7: note: did you mean to compare the result of \'strlcpy\' instead?","clang/test/SemaCXX/warn-memsize-comparison.cpp:81:7: note: did you mean to compare the result of \'strlcat\' instead?"} | ||
Line 5,975: | Line 5,987: | ||
}, | }, | ||
["note_method_declared_at"]={ | ["note_method_declared_at"]={ | ||
[ | [b]="method %0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="method (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e5c1bda4d177",1288394405,"Improve diagnostics reporting of un-implemented","Improve diagnostics reporting of un-implemented\nmethods in protocols when protocols are in system\nheaders and thus ignored. //rdar: //8227199\n\nllvm-svn: 117739"}, | [h]={"e5c1bda4d177",1288394405,"Improve diagnostics reporting of un-implemented","Improve diagnostics reporting of un-implemented\nmethods in protocols when protocols are in system\nheaders and thus ignored. //rdar: //8227199\n\nllvm-svn: 117739"}, | ||
[i]={{ | [i]={{P,303,"static void DiagnoseObjCImplementedDeprecations(Sema &S, const NamedDecl *ND, SourceLocation ImplLoc) {\n // ...\n if (Availability != AR_Deprecated) {\n if (isa<ObjCMethodDecl>(ND)) {\n // ...\n S.Diag(ND->getLocation(), diag::note_method_declared_at) << ND->getDeclName();"},{P,321,"static void DiagnoseObjCImplementedDeprecations(Sema &S, const NamedDecl *ND, SourceLocation ImplLoc) {\n // ...\n if (isa<ObjCMethodDecl>(ND))\n S.Diag(ND->getLocation(), diag::note_method_declared_at) << ND->getDeclName();"},{P,2267,"static void WarnUndefinedMethod(Sema &S, ObjCImplDecl *Impl, ObjCMethodDecl *method, bool &IncompleteImpl, unsigned DiagID, NamedDecl *NeededFor = nullptr) {\n // ...\n if (MethodLoc.isValid())\n S.Diag(MethodLoc, diag::note_method_declared_at) << method;"},{P,2666,"/// 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 // ...\n Diag(MethodDecl->getLocation(), diag::note_method_declared_at) << MethodDecl->getDeclName();"},{p,1195,"static bool HelperToDiagnoseMismatchedMethodsInGlobalPool(Sema &S, SourceLocation AtLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, ObjCMethodDecl *Method, ObjCMethodList &MethList) {\n // ...\n for (M = M->getNext(); M; M = M->getNext()) {\n // ...\n if (!S.MatchTwoMethodDeclarations(Method, MatchingMethodDecl, Sema::MMS_loose)) {\n if (!Warned) {\n // ...\n S.Diag(Method->getLocation(), diag::note_method_declared_at) << Method->getDeclName();"},{p,1198,"static bool HelperToDiagnoseMismatchedMethodsInGlobalPool(Sema &S, SourceLocation AtLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, ObjCMethodDecl *Method, ObjCMethodList &MethList) {\n // ...\n for (M = M->getNext(); M; M = M->getNext()) {\n // ...\n if (!S.MatchTwoMethodDeclarations(Method, MatchingMethodDecl, Sema::MMS_loose)) {\n // ...\n S.Diag(MatchingMethodDecl->getLocation(), diag::note_method_declared_at) << MatchingMethodDecl->getDeclName();"},{p,2574,"/// Diagnose use of %s directive in an NSString which is being passed\n/// as formatting string to formatting method.\nstatic void DiagnoseCStringFormatDirectiveInObjCAPI(Sema &S, ObjCMethodDecl *Method, Selector Sel, Expr **Args, unsigned NumArgs) {\n // ...\n if (ObjCStringLiteral *OSL = dyn_cast<ObjCStringLiteral>(FormatExpr->IgnoreParenImpCasts())) {\n // ...\n if (S.FormatStringHasSArg(FormatString)) {\n // ...\n if (Method)\n S.Diag(Method->getLocation(), diag::note_method_declared_at) << Method->getDeclName();"},{p,2719,"/// \\param ReceiverType The type of the object receiving the\n/// message. When \\p ReceiverTypeInfo is non-NULL, this is the same\n/// type as that refers to. For a superclass send, this is the type of\n/// the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this class 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::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // Warn about explicit call of +initialize on its own class. But not on \'super\'.\n if (Method && Method->getMethodFamily() == OMF_initialize) {\n if (!SuperLoc.isValid()) {\n // ...\n if (ID == Class) {\n // ...\n Diag(Method->getLocation(), diag::note_method_declared_at) << Method->getDeclName();"},{p,2727,"/// \\param ReceiverType The type of the object receiving the\n/// message. When \\p ReceiverTypeInfo is non-NULL, this is the same\n/// type as that refers to. For a superclass send, this is the type of\n/// the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this class 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::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // Warn about explicit call of +initialize on its own class. But not on \'super\'.\n if (Method && Method->getMethodFamily() == OMF_initialize) {\n if (!SuperLoc.isValid()) {\n // ...\n } else if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) {\n // [super initialize] is allowed only within an +initialize implementation\n if (CurMeth->getMethodFamily() != OMF_initialize) {\n // ...\n Diag(Method->getLocation(), diag::note_method_declared_at) << Method->getDeclName();"},{p,2729,"/// \\param ReceiverType The type of the object receiving the\n/// message. When \\p ReceiverTypeInfo is non-NULL, this is the same\n/// type as that refers to. For a superclass send, this is the type of\n/// the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this class 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::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // Warn about explicit call of +initialize on its own class. But not on \'super\'.\n if (Method && Method->getMethodFamily() == OMF_initialize) {\n if (!SuperLoc.isValid()) {\n // ...\n } else if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) {\n // [super initialize] is allowed only within an +initialize implementation\n if (CurMeth->getMethodFamily() != OMF_initialize) {\n // ...\n Diag(CurMeth->getLocation(), diag::note_method_declared_at) << CurMeth->getDeclName();"},{p,2988,"/// 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 // Handle messages to Class.\n // We allow sending a message to a qualified Class (\"Class<foo>\"), which\n // is ok as long as one of the protocols implements the selector (if not,\n // warn).\n if (!ReceiverType->isObjCClassOrClassKindOfType()) {\n // ...\n if (!Method) {\n // ...\n // warn if instance method found for a Class message.\n if (Method && !isMethodDeclaredInRootProtocol(*this, Method)) {\n // ...\n Diag(Method->getLocation(), diag::note_method_declared_at) << Method->getDeclName();"},{p,3298,"/// 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 if (SelMethod) {\n // ...\n case OMF_alloc:\n case OMF_copy:\n case OMF_mutableCopy:\n case OMF_new:\n case OMF_init:\n // Issue error, unless ns_returns_not_retained.\n if (!SelMethod->hasAttr<NSReturnsNotRetainedAttr>()) {\n // ...\n Diag(SelMethod->getLocation(), diag::note_method_declared_at) << SelMethod->getDeclName();"},{p,3308,"/// 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 if (SelMethod) {\n // ...\n default:\n // +0 call. OK. unless ns_returns_retained.\n if (SelMethod->hasAttr<NSReturnsRetainedAttr>()) {\n // ...\n Diag(SelMethod->getLocation(), diag::note_method_declared_at) << SelMethod->getDeclName();"},{"clang/lib/Sema/SemaPseudoObject.cpp",1239,"bool ObjCSubscriptOpBuilder::findAtIndexGetter() {\n // ...\n if (AtIndexGetter) {\n // ...\n if (!R->isObjCObjectPointerType()) {\n // ...\n S.Diag(AtIndexGetter->getLocation(), diag::note_method_declared_at) << AtIndexGetter->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-deprecated-implementations.m"]={"clang/test/SemaObjC/warn-deprecated-implementations.m:6:1: note: method \'D\' declared here","clang/test/SemaObjC/warn-deprecated-implementations.m:8:1: note: method \'unavailable\' declared here","clang/test/SemaObjC/warn-deprecated-implementations.m:49:1: note: method \'B\' declared here","clang/test/SemaObjC/warn-deprecated-implementations.m:51:1: note: method \'unavailable\' declared here"} | ["clang/test/SemaObjC/warn-deprecated-implementations.m"]={"clang/test/SemaObjC/warn-deprecated-implementations.m:6:1: note: method \'D\' declared here","clang/test/SemaObjC/warn-deprecated-implementations.m:8:1: note: method \'unavailable\' declared here","clang/test/SemaObjC/warn-deprecated-implementations.m:49:1: note: method \'B\' declared here","clang/test/SemaObjC/warn-deprecated-implementations.m:51:1: note: method \'unavailable\' declared here"} | ||
Line 5,987: | Line 5,999: | ||
}, | }, | ||
["note_method_return_type_change"]={ | ["note_method_return_type_change"]={ | ||
[ | [b]="compiler has implicitly changed method %0 return type", | ||
[ | [d]=c, | ||
[ | [e]="compiler has implicitly changed method (.*?) return type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"b248ca55489e",1373561286,"ObjectiveC arc[qoi]: When due to change of certain methods\'","ObjectiveC arc[qoi]: When due to change of certain methods\'\nresult type, a diagnostic being issued, issue a \'note\' \nmentioning reason behind the unexpected warning.\n// rdar://14121570.\n\nllvm-svn: 186105"}, | [h]={"b248ca55489e",1373561286,"ObjectiveC arc[qoi]: When due to change of certain methods\'","ObjectiveC arc[qoi]: When due to change of certain methods\'\nresult type, a diagnostic being issued, issue a \'note\' \nmentioning reason behind the unexpected warning.\n// rdar://14121570.\n\nllvm-svn: 186105"}, | ||
[i]={{ | [i]={{N,6970,"void InitializationSequence::PrintInitLocationNote(Sema &S, const InitializedEntity &Entity) {\n if (Entity.isParamOrTemplateParamKind() && Entity.getDecl()) {\n // ...\n } else if (Entity.getKind() == InitializedEntity::EK_RelatedResult && Entity.getMethodDecl())\n S.Diag(Entity.getMethodDecl()->getLocation(), diag::note_method_return_type_change) << Entity.getMethodDecl()->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:176:1: note: compiler has implicitly changed method \'initWithX\' return type","clang/test/SemaObjC/related-result-type-inference.m:197:1: note: compiler has implicitly changed method \'newFilterViewControllerForType\' return type"} | ["clang/test/SemaObjC/related-result-type-inference.m"]={"clang/test/SemaObjC/related-result-type-inference.m:176:1: note: compiler has implicitly changed method \'initWithX\' return type","clang/test/SemaObjC/related-result-type-inference.m:197:1: note: compiler has implicitly changed method \'newFilterViewControllerForType\' return type"} | ||
Line 5,999: | Line 6,011: | ||
}, | }, | ||
["note_method_sent_forward_class"]={ | ["note_method_sent_forward_class"]={ | ||
[ | [b]="method %0 is used for the forward class", | ||
[ | [d]=c, | ||
[ | [e]="method (.*?) is used for the forward class", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"5276014db2b4",1241826349,"We want to diagnose sending message to a forward class","We want to diagnose sending message to a forward class\nand we also want to tell which message is actually \nbeing sent.\n\nllvm-svn: 71296"}, | [h]={"5276014db2b4",1241826349,"We want to diagnose sending message to a forward class","We want to diagnose sending message to a forward class\nand we also want to tell which message is actually \nbeing sent.\n\nllvm-svn: 71296"}, | ||
[i]={{ | [i]={{p,2670,"/// \\param ReceiverType The type of the object receiving the\n/// message. When \\p ReceiverTypeInfo is non-NULL, this is the same\n/// type as that refers to. For a superclass send, this is the type of\n/// the superclass.\n///\n/// \\param SuperLoc The location of the \"super\" keyword in a\n/// superclass message.\n///\n/// \\param Sel The selector to which the message is being sent.\n///\n/// \\param Method The method that this class 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::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg ArgsIn, bool isImplicit) {\n // ...\n // Find the method we are messaging.\n if (!Method) {\n // ...\n if (RequireCompleteType(Loc, Context.getObjCInterfaceType(Class), (getLangOpts().ObjCAutoRefCount ? diag::err_arc_receiver_forward_class : diag::warn_receiver_forward_class), TypeRange)) {\n // ...\n if (Method && !getLangOpts().ObjCAutoRefCount)\n Diag(Method->getLocation(), diag::note_method_sent_forward_class) << Method->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/forward-class-receiver.m"]={"clang/test/SemaObjC/forward-class-receiver.m:4:1: note: method \'new\' is used for the forward class"} | ["clang/test/SemaObjC/forward-class-receiver.m"]={"clang/test/SemaObjC/forward-class-receiver.m:4:1: note: method \'new\' is used for the forward class"} | ||
Line 6,011: | Line 6,023: | ||
}, | }, | ||
["note_misaligned_member_used_here"]={ | ["note_misaligned_member_used_here"]={ | ||
[ | [b]={{nil,O,"passing byval argument %0 with potentially incompatible alignment here"}}, | ||
[ | [d]=c, | ||
[ | [e]="passing byval argument (.*?) with potentially incompatible alignment here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={qb,1625925174,wb,ub}, | ||
[i]={{ | [i]={{C,6603,"// 16 byte ByVal alignment not due to a vector member is not honoured by XL\n// on AIX. Emit a warning here that users are generating binary incompatible\n// code to be safe.\n// Here we try to get information about the alignment of the struct member\n// from the struct passed to the caller function. We only warn when the struct\n// is passed byval, hence the series of checks and early returns if we are a not\n// passing a struct byval.\nvoid Sema::checkAIXMemberAlignment(SourceLocation Loc, const Expr *Arg) {\n // ...\n for (const FieldDecl *FD : ArgType->castAs<RecordType>()->getDecl()->fields()) {\n if (const auto *AA = FD->getAttr<AlignedAttr>()) {\n // ...\n if (Alignment.getQuantity() == 16) {\n // ...\n Diag(Loc, diag::note_misaligned_member_used_here) << PD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/aix-attr-align.c"]={"clang/test/Sema/aix-attr-align.c:36:31: note: passing byval argument \'s\' with potentially incompatible alignment here"} | ["clang/test/Sema/aix-attr-align.c"]={"clang/test/Sema/aix-attr-align.c:36:31: note: passing byval argument \'s\' with potentially incompatible alignment here"} | ||
Line 6,023: | Line 6,035: | ||
}, | }, | ||
["note_misplaced_ellipsis_vararg_add_comma"]={ | ["note_misplaced_ellipsis_vararg_add_comma"]={ | ||
[ | [b]="insert \',\' before \'...\' to silence this warning", | ||
[ | [d]=c, | ||
[ | [e]="insert \',\' before \'\\.\\.\\.\' to silence this warning", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"36ee9fb21957",1407799823,"Reject varargs \'...\' in function prototype if there are more parameters after","Reject varargs \'...\' in function prototype if there are more parameters after\nit. Diagnose with recovery if it appears after a function parameter that was\nobviously supposed to be a parameter pack. Otherwise, warn if it immediately\nfollows a function parameter pack, because the user most likely didn\'t intend\nto write a parameter pack followed by a C-style varargs ellipsis.\n\nThis warning can be syntactically disabled by using \", ...\" instead of \"...\".\n\nllvm-svn: 215408"}, | [h]={"36ee9fb21957",1407799823,"Reject varargs \'...\' in function prototype if there are more parameters after","Reject varargs \'...\' in function prototype if there are more parameters after\nit. Diagnose with recovery if it appears after a function parameter that was\nobviously supposed to be a parameter pack. Otherwise, warn if it immediately\nfollows a function parameter pack, because the user most likely didn\'t intend\nto write a parameter pack followed by a C-style varargs ellipsis.\n\nThis warning can be syntactically disabled by using \", ...\" instead of \"...\".\n\nllvm-svn: 215408"}, | ||
[i]={{"clang/lib/Parse/ParseDecl.cpp",7518,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (ParmDeclarator.getEllipsisLoc().isValid() || Actions.containsUnexpandedParameterPacks(ParmDeclarator)) {\n // ...\n Diag(EllipsisLoc, diag::note_misplaced_ellipsis_vararg_add_comma) << FixItHint::CreateInsertion(EllipsisLoc, \", \");"}}, | [i]={{"clang/lib/Parse/ParseDecl.cpp",7518,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (ParmDeclarator.getEllipsisLoc().isValid() || Actions.containsUnexpandedParameterPacks(ParmDeclarator)) {\n // ...\n Diag(EllipsisLoc, diag::note_misplaced_ellipsis_vararg_add_comma) << FixItHint::CreateInsertion(EllipsisLoc, \", \");"}}, | ||
Line 6,035: | Line 6,047: | ||
}, | }, | ||
["note_misplaced_ellipsis_vararg_add_ellipsis"]={ | ["note_misplaced_ellipsis_vararg_add_ellipsis"]={ | ||
[ | [b]="place \'...\' %select{immediately before declared identifier|here}0 to declare a function parameter pack", | ||
[ | [d]=c, | ||
[ | [e]="place \'\\.\\.\\.\' (?:immediately before declared identifier|here) to declare a function parameter pack", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"36ee9fb21957",1407799823,"Reject varargs \'...\' in function prototype if there are more parameters after","Reject varargs \'...\' in function prototype if there are more parameters after\nit. Diagnose with recovery if it appears after a function parameter that was\nobviously supposed to be a parameter pack. Otherwise, warn if it immediately\nfollows a function parameter pack, because the user most likely didn\'t intend\nto write a parameter pack followed by a C-style varargs ellipsis.\n\nThis warning can be syntactically disabled by using \", ...\" instead of \"...\".\n\nllvm-svn: 215408"}, | [h]={"36ee9fb21957",1407799823,"Reject varargs \'...\' in function prototype if there are more parameters after","Reject varargs \'...\' in function prototype if there are more parameters after\nit. Diagnose with recovery if it appears after a function parameter that was\nobviously supposed to be a parameter pack. Otherwise, warn if it immediately\nfollows a function parameter pack, because the user most likely didn\'t intend\nto write a parameter pack followed by a C-style varargs ellipsis.\n\nThis warning can be syntactically disabled by using \", ...\" instead of \"...\".\n\nllvm-svn: 215408"}, | ||
[i]={{"clang/lib/Parse/ParseDecl.cpp",7513,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (ParmDeclarator.getEllipsisLoc().isValid() || Actions.containsUnexpandedParameterPacks(ParmDeclarator)) {\n // ...\n if (ParmEllipsis.isValid()) {\n // ...\n } else {\n Diag(ParmDeclarator.getIdentifierLoc(), diag::note_misplaced_ellipsis_vararg_add_ellipsis) << FixItHint::CreateInsertion(ParmDeclarator.getIdentifierLoc(), \"...\") << !ParmDeclarator.hasName();"}}, | [i]={{"clang/lib/Parse/ParseDecl.cpp",7513,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (ParmDeclarator.getEllipsisLoc().isValid() || Actions.containsUnexpandedParameterPacks(ParmDeclarator)) {\n // ...\n if (ParmEllipsis.isValid()) {\n // ...\n } else {\n Diag(ParmDeclarator.getIdentifierLoc(), diag::note_misplaced_ellipsis_vararg_add_ellipsis) << FixItHint::CreateInsertion(ParmDeclarator.getIdentifierLoc(), \"...\") << !ParmDeclarator.hasName();"}}, | ||
Line 6,047: | Line 6,059: | ||
}, | }, | ||
["note_misplaced_ellipsis_vararg_existing_ellipsis"]={ | ["note_misplaced_ellipsis_vararg_existing_ellipsis"]={ | ||
[ | [b]="preceding \'...\' declares a function parameter pack", | ||
[ | [d]=c, | ||
[ | [e]="preceding \'\\.\\.\\.\' declares a function parameter pack", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"36ee9fb21957",1407799823,"Reject varargs \'...\' in function prototype if there are more parameters after","Reject varargs \'...\' in function prototype if there are more parameters after\nit. Diagnose with recovery if it appears after a function parameter that was\nobviously supposed to be a parameter pack. Otherwise, warn if it immediately\nfollows a function parameter pack, because the user most likely didn\'t intend\nto write a parameter pack followed by a C-style varargs ellipsis.\n\nThis warning can be syntactically disabled by using \", ...\" instead of \"...\".\n\nllvm-svn: 215408"}, | [h]={"36ee9fb21957",1407799823,"Reject varargs \'...\' in function prototype if there are more parameters after","Reject varargs \'...\' in function prototype if there are more parameters after\nit. Diagnose with recovery if it appears after a function parameter that was\nobviously supposed to be a parameter pack. Otherwise, warn if it immediately\nfollows a function parameter pack, because the user most likely didn\'t intend\nto write a parameter pack followed by a C-style varargs ellipsis.\n\nThis warning can be syntactically disabled by using \", ...\" instead of \"...\".\n\nllvm-svn: 215408"}, | ||
[i]={{"clang/lib/Parse/ParseDecl.cpp",7510,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (ParmDeclarator.getEllipsisLoc().isValid() || Actions.containsUnexpandedParameterPacks(ParmDeclarator)) {\n // ...\n if (ParmEllipsis.isValid()) {\n Diag(ParmEllipsis, diag::note_misplaced_ellipsis_vararg_existing_ellipsis);"}}, | [i]={{"clang/lib/Parse/ParseDecl.cpp",7510,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) {\n if (!getLangOpts().CPlusPlus) {\n // ...\n } else if (ParmDeclarator.getEllipsisLoc().isValid() || Actions.containsUnexpandedParameterPacks(ParmDeclarator)) {\n // ...\n if (ParmEllipsis.isValid()) {\n Diag(ParmEllipsis, diag::note_misplaced_ellipsis_vararg_existing_ellipsis);"}}, | ||
Line 6,059: | Line 6,071: | ||
}, | }, | ||
["note_missing_end_of_definition_before"]={ | ["note_missing_end_of_definition_before"]={ | ||
[ | [b]="still within definition of %q0 here", | ||
[ | [d]=c, | ||
[ | [e]="still within definition of (.*?) here", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"da35e963bc57",1383972771,"Try to recover a bit better if a close brace is missing from the end of a class","Try to recover a bit better if a close brace is missing from the end of a class\ndefinition. If we see something that looks like a namespace definition inside a\nclass, that strongly indicates that a close brace was missing somewhere.\n\nllvm-svn: 194319"}, | [h]={"da35e963bc57",1383972771,"Try to recover a bit better if a close brace is missing from the end of a class","Try to recover a bit better if a close brace is missing from the end of a class\ndefinition. If we see something that looks like a namespace definition inside a\nclass, that strongly indicates that a close brace was missing somewhere.\n\nllvm-svn: 194319"}, | ||
[i]={{"clang/lib/Parse/ParseDeclCXX.cpp",3691,"void Parser::DiagnoseUnexpectedNamespace(NamedDecl *D) {\n // ...\n Diag(Tok.getLocation(), diag::note_missing_end_of_definition_before) << D;"}}, | [i]={{"clang/lib/Parse/ParseDeclCXX.cpp",3691,"void Parser::DiagnoseUnexpectedNamespace(NamedDecl *D) {\n // ...\n Diag(Tok.getLocation(), diag::note_missing_end_of_definition_before) << D;"}}, | ||
Line 6,071: | Line 6,083: | ||
}, | }, | ||
["note_missing_selector_name"]={ | ["note_missing_selector_name"]={ | ||
[ | [b]="introduce a parameter name to make %0 part of the selector", | ||
[ | [d]=c, | ||
[ | [e]="introduce a parameter name to make (.*?) part of the selector", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"84f498433116",1347923399,"objective-C: improve on warnings about misplacement of method","objective-C: improve on warnings about misplacement of method\nargument names. // rdar://12263549\n\nllvm-svn: 164077"}, | [h]={"84f498433116",1347923399,"objective-C: improve on warnings about misplacement of method","objective-C: improve on warnings about misplacement of method\nargument names. // rdar://12263549\n\nllvm-svn: 164077"}, | ||
[i]={{ | [i]={{vc,1510,"/// objc-method-decl:\n/// objc-selector\n/// objc-keyword-selector objc-parmlist[opt]\n/// objc-type-name objc-selector\n/// objc-type-name objc-keyword-selector objc-parmlist[opt]\n///\n/// objc-keyword-selector:\n/// objc-keyword-decl\n/// objc-keyword-selector objc-keyword-decl\n///\n/// objc-keyword-decl:\n/// objc-selector \':\' objc-type-name objc-keyword-attributes[opt] identifier\n/// objc-selector \':\' objc-keyword-attributes[opt] identifier\n/// \':\' objc-type-name objc-keyword-attributes[opt] identifier\n/// \':\' objc-keyword-attributes[opt] identifier\n///\n/// objc-parmlist:\n/// objc-parms objc-ellipsis[opt]\n///\n/// objc-parms:\n/// objc-parms , parameter-declaration\n///\n/// objc-ellipsis:\n/// , ...\n///\n/// objc-keyword-attributes: [OBJC2]\n/// __attribute__((unused))\n///\nDecl *Parser::ParseObjCMethodDecl(SourceLocation mLoc, tok::TokenKind mType, tok::ObjCKeywordKind MethodImplKind, bool MethodDefinition) {\n // ...\n while (true) {\n // ...\n if (!SelIdent) {\n // ...\n if (PP.getLocForEndOfToken(ArgInfo.NameLoc) == ColonLoc) {\n // ...\n Diag(ArgInfo.NameLoc, diag::note_missing_selector_name) << ArgInfo.Name;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/unused.m"]={"clang/test/SemaObjC/unused.m:32:20: note: introduce a parameter name to make \'x\' part of the selector","clang/test/SemaObjC/unused.m:36:6: note: introduce a parameter name to make \'y\' part of the selector"} | ["clang/test/SemaObjC/unused.m"]={"clang/test/SemaObjC/unused.m:32:20: note: introduce a parameter name to make \'x\' part of the selector","clang/test/SemaObjC/unused.m:36:6: note: introduce a parameter name to make \'y\' part of the selector"} | ||
Line 6,083: | Line 6,095: | ||
}, | }, | ||
["note_mmap_add_framework_keyword"]={ | ["note_mmap_add_framework_keyword"]={ | ||
[ | [b]={{nil,L,"use \'framework module\' to declare module \'%0\'"}}, | ||
[ | [d]=c, | ||
[ | [e]="use \'framework module\' to declare module \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"9f6020bcc522",1527816378,"[Modules] Warning for module declarations lacking \'framework\' qualifier","[Modules] Warning for module declarations lacking \'framework\' qualifier\n\nWhen a module declaration for a framework lacks the \'framework\'\nqualifier, the listed headers aren\'t found (because there\'s no\ntrigger for the special framework style path lookup) and the module\nis silently not built. This leads to frameworks not being modularized\nby accident, which is pretty bad.\n\nAdd a warning and suggest the user to add the \'framework\' qualifier\nwhen we can prove that it\'s the case.\n\nrdar://problem/39193062\n\nllvm-svn: 333718"}, | [h]={"9f6020bcc522",1527816378,"[Modules] Warning for module declarations lacking \'framework\' qualifier","[Modules] Warning for module declarations lacking \'framework\' qualifier\n\nWhen a module declaration for a framework lacks the \'framework\'\nqualifier, the listed headers aren\'t found (because there\'s no\ntrigger for the special framework style path lookup) and the module\nis silently not built. This leads to frameworks not being modularized\nby accident, which is pretty bad.\n\nAdd a warning and suggest the user to add the \'framework\' qualifier\nwhen we can prove that it\'s the case.\n\nrdar://problem/39193062\n\nllvm-svn: 333718"}, | ||
[i]={{ | [i]={{Ob,2480,"/// Parse a header declaration.\n///\n/// header-declaration:\n/// \'textual\'[opt] \'header\' string-literal\n/// \'private\' \'textual\'[opt] \'header\' string-literal\n/// \'exclude\' \'header\' string-literal\n/// \'umbrella\' \'header\' string-literal\n///\n/// FIXME: Support \'private textual header\'.\nvoid ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, SourceLocation LeadingLoc) {\n // ...\n if (NeedsFramework)\n Diags.Report(CurrModuleDeclLoc, diag::note_mmap_add_framework_keyword) << ActiveModule->getFullModuleName() << FixItHint::CreateReplacement(CurrModuleDeclLoc, \"framework module\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/incomplete-framework-module.m"]={"clang/test/Modules/Inputs/incomplete-framework-module/Foo.framework/Modules/module.modulemap:1:1: note: use \'framework module\' to declare module \'Foo\'","clang/test/Modules/Inputs/incomplete-framework-module/Foo.framework/Modules/module.modulemap:1:1: note: use \'framework module\' to declare module \'Foo\'"} | ["clang/test/Modules/incomplete-framework-module.m"]={"clang/test/Modules/Inputs/incomplete-framework-module/Foo.framework/Modules/module.modulemap:1:1: note: use \'framework module\' to declare module \'Foo\'","clang/test/Modules/Inputs/incomplete-framework-module/Foo.framework/Modules/module.modulemap:1:1: note: use \'framework module\' to declare module \'Foo\'"} | ||
Line 6,095: | Line 6,107: | ||
}, | }, | ||
["note_mmap_lbrace_match"]={ | ["note_mmap_lbrace_match"]={ | ||
[ | [b]="to match this \'{\'", | ||
[ | [d]=c, | ||
[ | [e]="to match this \'\\{\'", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"718292f260bf",1321038628,"Introduce basic support for parsing module map files.","Introduce basic support for parsing module map files.\n\nModule map files provide a way to map between headers and modules, so\nthat we can layer a module system on top of existing headers without\nchanging those headers at all.\n\nThis commit introduces the module map file parser and the module map\nthat it generates, and wires up the module map file parser so that\nwe\'ll automatically find module map files as part of header\nsearch. Note that we don\'t yet use the information stored in the\nmodule map.\n\nllvm-svn: 144402"}, | [h]={"718292f260bf",1321038628,"Introduce basic support for parsing module map files.","Introduce basic support for parsing module map files.\n\nModule map files provide a way to map between headers and modules, so\nthat we can layer a module system on top of existing headers without\nchanging those headers at all.\n\nThis commit introduces the module map file parser and the module map\nthat it generates, and wires up the module map file parser so that\nwe\'ll automatically find module map files as part of header\nsearch. Note that we don\'t yet use the information stored in the\nmodule map.\n\nllvm-svn: 144402"}, | ||
[i]={{ | [i]={{Ob,2057,"/// Parse a module declaration.\n///\n/// module-declaration:\n/// \'extern\' \'module\' module-id string-literal\n/// \'explicit\'[opt] \'framework\'[opt] \'module\' module-id attributes[opt]\n/// { module-member* }\n///\n/// module-member:\n/// requires-declaration\n/// header-declaration\n/// submodule-declaration\n/// export-declaration\n/// export-as-declaration\n/// link-declaration\n///\n/// submodule-declaration:\n/// module-declaration\n/// inferred-submodule-declaration\nvoid ModuleMapParser::parseModuleDecl() {\n // ...\n if (Module *Existing = Map.lookupModuleQualified(ModuleName, ActiveModule)) {\n // ...\n if (LoadedFromASTFile || Inferred || PartOfFramework || ParsedAsMainInput) {\n // ...\n if (Tok.is(MMToken::RBrace))\n // ...\n else {\n // ...\n Diags.Report(LBraceLoc, diag::note_mmap_lbrace_match);"},{Ob,2198,"/// Parse a module declaration.\n///\n/// module-declaration:\n/// \'extern\' \'module\' module-id string-literal\n/// \'explicit\'[opt] \'framework\'[opt] \'module\' module-id attributes[opt]\n/// { module-member* }\n///\n/// module-member:\n/// requires-declaration\n/// header-declaration\n/// submodule-declaration\n/// export-declaration\n/// export-as-declaration\n/// link-declaration\n///\n/// submodule-declaration:\n/// module-declaration\n/// inferred-submodule-declaration\nvoid ModuleMapParser::parseModuleDecl() {\n // ...\n if (Tok.is(MMToken::RBrace))\n // ...\n else {\n // ...\n Diags.Report(LBraceLoc, diag::note_mmap_lbrace_match);"},{Ob,2471,"/// Parse a header declaration.\n///\n/// header-declaration:\n/// \'textual\'[opt] \'header\' string-literal\n/// \'private\' \'textual\'[opt] \'header\' string-literal\n/// \'exclude\' \'header\' string-literal\n/// \'umbrella\' \'header\' string-literal\n///\n/// FIXME: Support \'private textual header\'.\nvoid ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, SourceLocation LeadingLoc) {\n // ...\n // If we were given stat information, parse it so we can skip looking for\n // the file.\n if (Tok.is(MMToken::LBrace)) {\n // ...\n if (Tok.is(MMToken::RBrace))\n // ...\n else {\n // ...\n Diags.Report(LBraceLoc, diag::note_mmap_lbrace_match);"},{Ob,2954,"/// Parse an inferred module declaration (wildcard modules).\n///\n/// module-declaration:\n/// \'explicit\'[opt] \'framework\'[opt] \'module\' * attributes[opt]\n/// { inferred-module-member* }\n///\n/// inferred-module-member:\n/// \'export\' \'*\'\n/// \'exclude\' identifier\nvoid ModuleMapParser::parseInferredModuleDecl(bool Framework, bool Explicit) {\n // ...\n if (Tok.is(MMToken::RBrace))\n // ...\n else {\n // ...\n Diags.Report(LBraceLoc, diag::note_mmap_lbrace_match);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Parser/objcxx-at.mm"]={"clang/test/Parser/objcxx-at.mm:12:10: note: to match this \'{\'"} | ["clang/test/Parser/objcxx-at.mm"]={"clang/test/Parser/objcxx-at.mm:12:10: note: to match this \'{\'"} | ||
Line 6,107: | Line 6,119: | ||
}, | }, | ||
["note_mmap_lsquare_match"]={ | ["note_mmap_lsquare_match"]={ | ||
[ | [b]="to match this \']\'", | ||
[ | [d]=c, | ||
[ | [e]="to match this \'\\]\'", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"a686e1b05df9",1327693953,"Introduce module attributes into the module map grammar, along with a","Introduce module attributes into the module map grammar, along with a\nsingle attribute (\"system\") that allows us to mark a module as being a\n\"system\" module. Each of the headers that makes up a system module is\nconsidered to be a system header, so that we (for example) suppress\nwarnings there.\n\nIf a module is being inferred for a framework, and that framework\ndirectory is within a system frameworks directory, infer it as a\nsystem framework.\n\nllvm-svn: 149143"}, | [h]={"a686e1b05df9",1327693953,"Introduce module attributes into the module map grammar, along with a","Introduce module attributes into the module map grammar, along with a\nsingle attribute (\"system\") that allows us to mark a module as being a\n\"system\" module. Each of the headers that makes up a system module is\nconsidered to be a system header, so that we (for example) suppress\nwarnings there.\n\nIf a module is being inferred for a framework, and that framework\ndirectory is within a system frameworks directory, infer it as a\nsystem framework.\n\nllvm-svn: 149143"}, | ||
[i]={{ | [i]={{Ob,3022,"/// Parse optional attributes.\n///\n/// attributes:\n/// attribute attributes\n/// attribute\n///\n/// attribute:\n/// [ identifier ]\n///\n/// \\param Attrs Will be filled in with the parsed attributes.\n///\n/// \\returns true if an error occurred, false otherwise.\nbool ModuleMapParser::parseOptionalAttributes(Attributes &Attrs) {\n // ...\n while (Tok.is(MMToken::LSquare)) {\n // ...\n // Consume the \']\'.\n if (!Tok.is(MMToken::RSquare)) {\n // ...\n Diags.Report(LSquareLoc, diag::note_mmap_lsquare_match);"}} | ||
}, | }, | ||
["note_mmap_prev_definition"]={ | ["note_mmap_prev_definition"]={ | ||
[ | [b]="previously defined here", | ||
[ | [d]=c, | ||
[ | [e]="previously defined here", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"718292f260bf",1321038628,"Introduce basic support for parsing module map files.","Introduce basic support for parsing module map files.\n\nModule map files provide a way to map between headers and modules, so\nthat we can layer a module system on top of existing headers without\nchanging those headers at all.\n\nThis commit introduces the module map file parser and the module map\nthat it generates, and wires up the module map file parser so that\nwe\'ll automatically find module map files as part of header\nsearch. Note that we don\'t yet use the information stored in the\nmodule map.\n\nllvm-svn: 144402"}, | [h]={"718292f260bf",1321038628,"Introduce basic support for parsing module map files.","Introduce basic support for parsing module map files.\n\nModule map files provide a way to map between headers and modules, so\nthat we can layer a module system on top of existing headers without\nchanging those headers at all.\n\nThis commit introduces the module map file parser and the module map\nthat it generates, and wires up the module map file parser so that\nwe\'ll automatically find module map files as part of header\nsearch. Note that we don\'t yet use the information stored in the\nmodule map.\n\nllvm-svn: 144402"}, | ||
[i]={{ | [i]={{Ob,2069,"/// Parse a module declaration.\n///\n/// module-declaration:\n/// \'extern\' \'module\' module-id string-literal\n/// \'explicit\'[opt] \'framework\'[opt] \'module\' module-id attributes[opt]\n/// { module-member* }\n///\n/// module-member:\n/// requires-declaration\n/// header-declaration\n/// submodule-declaration\n/// export-declaration\n/// export-as-declaration\n/// link-declaration\n///\n/// submodule-declaration:\n/// module-declaration\n/// inferred-submodule-declaration\nvoid ModuleMapParser::parseModuleDecl() {\n // ...\n if (Module *Existing = Map.lookupModuleQualified(ModuleName, ActiveModule)) {\n // ...\n if (!Existing->Parent && Map.mayShadowNewModule(Existing)) {\n // ...\n } else {\n // ...\n Diags.Report(Existing->DefinitionLoc, diag::note_mmap_prev_definition);"},{Ob,2839,"/// Parse an inferred module declaration (wildcard modules).\n///\n/// module-declaration:\n/// \'explicit\'[opt] \'framework\'[opt] \'module\' * attributes[opt]\n/// { inferred-module-member* }\n///\n/// inferred-module-member:\n/// \'export\' \'*\'\n/// \'exclude\' identifier\nvoid ModuleMapParser::parseInferredModuleDecl(bool Framework, bool Explicit) {\n // ...\n if (ActiveModule) {\n // ...\n // Check for redefinition of an inferred module.\n if (!Failed && ActiveModule->InferSubmodules) {\n // ...\n if (ActiveModule->InferredSubmoduleLoc.isValid())\n Diags.Report(ActiveModule->InferredSubmoduleLoc, diag::note_mmap_prev_definition);"}} | ||
}, | }, | ||
["note_mmap_rename_top_level_private_module"]={ | ["note_mmap_rename_top_level_private_module"]={ | ||
[ | [b]={{nil,V,"rename \'%0\' to ensure it can be found by name"}}, | ||
[ | [d]=c, | ||
[ | [e]="rename \'(.*?)\' to ensure it can be found by name", | ||
[ | [f]=a, | ||
[ | [g]=hb, | ||
[h]={"2972991969b6",1513911210,"[Modules] Change private modules rules and warnings","[Modules] Change private modules rules and warnings\n\nWe used to advertise private modules to be declared as submodules\n(Foo.Private). This has proven to not scale well since private headers\nmight carry several dependencies, introducing unwanted content into the\nmain module and often causing dep cycles.\n\nChange the canonical way to name it to Foo_Private, forcing private\nmodules as top level ones, and provide warnings under -Wprivate-module\nto suggest fixes for other private naming. Update documentation to\nreflect that.\n\nrdar://problem/31173501\n\nllvm-svn: 321337"}, | [h]={"2972991969b6",1513911210,"[Modules] Change private modules rules and warnings","[Modules] Change private modules rules and warnings\n\nWe used to advertise private modules to be declared as submodules\n(Foo.Private). This has proven to not scale well since private headers\nmight carry several dependencies, introducing unwanted content into the\nmain module and often causing dep cycles.\n\nChange the canonical way to name it to Foo_Private, forcing private\nmodules as top level ones, and provide warnings under -Wprivate-module\nto suggest fixes for other private naming. Update documentation to\nreflect that.\n\nrdar://problem/31173501\n\nllvm-svn: 321337"}, | ||
[i]={{ | [i]={{Ob,1835,"/// Private modules are canonicalized as Foo_Private. Clang provides extra\n/// module map search logic to find the appropriate private module when PCH\n/// is used with implicit module maps. Warn when private modules are written\n/// in other ways (FooPrivate and Foo.Private), providing notes and fixits.\nvoid ModuleMapParser::diagnosePrivateModules(SourceLocation ExplicitLoc, SourceLocation FrameworkLoc) {\n auto GenNoteAndFixIt = [&](StringRef BadName, StringRef Canonical, const Module *M, SourceRange ReplLoc) {\n auto D = Diags.Report(ActiveModule->DefinitionLoc, diag::note_mmap_rename_top_level_private_module);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/implicit-private-with-different-name.m"]={"clang/test/Modules/Inputs/implicit-private-with-different-name/A.framework/Modules/module.private.modulemap:1:18: note: rename \'APrivate\' to ensure it can be found by name"} | ["clang/test/Modules/implicit-private-with-different-name.m"]={"clang/test/Modules/Inputs/implicit-private-with-different-name/A.framework/Modules/module.private.modulemap:1:18: note: rename \'APrivate\' to ensure it can be found by name"} | ||
Line 6,137: | Line 6,149: | ||
}, | }, | ||
["note_module_cache_path"]={ | ["note_module_cache_path"]={ | ||
[ | [b]="after modifying system headers, please delete the module cache at \'%0\'", | ||
[ | [d]=c, | ||
[ | [e]="after modifying system headers, please delete the module cache at \'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]=Kc, | ||
[h]={"940e80502e57",1368224113,"[Modules] When things go horribly wrong when reading a module, point at the module cache.","[Modules] When things go horribly wrong when reading a module, point at the module cache.\n\nSometimes people hack on their system headers. In such cases, they\'ll\nneed to delete their module cache, but may not know where it is. Add a\nnote to show them where it is.\n\nllvm-svn: 181638"}, | [h]={"940e80502e57",1368224113,"[Modules] When things go horribly wrong when reading a module, point at the module cache.","[Modules] When things go horribly wrong when reading a module, point at the module cache.\n\nSometimes people hack on their system headers. In such cases, they\'ll\nneed to delete their module cache, but may not know where it is. Add a\nnote to show them where it is.\n\nllvm-svn: 181638"}, | ||
[i]={{ | [i]={{Jc,1293,"void ASTReader::Error(StringRef Msg) const {\n // ...\n if (PP.getLangOpts().Modules && !Diags.isDiagnosticInFlight() && !PP.getHeaderSearchInfo().getModuleCachePath().empty()) {\n Diag(diag::note_module_cache_path) << PP.getHeaderSearchInfo().getModuleCachePath();"}} | ||
}, | }, | ||
["note_module_def_undef_here"]={ | ["note_module_def_undef_here"]={ | ||
[ | [b]="macro was %select{defined|#undef\'d}0 here", | ||
[ | [d]=c, | ||
[ | [e]="macro was (?:defined|\\#undef\'d) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"35b13ece231b",1363738925,"<rdar://problem/10796651> Introduce configuration macros into module maps.","<rdar://problem/10796651> Introduce configuration macros into module maps.\n\nConfiguration macros are macros that are intended to alter how a\nmodule works, such that we need to build different module variants\nfor different values of these macros. A module can declare its\nconfiguration macros, in which case we will complain if the definition\nof a configation macro on the command line (or lack thereof) differs\nfrom the current preprocessor state at the point where the module is\nimported. This should eliminate some surprises when enabling modules,\nbecause \"#define CONFIG_MACRO ...\" followed by \"#include\n<module/header.h>\" would silently ignore the CONFIG_MACRO setting. At\nleast it will no longer be silent about it.\n\nConfiguration macros are eventually intended to help reduce the number\nof module variants that need to be built. When the list of\nconfiguration macros for a module is exhaustive, we only need to\nconsider the settings for those macros when building/finding the\nmodule, which can help isolate modules for various project-specific -D\nflags that should never affect how modules are build (but currently do).\n\nllvm-svn: 177466"}, | [h]={"35b13ece231b",1363738925,"<rdar://problem/10796651> Introduce configuration macros into module maps.","<rdar://problem/10796651> Introduce configuration macros into module maps.\n\nConfiguration macros are macros that are intended to alter how a\nmodule works, such that we need to build different module variants\nfor different values of these macros. A module can declare its\nconfiguration macros, in which case we will complain if the definition\nof a configation macro on the command line (or lack thereof) differs\nfrom the current preprocessor state at the point where the module is\nimported. This should eliminate some surprises when enabling modules,\nbecause \"#define CONFIG_MACRO ...\" followed by \"#include\n<module/header.h>\" would silently ignore the CONFIG_MACRO setting. At\nleast it will no longer be silent about it.\n\nConfiguration macros are eventually intended to help reduce the number\nof module variants that need to be built. When the list of\nconfiguration macros for a module is exhaustive, we only need to\nconsider the settings for those macros when building/finding the\nmodule, which can help isolate modules for various project-specific -D\nflags that should never affect how modules are build (but currently do).\n\nllvm-svn: 177466"}, | ||
[i]={{"clang/lib/Frontend/CompilerInstance.cpp",1557,"/// Diagnose differences between the current definition of the given\n/// configuration macro and the definition provided on the command line.\nstatic void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) {\n // ...\n if (CurrentDefinition == CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition) {\n // ...\n PP.Diag(LatestDef.getUndefLocation(), diag::note_module_def_undef_here) << true;"},{"clang/lib/Frontend/CompilerInstance.cpp",1566,"/// Diagnose differences between the current definition of the given\n/// configuration macro and the definition provided on the command line.\nstatic void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) {\n // ...\n if (CurrentDefinition == CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition) {\n // ...\n } else if (!CmdLineDefinition) {\n // ...\n PP.Diag(CurrentDefinition->getDefinitionLoc(), diag::note_module_def_undef_here) << false;"},{"clang/lib/Frontend/CompilerInstance.cpp",1574,"/// Diagnose differences between the current definition of the given\n/// configuration macro and the definition provided on the command line.\nstatic void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) {\n // ...\n if (CurrentDefinition == CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition) {\n // ...\n } else if (!CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition->isIdenticalTo(*CmdLineDefinition, PP,\n // ...\n PP.Diag(CurrentDefinition->getDefinitionLoc(), diag::note_module_def_undef_here) << false;"}}, | [i]={{"clang/lib/Frontend/CompilerInstance.cpp",1557,"/// Diagnose differences between the current definition of the given\n/// configuration macro and the definition provided on the command line.\nstatic void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) {\n // ...\n if (CurrentDefinition == CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition) {\n // ...\n PP.Diag(LatestDef.getUndefLocation(), diag::note_module_def_undef_here) << true;"},{"clang/lib/Frontend/CompilerInstance.cpp",1566,"/// Diagnose differences between the current definition of the given\n/// configuration macro and the definition provided on the command line.\nstatic void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) {\n // ...\n if (CurrentDefinition == CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition) {\n // ...\n } else if (!CmdLineDefinition) {\n // ...\n PP.Diag(CurrentDefinition->getDefinitionLoc(), diag::note_module_def_undef_here) << false;"},{"clang/lib/Frontend/CompilerInstance.cpp",1574,"/// Diagnose differences between the current definition of the given\n/// configuration macro and the definition provided on the command line.\nstatic void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, Module *Mod, SourceLocation ImportLoc) {\n // ...\n if (CurrentDefinition == CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition) {\n // ...\n } else if (!CmdLineDefinition) {\n // ...\n } else if (!CurrentDefinition->isIdenticalTo(*CmdLineDefinition, PP,\n // ...\n PP.Diag(CurrentDefinition->getDefinitionLoc(), diag::note_module_def_undef_here) << false;"}}, | ||
Line 6,158: | Line 6,170: | ||
}, | }, | ||
["note_module_file_conflict"]={ | ["note_module_file_conflict"]={ | ||
[ | [b]={{nil,M,"this is generally caused by modules with the same name found in multiple paths"}}, | ||
[ | [d]=c, | ||
[ | [e]="this is generally caused by modules with the same name found in multiple paths", | ||
[ | [f]=a, | ||
[ | [g]=Kc, | ||
[h]={"766a08df12c1",1626398649,"[Frontend] Only compile modules if not already finalized","[Frontend] Only compile modules if not already finalized\n\nIt was possible to re-add a module to a shared in-memory module cache\nwhen search paths are changed. This can eventually cause a crash if the\noriginal module is referenced after this occurs.\n 1. Module A depends on B\n 2. B exists in two paths C and D\n 3. First run only has C on the search path, finds A and B and loads\n them\n 4. Second run adds D to the front of the search path. A is loaded and\n contains a reference to the already compiled module from C. But\n searching finds the module from D instead, causing a mismatch\n 5. B and the modules that depend on it are considered out of date and\n thus rebuilt\n 6. The recompiled module A is added to the in-memory cache, freeing\n the previously inserted one\n\nThis can never occur from a regular clang process, but is very easy to\ndo through the API - whether through the use of a shared case or just\nrunning multiple compilations from a single `CompilerInstance`. Update\nthe compilation to return early if a module is already finalized so that\nthe pre-condition in the in-memory module cache holds.\n\nResolves rdar://78180255\n\nDifferential Revision: https://reviews.llvm.org/D105328"}, | [h]={"766a08df12c1",1626398649,"[Frontend] Only compile modules if not already finalized","[Frontend] Only compile modules if not already finalized\n\nIt was possible to re-add a module to a shared in-memory module cache\nwhen search paths are changed. This can eventually cause a crash if the\noriginal module is referenced after this occurs.\n 1. Module A depends on B\n 2. B exists in two paths C and D\n 3. First run only has C on the search path, finds A and B and loads\n them\n 4. Second run adds D to the front of the search path. A is loaded and\n contains a reference to the already compiled module from C. But\n searching finds the module from D instead, causing a mismatch\n 5. B and the modules that depend on it are considered out of date and\n thus rebuilt\n 6. The recompiled module A is added to the in-memory cache, freeing\n the previously inserted one\n\nThis can never occur from a regular clang process, but is very easy to\ndo through the API - whether through the use of a shared case or just\nrunning multiple compilations from a single `CompilerInstance`. Update\nthe compilation to return early if a module is already finalized so that\nthe pre-condition in the in-memory module cache holds.\n\nResolves rdar://78180255\n\nDifferential Revision: https://reviews.llvm.org/D105328"}, | ||
[i]={{ | [i]={{Jc,2946,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case IMPORTS: {\n // ...\n while (Idx < N) {\n // ...\n if (recompilingFinalized)\n Diag(diag::note_module_file_conflict);"}} | ||
}, | }, | ||
["note_module_file_imported_by"]={ | ["note_module_file_imported_by"]={ | ||
[ | [b]="imported by %select{|module \'%2\' in }1\'%0\'", | ||
[ | [d]=c, | ||
[ | [e]="imported by (?:|module \'(.*?)\' in )\'(.*?)\'", | ||
[ | [f]=a, | ||
[ | [g]=Kc, | ||
[h]={"37bd29a5e6b0",1425092992,"Give better diagnostics when -fmodule-file= finds a bad file: if the file is","Give better diagnostics when -fmodule-file= finds a bad file: if the file is\nfound indirectly, explain how we got there, and distinguish between \'file not\nfound\' and \'file found but invalid\'.\n\nllvm-svn: 230839"}, | [h]={"37bd29a5e6b0",1425092992,"Give better diagnostics when -fmodule-file= finds a bad file: if the file is","Give better diagnostics when -fmodule-file= finds a bad file: if the file is\nfound indirectly, explain how we got there, and distinguish between \'file not\nfound\' and \'file found but invalid\'.\n\nllvm-svn: 230839"}, | ||
[i]={{ | [i]={{Jc,2943,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case IMPORTS: {\n // ...\n while (Idx < N) {\n // ...\n if (isDiagnosedResult(Result, Capabilities) || recompilingFinalized)\n Diag(diag::note_module_file_imported_by) << F.FileName << !F.ModuleName.empty() << F.ModuleName;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/PCH/cxx-chain-function-template.cpp"]={"note: imported by \'clang/test/PCH/cxx-chain-function-template.cpp.pch-final\'"} | ["clang/test/PCH/cxx-chain-function-template.cpp"]={"note: imported by \'clang/test/PCH/cxx-chain-function-template.cpp.pch-final\'"} | ||
Line 6,179: | Line 6,191: | ||
}, | }, | ||
["note_module_import_here"]={ | ["note_module_import_here"]={ | ||
[ | [b]={{nil,U,"module imported here"}}, | ||
[ | [d]=c, | ||
[ | [e]="module imported here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"27e5aa08920d",1496689076,"Factor out and unify emission of \"module is unavailable\" diagnostics.","Factor out and unify emission of \"module is unavailable\" diagnostics.\n\nInspired by post-commit review of r304190.\n\nllvm-svn: 304728"}, | [h]={"27e5aa08920d",1496689076,"Factor out and unify emission of \"module is unavailable\" diagnostics.","Factor out and unify emission of \"module is unavailable\" diagnostics.\n\nInspired by post-commit review of r304190.\n\nllvm-svn: 304728"}, | ||
[i]={{"clang/lib/Frontend/CompilerInstance.cpp",2122,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n // Make the named module visible, if it\'s not already part of the module\n // we are parsing.\n if (ModuleName != getLangOpts().CurrentModule) {\n // ...\n // Check whether this module is available.\n if (Preprocessor::checkModuleIsAvailable(getLangOpts(), getTarget(), getDiagnostics(), Module)) {\n getDiagnostics().Report(ImportLoc, diag::note_module_import_here) << SourceRange(Path.front().second, Path.back().second);"}}, | [i]={{"clang/lib/Frontend/CompilerInstance.cpp",2122,"ModuleLoadResult CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) {\n // ...\n // Make the named module visible, if it\'s not already part of the module\n // we are parsing.\n if (ModuleName != getLangOpts().CurrentModule) {\n // ...\n // Check whether this module is available.\n if (Preprocessor::checkModuleIsAvailable(getLangOpts(), getTarget(), getDiagnostics(), Module)) {\n getDiagnostics().Report(ImportLoc, diag::note_module_import_here) << SourceRange(Path.front().second, Path.back().second);"}}, | ||
Line 6,191: | Line 6,203: | ||
}, | }, | ||
["note_module_import_not_at_top_level"]={ | ["note_module_import_not_at_top_level"]={ | ||
[ | [b]="%0 begins here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) begins here", | ||
[ | [f]=a, | ||
[ | [g]=Vc, | ||
[h]={"779448684662",1393739898,"Add [extern_c] attribute for modules, allowing a C module to be imported within an extern \"C\" block ...","Add [extern_c] attribute for modules, allowing a C module to be imported within an extern \"C\" block in C++ code.\n\nllvm-svn: 202615"}, | [h]={"779448684662",1393739898,"Add [extern_c] attribute for modules, allowing a C module to be imported within an extern \"C\" block ...","Add [extern_c] attribute for modules, allowing a C module to be imported within an extern \"C\" block in C++ code.\n\nllvm-svn: 202615"}, | ||
[i]={{ | [i]={{xb,51,"static void checkModuleImportContext(Sema &S, Module *M, SourceLocation ImportLoc, DeclContext *DC, bool FromInclude = false) {\n // ...\n if (!isa<TranslationUnitDecl>(DC)) {\n // ...\n S.Diag(cast<Decl>(DC)->getBeginLoc(), diag::note_module_import_not_at_top_level) << DC;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ARCMT/atautorelease-check.m"]={"clang/test/ARCMT/atautorelease-check.m:100:5: note: [rewriter] intended @autoreleasepool scope begins here","clang/test/ARCMT/atautorelease-check.m:113:5: note: [rewriter] intended @autoreleasepool scope begins here","clang/test/ARCMT/atautorelease-check.m:125:5: note: [rewriter] intended @autoreleasepool scope begins here","clang/test/ARCMT/atautorelease-check.m:136:5: note: [rewriter] intended @autoreleasepool scope begins here"} | ["clang/test/ARCMT/atautorelease-check.m"]={"clang/test/ARCMT/atautorelease-check.m:100:5: note: [rewriter] intended @autoreleasepool scope begins here","clang/test/ARCMT/atautorelease-check.m:113:5: note: [rewriter] intended @autoreleasepool scope begins here","clang/test/ARCMT/atautorelease-check.m:125:5: note: [rewriter] intended @autoreleasepool scope begins here","clang/test/ARCMT/atautorelease-check.m:136:5: note: [rewriter] intended @autoreleasepool scope begins here"} | ||
Line 6,203: | Line 6,215: | ||
}, | }, | ||
["note_module_odr_violation_definition_data"]={ | ["note_module_odr_violation_definition_data"]={ | ||
[ | [b]={{nil,V,"but in \'%0\' found %select{%2 base %plural{1:class|:classes}2|%2 virtual base %plural{1:class|:classes}2|%ordinal2 base class with different type %3|%ordinal2 %select{non-virtual|virtual}3 base class %4|%ordinal2 base class %3 with %select{public|protected|private|no}4 access specifier}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in \'(.*?)\' found (?:(.*?) base (?:class|classes)|(.*?) virtual base (?:class|classes)|(.*?) base class with different type (.*?)|(.*?) (?:non\\-virtual|virtual) base class (.*?)|(.*?) base class (.*?) with (?:public|protected|private|no) access specifier)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"e13eabe7d339",1506737957,"[ODRHash] Add base classes to hashing CXXRecordDecl.","[ODRHash] Add base classes to hashing CXXRecordDecl.\n\nllvm-svn: 314581"}, | [h]={"e13eabe7d339",1506737957,"[ODRHash] Add base classes to hashing CXXRecordDecl.","[ODRHash] Add base classes to hashing CXXRecordDecl.\n\nllvm-svn: 314581"}, | ||
[i]={{ | [i]={{Q,740,"bool ODRDiagsEmitter::diagnoseMismatch(const CXXRecordDecl *FirstRecord, const CXXRecordDecl *SecondRecord, const struct CXXRecordDecl::DefinitionData *SecondDD) const {\n // ...\n // Diagnostics from DefinitionData are emitted here.\n if (FirstDD != SecondDD) {\n // ...\n auto DiagBaseNote = [&SecondModule, this](SourceLocation Loc, SourceRange Range, ODRDefinitionDataDifference DiffType) { return Diag(Loc, diag::note_module_odr_violation_definition_data) << SecondModule << Range << DiffType; };"}}, | ||
[j]={ | [j]={ | ||
[ | [Oc]={"build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2683:8: note: but in \'FirstModule\' found 1 base class","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2693:8: note: but in \'FirstModule\' found 0 base classes","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2705:8: note: but in \'FirstModule\' found 0 virtual base classes","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2717:8: note: but in \'FirstModule\' found 1st base class with different type \'B4a\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2729:8: note: but in \'FirstModule\' found 1 virtual base class","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2741:8: note: but in \'FirstModule\' found 0 virtual base classes","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2753:8: note: but in \'FirstModule\' found 1st base class \'B7a\' with protected access specifier","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2765:8: note: but in \'FirstModule\' found 1st base class \'B8a\' with public access specifier","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2777:8: note: but in \'FirstModule\' found 1st base class \'B9a\' with private access specifier","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2789:8: note: but in \'FirstModule\' found 1st base class \'B10a\' with no access specifier"} | ||
} | } | ||
}, | }, | ||
["note_module_odr_violation_different_definitions"]={ | ["note_module_odr_violation_different_definitions"]={ | ||
[ | [b]="definition in module \'%0\' is here", | ||
[ | [d]=c, | ||
[ | [e]="definition in module \'(.*?)\' is here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"cd45dbc5f24c",1397879310,"When a module completes the definition of a class template specialization imported from another modu...","When a module completes the definition of a class template specialization imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.\n\nllvm-svn: 206680"}, | [h]={"cd45dbc5f24c",1397879310,"When a module completes the definition of a class template specialization imported from another modu...","When a module completes the definition of a class template specialization imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.\n\nllvm-svn: 206680"}, | ||
[i]={{ | [i]={{Q,662,"void ODRDiagsEmitter::diagnoseSubMismatchUnexpected(DiffResult &DR, const NamedDecl *FirstRecord, StringRef FirstModule, const NamedDecl *SecondRecord, StringRef SecondModule) const {\n // ...\n Diag(SecondRecord->getLocation(), diag::note_module_odr_violation_different_definitions) << SecondModule;"}} | ||
}, | }, | ||
["note_module_odr_violation_enum"]={ | ["note_module_odr_violation_enum"]={ | ||
[ | [b]={{nil,L,"but in \'%0\' found %select{enum that is %select{not scoped|scoped}2|enum scoped with keyword %select{struct|class}2|enum %select{without|with}2 specified type|enum with specified type %2|enum with %2 element%s2|%ordinal2 element has name %3|%ordinal2 element %3 %select{has|does not have}4 an initializer|%ordinal2 element %3 has different initializer|}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in \'(.*?)\' found (?:enum that is (?:not scoped|scoped)|enum scoped with keyword (?:struct|class)|enum (?:without|with) specified type|enum with specified type (.*?)|enum with (.*?) element(.*?)|(.*?) element has name (.*?)|(.*?) element (.*?) (?:has|does not have) an initializer|(.*?) element (.*?) has different initializer|)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"ab4d730f14d1",1532559125,"[ODRHash] Support hashing enums.","[ODRHash] Support hashing enums.\n\nllvm-svn: 337978"}, | [h]={"ab4d730f14d1",1532559125,"[ODRHash] Support hashing enums.","[ODRHash] Support hashing enums.\n\nllvm-svn: 337978"}, | ||
[i]={{ | [i]={{Q,1816,"bool ODRDiagsEmitter::diagnoseMismatch(const EnumDecl *FirstEnum, const EnumDecl *SecondEnum) const {\n // ...\n auto DiagNote = [&SecondModule, this](const auto *DiagAnchor, ODREnumDifference DiffType) { return Diag(DiagAnchor->getLocation(), diag::note_module_odr_violation_enum) << SecondModule << DiagAnchor->getSourceRange() << DiffType; };"}}, | ||
[j]={ | [j]={ | ||
[ | [Oc]={"build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3407:6: note: but in \'FirstModule\' found enum with 0 elements","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3427:6: note: but in \'FirstModule\' found enum with 1 element","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3447:11: note: but in \'FirstModule\' found 1st element has name \'x61\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3457:11: note: but in \'FirstModule\' found 1st element \'x71\' does not have an initializer","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3467:11: note: but in \'FirstModule\' found 1st element \'x81\' has an initializer","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3477:20: note: but in \'FirstModule\' found 2nd element \'x92\' has different initializer","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3487:12: note: but in \'FirstModule\' found enum with specified type","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3497:6: note: but in \'FirstModule\' found enum without specified type","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3507:13: note: but in \'FirstModule\' found enum with specified type \'long\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3517:13: note: but in \'FirstModule\' found enum that is scoped","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3527:6: note: but in \'FirstModule\' found enum that is not scoped","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3537:12: note: but in \'FirstModule\' found enum scoped with keyword class","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3547:13: note: but in \'FirstModule\' found enum scoped with keyword struct"} | ||
} | } | ||
}, | }, | ||
["note_module_odr_violation_field"]={ | ["note_module_odr_violation_field"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{field %3|field %3 with type %4|%select{non-|}4bitfield %3|bitfield %3 with different width expression|%select{non-|}4mutable field %3|field %3 with %select{no|an}4 initializer|field %3 with a different initializer}2"},{O,O,"but in \'%0\' found %select{field %2|field %2 with type %3|%select{non-|}3bitfield %2|bitfield %2 with different width expression|%select{non-|}3mutable field %2|field %2 with %select{no|an}3 initializer|field %2 with a different initializer}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:field (.*?)|field (.*?) with type (.*?)|(?:non\\-|)bitfield (.*?)|bitfield (.*?) with different width expression|(?:non\\-|)mutable field (.*?)|field (.*?) with (?:no|an) initializer|field (.*?) with a different initializer)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,167,"bool ODRDiagsEmitter::diagnoseSubMismatchField(const NamedDecl *FirstRecord, StringRef FirstModule, StringRef SecondModule, const FieldDecl *FirstField, const FieldDecl *SecondField) const {\n // ...\n auto DiagNote = [SecondField, SecondModule, this](ODRFieldDifference DiffType) { return Diag(SecondField->getLocation(), diag::note_module_odr_violation_field) << SecondModule.empty() << SecondModule << SecondField->getSourceRange() << DiffType; };"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Modules/odr_hash-gnu.cpp"]={"build/tools/clang/test/Modules/Output/odr_hash-gnu.cpp.tmp/Inputs/second.h:53:13: note: but in \'SecondModule\' found field \'x\' with type \'typeof (3)\' (aka \'int\')","build/tools/clang/test/Modules/Output/odr_hash-gnu.cpp.tmp/Inputs/second.h:98:13: note: but in \'SecondModule\' found field \'x\' with type \'typeof(I)\' (aka \'int\')"} | ["clang/test/Modules/odr_hash-gnu.cpp"]={"build/tools/clang/test/Modules/Output/odr_hash-gnu.cpp.tmp/Inputs/second.h:53:13: note: but in \'SecondModule\' found field \'x\' with type \'typeof (3)\' (aka \'int\')","build/tools/clang/test/Modules/Output/odr_hash-gnu.cpp.tmp/Inputs/second.h:98:13: note: but in \'SecondModule\' found field \'x\' with type \'typeof(I)\' (aka \'int\')"} | ||
Line 6,248: | Line 6,260: | ||
}, | }, | ||
["note_module_odr_violation_function"]={ | ["note_module_odr_violation_function"]={ | ||
[ | [b]={{nil,V,"but in \'%0\' found %select{different return type %2|%ordinal2 parameter with name %3|%ordinal2 parameter with type %3%select{| decayed from %5}4|%ordinal2 parameter with%select{out|}3 a default argument|%ordinal2 parameter with a different default argument|a different body}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in \'(.*?)\' found (?:different return type (.*?)|(.*?) parameter with name (.*?)|(.*?) parameter with type (.*?)(?:| decayed from (.*?))|(.*?) parameter with(?:out|) a default argument|(.*?) parameter with a different default argument|a different body)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"e81caeb3147f",1512782980,"[ODRHash] Support ODR violation detection in functions.","[ODRHash] Support ODR violation detection in functions.\n\nExtend the hashing to functions, which allows detection of function definition\nmismatches across modules.\n\nllvm-svn: 320230"}, | [h]={"e81caeb3147f",1512782980,"[ODRHash] Support ODR violation detection in functions.","[ODRHash] Support ODR violation detection in functions.\n\nExtend the hashing to functions, which allows detection of function definition\nmismatches across modules.\n\nllvm-svn: 320230"}, | ||
[i]={{ | [i]={{Q,1683,"bool ODRDiagsEmitter::diagnoseMismatch(const FunctionDecl *FirstFunction, const FunctionDecl *SecondFunction) const {\n // ...\n auto DiagNote = [&SecondModule, this](SourceLocation Loc, SourceRange Range, ODRFunctionDifference DiffType) { return Diag(Loc, diag::note_module_odr_violation_function) << SecondModule << Range << DiffType; };"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/odr_hash.cl"]={"build/tools/clang/test/Modules/Output/odr_hash.cl.tmp/Inputs/first.h:38:6: note: but in \'FirstModule\' found a different body","build/tools/clang/test/Modules/Output/odr_hash.cl.tmp/Inputs/first.h:41:6: note: but in \'FirstModule\' found a different body"} | ["clang/test/Modules/odr_hash.cl"]={"build/tools/clang/test/Modules/Output/odr_hash.cl.tmp/Inputs/first.h:38:6: note: but in \'FirstModule\' found a different body","build/tools/clang/test/Modules/Output/odr_hash.cl.tmp/Inputs/first.h:41:6: note: but in \'FirstModule\' found a different body"} | ||
Line 6,260: | Line 6,272: | ||
}, | }, | ||
["note_module_odr_violation_method_params"]={ | ["note_module_odr_violation_method_params"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{%select{method %4|constructor|destructor}3 that has %5 parameter%s5|%select{method %4|constructor|destructor}3 with %ordinal5 parameter of type %6%select{| decayed from %8}7|%select{method %4|constructor|destructor}3 with %ordinal5 parameter named %6}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:(?:method (.*?)|constructor|destructor) that has (.*?) parameter(.*?)|(?:method (.*?)|constructor|destructor) with (.*?) parameter of type (.*?)(?:| decayed from (.*?))|(?:method (.*?)|constructor|destructor) with (.*?) parameter named (.*?))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,93,"template <typename MethodT> static bool diagnoseSubMismatchMethodParameters(DiagnosticsEngine &Diags, const NamedDecl *FirstContainer, StringRef FirstModule, StringRef SecondModule, const MethodT *FirstMethod, const MethodT *SecondMethod) {\n // ...\n auto DiagNote = [&Diags, &GetDiagMethodType, SecondModule, SecondMethod](ODRMethodParametersDifference DiffType) {\n // ...\n return Diags.Report(SecondMethod->getLocation(), diag::note_module_odr_violation_method_params) << SecondModule.empty() << SecondModule << SecondMethod->getSourceRange() << DiffType << SecondMethodType << SecondName;"}}, | |||
[j]={ | [j]={ | ||
[ | [Oc]={"build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:547:8: note: but in \'FirstModule\' found method \'A\' that has 1 parameter","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:563:8: note: but in \'FirstModule\' found method \'A\' with 1st parameter of type \'int\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:579:8: note: but in \'FirstModule\' found method \'A\' with 1st parameter named \'x\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:621:8: note: but in \'FirstModule\' found method \'A\' with 1st parameter of type \'int *\' decayed from \'int[2]\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:897:3: note: but in \'FirstModule\' found constructor that has 1 parameter","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:3936:12: note: but in \'SecondModule\' found method \'run\' with 1st parameter of type \'B...\'"} | ||
} | } | ||
}, | }, | ||
["note_module_odr_violation_mismatch_decl"]={ | ["note_module_odr_violation_mismatch_decl"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{end of class|public access specifier|private access specifier|protected access specifier|static assert|field|method|type alias|typedef|data member|friend declaration|function template|method|instance variable|property}2"},{O,L,"but in \'%0\' found %select{end of class|public access specifier|private access specifier|protected access specifier|static assert|field|method|type alias|typedef|data member|friend declaration|function template}1"},{V,U,"but in \'%0\' found %select{end of class|public access specifier|private access specifier|protected access specifier|static assert|field|method|type alias|typedef|data member|friend declaration}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:end of class|public access specifier|private access specifier|protected access specifier|static assert|field|method|type alias|typedef|data member|friend declaration|function template|method|instance variable|property)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"fa3d93a148d4",1485827055,"Add better ODR checking for modules.","Add better ODR checking for modules.\n\nWhen objects are imported for modules, there is a chance that a name collision\nwill cause an ODR violation. Previously, only a small number of such\nviolations were detected. This patch provides a stronger check based on\nAST nodes.\n\nThe information needed to uniquely identify an object is taked from the AST and\nput into a one-dimensional byte stream. This stream is then hashed to give\na value to represent the object, which is stored with the other object data\nin the module.\n\nWhen modules are loaded, and Decl\'s are merged, the hash values of the two\nDecl\'s are compared. Only Decl\'s with matched hash values will be merged.\nMismatch hashes will generate a module error, and if possible, point to the\nfirst difference between the two objects.\n\nThe transform from AST to byte stream is a modified depth first algorithm.\nDue to references between some AST nodes, a pure depth first algorithm could\ngenerate loops. For Stmt nodes, a straight depth first processing occurs.\nFor Type and Decl nodes, they are replaced with an index number and only on\nfirst visit will these nodes be processed. As an optimization, boolean\nvalues are saved and stored together in reverse order at the end of the\nbyte stream to lower the ammount of data that needs to be hashed.\n\nCompile time impact was measured at 1.5-2.0% during module building, and\nnegligible during builds without module building.\n\nDifferential Revision: https://reviews.llvm.org/D21675\n\nllvm-svn: 293585"}, | [h]={"fa3d93a148d4",1485827055,"Add better ODR checking for modules.","Add better ODR checking for modules.\n\nWhen objects are imported for modules, there is a chance that a name collision\nwill cause an ODR violation. Previously, only a small number of such\nviolations were detected. This patch provides a stronger check based on\nAST nodes.\n\nThe information needed to uniquely identify an object is taked from the AST and\nput into a one-dimensional byte stream. This stream is then hashed to give\na value to represent the object, which is stored with the other object data\nin the module.\n\nWhen modules are loaded, and Decl\'s are merged, the hash values of the two\nDecl\'s are compared. Only Decl\'s with matched hash values will be merged.\nMismatch hashes will generate a module error, and if possible, point to the\nfirst difference between the two objects.\n\nThe transform from AST to byte stream is a modified depth first algorithm.\nDue to references between some AST nodes, a pure depth first algorithm could\ngenerate loops. For Stmt nodes, a straight depth first processing occurs.\nFor Type and Decl nodes, they are replaced with an index number and only on\nfirst visit will these nodes be processed. As an optimization, boolean\nvalues are saved and stored together in reverse order at the end of the\nbyte stream to lower the ammount of data that needs to be hashed.\n\nCompile time impact was measured at 1.5-2.0% during module building, and\nnegligible during builds without module building.\n\nDifferential Revision: https://reviews.llvm.org/D21675\n\nllvm-svn: 293585"}, | ||
[i]={{ | [i]={{Q,700,"void ODRDiagsEmitter::diagnoseSubMismatchDifferentDeclKinds(DiffResult &DR, const NamedDecl *FirstRecord, StringRef FirstModule, const NamedDecl *SecondRecord, StringRef SecondModule) const {\n // ...\n Diag(SecondDiagInfo.first, diag::note_module_odr_violation_mismatch_decl) << SecondModule.empty() << SecondModule << SecondDiagInfo.second << DR.SecondDiffType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/odr_hash-blocks.cpp"]={"build/tools/clang/test/Modules/Output/odr_hash-blocks.cpp.tmp/Inputs/first.h:100:3: note: but in \'FirstModule\' found public access specifier"} | ["clang/test/Modules/odr_hash-blocks.cpp"]={"build/tools/clang/test/Modules/Output/odr_hash-blocks.cpp.tmp/Inputs/first.h:100:3: note: but in \'FirstModule\' found public access specifier"} | ||
Line 6,284: | Line 6,296: | ||
}, | }, | ||
["note_module_odr_violation_mismatch_decl_unknown"]={ | ["note_module_odr_violation_mismatch_decl_unknown"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{||||different static assert|different field|different method|different type alias|different typedef|different data member|different friend declaration|different function template|different method|different instance variable|different property|another unexpected decl}2"},{O,O,"but in \'%0\' found %select{||||different static assert|different field|different method|different type alias|different typedef|different data member|different friend declaration|different function template|another unexpected decl}1"},{zb,U,"but in \'%0\' found %select{||||different static assert|different field|different method|different type alias|different typedef|different data member|different friend declaration|another unexpected decl}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:||||different static assert|different field|different method|different type alias|different typedef|different data member|different friend declaration|different function template|different method|different instance variable|different property|another unexpected decl)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"708859a71326",1496883381,"[ODRHash] Change the fall-back diagnostic error.","[ODRHash] Change the fall-back diagnostic error.\n\nProvide a little more information when a ODR violation is detected, but the\nspecific error could not be diagnosed.\n\nllvm-svn: 304956"}, | [h]={"708859a71326",1496883381,"[ODRHash] Change the fall-back diagnostic error.","[ODRHash] Change the fall-back diagnostic error.\n\nProvide a little more information when a ODR violation is detected, but the\nspecific error could not be diagnosed.\n\nllvm-svn: 304956"}, | ||
[i]={{ | [i]={{Q,1553,"bool ODRDiagsEmitter::diagnoseMismatch(const CXXRecordDecl *FirstRecord, const CXXRecordDecl *SecondRecord, const struct CXXRecordDecl::DefinitionData *SecondDD) const {\n // ...\n Diag(SecondDecl->getLocation(), diag::note_module_odr_violation_mismatch_decl_unknown) << SecondModule.empty() << SecondModule << FirstDiffType << SecondDecl->getSourceRange();"},{Q,1649,"bool ODRDiagsEmitter::diagnoseMismatch(const RecordDecl *FirstRecord, const RecordDecl *SecondRecord) const {\n // ...\n Diag(SecondDecl->getLocation(), diag::note_module_odr_violation_mismatch_decl_unknown) << SecondModule.empty() << SecondModule << FirstDiffType << SecondDecl->getSourceRange();"},{Q,2102,"bool ODRDiagsEmitter::diagnoseMismatch(const ObjCInterfaceDecl *FirstID, const ObjCInterfaceDecl *SecondID, const struct ObjCInterfaceDecl::DefinitionData *SecondDD) const {\n // ...\n Diag(SecondDecl->getLocation(), diag::note_module_odr_violation_mismatch_decl_unknown) << SecondModule.empty() << SecondModule << FirstDiffType << SecondDecl->getSourceRange();"},{Q,2208,"bool ODRDiagsEmitter::diagnoseMismatch(const ObjCProtocolDecl *FirstProtocol, const ObjCProtocolDecl *SecondProtocol, const struct ObjCProtocolDecl::DefinitionData *SecondDD) const {\n // ...\n Diag(SecondDecl->getLocation(), diag::note_module_odr_violation_mismatch_decl_unknown) << SecondModule.empty() << SecondModule << FirstDiffType << SecondDecl->getSourceRange();"}} | ||
}, | }, | ||
["note_module_odr_violation_no_possible_decls"]={ | ["note_module_odr_violation_no_possible_decls"]={ | ||
[ | [b]="definition has no member %0", | ||
[ | [d]=c, | ||
[ | [e]="definition has no member (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=Kc, | ||
[h]={"2b9e3e396a6f",1382076318,"Basic ODR checking for C++ modules:","Basic ODR checking for C++ modules:\n\nIf we have multiple definitions of the same entity from different modules, we\nnominate the first definition which we see as being the canonical definition.\nIf we load a declaration from a different definition and we can\'t find a\ncorresponding declaration in the canonical definition, issue a diagnostic.\n\nThis is insufficient to prevent things from going horribly wrong in all cases\n-- we might be in the middle of emitting IR for a function when we trigger some\ndeserialization and discover that it refers to an incoherent piece of the AST,\nby which point it\'s probably too late to bail out -- but we\'ll at least produce\na diagnostic.\n\nllvm-svn: 192950"}, | [h]={"2b9e3e396a6f",1382076318,"Basic ODR checking for C++ modules:","Basic ODR checking for C++ modules:\n\nIf we have multiple definitions of the same entity from different modules, we\nnominate the first definition which we see as being the canonical definition.\nIf we load a declaration from a different definition and we can\'t find a\ncorresponding declaration in the canonical definition, issue a diagnostic.\n\nThis is insufficient to prevent things from going horribly wrong in all cases\n-- we might be in the middle of emitting IR for a function when we trigger some\ndeserialization and discover that it refers to an incoherent piece of the AST,\nby which point it\'s probably too late to bail out -- but we\'ll at least produce\na diagnostic.\n\nllvm-svn: 192950"}, | ||
[i]={{ | [i]={{Jc,9751,"void ASTReader::diagnoseOdrViolations() {\n // ...\n // For each declaration from a merged context, check that the canonical\n // definition of that context also contains a declaration of the same\n // entity.\n //\n // Caution: this loop does things that might invalidate iterators into\n // PendingOdrMergeChecks. Don\'t turn this into a range-based for loop!\n while (!PendingOdrMergeChecks.empty()) {\n // ...\n if (!Found) {\n // ...\n if (Candidates.empty())\n Diag(cast<Decl>(CanonDef)->getLocation(), diag::note_module_odr_violation_no_possible_decls) << D;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/odr.cpp"]={"clang/test/Modules/odr.cpp:5:8: note: definition has no member \'n\'","clang/test/Modules/Inputs/odr/a.h:1:15: note: definition has no member \'m\'","clang/test/Modules/Inputs/odr/a.h:5:6: note: definition has no member \'e2\'"} | ["clang/test/Modules/odr.cpp"]={"clang/test/Modules/odr.cpp:5:8: note: definition has no member \'n\'","clang/test/Modules/Inputs/odr/a.h:1:15: note: definition has no member \'m\'","clang/test/Modules/Inputs/odr/a.h:5:6: note: definition has no member \'e2\'"} | ||
Line 6,305: | Line 6,317: | ||
}, | }, | ||
["note_module_odr_violation_objc_interface"]={ | ["note_module_odr_violation_objc_interface"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{%select{no super class|super class with type %4}3|instance variable \'%3\' access control is %select{|@private|@protected|@public|@package}4}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:(?:no super class|super class with type (.*?))|instance variable \'(.*?)\' access control is (?:|@private|@protected|@public|@package))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Jb,1662843785,Fb,Gb}, | ||
[i]={{Q,1948,"bool ODRDiagsEmitter::diagnoseMismatch(const ObjCInterfaceDecl *FirstID, const ObjCInterfaceDecl *SecondID, const struct ObjCInterfaceDecl::DefinitionData *SecondDD) const {\n // ...\n auto DiagNote = [&SecondModule, this](SourceLocation Loc, SourceRange Range, ODRInterfaceDifference DiffType) { return Diag(Loc, diag::note_module_odr_violation_objc_interface) << SecondModule.empty() << SecondModule << Range << DiffType; };"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Modules/method_pool.m"]={"clang/test/Modules/Inputs/MethodPoolA.h:10:12: note: but in \'MethodPoolA\' found super class with type \'A\'"} | ["clang/test/Modules/method_pool.m"]={"clang/test/Modules/Inputs/MethodPoolA.h:10:12: note: but in \'MethodPoolA\' found super class with type \'A\'"} | ||
Line 6,317: | Line 6,329: | ||
}, | }, | ||
["note_module_odr_violation_objc_method"]={ | ["note_module_odr_violation_objc_method"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{method %3 with different return type %4|method %3 as %select{class|instance}4 method|%select{no|\'required\'|\'optional\'}3 method control|method %3 with %select{no designated initializer|designated initializer}4|%select{regular|direct}4 method %3|different method %3}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:method (.*?) with different return type (.*?)|method (.*?) as (?:class|instance) method|(?:no|\'required\'|\'optional\') method control|method (.*?) with (?:no designated initializer|designated initializer)|(?:regular|direct) method (.*?)|different method (.*?))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,444,"bool ODRDiagsEmitter::diagnoseSubMismatchObjCMethod(const NamedDecl *FirstObjCContainer, StringRef FirstModule, StringRef SecondModule, const ObjCMethodDecl *FirstMethod, const ObjCMethodDecl *SecondMethod) const {\n // ...\n auto DiagNote = [SecondModule, SecondMethod, this](ODRMethodDifference DiffType) { return Diag(SecondMethod->getLocation(), diag::note_module_odr_violation_objc_method) << SecondModule.empty() << SecondModule << SecondMethod->getSourceRange() << DiffType; };"}} | |||
}, | }, | ||
["note_module_odr_violation_objc_property"]={ | ["note_module_odr_violation_objc_property"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{property %3|property %3 with type %4|%select{no|\'required\'|\'optional\'}3 property control|property %3 with different \'%select{none|readonly|getter|assign|readwrite|retain|copy|nonatomic|setter|atomic|weak|strong|unsafe_unretained|nullability|null_resettable|class|direct}4\' attribute}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:property (.*?)|property (.*?) with type (.*?)|(?:no|\'required\'|\'optional\') property control|property (.*?) with different \'(?:none|readonly|getter|assign|readwrite|retain|copy|nonatomic|setter|atomic|weak|strong|unsafe_unretained|nullability|null_resettable|class|direct)\' attribute)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"dcb71b5e1d13",1657144706,"[ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches.","[ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches.\n\nDifferential Revision: https://reviews.llvm.org/D130326"}, | [h]={"dcb71b5e1d13",1657144706,"[ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches.","[ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches.\n\nDifferential Revision: https://reviews.llvm.org/D130326"}, | ||
[i]={{ | [i]={{Q,522,"bool ODRDiagsEmitter::diagnoseSubMismatchObjCProperty(const NamedDecl *FirstObjCContainer, StringRef FirstModule, StringRef SecondModule, const ObjCPropertyDecl *FirstProp, const ObjCPropertyDecl *SecondProp) const {\n // ...\n auto DiagNote = [SecondModule, SecondProp, this](SourceLocation Loc, ODRPropertyDifference DiffType) { return Diag(Loc, diag::note_module_odr_violation_objc_property) << SecondModule.empty() << SecondModule << SecondProp->getSourceRange() << DiffType; };"}} | ||
}, | }, | ||
["note_module_odr_violation_possible_decl"]={ | ["note_module_odr_violation_possible_decl"]={ | ||
[ | [b]="declaration of %0 does not match", | ||
[ | [d]=c, | ||
[ | [e]="declaration of (.*?) does not match", | ||
[ | [f]=a, | ||
[ | [g]=Kc, | ||
[h]={"2b9e3e396a6f",1382076318,"Basic ODR checking for C++ modules:","Basic ODR checking for C++ modules:\n\nIf we have multiple definitions of the same entity from different modules, we\nnominate the first definition which we see as being the canonical definition.\nIf we load a declaration from a different definition and we can\'t find a\ncorresponding declaration in the canonical definition, issue a diagnostic.\n\nThis is insufficient to prevent things from going horribly wrong in all cases\n-- we might be in the middle of emitting IR for a function when we trigger some\ndeserialization and discover that it refers to an incoherent piece of the AST,\nby which point it\'s probably too late to bail out -- but we\'ll at least produce\na diagnostic.\n\nllvm-svn: 192950"}, | [h]={"2b9e3e396a6f",1382076318,"Basic ODR checking for C++ modules:","Basic ODR checking for C++ modules:\n\nIf we have multiple definitions of the same entity from different modules, we\nnominate the first definition which we see as being the canonical definition.\nIf we load a declaration from a different definition and we can\'t find a\ncorresponding declaration in the canonical definition, issue a diagnostic.\n\nThis is insufficient to prevent things from going horribly wrong in all cases\n-- we might be in the middle of emitting IR for a function when we trigger some\ndeserialization and discover that it refers to an incoherent piece of the AST,\nby which point it\'s probably too late to bail out -- but we\'ll at least produce\na diagnostic.\n\nllvm-svn: 192950"}, | ||
[i]={{ | [i]={{Jc,9755,"void ASTReader::diagnoseOdrViolations() {\n // ...\n // For each declaration from a merged context, check that the canonical\n // definition of that context also contains a declaration of the same\n // entity.\n //\n // Caution: this loop does things that might invalidate iterators into\n // PendingOdrMergeChecks. Don\'t turn this into a range-based for loop!\n while (!PendingOdrMergeChecks.empty()) {\n // ...\n if (!Found) {\n // ...\n if (Candidates.empty())\n // ...\n else {\n for (unsigned I = 0, N = Candidates.size(); I != N; ++I)\n Diag(Candidates[I]->getLocation(), diag::note_module_odr_violation_possible_decl) << Candidates[I];"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/odr.cpp"]={"clang/test/Modules/Inputs/odr/a.h:3:9: note: declaration of \'f\' does not match"} | ["clang/test/Modules/odr.cpp"]={"clang/test/Modules/Inputs/odr/a.h:3:9: note: declaration of \'f\' does not match"} | ||
Line 6,347: | Line 6,359: | ||
}, | }, | ||
["note_module_odr_violation_record"]={ | ["note_module_odr_violation_record"]={ | ||
[ | [b]={{nil,F,"but in \'%0\' found %select{static assert with different condition|static assert with different message|static assert with %select{|no }2message|%select{method %3|constructor|destructor}2|%select{method %3|constructor|destructor}2 is %select{not deleted|deleted}4|%select{method %3|constructor|destructor}2 is %select{not defaulted|defaulted}4|%select{method %3|constructor|destructor}2 is %select{|pure }4%select{not virtual|virtual}5|%select{method %3|constructor|destructor}2 is %select{not static|static}4|%select{method %3|constructor|destructor}2 is %select{not volatile|volatile}4|%select{method %3|constructor|destructor}2 is %select{not const|const}4|%select{method %3|constructor|destructor}2 is %select{not inline|inline}4|%select{method %3|constructor|destructor}2 with %ordinal4 parameter with%select{out|}5 a default argument|%select{method %3|constructor|destructor}2 with %ordinal4 parameter with a different default argument|%select{method %3|constructor|destructor}2 with %select{no |}4template arguments|%select{method %3|constructor|destructor}2 with %4 template argument%s4|%select{method %3|constructor|destructor}2 with %4 for %ordinal5 template argument|%select{method %3|constructor|destructor}2 with %select{no body|body}4|%select{method %3|constructor|destructor}2 with different body|friend %select{class|function}2|friend %2|friend function %2|function template %2 with %3 template parameter%s3|function template %2 with %ordinal3 template paramter being a %select{type|non-type|template}4 template parameter|function template %2 with %ordinal3 template parameter %select{with no name|named %5}4|function template %2 with %ordinal3 template parameter with %select{no |}4default argument|function template %2 with %ordinal3 template parameter with default argument %4|function template %2 with %ordinal3 template parameter with different type|function template %2 with %ordinal3 template parameter %select{not |}4being a template parameter pack|}1"},{O,O,"but in \'%0\' found %select{static assert with different condition|static assert with different message|static assert with %select{|no }2message|%select{method %3|constructor|destructor}2|%select{method %3|constructor|destructor}2 is %select{not deleted|deleted}4|%select{method %3|constructor|destructor}2 is %select{not defaulted|defaulted}4|%select{method %3|constructor|destructor}2 is %select{|pure }4%select{not virtual|virtual}5|%select{method %3|constructor|destructor}2 is %select{not static|static}4|%select{method %3|constructor|destructor}2 is %select{not volatile|volatile}4|%select{method %3|constructor|destructor}2 is %select{not const|const}4|%select{method %3|constructor|destructor}2 is %select{not inline|inline}4|%select{method %3|constructor|destructor}2 that has %4 parameter%s4|%select{method %3|constructor|destructor}2 with %ordinal4 parameter of type %5%select{| decayed from %7}6|%select{method %3|constructor|destructor}2 with %ordinal4 parameter named %5|%select{method %3|constructor|destructor}2 with %ordinal4 parameter with%select{out|}5 a default argument|%select{method %3|constructor|destructor}2 with %ordinal4 parameter with a different default argument|%select{method %3|constructor|destructor}2 with %select{no |}4template arguments|%select{method %3|constructor|destructor}2 with %4 template argument%s4|%select{method %3|constructor|destructor}2 with %4 for %ordinal5 template argument|%select{method %3|constructor|destructor}2 with %select{no body|body}4|%select{method %3|constructor|destructor}2 with different body|friend %select{class|function}2|friend %2|friend function %2|function template %2 with %3 template parameter%s3|function template %2 with %ordinal3 template paramter being a %select{type|non-type|template}4 template parameter|function template %2 with %ordinal3 template parameter %select{with no name|named %5}4|function template %2 with %ordinal3 template parameter with %select{no |}4default argument|function template %2 with %ordinal3 template parameter with default argument %4|function template %2 with %ordinal3 template parameter with different type|function template %2 with %ordinal3 template parameter %select{not |}4being a template parameter pack|}1"}}, | ||
[d]=c, | |||
[e]="but in \'(.*?)\' found (?:static assert with different condition|static assert with different message|static assert with (?:|no )message|(?:method (.*?)|constructor|destructor)|(?:method (.*?)|constructor|destructor) is (?:not deleted|deleted)|(?:method (.*?)|constructor|destructor) is (?:not defaulted|defaulted)|(?:method (.*?)|constructor|destructor) is (?:|pure )(?:not virtual|virtual)|(?:method (.*?)|constructor|destructor) is (?:not static|static)|(?:method (.*?)|constructor|destructor) is (?:not volatile|volatile)|(?:method (.*?)|constructor|destructor) is (?:not const|const)|(?:method (.*?)|constructor|destructor) is (?:not inline|inline)|(?:method (.*?)|constructor|destructor) with (.*?) parameter with(?:out|) a default argument|(?:method (.*?)|constructor|destructor) with (.*?) parameter with a different default argument|(?:method (.*?)|constructor|destructor) with (?:no |)template arguments|(?:method (.*?)|constructor|destructor) with (.*?) template argument(.*?)|(?:method (.*?)|constructor|destructor) with (.*?) for (.*?) template argument|(?:method (.*?)|constructor|destructor) with (?:no body|body)|(?:method (.*?)|constructor|destructor) with different body|friend (?:class|function)|friend (.*?)|friend function (.*?)|function template (.*?) with (.*?) template parameter(.*?)|function template (.*?) with (.*?) template paramter being a (?:type|non\\-type|template) template parameter|function template (.*?) with (.*?) template parameter (?:with no name|named (.*?))|function template (.*?) with (.*?) template parameter with (?:no |)default argument|function template (.*?) with (.*?) template parameter with default argument (.*?)|function template (.*?) with (.*?) template parameter with different type|function template (.*?) with (.*?) template parameter (?:not |)being a template parameter pack|)", | |||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,966,"bool ODRDiagsEmitter::diagnoseMismatch(const CXXRecordDecl *FirstRecord, const CXXRecordDecl *SecondRecord, const struct CXXRecordDecl::DefinitionData *SecondDD) const {\n // ...\n auto DiagNote = [&SecondModule, this](SourceLocation Loc, SourceRange Range, ODRCXXRecordDifference DiffType) { return Diag(Loc, diag::note_module_odr_violation_record) << SecondModule << Range << DiffType; };"}}, | |||
[j]={ | [j]={ | ||
[ | [Oc]={ | ||
[1]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:103:25: note: but in \'FirstModule\' found static assert with different message", | [1]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:103:25: note: but in \'FirstModule\' found static assert with different message", | ||
[2]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:117:25: note: but in \'FirstModule\' found static assert with message", | [2]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:117:25: note: but in \'FirstModule\' found static assert with message", | ||
Line 6,415: | Line 6,427: | ||
}, | }, | ||
["note_module_odr_violation_referenced_protocols"]={ | ["note_module_odr_violation_referenced_protocols"]={ | ||
[ | [b]={{nil,F,"but in %select{\'%1\'|definition here}0 found %select{%3 referenced %plural{1:protocol|:protocols}3|%ordinal3 referenced protocol with different name %4}2"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in (?:\'(.*?)\'|definition here) found (?:(.*?) referenced (?:protocol|protocols)|(.*?) referenced protocol with different name (.*?))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,382,"bool ODRDiagsEmitter::diagnoseSubMismatchProtocols(const ObjCProtocolList &FirstProtocols, const ObjCContainerDecl *FirstContainer, StringRef FirstModule, const ObjCProtocolList &SecondProtocols, const ObjCContainerDecl *SecondContainer, StringRef SecondModule) const {\n // ...\n auto DiagRefProtocolNote = [SecondModule, this](SourceLocation Loc, SourceRange Range, ODRReferencedProtocolDifference DiffType) { return Diag(Loc, diag::note_module_odr_violation_referenced_protocols) << SecondModule.empty() << SecondModule << Range << DiffType; };"}} | |||
}, | }, | ||
["note_module_odr_violation_template_parameter"]={ | ["note_module_odr_violation_template_parameter"]={ | ||
[ | [b]={{nil,O,"but in \'%0\' found %select{unnamed template parameter %2|template parameter %3|template parameter with %select{no |}2default argument|template parameter with different default argument}1"},{zb,V,"but in \'%0\' found %select{unnamed template parameter %2|template parameter %2|template parameter with %select{no |}2default argument|template parameter with different default argument}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in \'(.*?)\' found (?:unnamed template parameter (.*?)|template parameter (.*?)|template parameter with (?:no |)default argument|template parameter with different default argument)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"498117bf11d8",1503456239,"[ODRHash] Diagnose differing template parameters.","[ODRHash] Diagnose differing template parameters.\n\nllvm-svn: 311519"}, | [h]={"498117bf11d8",1503456239,"[ODRHash] Diagnose differing template parameters.","[ODRHash] Diagnose differing template parameters.\n\nllvm-svn: 311519"}, | ||
[i]={{ | [i]={{Q,885,"bool ODRDiagsEmitter::diagnoseMismatch(const CXXRecordDecl *FirstRecord, const CXXRecordDecl *SecondRecord, const struct CXXRecordDecl::DefinitionData *SecondDD) const {\n // ...\n if (FirstTemplate && SecondTemplate) {\n // ...\n for (auto Pair : llvm::zip(FirstTemplateParams, SecondTemplateParams)) {\n // ...\n Diag(SecondDecl->getLocation(), diag::note_module_odr_violation_template_parameter) << SecondModule << SecondDecl->getSourceRange() << NoteDiffType << hasSecondArg << SecondName;"}}, | ||
[j]={ | [j]={ | ||
[ | [Oc]={"build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2487:17: note: but in \'FirstModule\' found template parameter \'A\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2499:17: note: but in \'FirstModule\' found template parameter with different default argument","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2511:17: note: but in \'FirstModule\' found template parameter with default argument","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2523:15: note: but in \'FirstModule\' found template parameter with no default argument","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2536:31: note: but in \'FirstModule\' found template parameter with different default argument","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2549:17: note: but in \'FirstModule\' found template parameter \'A\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2561:15: note: but in \'FirstModule\' found template parameter with different default argument","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2573:16: note: but in \'FirstModule\' found template parameter with different default argument"} | ||
} | } | ||
}, | }, | ||
["note_module_odr_violation_typedef"]={ | ["note_module_odr_violation_typedef"]={ | ||
[ | [b]={{nil,O,"but in \'%0\' found %select{%select{typedef|type alias}2 name %3|%select{typedef|type alias}2 %3 with different underlying type %4}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in \'(.*?)\' found (?:(?:typedef|type alias) name (.*?)|(?:typedef|type alias) (.*?) with different underlying type (.*?))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,265,"bool ODRDiagsEmitter::diagnoseSubMismatchTypedef(const NamedDecl *FirstRecord, StringRef FirstModule, StringRef SecondModule, const TypedefNameDecl *FirstTD, const TypedefNameDecl *SecondTD, bool IsTypeAlias) const {\n // ...\n auto DiagNote = [SecondTD, SecondModule, this](ODRTypedefDifference DiffType) { return Diag(SecondTD->getLocation(), diag::note_module_odr_violation_typedef) << SecondModule << SecondTD->getSourceRange() << DiffType; };"}}, | |||
[j]={ | [j]={ | ||
["clang/test/Modules/odr_hash.mm"]={"build/tools/clang/test/Modules/Output/odr_hash.mm.tmp/Inputs/first.h:187:9: note: but in \'FirstModule\' found type alias \'T\' with different underlying type \'Interface2<P1,P1>\'"} | ["clang/test/Modules/odr_hash.mm"]={"build/tools/clang/test/Modules/Output/odr_hash.mm.tmp/Inputs/first.h:187:9: note: but in \'FirstModule\' found type alias \'T\' with different underlying type \'Interface2<P1,P1>\'"} | ||
Line 6,448: | Line 6,460: | ||
}, | }, | ||
["note_module_odr_violation_variable"]={ | ["note_module_odr_violation_variable"]={ | ||
[ | [b]={{nil,O,"but in \'%0\' found %select{data member with name %2|data member %2 with different type %3|data member %2 with%select{out|}3 an initializer|data member %2 with a different initializer|data member %2 %select{is constexpr|is not constexpr}3}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="but in \'(.*?)\' found (?:data member with name (.*?)|data member (.*?) with different type (.*?)|data member (.*?) with(?:out|) an initializer|data member (.*?) with a different initializer|data member (.*?) (?:is constexpr|is not constexpr))", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={Zb,1643408541,bc,cc}, | ||
[i]={{Q,308,"bool ODRDiagsEmitter::diagnoseSubMismatchVar(const NamedDecl *FirstRecord, StringRef FirstModule, StringRef SecondModule, const VarDecl *FirstVD, const VarDecl *SecondVD) const {\n // ...\n auto DiagNote = [SecondVD, SecondModule, this](ODRVarDifference DiffType) { return Diag(SecondVD->getLocation(), diag::note_module_odr_violation_variable) << SecondModule << SecondVD->getSourceRange() << DiffType; };"}}, | |||
[j]={ | [j]={ | ||
[ | [Oc]={"build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2230:14: note: but in \'FirstModule\' found data member with name \'x\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2246:14: note: but in \'FirstModule\' found data member \'x\' with different type \'int\'","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2261:20: note: but in \'FirstModule\' found data member \'x\' without an initializer","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2275:20: note: but in \'FirstModule\' found data member \'x\' with a different initializer","build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2289:20: note: but in \'FirstModule\' found data member \'x\' is constexpr"} | ||
} | } | ||
}, | }, | ||
["note_mt_message"]={ | ["note_mt_message"]={ | ||
[ | [b]="[rewriter] %0", | ||
[ | [d]=c, | ||
[ | [e]="\\[rewriter\\] (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"42aa21222d37",1390712852,"ARCMigrate: Introduce proper diagnostics for TransformActions","ARCMigrate: Introduce proper diagnostics for TransformActions\n\nThis starts to switch ARCMT to use proper diagnostic messages. The old use was\nbased on incorrect example code from the documentation.\n\nThe logic of the previous report() functions has been retained to support any\nexternal consumers that might be intercepting diagnostic messages through the\nold interface.\n\nNote that the change in test/Misc/warning-flags.c isn\'t a new warning without a\nflag, rather one that was previously invisible to the test. Adding a flag might\nbe a good idea though.\n\nllvm-svn: 200124"}, | [h]={"42aa21222d37",1390712852,"ARCMigrate: Introduce proper diagnostics for TransformActions","ARCMigrate: Introduce proper diagnostics for TransformActions\n\nThis starts to switch ARCMT to use proper diagnostic messages. The old use was\nbased on incorrect example code from the documentation.\n\nThe logic of the previous report() functions has been retained to support any\nexternal consumers that might be intercepting diagnostic messages through the\nold interface.\n\nNote that the change in test/Misc/warning-flags.c isn\'t a new warning without a\nflag, rather one that was previously invisible to the test. Adding a flag might\nbe a good idea though.\n\nllvm-svn: 200124"}, | ||
[i]={{"clang/lib/ARCMigrate/TransformActions.cpp",700,"void TransformActions::reportNote(StringRef message, SourceLocation loc, SourceRange range) { report(loc, diag::note_mt_message, range) << message; }"}}, | [i]={{"clang/lib/ARCMigrate/TransformActions.cpp",700,"void TransformActions::reportNote(StringRef message, SourceLocation loc, SourceRange range) { report(loc, diag::note_mt_message, range) << message; }"}}, | ||
Line 6,472: | Line 6,484: | ||
}, | }, | ||
["note_multiversioning_caused_here"]={ | ["note_multiversioning_caused_here"]={ | ||
[ | [b]={{nil,L,"function multiversioning caused by this declaration"}}, | ||
[ | [d]=c, | ||
[ | [e]="function multiversioning caused by this declaration", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"281d20b601c8",1515447257,"Implement Attribute Target MultiVersioning","Implement Attribute Target MultiVersioning\n\nGCC\'s attribute \'target\', in addition to being an optimization hint,\nalso allows function multiversioning. We currently have the former\nimplemented, this is the latter\'s implementation.\n\nThis works by enabling functions with the same name/signature to coexist,\nso that they can all be emitted. Multiversion state is stored in the\nFunctionDecl itself, and SemaDecl manages the definitions.\nNote that it ends up having to permit redefinition of functions so\nthat they can all be emitted. Additionally, all versions of the function\nmust be emitted, so this also manages that.\n\nNote that this includes some additional rules that GCC does not, since\ndefining something as a MultiVersion function after a usage has been made illegal.\n\nThe only \'history rewriting\' that happens is if a function is emitted before\nit has been converted to a multiversion\'ed function, at which point its name\nneeds to be changed.\n\nFunction templates and virtual functions are NOT yet supported (not supported\nin GCC either).\n\nAdditionally, constructors/destructors are disallowed, but the former is \nplanned.\n\nllvm-svn: 322028"}, | [h]={"281d20b601c8",1515447257,"Implement Attribute Target MultiVersioning","Implement Attribute Target MultiVersioning\n\nGCC\'s attribute \'target\', in addition to being an optimization hint,\nalso allows function multiversioning. We currently have the former\nimplemented, this is the latter\'s implementation.\n\nThis works by enabling functions with the same name/signature to coexist,\nso that they can all be emitted. Multiversion state is stored in the\nFunctionDecl itself, and SemaDecl manages the definitions.\nNote that it ends up having to permit redefinition of functions so\nthat they can all be emitted. Additionally, all versions of the function\nmust be emitted, so this also manages that.\n\nNote that this includes some additional rules that GCC does not, since\ndefining something as a MultiVersion function after a usage has been made illegal.\n\nThe only \'history rewriting\' that happens is if a function is emitted before\nit has been converted to a multiversion\'ed function, at which point its name\nneeds to be changed.\n\nFunction templates and virtual functions are NOT yet supported (not supported\nin GCC either).\n\nAdditionally, constructors/destructors are disallowed, but the former is \nplanned.\n\nllvm-svn: 322028"}, | ||
[i]={{ | [i]={{q,11017,"static bool checkNonMultiVersionCompatAttributes(Sema &S, const FunctionDecl *FD, const FunctionDecl *CausedFD, MultiVersionKind MVKind) {\n const auto Diagnose = [FD, CausedFD, MVKind](Sema &S, const Attr *A) {\n // ...\n if (CausedFD)\n S.Diag(CausedFD->getLocation(), diag::note_multiversioning_caused_here);"},{q,11192,"static bool CheckMultiVersionAdditionalRules(Sema &S, const FunctionDecl *OldFD, const FunctionDecl *NewFD, bool CausesMV, MultiVersionKind MVKind) {\n // ...\n return S.areMultiversionVariantFunctionsCompatible(OldFD, NewFD, S.PDiag(diag::err_multiversion_noproto), PartialDiagnosticAt(NewFD->getLocation(), S.PDiag(diag::note_multiversioning_caused_here)), PartialDiagnosticAt(NewFD->getLocation(), S.PDiag(diag::err_multiversion_doesnt_support) << static_cast<unsigned>(MVKind)), PartialDiagnosticAt(NewFD->getLocation(), S.PDiag(diag::err_multiversion_diff)),"},{q,11285,"static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, FunctionDecl *NewFD, bool &Redeclaration, NamedDecl *&OldDecl, LookupResult &Previous) {\n // ...\n if (CheckMultiVersionValue(S, OldFD)) {\n S.Diag(NewFD->getLocation(), diag::note_multiversioning_caused_here);"},{q,11334,"static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, FunctionDecl *NewFD, bool &Redeclaration, NamedDecl *&OldDecl, LookupResult &Previous) {\n // ...\n for (const auto *FD : OldFD->redecls()) {\n // ...\n // We allow forward declarations before ANY multiversioning attributes, but\n // nothing after the fact.\n if (PreviousDeclsHaveMultiVersionAttribute(FD) && ((NewTA && (!CurTA || CurTA->isInherited())) || (NewTVA && (!CurTVA || CurTVA->isInherited())))) {\n // ...\n S.Diag(NewFD->getLocation(), diag::note_multiversioning_caused_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-target-mv.c"]={"clang/test/Sema/attr-target-mv.c:23:49: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:86:48: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:99:51: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:136:49: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:156:83: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:163:83: note: function multiversioning caused by this declaration"} | ["clang/test/Sema/attr-target-mv.c"]={"clang/test/Sema/attr-target-mv.c:23:49: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:86:48: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:99:51: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:136:49: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:156:83: note: function multiversioning caused by this declaration","clang/test/Sema/attr-target-mv.c:163:83: note: function multiversioning caused by this declaration"} | ||
Line 6,484: | Line 6,496: | ||
}, | }, | ||
["note_musttail_callconv_mismatch"]={ | ["note_musttail_callconv_mismatch"]={ | ||
[ | [b]={{nil,M,"target function has calling convention %1 (expected %0)"}}, | ||
[ | [d]=c, | ||
[ | [e]="target function has calling convention (.*?) \\(expected (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={hd,1607502387, | [h]={hd,1607502387,dd,vd}, | ||
[i]={{ | [i]={{G,778,"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(CalleeLoc, diag::note_musttail_callconv_mismatch) << FunctionType::getNameForCallConv(CallerType.Func->getCallConv()) << FunctionType::getNameForCallConv(CalleeType.Func->getCallConv());"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:154:1: note: target function has calling convention regcall (expected cdecl)"} | ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:154:1: note: target function has calling convention regcall (expected cdecl)"} | ||
Line 6,496: | Line 6,508: | ||
}, | }, | ||
["note_musttail_callee_defined_here"]={ | ["note_musttail_callee_defined_here"]={ | ||
[ | [b]={{nil,M,"%0 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={hd,1607502387, | [h]={hd,1607502387,dd,vd}, | ||
[i]={{ | [i]={{G,796,"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 if (const auto *ND = dyn_cast_or_null<NamedDecl>(CE->getCalleeDecl())) {\n // ...\n Diag(CalleeLoc, diag::note_musttail_callee_defined_here) << ND->getDeclName();"}} | ||
}, | }, | ||
["note_musttail_fix_non_prototype"]={ | ["note_musttail_fix_non_prototype"]={ | ||
[ | [b]={{nil,M,"add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype"}}, | ||
[ | [d]=c, | ||
[ | [e]="add \'void\' to the parameter list to turn an old\\-style K&R function declaration into a prototype", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={hd,1607502387, | [h]={hd,1607502387,dd,vd}, | ||
[i]={{ | [i]={{G,758,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n // Both caller and callee must have a prototype (no K&R declarations).\n if (!CalleeType.Func || !CallerType.Func) {\n // ...\n if (!CalleeType.Func && CE->getDirectCallee()) {\n Diag(CE->getDirectCallee()->getBeginLoc(), diag::note_musttail_fix_non_prototype);"},{G,761,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n // Both caller and callee must have a prototype (no K&R declarations).\n if (!CalleeType.Func || !CallerType.Func) {\n // ...\n if (!CallerType.Func)\n Diag(CallerDecl->getBeginLoc(), diag::note_musttail_fix_non_prototype);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/attr-musttail.c"]={"clang/test/Sema/attr-musttail.c:3:1: note: add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype","clang/test/Sema/attr-musttail.c:9:1: note: add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype"} | ["clang/test/Sema/attr-musttail.c"]={"clang/test/Sema/attr-musttail.c:3:1: note: add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype","clang/test/Sema/attr-musttail.c:9:1: note: add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype"} | ||
Line 6,517: | Line 6,529: | ||
}, | }, | ||
["note_musttail_mismatch"]={ | ["note_musttail_mismatch"]={ | ||
[ | [b]={{nil,M,"target function %select{is a member of different class%diff{ (expected $ but has $)|}1,2|has different number of parameters (expected %1 but has %2)|has type mismatch at %ordinal3 parameter%diff{ (expected $ but has $)|}1,2|has different return type%diff{ ($ expected but has $)|}1,2}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="target function (?:is a member of 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 (.*?)\\)|))", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={hd,1607502387, | [h]={hd,1607502387,dd,vd}, | ||
[i]={{ | [i]={{G,851,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n PartialDiagnostic PD = PDiag(diag::note_musttail_mismatch);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:17:1: note: target function has different number of parameters (expected 1 but has 0)","clang/test/SemaCXX/attr-musttail.cpp:23:1: note: target function has type mismatch at 1st parameter (expected \'long\' but has \'int\')","clang/test/SemaCXX/attr-musttail.cpp:29:1: note: target function has different return type (\'int\' expected but has \'long\')","clang/test/SemaCXX/attr-musttail.cpp:133:1: note: target function has type mismatch at 1st parameter (expected \'short\' but has \'int\')","clang/test/SemaCXX/attr-musttail.cpp:132:1: note: target function has type mismatch at 1st parameter (expected \'int\' but has \'short\')","clang/test/SemaCXX/attr-musttail.cpp:144:3: note: target function is a member of different class (expected \'TestClassMismatch2\' but has \'TestClassMismatch1\')","clang/test/SemaCXX/attr-musttail.cpp:234:3: note: target function has different return type (\'long\' expected but has \'int\')","clang/test/SemaCXX/attr-musttail.cpp:102:1: note: target function has different return type (\'long\' expected but has \'int\')"} | ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:17:1: note: target function has different number of parameters (expected 1 but has 0)","clang/test/SemaCXX/attr-musttail.cpp:23:1: note: target function has type mismatch at 1st parameter (expected \'long\' but has \'int\')","clang/test/SemaCXX/attr-musttail.cpp:29:1: note: target function has different return type (\'int\' expected but has \'long\')","clang/test/SemaCXX/attr-musttail.cpp:133:1: note: target function has type mismatch at 1st parameter (expected \'short\' but has \'int\')","clang/test/SemaCXX/attr-musttail.cpp:132:1: note: target function has type mismatch at 1st parameter (expected \'int\' but has \'short\')","clang/test/SemaCXX/attr-musttail.cpp:144:3: note: target function is a member of different class (expected \'TestClassMismatch2\' but has \'TestClassMismatch1\')","clang/test/SemaCXX/attr-musttail.cpp:234:3: note: target function has different return type (\'long\' expected but has \'int\')","clang/test/SemaCXX/attr-musttail.cpp:102:1: note: target function has different return type (\'long\' expected but has \'int\')"} | ||
Line 6,529: | Line 6,541: | ||
}, | }, | ||
["note_musttail_structors_forbidden"]={ | ["note_musttail_structors_forbidden"]={ | ||
[ | [b]={{nil,M,"target %select{constructor|destructor}0 is declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="target (?:constructor|destructor) is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={hd,1607502387, | [h]={hd,1607502387,dd,vd}, | ||
[i]={{ | [i]={{G,685,"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 if (IsCallee)\n Diag(CMD->getBeginLoc(), diag::note_musttail_structors_forbidden) << isa<CXXDestructorDecl>(CMD);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:190:8: note: target destructor is declared here","clang/test/SemaCXX/attr-musttail.cpp:208:3: note: target constructor is declared here"} | ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:190:8: note: target destructor is declared here","clang/test/SemaCXX/attr-musttail.cpp:208:3: note: target constructor is declared here"} | ||
Line 6,541: | Line 6,553: | ||
}, | }, | ||
["note_namespace_defined_here"]={ | ["note_namespace_defined_here"]={ | ||
[ | [b]="namespace %0 defined here", | ||
[ | [d]=c, | ||
[ | [e]="namespace (.*?) defined here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace","Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to improve GCC compatibility. Fixes PR7517.\n\nAs a drive-by, add typo correction for using directives.\n\nllvm-svn: 107172"}, | [h]={"cdf87024edb7",1277834026,"Allow a using directive to refer to the implicitly-defined namespace","Allow a using directive to refer to the implicitly-defined namespace\n\"std\", with a warning, to improve GCC compatibility. Fixes PR7517.\n\nAs a drive-by, add typo correction for using directives.\n\nllvm-svn: 107172"}, | ||
[i]={{m,11905,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n // ...\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_member_suggest) << Ident << DC << DroppedSpecifier << SS.getRange(), S.PDiag(diag::note_namespace_defined_here));"},{m,11909,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n // ...\n } else {\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_suggest) << Ident, S.PDiag(diag::note_namespace_defined_here));"}}, | [i]={{m,11905,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n // ...\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_member_suggest) << Ident << DC << DroppedSpecifier << SS.getRange(), S.PDiag(diag::note_namespace_defined_here));"},{m,11909,"static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), R.getLookupKind(), Sc, &SS, CCC, Sema::CTK_ErrorRecovery)) {\n if (DeclContext *DC = S.computeDeclContext(SS, false)) {\n // ...\n } else {\n S.diagnoseTypo(Corrected, S.PDiag(diag::err_using_directive_suggest) << Ident, S.PDiag(diag::note_namespace_defined_here));"}}, | ||
Line 6,553: | Line 6,565: | ||
}, | }, | ||
["note_neon_vector_initializer_non_portable"]={ | ["note_neon_vector_initializer_non_portable"]={ | ||
[ | [b]="consider using vld1_%0%1() to initialize a vector from memory, or vcreate_%0%1() to initialize from an integer constant", | ||
[ | [d]=c, | ||
[ | [e]="consider using vld1_(.*?)(.*?)\\(\\) to initialize a vector from memory, or vcreate_(.*?)(.*?)\\(\\) to initialize from an integer constant", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"9eef2659bf60",1403274913,"The ability to use vector initializer lists is a GNU vector extension","The ability to use vector initializer lists is a GNU vector extension\nand is unrelated to the NEON intrinsics in arm_neon.h. On little\nendian machines it works fine, however on big endian machines it\nexhibits surprising behaviour:\n\n uint32x2_t x = {42, 64};\n return vget_lane_u32(x, 0); // Will return 64.\n\nBecause of this, explicitly call out that it is unsupported on big\nendian machines.\n\nThis patch will emit the following warning in big-endian mode:\n\n test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu]\n int32x4_t x = {0, 1, 2, 3};\n ^\n test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants\n 1 warning generated.\n\nllvm-svn: 211362"}, | [h]={"9eef2659bf60",1403274913,"The ability to use vector initializer lists is a GNU vector extension","The ability to use vector initializer lists is a GNU vector extension\nand is unrelated to the NEON intrinsics in arm_neon.h. On little\nendian machines it works fine, however on big endian machines it\nexhibits surprising behaviour:\n\n uint32x2_t x = {42, 64};\n return vget_lane_u32(x, 0); // Will return 64.\n\nBecause of this, explicitly call out that it is unsupported on big\nendian machines.\n\nThis patch will emit the following warning in big-endian mode:\n\n test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu]\n int32x4_t x = {0, 1, 2, 3};\n ^\n test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants\n 1 warning generated.\n\nllvm-svn: 211362"}, | ||
[i]={{ | [i]={{N,1865,"void InitListChecker::CheckVectorType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (!SemaRef.getLangOpts().OpenCL && !SemaRef.getLangOpts().HLSL) {\n // ...\n if (isBigEndian && (T->getVectorKind() == VectorType::NeonVector || T->getVectorKind() == VectorType::NeonPolyVector)) {\n // ...\n SemaRef.Diag(IList->getBeginLoc(), SemaRef.Context.getTypeSize(VT) > 64 ? diag::note_neon_vector_initializer_non_portable_q : diag::note_neon_vector_initializer_non_portable) << typeCode << typeSize;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:9:15: note: consider using vld1_s16() to initialize a vector from memory, or vcreate_s16() to initialize from an integer constant","clang/test/Sema/big-endian-neon-initializers.c:11:17: note: consider using vld1_f32() to initialize a vector from memory, or vcreate_f32() to initialize from an integer constant"} | ["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:9:15: note: consider using vld1_s16() to initialize a vector from memory, or vcreate_s16() to initialize from an integer constant","clang/test/Sema/big-endian-neon-initializers.c:11:17: note: consider using vld1_f32() to initialize a vector from memory, or vcreate_f32() to initialize from an integer constant"} | ||
Line 6,565: | Line 6,577: | ||
}, | }, | ||
["note_neon_vector_initializer_non_portable_q"]={ | ["note_neon_vector_initializer_non_portable_q"]={ | ||
[ | [b]="consider using vld1q_%0%1() to initialize a vector from memory, or vcombine_%0%1(vcreate_%0%1(), vcreate_%0%1()) to initialize from integer constants", | ||
[ | [d]=c, | ||
[ | [e]="consider using vld1q_(.*?)(.*?)\\(\\) to initialize a vector from memory, or vcombine_(.*?)(.*?)\\(vcreate_(.*?)(.*?)\\(\\), vcreate_(.*?)(.*?)\\(\\)\\) to initialize from integer constants", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"9eef2659bf60",1403274913,"The ability to use vector initializer lists is a GNU vector extension","The ability to use vector initializer lists is a GNU vector extension\nand is unrelated to the NEON intrinsics in arm_neon.h. On little\nendian machines it works fine, however on big endian machines it\nexhibits surprising behaviour:\n\n uint32x2_t x = {42, 64};\n return vget_lane_u32(x, 0); // Will return 64.\n\nBecause of this, explicitly call out that it is unsupported on big\nendian machines.\n\nThis patch will emit the following warning in big-endian mode:\n\n test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu]\n int32x4_t x = {0, 1, 2, 3};\n ^\n test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants\n 1 warning generated.\n\nllvm-svn: 211362"}, | [h]={"9eef2659bf60",1403274913,"The ability to use vector initializer lists is a GNU vector extension","The ability to use vector initializer lists is a GNU vector extension\nand is unrelated to the NEON intrinsics in arm_neon.h. On little\nendian machines it works fine, however on big endian machines it\nexhibits surprising behaviour:\n\n uint32x2_t x = {42, 64};\n return vget_lane_u32(x, 0); // Will return 64.\n\nBecause of this, explicitly call out that it is unsupported on big\nendian machines.\n\nThis patch will emit the following warning in big-endian mode:\n\n test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu]\n int32x4_t x = {0, 1, 2, 3};\n ^\n test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants\n 1 warning generated.\n\nllvm-svn: 211362"}, | ||
[i]={{ | [i]={{N,1864,"void InitListChecker::CheckVectorType(const InitializedEntity &Entity, InitListExpr *IList, QualType DeclType, unsigned &Index, InitListExpr *StructuredList, unsigned &StructuredIndex) {\n // ...\n if (!SemaRef.getLangOpts().OpenCL && !SemaRef.getLangOpts().HLSL) {\n // ...\n if (isBigEndian && (T->getVectorKind() == VectorType::NeonVector || T->getVectorKind() == VectorType::NeonPolyVector)) {\n // ...\n SemaRef.Diag(IList->getBeginLoc(), SemaRef.Context.getTypeSize(VT) > 64 ? diag::note_neon_vector_initializer_non_portable_q : diag::note_neon_vector_initializer_non_portable) << typeCode << typeSize;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:8:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants","clang/test/Sema/big-endian-neon-initializers.c:10:15: note: consider using vld1q_s64() to initialize a vector from memory, or vcombine_s64(vcreate_s64(), vcreate_s64()) to initialize from integer constants"} | ["clang/test/Sema/big-endian-neon-initializers.c"]={"clang/test/Sema/big-endian-neon-initializers.c:8:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants","clang/test/Sema/big-endian-neon-initializers.c:10:15: note: consider using vld1q_s64() to initialize a vector from memory, or vcombine_s64(vcreate_s64(), vcreate_s64()) to initialize from integer constants"} | ||
Line 6,577: | Line 6,589: | ||
}, | }, | ||
["note_nested_requirement_here"]={ | ["note_nested_requirement_here"]={ | ||
[ | [b]={{nil,n,"while checking the satisfaction of nested requirement requested here"}}, | ||
[ | [d]=c, | ||
[ | [e]="while checking the satisfaction of nested requirement requested here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{E,951,"/// 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::NestedRequirementConstraintsCheck:\n Diags.Report(Active->PointOfInstantiation, diag::note_nested_requirement_here) << Active->InstantiationRange;"},{E,1025,"/// Prints the current instantiation stack through a series of\n/// notes.\nvoid Sema::PrintInstantiationStack() {\n // ...\n for (SmallVectorImpl<CodeSynthesisContext>::reverse_iterator Active = CodeSynthesisContexts.rbegin(), ActiveEnd = CodeSynthesisContexts.rend(); Active != ActiveEnd; ++Active, ++InstantiationIdx) {\n // ...\n case CodeSynthesisContext::ConstraintsCheck: {\n // ...\n if (!Active->Entity) {\n Diags.Report(Active->PointOfInstantiation, diag::note_nested_requirement_here) << Active->InstantiationRange;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp:28:12: note: while checking the satisfaction of nested requirement requested here","clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp:28:12: note: while checking the satisfaction of nested requirement requested here"} | ["clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp"]={"clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp:28:12: note: while checking the satisfaction of nested requirement requested here","clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp:28:12: note: while checking the satisfaction of nested requirement requested here"} | ||
Line 6,589: | Line 6,601: | ||
}, | }, | ||
["note_nested_requirement_substitution_error"]={ | ["note_nested_requirement_substitution_error"]={ | ||
[ | [b]={{nil,F,"%select{and|because}0 \'%1\' would be invalid%2"},{O,n,"%select{and|because}0 \'%1\' would be invalid: %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' would be invalid(.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb}, | ||
[i]={{ | [i]={{eb,1017,"static void diagnoseUnsatisfiedRequirement(Sema &S, concepts::NestedRequirement *Req, bool First) {\n // ...\n for (auto &Pair : Req->getConstraintSatisfaction()) {\n if (auto *SubstDiag = Pair.second.dyn_cast<SubstitutionDiagnostic *>())\n S.Diag(SubstDiag->first, diag::note_nested_requirement_substitution_error) << (int)First << Req->getInvalidConstraintEntity() << SubstDiag->second;"}} | ||
}, | }, | ||
["note_nested_requirement_unknown_substitution_error"]={ | ["note_nested_requirement_unknown_substitution_error"]={ | ||
[ | [b]={{nil,n,"%select{and|because}0 \'%1\' would be invalid"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:and|because) \'(.*?)\' would be invalid", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rb,1576172311,sb,tb} | ||
}, | }, | ||
["note_next_field_declaration"]={ | ["note_next_field_declaration"]={ | ||
[ | [b]={{nil,V,"next field declaration is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="next field declaration is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, | [h]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, | ||
[i]={{ | [i]={{q,18794,"void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, ArrayRef<Decl *> Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &Attrs) {\n // ...\n for (ArrayRef<Decl *>::iterator i = Fields.begin(), end = Fields.end(); i != end; ++i) {\n // ...\n if (FDTy->isFunctionType()) {\n // ...\n } else if (FDTy->isIncompleteArrayType() && (Record || isa<ObjCContainerDecl>(EnclosingDecl))) {\n if (Record) {\n // ...\n if (!Record->isUnion() && !IsLastField) {\n // ...\n Diag((*(i + 1))->getLocation(), diag::note_next_field_declaration);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:71:7: note: next field declaration is here"} | ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:71:7: note: next field declaration is here"} | ||
Line 6,618: | Line 6,630: | ||
}, | }, | ||
["note_next_ivar_declaration"]={ | ["note_next_ivar_declaration"]={ | ||
[ | [b]={{nil,V,"next %select{instance variable declaration|synthesized instance variable}0 is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="next (?:instance variable declaration|synthesized instance variable) is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, | [h]={"30680e943735",1508796101,"[Sema] Add support for flexible array members in Obj-C.","[Sema] Add support for flexible array members in Obj-C.\n\nAllow Obj-C ivars with incomplete array type but only as the last ivar.\nAlso add a requirement for ivars that contain a flexible array member to\nbe at the end of class too. It is possible to add in a subclass another\nivar at the end but we\'ll emit a warning in this case. Also we\'ll emit a\nwarning if a variable sized ivar is declared in class extension or in\nimplementation because subclasses won\'t know they should avoid adding\nnew ivars.\n\nIn ARC incomplete array objects are treated as __unsafe_unretained so\nrequire them to be marked as such.\n\nProhibit synthesizing ivars with flexible array members because order of\nsynthesized ivars is not obvious and tricky to control. Spelling out\nivar explicitly gives control to developers and helps to avoid surprises\nwith unexpected ivar ordering.\n\nFor C and C++ changed diagnostic to tell explicitly a field is not the\nlast one and point to the next field. It is not as useful as in Obj-C\nbut it is an improvement and it is consistent with Obj-C. For C for\nunions emit more specific err_flexible_array_union instead of generic\nerr_field_incomplete.\n\nrdar://problem/21054495\n\nReviewers: rjmccall, theraven\n\nReviewed By: rjmccall\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D38773\n\nllvm-svn: 316381"}, | ||
[i]={{ | [i]={{P,3901,"static void DiagnoseVariableSizedIvars(Sema &S, ObjCContainerDecl *OCD) {\n // ...\n // Check if variable sized ivar is followed by another ivar.\n for (ObjCIvarDecl *ivar = IntfDecl->all_declared_ivar_begin(); ivar; ivar = ivar->getNextIvar()) {\n // ...\n if (IsInvalidIvar) {\n S.Diag(ivar->getNextIvar()->getLocation(), diag::note_next_ivar_declaration) << ivar->getNextIvar()->getSynthesize();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/flexible-array.mm"]={"clang/test/SemaObjCXX/flexible-array.mm:17:7: note: next instance variable declaration is here","clang/test/SemaObjCXX/flexible-array.mm:35:7: note: next instance variable declaration is here"} | ["clang/test/SemaObjCXX/flexible-array.mm"]={"clang/test/SemaObjCXX/flexible-array.mm:17:7: note: next instance variable declaration is here","clang/test/SemaObjCXX/flexible-array.mm:35:7: note: next instance variable declaration is here"} | ||
Line 6,630: | Line 6,642: | ||
}, | }, | ||
["note_non_c_like_anon_struct"]={ | ["note_non_c_like_anon_struct"]={ | ||
[ | [b]={{nil,K,"type is not C-compatible due to this %select{base class|default member initializer|lambda expression|friend declaration|member declaration}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="type is not C\\-compatible due to this (?:base class|default member initializer|lambda expression|friend declaration|member declaration)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | [h]={"1228d42ddab8",1576809732,"[OpenMP][Part 2] Use reusable OpenMP context/traits handling","[OpenMP][Part 2] Use reusable OpenMP context/traits handling\n\nThis patch implements an almost complete handling of OpenMP\ncontexts/traits such that we can reuse most of the logic in Flang\nthrough the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.\n\nAll but construct SIMD specifiers, e.g., inbranch, and the device ISA\nselector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From\nthese definitions we generate the enum classes `TraitSet`,\n`TraitSelector`, and `TraitProperty` as well as conversion and helper\nfunctions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.\n\nThe above enum classes are used in the parser, sema, and the AST\nattribute. The latter is not a collection of multiple primitive variant\narguments that contain encodings via numbers and strings but instead a\ntree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).\n\nThe changes to the parser make it more forgiving when wrong syntax is\nread and they also resulted in more specialized diagnostics. The tests\nare updated and the core issues are detected as before. Here and\nelsewhere this patch tries to be generic, thus we do not distinguish\nwhat selector set, selector, or property is parsed except if they do\nbehave exceptionally, as for example `user={condition(EXPR)}` does.\n\nThe sema logic changed in two ways: First, the OMPDeclareVariantAttr\nrepresentation changed, as mentioned above, and the sema was adjusted to\nwork with the new `OpenMPTraitInfo`. Second, the matching and scoring\nlogic moved into `OMPContext.{h,cpp}`. It is implemented on a flat\nrepresentation of the `match` clause that is not tied to clang.\n`OpenMPTraitInfo` provides a method to generate this flat structure (see\n`struct VariantMatchInfo`) by computing integer score values and boolean\nuser conditions from the `clang::Expr` we keep for them.\n\nThe OpenMP context is now an explicit object (see `struct OMPContext`).\nThis is in anticipation of construct traits that need to be tracked. The\nOpenMP context, as well as the `VariantMatchInfo`, are basically made up\nof a set of active or respectively required traits, e.g., \'host\', and an\nordered container of constructs which allows duplication. Matching and\nscoring is kept as generic as possible to allow easy extension in the\nfuture.\n\n---\n\nTest changes:\n\nThe messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have\nbeen auto generated to match the new warnings and notes of the parser.\nThe \"subset\" checks were reversed causing the wrong version to be\npicked. The tests have been adjusted to correct this.\nWe do not print scores if the user did not provide one.\nWe print spaces to make lists in the `match` clause more legible.\n\nReviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim\n\nSubscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits\n\nTags: #clang, #llvm\n\nDifferential Revision: https://reviews.llvm.org/D71830"}, | ||
[i]={{ | [i]={{q,5030,"void Sema::setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD) {\n // ...\n if (NonCLike || ChangesLinkage) {\n // ...\n if (NonCLike.Kind != NonCLikeKind::None) {\n Diag(NonCLike.Range.getBegin(), diag::note_non_c_like_anon_struct) << NonCLike.Kind - 1 << NonCLike.Range;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:112:5: note: type is not C-compatible due to this member declaration","clang/test/SemaCXX/warn-unused-local-typedef.cpp:117:5: note: type is not C-compatible due to this member declaration"} | ["clang/test/SemaCXX/warn-unused-local-typedef.cpp"]={"clang/test/SemaCXX/warn-unused-local-typedef.cpp:112:5: note: type is not C-compatible due to this member declaration","clang/test/SemaCXX/warn-unused-local-typedef.cpp:117:5: note: type is not C-compatible due to this member declaration"} | ||
Line 6,642: | Line 6,654: | ||
}, | }, | ||
["note_non_deducible_parameter"]={ | ["note_non_deducible_parameter"]={ | ||
[ | [b]={{nil,U,"non-deducible template parameter %0"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-deducible template parameter (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"4e05eaa9e84a",1487205407,"[c++1z] Diagnose non-deducible template parameters in deduction guide templates, per [temp.param]p11...","[c++1z] Diagnose non-deducible template parameters in deduction guide templates, per [temp.param]p11.\n\nllvm-svn: 295264"}, | [h]={"4e05eaa9e84a",1487205407,"[c++1z] Diagnose non-deducible template parameters in deduction guide templates, per [temp.param]p11...","[c++1z] Diagnose non-deducible template parameters in deduction guide templates, per [temp.param]p11.\n\nllvm-svn: 295264"}, | ||
[i]={{ | [i]={{s,4441,"static void noteNonDeducibleParameters(Sema &S, TemplateParameterList *TemplateParams, const llvm::SmallBitVector &DeducibleParams) {\n for (unsigned I = 0, N = DeducibleParams.size(); I != N; ++I) {\n if (!DeducibleParams[I]) {\n // ...\n if (Param->getDeclName())\n S.Diag(Param->getLocation(), diag::note_non_deducible_parameter) << Param->getDeclName();"},{s,4444,"static void noteNonDeducibleParameters(Sema &S, TemplateParameterList *TemplateParams, const llvm::SmallBitVector &DeducibleParams) {\n for (unsigned I = 0, N = DeducibleParams.size(); I != N; ++I) {\n if (!DeducibleParams[I]) {\n // ...\n if (Param->getDeclName())\n // ...\n else\n S.Diag(Param->getLocation(), diag::note_non_deducible_parameter) << \"(anonymous)\";"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:21: note: non-deducible template parameter \'Inner\'","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:31:44: note: non-deducible template parameter \'Inner\'","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:21: note: non-deducible template parameter \'Inner\'","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:21: note: non-deducible template parameter \'Inner\'"} | ["clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:21: note: non-deducible template parameter \'Inner\'","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:31:44: note: non-deducible template parameter \'Inner\'","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:21: note: non-deducible template parameter \'Inner\'","clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp:25:21: note: non-deducible template parameter \'Inner\'"} | ||
Line 6,654: | Line 6,666: | ||
}, | }, | ||
["note_non_instantiated_member_here"]={ | ["note_non_instantiated_member_here"]={ | ||
[ | [b]="not-yet-instantiated member is declared here", | ||
[ | [d]=c, | ||
[ | [e]="not\\-yet\\-instantiated member is declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"528ad93924b1",1299442365,"We may fail to map a declaration in a template to its instantiated","We may fail to map a declaration in a template to its instantiated\ndeclaration because of interesting ordering dependencies while\ninstantiating a class template or member class thereof. Complain,\nrather than asserting (+Asserts) or silently rejecting the code\n(-Asserts).\n\nFixes the crash-on-invalid in PR8965. \n\nllvm-svn: 127129"}, | [h]={"528ad93924b1",1299442365,"We may fail to map a declaration in a template to its instantiated","We may fail to map a declaration in a template to its instantiated\ndeclaration because of interesting ordering dependencies while\ninstantiating a class template or member class thereof. Complain,\nrather than asserting (+Asserts) or silently rejecting the code\n(-Asserts).\n\nFixes the crash-on-invalid in PR8965. \n\nllvm-svn: 127129"}, | ||
[i]={{ | [i]={{Mc,6324,"/// Find the instantiation of the given declaration within the\n/// current instantiation.\n///\n/// This routine is intended to be used when \\p D is a declaration\n/// referenced from within a template, that needs to mapped into the\n/// corresponding declaration within an instantiation. For example,\n/// given:\n///\n/// \\code\n/// template<typename T>\n/// struct X {\n/// enum Kind {\n/// KnownValue = sizeof(T)\n/// };\n///\n/// bool getKind() const { return KnownValue; }\n/// };\n///\n/// template struct X<int>;\n/// \\endcode\n///\n/// In the instantiation of X<int>::getKind(), we need to map the \\p\n/// EnumConstantDecl for \\p KnownValue (which refers to\n/// X<T>::<Kind>::KnownValue) to its instantiation (X<int>::<Kind>::KnownValue).\n/// \\p FindInstantiatedDecl performs this mapping from within the instantiation\n/// of X<int>.\nNamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext) {\n // ...\n if (ParentDC != D->getDeclContext()) {\n // ...\n if (!Result) {\n if (isa<UsingShadowDecl>(D)) {\n // ...\n } else if (hasUncompilableErrorOccurred()) {\n // ...\n } else if (IsBeingInstantiated) {\n // ...\n Diag(D->getLocation(), diag::note_non_instantiated_member_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/many-template-parameter-lists.cpp"]={"clang/test/SemaCXX/many-template-parameter-lists.cpp:8:10: note: not-yet-instantiated member is declared here"} | ["clang/test/SemaCXX/many-template-parameter-lists.cpp"]={"clang/test/SemaCXX/many-template-parameter-lists.cpp:8:10: note: not-yet-instantiated member is declared here"} | ||
Line 6,666: | Line 6,678: | ||
}, | }, | ||
["note_non_literal_base_class"]={ | ["note_non_literal_base_class"]={ | ||
[ | [b]="%0 is not literal because it has base class %1 of non-literal type", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not literal because it has base class (.*?) of non\\-literal type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{ | [i]={{H,9350,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n } else if (!RD->isAggregate() && !RD->hasConstexprNonCopyMoveConstructor() && !RD->hasTrivialDefaultConstructor()) {\n // ...\n } else if (RD->hasNonLiteralTypeFieldsOrBases()) {\n for (const auto &I : RD->bases()) {\n if (!I.getType()->isLiteralType(Context)) {\n Diag(I.getBeginLoc(), diag::note_non_literal_base_class) << RD << I.getType() << I.getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.inhctor/p2.cpp"]={"clang/test/CXX/special/class.inhctor/p2.cpp:71:25: note: \'BothNonLiteral\' is not literal because it has base class \'NonLiteral\' of non-literal type"} | ["clang/test/CXX/special/class.inhctor/p2.cpp"]={"clang/test/CXX/special/class.inhctor/p2.cpp:71:25: note: \'BothNonLiteral\' is not literal because it has base class \'NonLiteral\' of non-literal type"} | ||
Line 6,678: | Line 6,690: | ||
}, | }, | ||
["note_non_literal_field"]={ | ["note_non_literal_field"]={ | ||
[ | [b]="%0 is not literal because it has data member %1 of %select{non-literal|volatile}3 type %2", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not literal because it has data member (.*?) of (?:non\\-literal|volatile) type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{ | [i]={{H,9358,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n } else if (!RD->isAggregate() && !RD->hasConstexprNonCopyMoveConstructor() && !RD->hasTrivialDefaultConstructor()) {\n // ...\n } else if (RD->hasNonLiteralTypeFieldsOrBases()) {\n // ...\n for (const auto *I : RD->fields()) {\n if (!I->getType()->isLiteralType(Context) || I->getType().isVolatileQualified()) {\n Diag(I->getLocation(), diag::note_non_literal_field) << RD << I << I->getType() << I->getType().isVolatileQualified();"}}, | ||
[j]={ | [j]={ | ||
[ | [Rc]={"clang/test/CXX/basic/basic.types/p10.cpp:106:5: note: \'NonLitMember\' is not literal because it has data member \'s\' of non-literal type \'S\'","clang/test/CXX/basic/basic.types/p10.cpp:119:5: note: \'MemberType<NonLiteral>\' is not literal because it has data member \'t\' of non-literal type \'NonLiteral\'","clang/test/CXX/basic/basic.types/p10.cpp:135:5: note: \'ArrBad\' is not literal because it has data member \'s\' of non-literal type \'S[3]\'"} | ||
} | } | ||
}, | }, | ||
["note_non_literal_incomplete"]={ | ["note_non_literal_incomplete"]={ | ||
[ | [b]="incomplete type %0 is not a literal type", | ||
[ | [d]=c, | ||
[ | [e]="incomplete type (.*?) is not a literal type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"6ca73133ca7b",1335396228,"If a type is non-literal by virtue of being incomplete produce notes","If a type is non-literal by virtue of being incomplete produce notes\nexplaining that.\n\nllvm-svn: 155598"}, | [h]={"6ca73133ca7b",1335396228,"If a type is non-literal by virtue of being incomplete produce notes","If a type is non-literal by virtue of being incomplete produce notes\nexplaining that.\n\nllvm-svn: 155598"}, | ||
[i]={{ | [i]={{H,9324,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n if (RequireCompleteType(Loc, ElemType, diag::note_non_literal_incomplete, T))"}}, | ||
[j]={ | [j]={ | ||
[ | [Rc]={"clang/test/CXX/basic/basic.types/p10.cpp:34:22: note: incomplete type \'const Incomplete\' is not a literal type","clang/test/CXX/basic/basic.types/p10.cpp:35:22: note: incomplete type \'const Incomplete[]\' is not a literal type"} | ||
} | } | ||
}, | }, | ||
["note_non_literal_lambda"]={ | ["note_non_literal_lambda"]={ | ||
[ | [b]={{nil,L,"lambda closure types are non-literal types before C++17"}}, | ||
[ | [d]=c, | ||
[ | [e]="lambda closure types are non\\-literal types before C\\+\\+17", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"d699da427a4c",1526328904,"PR37450: Fix bug that disabled some type checks for variables with deduced types.","PR37450: Fix bug that disabled some type checks for variables with deduced types.\n\nAlso improve diagnostic for the case where a type is non-literal because it\'s a lambda.\n\nllvm-svn: 332286"}, | [h]={"d699da427a4c",1526328904,"PR37450: Fix bug that disabled some type checks for variables with deduced types.","PR37450: Fix bug that disabled some type checks for variables with deduced types.\n\nAlso improve diagnostic for the case where a type is non-literal because it\'s a lambda.\n\nllvm-svn: 332286"}, | ||
[i]={{ | [i]={{H,9330,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // [expr.prim.lambda]p3:\n // This class type is [not] a literal type.\n if (RD->isLambda() && !getLangOpts().CPlusPlus17) {\n Diag(RD->getLocation(), diag::note_non_literal_lambda);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp:15:26: note: lambda closure types are non-literal types before C++17"} | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp:15:26: note: lambda closure types are non-literal types before C++17"} | ||
Line 6,714: | Line 6,726: | ||
}, | }, | ||
["note_non_literal_no_constexpr_ctors"]={ | ["note_non_literal_no_constexpr_ctors"]={ | ||
[ | [b]="%0 is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{ | [i]={{H,9346,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n } else if (!RD->isAggregate() && !RD->hasConstexprNonCopyMoveConstructor() && !RD->hasTrivialDefaultConstructor()) {\n Diag(RD->getLocation(), diag::note_non_literal_no_constexpr_ctors) << RD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:28:8: note: \'NonLiteral\' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:28:8: note: \'NonLiteral\' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors"} | ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:28:8: note: \'NonLiteral\' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:28:8: note: \'NonLiteral\' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors"} | ||
Line 6,726: | Line 6,738: | ||
}, | }, | ||
["note_non_literal_non_constexpr_dtor"]={ | ["note_non_literal_non_constexpr_dtor"]={ | ||
[ | [b]={{nil,n,"%0 is not literal because its destructor is not constexpr"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not literal because its destructor is not constexpr", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={rc,1567434909,qc,pc}, | ||
[i]={{ | [i]={{H,9375,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n } else if (!RD->isAggregate() && !RD->hasConstexprNonCopyMoveConstructor() && !RD->hasTrivialDefaultConstructor()) {\n // ...\n } else if (RD->hasNonLiteralTypeFieldsOrBases()) {\n // ...\n } else if (getLangOpts().CPlusPlus20 ? !RD->hasConstexprDestructor() : !RD->hasTrivialDestructor()) {\n // ...\n if (getLangOpts().CPlusPlus20) {\n Diag(Dtor->getLocation(), diag::note_non_literal_non_constexpr_dtor) << RD;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp"]={"clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp:21:19: note: \'NonLit\' is not literal because its destructor is not constexpr"} | ["clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp"]={"clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp:21:19: note: \'NonLit\' is not literal because its destructor is not constexpr"} | ||
Line 6,738: | Line 6,750: | ||
}, | }, | ||
["note_non_literal_nontrivial_dtor"]={ | ["note_non_literal_nontrivial_dtor"]={ | ||
[ | [b]="%0 is not literal because it has a non-trivial destructor", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not literal because it has a non\\-trivial destructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{ | [i]={{H,9380,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n } else if (!RD->isAggregate() && !RD->hasConstexprNonCopyMoveConstructor() && !RD->hasTrivialDefaultConstructor()) {\n // ...\n } else if (RD->hasNonLiteralTypeFieldsOrBases()) {\n // ...\n } else if (getLangOpts().CPlusPlus20 ? !RD->hasConstexprDestructor() : !RD->hasTrivialDestructor()) {\n // ...\n if (getLangOpts().CPlusPlus20) {\n // ...\n } else {\n Diag(Dtor->getLocation(), Dtor->isUserProvided() ? diag::note_non_literal_user_provided_dtor : diag::note_non_literal_nontrivial_dtor) << RD;"}}, | ||
[j]={ | [j]={ | ||
[ | [Rc]={"clang/test/CXX/basic/basic.types/p10.cpp:46:11: note: \'NonTrivDtor\' is not literal because it has a non-trivial destructor"} | ||
} | } | ||
}, | }, | ||
["note_non_literal_user_provided_dtor"]={ | ["note_non_literal_user_provided_dtor"]={ | ||
[ | [b]="%0 is not literal because it has a user-provided destructor", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not literal because it has a user\\-provided destructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{ | [i]={{H,9379,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n // ...\n } else if (!RD->isAggregate() && !RD->hasConstexprNonCopyMoveConstructor() && !RD->hasTrivialDefaultConstructor()) {\n // ...\n } else if (RD->hasNonLiteralTypeFieldsOrBases()) {\n // ...\n } else if (getLangOpts().CPlusPlus20 ? !RD->hasConstexprDestructor() : !RD->hasTrivialDestructor()) {\n // ...\n if (getLangOpts().CPlusPlus20) {\n // ...\n } else {\n Diag(Dtor->getLocation(), Dtor->isUserProvided() ? diag::note_non_literal_user_provided_dtor : diag::note_non_literal_nontrivial_dtor) << RD;"}}, | ||
[j]={ | [j]={ | ||
[ | [Rc]={"clang/test/CXX/basic/basic.types/p10.cpp:41:3: note: \'UserProvDtor\' is not literal because it has a user-provided destructor"} | ||
} | } | ||
}, | }, | ||
["note_non_literal_virtual_base"]={ | ["note_non_literal_virtual_base"]={ | ||
[ | [b]="%select{struct|interface|class}0 with virtual base %plural{1:class|:classes}1 is not a literal type", | ||
[ | [d]=c, | ||
[ | [e]="(?:struct|interface|class) with virtual base (?:class|classes) is not a literal type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Qb,1317436288,Nb,Lb}, | ||
[i]={{ | [i]={{H,9339,"/// Ensure that the type T is a literal type.\n///\n/// This routine checks whether the type @p T is a literal type. If @p T is an\n/// incomplete type, an attempt is made to complete it. If @p T is a literal\n/// type, or @p AllowIncompleteType is true and @p T is an incomplete type,\n/// returns false. Otherwise, this routine issues the diagnostic @p PD (giving\n/// it the type @p T), along with notes explaining why the type is not a\n/// literal type, and returns true.\n///\n/// @param Loc The location in the source that the non-literal type\n/// diagnostic should refer to.\n///\n/// @param T The type that this routine is examining for literalness.\n///\n/// @param Diagnoser Emits a diagnostic if T is not a literal type.\n///\n/// @returns @c true if @p T is not a literal type and a diagnostic was emitted,\n/// @c false otherwise.\nbool Sema::RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser) {\n // ...\n // If the class has virtual base classes, then it\'s not an aggregate, and\n // cannot have any constexpr constructors or a trivial default constructor,\n // so is non-literal. This is better to diagnose than the resulting absence\n // of constexpr constructors.\n if (RD->getNumVBases()) {\n Diag(RD->getLocation(), diag::note_non_literal_virtual_base) << getLiteralDiagFromTagKind(RD->getTagKind()) << RD->getNumVBases();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/special/class.ctor/p6-0x.cpp"]={"clang/test/CXX/special/class.ctor/p6-0x.cpp:24:8: note: struct with virtual base class is not a literal type"} | ["clang/test/CXX/special/class.ctor/p6-0x.cpp"]={"clang/test/CXX/special/class.ctor/p6-0x.cpp:24:8: note: struct with virtual base class is not a literal type"} | ||
Line 6,774: | Line 6,786: | ||
}, | }, | ||
["note_non_null_attribute_failed"]={ | ["note_non_null_attribute_failed"]={ | ||
[ | [b]={{nil,r,"null passed to a callee that requires a non-null argument"}}, | ||
[ | [d]=c, | ||
[ | [e]="null passed to a callee that requires a non\\-null argument", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"0bb4d46b2be5",1560587576,"[clang] perform semantic checking in constant context","[clang] perform semantic checking in constant context\n\nSummary:\nSince the addition of __builtin_is_constant_evaluated the result of an expression can change based on whether it is evaluated in constant context. a lot of semantic checking performs evaluations with out specifying context. which can lead to wrong diagnostics.\nfor example:\n```\nconstexpr int i0 = (long long)__builtin_is_constant_evaluated() * (1ll << 33); //#1\nconstexpr int i1 = (long long)!__builtin_is_constant_evaluated() * (1ll << 33); //#2\n```\nbefore the patch, #2 was diagnosed incorrectly and #1 wasn\'t diagnosed.\nafter the patch #1 is diagnosed as it should and #2 isn\'t.\n\nChanges:\n - add a flag to Sema to passe in constant context mode.\n - in SemaChecking.cpp calls to Expr::Evaluate* are now done in constant context when they should.\n - in SemaChecking.cpp diagnostics for UB are not checked for in constant context because an error will be emitted by the constant evaluator.\n - in SemaChecking.cpp diagnostics for construct that cannot appear in constant context are not checked for in constant context.\n - in SemaChecking.cpp diagnostics on constant expression are always emitted because constant expression are always evaluated.\n - semantic checking for initialization of constexpr variables is now done in constant context.\n - adapt test that were depending on warning changes.\n - add test.\n\nReviewers: rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D62009\n\nllvm-svn: 363488"}, | [h]={"0bb4d46b2be5",1560587576,"[clang] perform semantic checking in constant context","[clang] perform semantic checking in constant context\n\nSummary:\nSince the addition of __builtin_is_constant_evaluated the result of an expression can change based on whether it is evaluated in constant context. a lot of semantic checking performs evaluations with out specifying context. which can lead to wrong diagnostics.\nfor example:\n```\nconstexpr int i0 = (long long)__builtin_is_constant_evaluated() * (1ll << 33); //#1\nconstexpr int i1 = (long long)!__builtin_is_constant_evaluated() * (1ll << 33); //#2\n```\nbefore the patch, #2 was diagnosed incorrectly and #1 wasn\'t diagnosed.\nafter the patch #1 is diagnosed as it should and #2 isn\'t.\n\nChanges:\n - add a flag to Sema to passe in constant context mode.\n - in SemaChecking.cpp calls to Expr::Evaluate* are now done in constant context when they should.\n - in SemaChecking.cpp diagnostics for UB are not checked for in constant context because an error will be emitted by the constant evaluator.\n - in SemaChecking.cpp diagnostics for construct that cannot appear in constant context are not checked for in constant context.\n - in SemaChecking.cpp diagnostics on constant expression are always emitted because constant expression are always evaluated.\n - semantic checking for initialization of constexpr variables is now done in constant context.\n - adapt test that were depending on warning changes.\n - add test.\n\nReviewers: rsmith\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D62009\n\nllvm-svn: 363488"}, | ||
[i]={{l,6143,"static bool EvaluateCallArg(const ParmVarDecl *PVD, const Expr *Arg, CallRef Call, EvalInfo &Info, bool NonNull = false) {\n // ...\n // Passing a null pointer to an __attribute__((nonnull)) parameter results in\n // undefined behavior, so is non-constant.\n if (NonNull && V.isLValue() && V.isNullPointer()) {\n Info.CCEDiag(Arg, diag::note_non_null_attribute_failed);"}}, | [i]={{l,6143,"static bool EvaluateCallArg(const ParmVarDecl *PVD, const Expr *Arg, CallRef Call, EvalInfo &Info, bool NonNull = false) {\n // ...\n // Passing a null pointer to an __attribute__((nonnull)) parameter results in\n // undefined behavior, so is non-constant.\n if (NonNull && V.isLValue() && V.isNullPointer()) {\n Info.CCEDiag(Arg, diag::note_non_null_attribute_failed);"}}, | ||
Line 6,786: | Line 6,798: | ||
}, | }, | ||
["note_non_template_in_template_id_found"]={ | ["note_non_template_in_template_id_found"]={ | ||
[ | [b]={{nil,U,"non-template declaration found by name lookup"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-template declaration found by name lookup", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"42bc73a3f15f",1494383428,"When we see a \'<\' operator, check whether it\'s a probable typo for a template-id.","When we see a \'<\' operator, check whether it\'s a probable typo for a template-id.\n\nThe heuristic that we use here is:\n * the left-hand side must be a simple identifier or a class member access\n * the right-hand side must be \'<\' followed by either a \'>\' or by a type-id that\n cannot be an expression (in particular, not followed by \'(\' or \'{\')\n * there is a \'>\' token matching the \'<\' token\n\nThe second condition guarantees the expression would otherwise be ill-formed.\n\nIf we\'re confident that the user intended the name before the \'<\' to be\ninterpreted as a template, diagnose the fact that we didn\'t interpret it\nthat way, rather than diagnosing that the template arguments are not valid\nexpressions.\n\nllvm-svn: 302615"}, | [h]={"42bc73a3f15f",1494383428,"When we see a \'<\' operator, check whether it\'s a probable typo for a template-id.","When we see a \'<\' operator, check whether it\'s a probable typo for a template-id.\n\nThe heuristic that we use here is:\n * the left-hand side must be a simple identifier or a class member access\n * the right-hand side must be \'<\' followed by either a \'>\' or by a type-id that\n cannot be an expression (in particular, not followed by \'(\' or \'{\')\n * there is a \'>\' token matching the \'<\' token\n\nThe second condition guarantees the expression would otherwise be ill-formed.\n\nIf we\'re confident that the user intended the name before the \'<\' to be\ninterpreted as a template, diagnose the fact that we didn\'t interpret it\nthat way, rather than diagnosing that the template arguments are not valid\nexpressions.\n\nllvm-svn: 302615"}, | ||
[i]={{ | [i]={{s,714,"void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(NameInfo, LookupKind, S, &SS, CCC, CTK_ErrorRecovery, LookupCtx)) {\n // ...\n if (ND || Corrected.isKeyword()) {\n // ...\n if (Found)\n Diag(Found->getLocation(), diag::note_non_template_in_template_id_found);"},{s,722,"void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater) {\n // ...\n if (Found)\n Diag(Found->getLocation(), diag::note_non_template_in_template_id_found);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/typo-template-name.cpp"]={"clang/test/SemaTemplate/typo-template-name.cpp:5:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:11:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:20:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:26:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:31:9: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:31:9: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:31:9: note: non-template declaration found by name lookup"} | ["clang/test/SemaTemplate/typo-template-name.cpp"]={"clang/test/SemaTemplate/typo-template-name.cpp:5:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:11:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:20:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:26:10: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:31:9: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:31:9: note: non-template declaration found by name lookup","clang/test/SemaTemplate/typo-template-name.cpp:31:9: note: non-template declaration found by name lookup"} | ||
Line 6,798: | Line 6,810: | ||
}, | }, | ||
["note_non_trivial_c_union"]={ | ["note_non_trivial_c_union"]={ | ||
[ | [b]={{nil,r,"%select{%2 has subobjects that are|%3 has type %2 that is}0 non-trivial to %select{default-initialize|destruct|copy}1"}}, | ||
[ | [d]=c, | ||
[ | [e]="(?:(.*?) has subobjects that are|(.*?) has type (.*?) that is) non\\-trivial to (?:default\\-initialize|destruct|copy)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"81b03d4a08b1",1562982435,"[Sema] Diagnose default-initialization, destruction, and copying of","[Sema] Diagnose default-initialization, destruction, and copying of\nnon-trivial C union types\n\nThis patch diagnoses uses of non-trivial C unions and structs/unions\ncontaining non-trivial C unions in the following contexts, which require\ndefault-initialization, destruction, or copying of the union objects,\ninstead of disallowing fields of non-trivial types in C unions, which is\nwhat we currently do:\n\n- function parameters.\n- function returns.\n- assignments.\n- compound literals.\n- block captures except capturing of `__block` variables by non-escaping\n blocks.\n- local and global variable definitions.\n- lvalue-to-rvalue conversions of volatile types.\n\nSee the discussion in https://reviews.llvm.org/D62988 for more background.\n\nrdar://problem/50679094\n\nDifferential Revision: https://reviews.llvm.org/D63753\n\nllvm-svn: 365985"}, | [h]={"81b03d4a08b1",1562982435,"[Sema] Diagnose default-initialization, destruction, and copying of","[Sema] Diagnose default-initialization, destruction, and copying of\nnon-trivial C union types\n\nThis patch diagnoses uses of non-trivial C unions and structs/unions\ncontaining non-trivial C unions in the following contexts, which require\ndefault-initialization, destruction, or copying of the union objects,\ninstead of disallowing fields of non-trivial types in C unions, which is\nwhat we currently do:\n\n- function parameters.\n- function returns.\n- assignments.\n- compound literals.\n- block captures except capturing of `__block` variables by non-escaping\n blocks.\n- local and global variable definitions.\n- lvalue-to-rvalue conversions of volatile types.\n\nSee the discussion in https://reviews.llvm.org/D62988 for more background.\n\nrdar://problem/50679094\n\nDifferential Revision: https://reviews.llvm.org/D63753\n\nllvm-svn: 365985"}, | ||
[i]={{ | [i]={{q,12916,"struct DiagNonTrivalCUnionDefaultInitializeVisitor : DefaultInitializedTypeVisitor<DiagNonTrivalCUnionDefaultInitializeVisitor, void> {\n // ...\n void visitARCStrong(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n if (InNonTrivialUnion)\n S.Diag(FD->getLocation(), diag::note_non_trivial_c_union) << 1 << 0 << QT << FD->getName();"},{q,12922,"struct DiagNonTrivalCUnionDefaultInitializeVisitor : DefaultInitializedTypeVisitor<DiagNonTrivalCUnionDefaultInitializeVisitor, void> {\n // ...\n void visitARCWeak(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n if (InNonTrivialUnion)\n S.Diag(FD->getLocation(), diag::note_non_trivial_c_union) << 1 << 0 << QT << FD->getName();"},{q,12942,"struct DiagNonTrivalCUnionDefaultInitializeVisitor : DefaultInitializedTypeVisitor<DiagNonTrivalCUnionDefaultInitializeVisitor, void> {\n // ...\n void visitStruct(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n // ...\n if (InNonTrivialUnion)\n S.Diag(RD->getLocation(), diag::note_non_trivial_c_union) << 0 << 0 << QT.getUnqualifiedType() << \"\";"},{q,12981,"struct DiagNonTrivalCUnionDestructedTypeVisitor : DestructedTypeVisitor<DiagNonTrivalCUnionDestructedTypeVisitor, void> {\n // ...\n void visitARCStrong(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n if (InNonTrivialUnion)\n S.Diag(FD->getLocation(), diag::note_non_trivial_c_union) << 1 << 1 << QT << FD->getName();"},{q,12987,"struct DiagNonTrivalCUnionDestructedTypeVisitor : DestructedTypeVisitor<DiagNonTrivalCUnionDestructedTypeVisitor, void> {\n // ...\n void visitARCWeak(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n if (InNonTrivialUnion)\n S.Diag(FD->getLocation(), diag::note_non_trivial_c_union) << 1 << 1 << QT << FD->getName();"},{q,13007,"struct DiagNonTrivalCUnionDestructedTypeVisitor : DestructedTypeVisitor<DiagNonTrivalCUnionDestructedTypeVisitor, void> {\n // ...\n void visitStruct(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n // ...\n if (InNonTrivialUnion)\n S.Diag(RD->getLocation(), diag::note_non_trivial_c_union) << 0 << 1 << QT.getUnqualifiedType() << \"\";"},{q,13047,"struct DiagNonTrivalCUnionCopyVisitor : CopiedTypeVisitor<DiagNonTrivalCUnionCopyVisitor, false, void> {\n // ...\n void visitARCStrong(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n if (InNonTrivialUnion)\n S.Diag(FD->getLocation(), diag::note_non_trivial_c_union) << 1 << 2 << QT << FD->getName();"},{q,13053,"struct DiagNonTrivalCUnionCopyVisitor : CopiedTypeVisitor<DiagNonTrivalCUnionCopyVisitor, false, void> {\n // ...\n void visitARCWeak(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n if (InNonTrivialUnion)\n S.Diag(FD->getLocation(), diag::note_non_trivial_c_union) << 1 << 2 << QT << FD->getName();"},{q,13073,"struct DiagNonTrivalCUnionCopyVisitor : CopiedTypeVisitor<DiagNonTrivalCUnionCopyVisitor, false, void> {\n // ...\n void visitStruct(QualType QT, const FieldDecl *FD, bool InNonTrivialUnion) {\n // ...\n if (InNonTrivialUnion)\n S.Diag(RD->getLocation(), diag::note_non_trivial_c_union) << 0 << 2 << QT.getUnqualifiedType() << \"\";"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/non-trivial-c-union.m"]={ | ["clang/test/SemaObjC/non-trivial-c-union.m"]={ | ||
[1]= | [1]=kb, | ||
[2]= | [2]=jb, | ||
[3]= | [3]=ib, | ||
[4]= | [4]=kb, | ||
[5]= | [5]=jb, | ||
[6]= | [6]=ib, | ||
[7]= | [7]=kb, | ||
[8]= | [8]=jb, | ||
[9]= | [9]=ib, | ||
[10]= | [10]=u, | ||
[11]= | [11]=v, | ||
[12]= | [12]=t, | ||
[13]= | [13]=B, | ||
[14]= | [14]=D, | ||
[15]= | [15]=A, | ||
[16]= | [16]=u, | ||
[17]= | [17]=v, | ||
[18]= | [18]=t, | ||
[19]= | [19]=B, | ||
[20]= | [20]=D, | ||
[21]= | [21]=A, | ||
[22]= | [22]=u, | ||
[23]= | [23]=v, | ||
[24]= | [24]=t, | ||
[25]= | [25]=B, | ||
[26]= | [26]=D, | ||
[27]= | [27]=A, | ||
[28]= | [28]=u, | ||
[29]= | [29]=v, | ||
[30]= | [30]=t, | ||
[31]= | [31]=B, | ||
[32]= | [32]=D, | ||
[33]= | [33]=A, | ||
[34]= | [34]=u, | ||
[35]= | [35]=v, | ||
[36]= | [36]=t, | ||
[37]= | [37]=B, | ||
[38]= | [38]=D, | ||
[39]= | [39]=A, | ||
[40]= | [40]=u, | ||
[41]= | [41]=v, | ||
[42]= | [42]=t, | ||
[43]= | [43]=B, | ||
[44]= | [44]=D, | ||
[45]= | [45]=A, | ||
[46]= | [46]=u, | ||
[47]= | [47]=v, | ||
[48]= | [48]=t, | ||
[49]= | [49]=B, | ||
[50]= | [50]=D, | ||
[51]= | [51]=A, | ||
[52]= | [52]=u, | ||
[53]= | [53]=v, | ||
[54]= | [54]=t, | ||
[55]= | [55]=B, | ||
[56]= | [56]=D, | ||
[57]= | [57]=A, | ||
[58]= | [58]=u, | ||
[59]= | [59]=v, | ||
[60]= | [60]=t, | ||
[61]= | [61]=B, | ||
[62]= | [62]=D, | ||
[63]= | [63]=A, | ||
[64]= | [64]=u, | ||
[65]= | [65]=v, | ||
[66]= | [66]=t, | ||
[67]= | [67]=B, | ||
[68]= | [68]=D, | ||
[69]= | [69]=A, | ||
[70]= | [70]=u, | ||
[71]= | [71]=v, | ||
[72]= | [72]=t, | ||
[73]= | [73]=B, | ||
[74]= | [74]=D, | ||
[75]= | [75]=A, | ||
[76]= | [76]=u, | ||
[77]= | [77]=v, | ||
[78]= | [78]=t, | ||
[79]= | [79]=B, | ||
[80]= | [80]=D, | ||
[81]= | [81]=A, | ||
[82]= | [82]=u, | ||
[83]= | [83]=v, | ||
[84]= | [84]=t, | ||
[85]= | [85]=kb, | ||
[86]= | [86]=jb, | ||
[87]= | [87]=ib, | ||
[88]= | [88]=u, | ||
[89]= | [89]=v, | ||
[90]= | [90]=t, | ||
[91]= | [91]=B, | ||
[92]= | [92]=D, | ||
[93]= | [93]=A, | ||
[94]= | [94]=u, | ||
[95]= | [95]=v, | ||
[96]= | [96]=t, | ||
[97]= | [97]=u, | ||
[98]= | [98]=v, | ||
[99]= | [99]=t, | ||
[100]= | [100]=u, | ||
[101]= | [101]=v, | ||
[102]= | [102]=t, | ||
[103]= | [103]=kb, | ||
[104]= | [104]=jb, | ||
[105]= | [105]=ib, | ||
[106]= | [106]=u, | ||
[107]= | [107]=v, | ||
[108]= | [108]=t, | ||
[109]= | [109]=B, | ||
[110]= | [110]=D, | ||
[111]= | [111]=A, | ||
[112]= | [112]=u, | ||
[113]= | [113]=v, | ||
[114]= | [114]=t, | ||
[115]= | [115]=B, | ||
[116]= | [116]=D, | ||
[117]= | [117]=A, | ||
[118]= | [118]=u, | ||
[119]= | [119]=v, | ||
[120]= | [120]=t, | ||
[121]= | [121]=B, | ||
[122]= | [122]=D, | ||
[123]= | [123]=A, | ||
[124]= | [124]=u, | ||
[125]= | [125]=v, | ||
[126]= | [126]=t, | ||
[127]= | [127]=kb, | ||
[128]= | [128]=jb, | ||
[129]= | [129]=ib, | ||
[130]= | [130]=B, | ||
[131]= | [131]=D, | ||
[132]= | [132]=A, | ||
[133]= | [133]=B, | ||
[134]= | [134]=D, | ||
[135]= | [135]=A, | ||
[136]= | [136]=B, | ||
[137]= | [137]=D, | ||
[138]= | [138]=A, | ||
[139]= | [139]=B, | ||
[140]= | [140]=D, | ||
[141]= | [141]=A, | ||
[142]= | [142]=kb, | ||
[143]= | [143]=jb, | ||
[144]= | [144]=ib, | ||
[145]= | [145]=u, | ||
[146]= | [146]=v, | ||
[147]= | [147]=t, | ||
[148]= | [148]=u, | ||
[149]= | [149]=v, | ||
[150]= | [150]=t, | ||
[151]= | [151]=u, | ||
[152]= | [152]=v, | ||
[153]= | [153]=t, | ||
[154]= | [154]=B, | ||
[155]= | [155]=D, | ||
[156]= | [156]=A, | ||
[157]= | [157]=u, | ||
[158]= | [158]=v, | ||
[159]= | [159]=t, | ||
[160]= | [160]=kb, | ||
[161]= | [161]=jb, | ||
[162]= | [162]=ib, | ||
[163]= | [163]=u, | ||
[164]= | [164]=v, | ||
[165]= | [165]=t, | ||
[166]= | [166]=kb, | ||
[167]= | [167]=jb, | ||
[168]= | [168]=ib, | ||
[169]= | [169]=u, | ||
[170]= | [170]=v, | ||
[171]= | [171]=t, | ||
[172]= | [172]=kb, | ||
[173]= | [173]=jb, | ||
[174]= | [174]=ib, | ||
[175]= | [175]=u, | ||
[176]= | [176]=v, | ||
[177]= | [177]=t, | ||
[178]= | [178]=kb, | ||
[179]= | [179]=jb, | ||
[180]= | [180]=ib, | ||
[181]= | [181]=u, | ||
[182]= | [182]=v, | ||
[183]= | [183]=t, | ||
[184]= | [184]=kb, | ||
[185]= | [185]=jb, | ||
[186]= | [186]=ib, | ||
[187]= | [187]=u, | ||
[188]= | [188]=v, | ||
[189]= | [189]=t, | ||
[190]= | [190]=B, | ||
[191]= | [191]=D, | ||
[192]= | [192]=A, | ||
[193]= | [193]=u, | ||
[194]= | [194]=v, | ||
[195]= | [195]=t, | ||
[196]= | [196]=B, | ||
[197]= | [197]=D, | ||
[198]= | [198]=A, | ||
[199]= | [199]=u, | ||
[200]= | [200]=v, | ||
[201]= | [201]=t, | ||
[202]= | [202]=B, | ||
[203]= | [203]=D, | ||
[204]= | [204]=A, | ||
[205]= | [205]=u, | ||
[206]= | [206]=v, | ||
[207]= | [207]=t, | ||
[208]= | [208]=B, | ||
[209]= | [209]=D, | ||
[210]= | [210]=A, | ||
[211]= | [211]=u, | ||
[212]= | [212]=v, | ||
[213]= | [213]=t, | ||
[214]= | [214]=B, | ||
[215]= | [215]=D, | ||
[216]= | [216]=A, | ||
[217]= | [217]=u, | ||
[218]= | [218]=v, | ||
[219]= | [219]=t, | ||
[220]= | [220]=B, | ||
[221]= | [221]=D, | ||
[222]= | [222]=A, | ||
[223]= | [223]=u, | ||
[224]= | [224]=v, | ||
[225]= | [225]=t, | ||
[226]= | [226]=B, | ||
[227]= | [227]=D, | ||
[228]= | [228]=A, | ||
[229]="clang/test/SemaObjC/Inputs/non-trivial-c-union.h:16:9: note: \'U1_SystemHeader\' has subobjects that are non-trivial to destruct", | [229]="clang/test/SemaObjC/Inputs/non-trivial-c-union.h:16:9: note: \'U1_SystemHeader\' has subobjects that are non-trivial to destruct", | ||
[230]="clang/test/SemaObjC/Inputs/non-trivial-c-union.h:17:15: note: f0 has type \'__strong id\' that is non-trivial to destruct", | [230]="clang/test/SemaObjC/Inputs/non-trivial-c-union.h:17:15: note: f0 has type \'__strong id\' that is non-trivial to destruct", | ||
Line 7,043: | Line 7,055: | ||
}, | }, | ||
["note_non_usual_function_declared_here"]={ | ["note_non_usual_function_declared_here"]={ | ||
[ | [b]={{nil,L,"non-usual %0 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="non\\-usual (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"fa752f23cc20",1521659988,"[Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocati...","[Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.\n\nSummary:\nLibc++\'s default allocator uses `__builtin_operator_new` and `__builtin_operator_delete` in order to allow the calls to new/delete to be ellided. However, libc++ now needs to support over-aligned types in the default allocator. In order to support this without disabling the existing optimization Clang needs to support calling the aligned new overloads from the builtins.\n\nSee llvm.org/PR22634 for more information about the libc++ bug.\n\nThis patch changes `__builtin_operator_new`/`__builtin_operator_delete` to call any usual `operator new`/`operator delete` function. It does this by performing overload resolution with the arguments passed to the builtin to determine which allocation function to call. If the selected function is not a usual allocation function a diagnostic is issued.\n\nOne open issue is if the `align_val_t` overloads should be considered \"usual\" when `LangOpts::AlignedAllocation` is disabled.\n\n\nIn order to allow libc++ to detect this new behavior the value for `__has_builtin(__builtin_operator_new)` has been updated to `201802`.\n\nReviewers: rsmith, majnemer, aaron.ballman, erik.pilkington, bogner, ahatanak\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D43047\n\nllvm-svn: 328134"}, | [h]={"fa752f23cc20",1521659988,"[Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocati...","[Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.\n\nSummary:\nLibc++\'s default allocator uses `__builtin_operator_new` and `__builtin_operator_delete` in order to allow the calls to new/delete to be ellided. However, libc++ now needs to support over-aligned types in the default allocator. In order to support this without disabling the existing optimization Clang needs to support calling the aligned new overloads from the builtins.\n\nSee llvm.org/PR22634 for more information about the libc++ bug.\n\nThis patch changes `__builtin_operator_new`/`__builtin_operator_delete` to call any usual `operator new`/`operator delete` function. It does this by performing overload resolution with the arguments passed to the builtin to determine which allocation function to call. If the selected function is not a usual allocation function a diagnostic is issued.\n\nOne open issue is if the `align_val_t` overloads should be considered \"usual\" when `LangOpts::AlignedAllocation` is disabled.\n\n\nIn order to allow libc++ to detect this new behavior the value for `__has_builtin(__builtin_operator_new)` has been updated to `201802`.\n\nReviewers: rsmith, majnemer, aaron.ballman, erik.pilkington, bogner, ahatanak\n\nReviewed By: rsmith\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D43047\n\nllvm-svn: 328134"}, | ||
[i]={{ | [i]={{Y,3861,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_Success: {\n // ...\n if (!FnDecl->isReplaceableGlobalAllocationFunction()) {\n // ...\n S.Diag(FnDecl->getLocation(), diag::note_non_usual_function_declared_here) << R.getLookupName() << FnDecl->getSourceRange();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaCXX/builtin-operator-new-delete.cpp"]={"clang/test/SemaCXX/builtin-operator-new-delete.cpp:48:7: note: non-usual \'operator new\' declared here","clang/test/SemaCXX/builtin-operator-new-delete.cpp:49:6: note: non-usual \'operator delete\' declared here","clang/test/SemaCXX/builtin-operator-new-delete.cpp:106:7: note: non-usual \'operator new\' declared here","clang/test/SemaCXX/builtin-operator-new-delete.cpp:108:6: note: non-usual \'operator delete\' declared here"} | ["clang/test/SemaCXX/builtin-operator-new-delete.cpp"]={"clang/test/SemaCXX/builtin-operator-new-delete.cpp:48:7: note: non-usual \'operator new\' declared here","clang/test/SemaCXX/builtin-operator-new-delete.cpp:49:6: note: non-usual \'operator delete\' declared here","clang/test/SemaCXX/builtin-operator-new-delete.cpp:106:7: note: non-usual \'operator new\' declared here","clang/test/SemaCXX/builtin-operator-new-delete.cpp:108:6: note: non-usual \'operator delete\' declared here"} | ||
Line 7,055: | Line 7,067: | ||
}, | }, | ||
["note_nontemplate_decl_here"]={ | ["note_nontemplate_decl_here"]={ | ||
[ | [b]="non-templated declaration is here", | ||
[ | [d]=c, | ||
[ | [e]="non\\-templated declaration is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2ec748cd5a66",1242260891,"Implement explicit instantiations of member classes of class templates, e.g.,","Implement explicit instantiations of member classes of class templates, e.g.,\n\n template<typename T>\n struct X {\n struct Inner;\n };\n\n template struct X<int>::Inner;\n\nThis change is larger than it looks because it also fixes some\na problem with nested-name-specifiers and tags. We weren\'t requiring\nthe DeclContext associated with the scope specifier of a tag to be\ncomplete. Therefore, when looking for something like \"struct\nX<int>::Inner\", we weren\'t instantiating X<int>. \n\nThis, naturally, uncovered a problem with member pointers, where we\nwere requiring the left-hand side of a member pointer access\nexpression (e.g., x->*) to be a complete type. However, this is wrong:\nthe semantics of this expression does not require a complete type (EDG\nagrees).\n\nStuart vouched for me. Blame him.\n\nllvm-svn: 71756"}, | [h]={"2ec748cd5a66",1242260891,"Implement explicit instantiations of member classes of class templates, e.g.,","Implement explicit instantiations of member classes of class templates, e.g.,\n\n template<typename T>\n struct X {\n struct Inner;\n };\n\n template struct X<int>::Inner;\n\nThis change is larger than it looks because it also fixes some\na problem with nested-name-specifiers and tags. We weren\'t requiring\nthe DeclContext associated with the scope specifier of a tag to be\ncomplete. Therefore, when looking for something like \"struct\nX<int>::Inner\", we weren\'t instantiating X<int>. \n\nThis, naturally, uncovered a problem with member pointers, where we\nwere requiring the left-hand side of a member pointer access\nexpression (e.g., x->*) to be a complete type. However, this is wrong:\nthe semantics of this expression does not require a complete type (EDG\nagrees).\n\nStuart vouched for me. Blame him.\n\nllvm-svn: 71756"}, | ||
[i]={{ | [i]={{s,10274,"// Explicit instantiation of a member class of a class template.\nDeclResult Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr) {\n // ...\n if (!Pattern) {\n // ...\n Diag(Record->getLocation(), diag::note_nontemplate_decl_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:112:10: note: non-templated declaration is here"} | ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:112:10: note: non-templated declaration is here"} | ||
Line 7,067: | Line 7,079: | ||
}, | }, | ||
["note_nontrivial_default_arg"]={ | ["note_nontrivial_default_arg"]={ | ||
[ | [b]="because it has a default argument", | ||
[ | [d]=c, | ||
[ | [e]="because it has a default argument", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,10079,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n if (MD->getMinRequiredArguments() < MD->getNumParams()) {\n if (Diagnose)\n Diag(MD->getParamDecl(MD->getMinRequiredArguments())->getLocation(), diag::note_nontrivial_default_arg) << MD->getParamDecl(MD->getMinRequiredArguments())->getSourceRange();"}} | [i]={{m,10079,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n if (MD->getMinRequiredArguments() < MD->getNumParams()) {\n if (Diagnose)\n Diag(MD->getParamDecl(MD->getMinRequiredArguments())->getLocation(), diag::note_nontrivial_default_arg) << MD->getParamDecl(MD->getMinRequiredArguments())->getSourceRange();"}} | ||
}, | }, | ||
["note_nontrivial_default_member_init"]={ | ["note_nontrivial_default_member_init"]={ | ||
[ | [b]={{nil,I,"because field %0 has an initializer"}}, | ||
[ | [d]=c, | ||
[ | [e]="because field (.*?) has an initializer", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{m,9970,"/// Check whether the members of a class type allow a special member to be\n/// trivial.\nstatic bool checkTrivialClassMembers(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM, bool ConstArg, Sema::TrivialABIHandling TAH, bool Diagnose) {\n for (const auto *FI : RD->fields()) {\n // ...\n // C++11 [class.ctor]p5:\n // A default constructor is trivial if [...]\n // -- no non-static data member of its class has a\n // brace-or-equal-initializer\n if (CSM == Sema::CXXDefaultConstructor && FI->hasInClassInitializer()) {\n if (Diagnose)\n S.Diag(FI->getLocation(), diag::note_nontrivial_default_member_init) << FI;"}} | [i]={{m,9970,"/// Check whether the members of a class type allow a special member to be\n/// trivial.\nstatic bool checkTrivialClassMembers(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM, bool ConstArg, Sema::TrivialABIHandling TAH, bool Diagnose) {\n for (const auto *FI : RD->fields()) {\n // ...\n // C++11 [class.ctor]p5:\n // A default constructor is trivial if [...]\n // -- no non-static data member of its class has a\n // brace-or-equal-initializer\n if (CSM == Sema::CXXDefaultConstructor && FI->hasInClassInitializer()) {\n if (Diagnose)\n S.Diag(FI->getLocation(), diag::note_nontrivial_default_member_init) << FI;"}} | ||
}, | }, | ||
["note_nontrivial_field"]={ | ["note_nontrivial_field"]={ | ||
[ | [b]={{nil,L,"field is non-trivial to %select{copy|default-initialize}0"}}, | ||
[ | [d]=c, | ||
[ | [e]="field is non\\-trivial to (?:copy|default\\-initialize)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"2be0441e770d",1523992421,"[Sema] Warn about memcpy\'ing non-trivial C structs.","[Sema] Warn about memcpy\'ing non-trivial C structs.\n\nIssue a warning when non-trivial C structs are copied or initialized by\ncalls to memset, bzero, memcpy, or memmove.\n\nrdar://problem/36124208\n\nDifferential Revision: https://reviews.llvm.org/D45310\n\nllvm-svn: 330202"}, | [h]={"2be0441e770d",1523992421,"[Sema] Warn about memcpy\'ing non-trivial C structs.","[Sema] Warn about memcpy\'ing non-trivial C structs.\n\nIssue a warning when non-trivial C structs are copied or initialized by\ncalls to memset, bzero, memcpy, or memmove.\n\nrdar://problem/36124208\n\nDifferential Revision: https://reviews.llvm.org/D45310\n\nllvm-svn: 330202"}, | ||
[i]={{ | [i]={{C,12257,"struct SearchNonTrivialToInitializeField : DefaultInitializedTypeVisitor<SearchNonTrivialToInitializeField> {\n // ...\n void visitARCStrong(QualType FT, SourceLocation SL) { S.DiagRuntimeBehavior(SL, E, S.PDiag(diag::note_nontrivial_field) << 1); }"},{C,12260,"struct SearchNonTrivialToInitializeField : DefaultInitializedTypeVisitor<SearchNonTrivialToInitializeField> {\n // ...\n void visitARCWeak(QualType FT, SourceLocation SL) { S.DiagRuntimeBehavior(SL, E, S.PDiag(diag::note_nontrivial_field) << 1); }"},{C,12299,"struct SearchNonTrivialToCopyField : CopiedTypeVisitor<SearchNonTrivialToCopyField, false> {\n // ...\n void visitARCStrong(QualType FT, SourceLocation SL) { S.DiagRuntimeBehavior(SL, E, S.PDiag(diag::note_nontrivial_field) << 0); }"},{C,12302,"struct SearchNonTrivialToCopyField : CopiedTypeVisitor<SearchNonTrivialToCopyField, false> {\n // ...\n void visitARCWeak(QualType FT, SourceLocation SL) { S.DiagRuntimeBehavior(SL, E, S.PDiag(diag::note_nontrivial_field) << 0); }"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m"]={"clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to copy"} | ["clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m"]={"clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to default-initialize","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:21:6: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:15:13: note: field is non-trivial to copy","clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m:17:6: note: field is non-trivial to copy"} | ||
Line 7,097: | Line 7,109: | ||
}, | }, | ||
["note_nontrivial_has_virtual"]={ | ["note_nontrivial_has_virtual"]={ | ||
[ | [b]="because type %0 has a virtual %select{member function|base class}1", | ||
[ | [d]=c, | ||
[ | [e]="because type (.*?) has a virtual (?:member function|base class)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"8a27391190de",1248287124,"\"This patch implements the restrictions on union members detailed in","\"This patch implements the restrictions on union members detailed in\n[class.union]p1\", from John McCall!\n\nllvm-svn: 76766"}, | [h]={"8a27391190de",1248287124,"\"This patch implements the restrictions on union members detailed in","\"This patch implements the restrictions on union members detailed in\n[class.union]p1\", from John McCall!\n\nllvm-svn: 76766"}, | ||
[i]={{m,10139,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n // C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25:\n // A [special member] for class X is trivial if [...]\n // -- class X has no virtual functions and no virtual base classes\n if (CSM != CXXDestructor && MD->getParent()->isDynamicClass()) {\n // ...\n if (RD->getNumVBases()) {\n // ...\n Diag(BS.getBeginLoc(), diag::note_nontrivial_has_virtual) << RD << 1;"},{m,10147,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n // C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25:\n // A [special member] for class X is trivial if [...]\n // -- class X has no virtual functions and no virtual base classes\n if (CSM != CXXDestructor && MD->getParent()->isDynamicClass()) {\n // ...\n // Must have a virtual method.\n for (const auto *MI : RD->methods()) {\n if (MI->isVirtual()) {\n // ...\n Diag(MLoc, diag::note_nontrivial_has_virtual) << RD << 0;"}}, | [i]={{m,10139,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n // C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25:\n // A [special member] for class X is trivial if [...]\n // -- class X has no virtual functions and no virtual base classes\n if (CSM != CXXDestructor && MD->getParent()->isDynamicClass()) {\n // ...\n if (RD->getNumVBases()) {\n // ...\n Diag(BS.getBeginLoc(), diag::note_nontrivial_has_virtual) << RD << 1;"},{m,10147,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n // C++11 [class.ctor]p5, C++11 [class.copy]p12, C++11 [class.copy]p25:\n // A [special member] for class X is trivial if [...]\n // -- class X has no virtual functions and no virtual base classes\n if (CSM != CXXDestructor && MD->getParent()->isDynamicClass()) {\n // ...\n // Must have a virtual method.\n for (const auto *MI : RD->methods()) {\n if (MI->isVirtual()) {\n // ...\n Diag(MLoc, diag::note_nontrivial_has_virtual) << RD << 0;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ec]={"clang/test/CXX/class/class.union/p1.cpp:10:3: note: because type \'Virtual\' has a virtual member function","clang/test/CXX/class/class.union/p1.cpp:13:21: note: because type \'VirtualBase\' has a virtual base class","clang/test/CXX/class/class.union/p1.cpp:10:3: note: because type \'Virtual\' has a virtual member function","clang/test/CXX/class/class.union/p1.cpp:13:21: note: because type \'VirtualBase\' has a virtual base class","clang/test/CXX/class/class.union/p1.cpp:10:3: note: because type \'Virtual\' has a virtual member function","clang/test/CXX/class/class.union/p1.cpp:13:21: note: because type \'VirtualBase\' has a virtual base class","clang/test/CXX/class/class.union/p1.cpp:10:3: note: because type \'Virtual\' has a virtual member function","clang/test/CXX/class/class.union/p1.cpp:13:21: note: because type \'VirtualBase\' has a virtual base class"} | ||
} | } | ||
}, | }, | ||
["note_nontrivial_no_copy"]={ | ["note_nontrivial_no_copy"]={ | ||
[ | [b]="because no %select{<<ERROR>>|constructor|constructor|assignment operator|assignment operator|<<ERROR>>}2 can be used to %select{<<ERROR>>|copy|move|copy|move|<<ERROR>>}2 %select{base class|field|an object}0 of type %3", | ||
[ | [d]=c, | ||
[ | [e]="because no (?:constructor|constructor|assignment operator|assignment operator) can be used to (?:copy|move|copy|move) (?:base class|field|an object) of type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,9918,"/// 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 } else if (!Selected)\n S.Diag(SubobjLoc, diag::note_nontrivial_no_copy) << Kind << SubType.getUnqualifiedType() << CSM << SubType;"}}, | [i]={{m,9918,"/// 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 } else if (!Selected)\n S.Diag(SubobjLoc, diag::note_nontrivial_no_copy) << Kind << SubType.getUnqualifiedType() << CSM << SubType;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ec]={"clang/test/CXX/class/class.union/p1.cpp:26:7: note: because no constructor can be used to copy an object of type \'const CopyCtor\'","clang/test/CXX/class/class.union/p1.cpp:30:7: note: because no assignment operator can be used to copy an object of type \'const CopyAssign\'","clang/test/CXX/class/class.union/p1.cpp:63:3: note: because no constructor can be used to copy an object of type \'const U2::(unnamed struct at clang/test/CXX/class/class.union/p1.cpp:63:3)\'","clang/test/CXX/class/class.union/p1.cpp:66:3: note: because no assignment operator can be used to copy an object of type \'const U2::(unnamed struct at clang/test/CXX/class/class.union/p1.cpp:66:3)\'","clang/test/CXX/class/class.union/p1.cpp:86:10: note: because no constructor can be used to copy an object of type \'const U3::s4\'","clang/test/CXX/class/class.union/p1.cpp:88:10: note: because no assignment operator can be used to copy an object of type \'const U3::s5\'","clang/test/CXX/class/class.union/p1.cpp:26:7: note: because no constructor can be used to copy an object of type \'const CopyCtor\'","clang/test/CXX/class/class.union/p1.cpp:30:7: note: because no assignment operator can be used to copy an object of type \'const CopyAssign\'"} | ||
} | } | ||
}, | }, | ||
["note_nontrivial_no_def_ctor"]={ | ["note_nontrivial_no_def_ctor"]={ | ||
[ | [b]="because %select{base class of |field of |}0type %1 has no default constructor", | ||
[ | [d]=c, | ||
[ | [e]="because (?:base class of |field of |)type (.*?) has no default constructor", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,9913,"/// 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 S.Diag(SubobjLoc, diag::note_nontrivial_no_def_ctor) << Kind << SubType.getUnqualifiedType();"}}, | [i]={{m,9913,"/// 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 S.Diag(SubobjLoc, diag::note_nontrivial_no_def_ctor) << Kind << SubType.getUnqualifiedType();"}}, | ||
[j]={ | [j]={ | ||
[ | [Ec]={"clang/test/CXX/class/class.union/p1.cpp:22:7: note: because type \'CtorTmpl\' has no default constructor"} | ||
} | } | ||
}, | }, | ||
["note_nontrivial_objc_ownership"]={ | ["note_nontrivial_objc_ownership"]={ | ||
[ | [b]="because type %0 has a member with %select{no|no|__strong|__weak|__autoreleasing}1 ownership", | ||
[ | [d]=c, | ||
[ | [e]="because type (.*?) has a member with (?:no|no|__strong|__weak|__autoreleasing) ownership", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"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"}, | [h]={"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"}, | ||
[i]={{m,9981,"/// Check whether the members of a class type allow a special member to be\n/// trivial.\nstatic bool checkTrivialClassMembers(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM, bool ConstArg, Sema::TrivialABIHandling TAH, bool Diagnose) {\n for (const auto *FI : RD->fields()) {\n // ...\n // Objective C ARC 4.3.5:\n // [...] nontrivally ownership-qualified types are [...] not trivially\n // default constructible, copy constructible, move constructible, copy\n // assignable, move assignable, or destructible [...]\n if (FieldType.hasNonTrivialObjCLifetime()) {\n if (Diagnose)\n S.Diag(FI->getLocation(), diag::note_nontrivial_objc_ownership) << RD << FieldType.getObjCLifetime();"}}, | [i]={{m,9981,"/// Check whether the members of a class type allow a special member to be\n/// trivial.\nstatic bool checkTrivialClassMembers(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM, bool ConstArg, Sema::TrivialABIHandling TAH, bool Diagnose) {\n for (const auto *FI : RD->fields()) {\n // ...\n // Objective C ARC 4.3.5:\n // [...] nontrivally ownership-qualified types are [...] not trivially\n // default constructible, copy constructible, move constructible, copy\n // assignable, move assignable, or destructible [...]\n if (FieldType.hasNonTrivialObjCLifetime()) {\n if (Diagnose)\n S.Diag(FI->getLocation(), diag::note_nontrivial_objc_ownership) << RD << FieldType.getObjCLifetime();"}}, | ||
Line 7,145: | Line 7,157: | ||
}, | }, | ||
["note_nontrivial_param_type"]={ | ["note_nontrivial_param_type"]={ | ||
[ | [b]="because its parameter is %diff{of type $, not $|of the wrong type}2,3", | ||
[ | [d]=c, | ||
[ | [e]="because its parameter is (?:of type (.*?), not (.*?)|of the wrong type)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,10045,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n case CXXCopyConstructor:\n case CXXCopyAssignment: {\n // ...\n if (!RT || ((RT->getPointeeType().getCVRQualifiers() != Qualifiers::Const) && ClangABICompat14)) {\n if (Diagnose)\n Diag(Param0->getLocation(), diag::note_nontrivial_param_type) << Param0->getSourceRange() << Param0->getType() << Context.getLValueReferenceType(Context.getRecordType(RD).withConst());"},{m,10064,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n case CXXMoveConstructor:\n case CXXMoveAssignment: {\n // ...\n if (!RT || RT->getPointeeType().getCVRQualifiers()) {\n if (Diagnose)\n Diag(Param0->getLocation(), diag::note_nontrivial_param_type) << Param0->getSourceRange() << Param0->getType() << Context.getRValueReferenceType(Context.getRecordType(RD));"}} | [i]={{m,10045,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n case CXXCopyConstructor:\n case CXXCopyAssignment: {\n // ...\n if (!RT || ((RT->getPointeeType().getCVRQualifiers() != Qualifiers::Const) && ClangABICompat14)) {\n if (Diagnose)\n Diag(Param0->getLocation(), diag::note_nontrivial_param_type) << Param0->getSourceRange() << Param0->getType() << Context.getLValueReferenceType(Context.getRecordType(RD).withConst());"},{m,10064,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n case CXXMoveConstructor:\n case CXXMoveAssignment: {\n // ...\n if (!RT || RT->getPointeeType().getCVRQualifiers()) {\n if (Diagnose)\n Diag(Param0->getLocation(), diag::note_nontrivial_param_type) << Param0->getSourceRange() << Param0->getType() << Context.getRValueReferenceType(Context.getRecordType(RD));"}} | ||
}, | }, | ||
["note_nontrivial_subobject"]={ | ["note_nontrivial_subobject"]={ | ||
[ | [b]="because the function selected to %select{construct|copy|move|copy|move|destroy}2 %select{base class|field}0 of type %1 is not trivial", | ||
[ | [d]=c, | ||
[ | [e]="because the function selected to (?:construct|copy|move|copy|move|destroy) (?:base class|field) of type (.*?) is not trivial", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,9931,"/// 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 } else if (!Selected)\n // ...\n else if (Selected->isUserProvided()) {\n // ...\n } else {\n if (Kind != TSK_CompleteObject)\n S.Diag(SubobjLoc, diag::note_nontrivial_subobject) << Kind << SubType.getUnqualifiedType() << CSM;"}}, | [i]={{m,9931,"/// 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 } else if (!Selected)\n // ...\n else if (Selected->isUserProvided()) {\n // ...\n } else {\n if (Kind != TSK_CompleteObject)\n S.Diag(SubobjLoc, diag::note_nontrivial_subobject) << Kind << SubType.getUnqualifiedType() << CSM;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ec]={"clang/test/CXX/class/class.union/p1.cpp:52:13: note: because the function selected to copy field of type \'Virtual\' is not trivial","clang/test/CXX/class/class.union/p1.cpp:55:17: note: because the function selected to copy field of type \'VirtualBase\' is not trivial","clang/test/CXX/class/class.union/p1.cpp:78:15: note: because the function selected to copy base class of type \'Virtual\' is not trivial","clang/test/CXX/class/class.union/p1.cpp:80:15: note: because the function selected to copy base class of type \'VirtualBase\' is not trivial"} | ||
} | } | ||
}, | }, | ||
["note_nontrivial_user_provided"]={ | ["note_nontrivial_user_provided"]={ | ||
[ | [b]="because %select{base class of |field of |}0type %1 has a user-provided %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}2", | ||
[ | [d]=c, | ||
[ | [e]="because (?:base class of |field of |)type (.*?) has a user\\-provided (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,9922,"/// 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 } else if (!Selected)\n // ...\n else if (Selected->isUserProvided()) {\n if (Kind == TSK_CompleteObject)\n S.Diag(Selected->getLocation(), diag::note_nontrivial_user_provided) << Kind << SubType.getUnqualifiedType() << CSM;"},{m,9925,"/// 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 } else if (!Selected)\n // ...\n else if (Selected->isUserProvided()) {\n if (Kind == TSK_CompleteObject)\n // ...\n else {\n S.Diag(SubobjLoc, diag::note_nontrivial_user_provided) << Kind << SubType.getUnqualifiedType() << CSM;"}}, | [i]={{m,9922,"/// 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 } else if (!Selected)\n // ...\n else if (Selected->isUserProvided()) {\n if (Kind == TSK_CompleteObject)\n S.Diag(Selected->getLocation(), diag::note_nontrivial_user_provided) << Kind << SubType.getUnqualifiedType() << CSM;"},{m,9925,"/// 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 } else if (!Selected)\n // ...\n else if (Selected->isUserProvided()) {\n if (Kind == TSK_CompleteObject)\n // ...\n else {\n S.Diag(SubobjLoc, diag::note_nontrivial_user_provided) << Kind << SubType.getUnqualifiedType() << CSM;"}}, | ||
[j]={ | [j]={ | ||
[ | [Ec]={"clang/test/CXX/class/class.union/p1.cpp:17:3: note: because type \'Ctor\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:20:3: note: because type \'Ctor2\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:35:3: note: because type \'Dtor\' has a user-provided destructor","clang/test/CXX/class/class.union/p1.cpp:58:10: note: because field of type \'Ctor\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:61:11: note: because field of type \'Ctor2\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:70:10: note: because field of type \'Dtor\' has a user-provided destructor","clang/test/CXX/class/class.union/p1.cpp:82:15: note: because base class of type \'Ctor\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:84:16: note: because base class of type \'Ctor2\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:90:15: note: because base class of type \'Dtor\' has a user-provided destructor","clang/test/CXX/class/class.union/p1.cpp:17:3: note: because type \'Ctor\' has a user-provided default constructor","clang/test/CXX/class/class.union/p1.cpp:35:3: note: because type \'Dtor\' has a user-provided destructor"} | ||
} | } | ||
}, | }, | ||
["note_nontrivial_variadic"]={ | ["note_nontrivial_variadic"]={ | ||
[ | [b]="because it is a variadic function", | ||
[ | [d]=c, | ||
[ | [e]="because it is a variadic function", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,10085,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n if (MD->isVariadic()) {\n if (Diagnose)\n Diag(MD->getLocation(), diag::note_nontrivial_variadic);"}}, | [i]={{m,10085,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n if (MD->isVariadic()) {\n if (Diagnose)\n Diag(MD->getLocation(), diag::note_nontrivial_variadic);"}}, | ||
[j]={ | [j]={ | ||
[ | [Ec]={"clang/test/CXX/class/class.union/p1.cpp:95:5: note: because it is a variadic function"} | ||
} | } | ||
}, | }, | ||
["note_nontrivial_virtual_dtor"]={ | ["note_nontrivial_virtual_dtor"]={ | ||
[ | [b]="destructor for %0 is not trivial because it is virtual", | ||
[ | [d]=c, | ||
[ | [e]="destructor for (.*?) is not trivial because it is virtual", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Tb,1354935182,Sb,Xb}, | ||
[i]={{m,10123,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n // C++11 [class.dtor]p5:\n // A destructor is trivial if [...]\n // -- the destructor is not virtual\n if (CSM == CXXDestructor && MD->isVirtual()) {\n if (Diagnose)\n Diag(MD->getLocation(), diag::note_nontrivial_virtual_dtor) << RD;"}}, | [i]={{m,10123,"/// Determine whether a defaulted or deleted special member function is trivial,\n/// as specified in C++11 [class.ctor]p5, C++11 [class.copy]p12,\n/// C++11 [class.copy]p25, and C++11 [class.dtor]p5.\nbool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH, bool Diagnose) {\n // ...\n // C++11 [class.dtor]p5:\n // A destructor is trivial if [...]\n // -- the destructor is not virtual\n if (CSM == CXXDestructor && MD->isVirtual()) {\n if (Diagnose)\n Diag(MD->getLocation(), diag::note_nontrivial_virtual_dtor) << RD;"}}, | ||
[j]={ | [j]={ | ||
[ | [Rc]={"clang/test/CXX/basic/basic.types/p10.cpp:46:11: note: destructor for \'NonTrivDtor\' is not trivial because it is virtual"} | ||
} | } | ||
}, | }, | ||
["note_not_found_by_two_phase_lookup"]={ | ["note_not_found_by_two_phase_lookup"]={ | ||
[ | [b]="%0 should be declared prior to the call site%select{| or in %2| or in an associated namespace of one of its arguments}1", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) should be declared prior to the call site(?:| or in (.*?)| or in an associated namespace of one of its arguments)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"998a591e3261",1307313768,"Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept...","Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup.\n\nllvm-svn: 132672"}, | [h]={"998a591e3261",1307313768,"Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept...","Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup.\n\nllvm-svn: 132672"}, | ||
[i]={{ | [i]={{fb,13207,"/// Attempt to recover from an ill-formed use of a non-dependent name in a\n/// template, where the non-dependent name was declared after the template\n/// was defined. This is common in code written for a compilers which do not\n/// correctly implement two-stage name lookup.\n///\n/// Returns true if a viable candidate was found and a diagnostic was issued.\nstatic bool DiagnoseTwoPhaseLookup(Sema &SemaRef, SourceLocation FnLoc, const CXXScopeSpec &SS, LookupResult &R, OverloadCandidateSet::CandidateSetKind CSK, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, CXXRecordDecl **FoundInClass = nullptr) {\n // ...\n for (DeclContext *DC = SemaRef.CurContext; DC; DC = DC->getParent()) {\n // ...\n if (!R.empty()) {\n // ...\n if (SuggestedNamespaces.empty()) {\n SemaRef.Diag(Best->Function->getLocation(), diag::note_not_found_by_two_phase_lookup) << R.getLookupName() << 0;"},{fb,13211,"/// Attempt to recover from an ill-formed use of a non-dependent name in a\n/// template, where the non-dependent name was declared after the template\n/// was defined. This is common in code written for a compilers which do not\n/// correctly implement two-stage name lookup.\n///\n/// Returns true if a viable candidate was found and a diagnostic was issued.\nstatic bool DiagnoseTwoPhaseLookup(Sema &SemaRef, SourceLocation FnLoc, const CXXScopeSpec &SS, LookupResult &R, OverloadCandidateSet::CandidateSetKind CSK, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, CXXRecordDecl **FoundInClass = nullptr) {\n // ...\n for (DeclContext *DC = SemaRef.CurContext; DC; DC = DC->getParent()) {\n // ...\n if (!R.empty()) {\n // ...\n if (SuggestedNamespaces.empty()) {\n // ...\n } else if (SuggestedNamespaces.size() == 1) {\n SemaRef.Diag(Best->Function->getLocation(), diag::note_not_found_by_two_phase_lookup) << R.getLookupName() << 1 << *SuggestedNamespaces.begin();"},{fb,13218,"/// Attempt to recover from an ill-formed use of a non-dependent name in a\n/// template, where the non-dependent name was declared after the template\n/// was defined. This is common in code written for a compilers which do not\n/// correctly implement two-stage name lookup.\n///\n/// Returns true if a viable candidate was found and a diagnostic was issued.\nstatic bool DiagnoseTwoPhaseLookup(Sema &SemaRef, SourceLocation FnLoc, const CXXScopeSpec &SS, LookupResult &R, OverloadCandidateSet::CandidateSetKind CSK, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args, CXXRecordDecl **FoundInClass = nullptr) {\n // ...\n for (DeclContext *DC = SemaRef.CurContext; DC; DC = DC->getParent()) {\n // ...\n if (!R.empty()) {\n // ...\n if (SuggestedNamespaces.empty()) {\n // ...\n } else if (SuggestedNamespaces.size() == 1) {\n // ...\n } else {\n // ...\n SemaRef.Diag(Best->Function->getLocation(), diag::note_not_found_by_two_phase_lookup) << R.getLookupName() << 2;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaTemplate/dependent-names-no-std.cpp"]={"clang/test/SemaTemplate/dependent-names-no-std.cpp:18:8: note: \'f\' should be declared prior to the call site or in namespace \'PR10053::ns\'"} | ["clang/test/SemaTemplate/dependent-names-no-std.cpp"]={"clang/test/SemaTemplate/dependent-names-no-std.cpp:18:8: note: \'f\' should be declared prior to the call site or in namespace \'PR10053::ns\'"} | ||
Line 7,214: | Line 7,226: | ||
}, | }, | ||
["note_not_module_interface_add_export"]={ | ["note_not_module_interface_add_export"]={ | ||
[ | [b]={{nil,r,"add \'export\' here if this is intended to be a module interface unit"}}, | ||
[ | [d]=c, | ||
[ | [e]="add \'export\' here if this is intended to be a module interface unit", | ||
[ | [f]=a, | ||
[ | [g]=Vc, | ||
[h]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | [h]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | ||
[i]={{ | [i]={{xb,448,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleImplementationUnit:\n // ...\n Diag(ModuleScopes.back().BeginLoc, diag::note_not_module_interface_add_export) << FixItHint::CreateInsertion(ModuleScopes.back().BeginLoc, \"export \");"},{xb,772,"/// 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 Diag(ModuleScopes.back().BeginLoc, diag::note_not_module_interface_add_export) << FixItHint::CreateInsertion(ModuleScopes.back().BeginLoc, \"export \");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/basic/basic.link/p2.cpp"]={"clang/test/CXX/basic/basic.link/p2.cpp:11:1: note: add \'export\' here if this is intended to be a module interface unit"} | ["clang/test/CXX/basic/basic.link/p2.cpp"]={"clang/test/CXX/basic/basic.link/p2.cpp:11:1: note: add \'export\' here if this is intended to be a module interface unit"} | ||
Line 7,226: | Line 7,238: | ||
}, | }, | ||
["note_not_structural_mutable_field"]={ | ["note_not_structural_mutable_field"]={ | ||
[ | [b]={{nil,I,"%0 is not a structural type because it has a mutable non-static data member"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not a structural type because it has a mutable non\\-static data member", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{s,1370,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Drill down into the reason why the class is non-structural.\n while (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) {\n // All members are required to be public and non-mutable, and can\'t be of\n // rvalue reference type. Check these conditions first to prefer a \"local\"\n // reason over a more distant one.\n for (const FieldDecl *FD : RD->fields()) {\n // ...\n if (FD->isMutable()) {\n Diag(FD->getLocation(), diag::note_not_structural_mutable_field) << T;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:120:15: note: \'MutableField\' is not a structural type because it has a mutable non-static data member"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:120:15: note: \'MutableField\' is not a structural type because it has a mutable non-static data member"} | ||
Line 7,238: | Line 7,250: | ||
}, | }, | ||
["note_not_structural_non_public"]={ | ["note_not_structural_non_public"]={ | ||
[ | [b]={{nil,I,"%0 is not a structural type because it has a %select{non-static data member|base class}1 that is not public"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not a structural type because it has a (?:non\\-static data member|base class) that is not public", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{s,1366,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Drill down into the reason why the class is non-structural.\n while (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) {\n // All members are required to be public and non-mutable, and can\'t be of\n // rvalue reference type. Check these conditions first to prefer a \"local\"\n // reason over a more distant one.\n for (const FieldDecl *FD : RD->fields()) {\n if (FD->getAccess() != AS_public) {\n Diag(FD->getLocation(), diag::note_not_structural_non_public) << T << 0;"},{s,1383,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Drill down into the reason why the class is non-structural.\n while (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) {\n // ...\n // All bases are required to be public.\n for (const auto &BaseSpec : RD->bases()) {\n if (BaseSpec.getAccessSpecifier() != AS_public) {\n Diag(BaseSpec.getBaseTypeLoc(), diag::note_not_structural_non_public) << T << 1;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:91:15: note: \'ProtectedBase\' is not a structural type because it has a base class that is not public","clang/test/CXX/temp/temp.param/p7.cpp:95:13: note: \'PrivateBase\' is not a structural type because it has a base class that is not public","clang/test/CXX/temp/temp.param/p7.cpp:99:5: note: \'Private2Base\' is not a structural type because it has a base class that is not public","clang/test/CXX/temp/temp.param/p7.cpp:104:5: note: \'ProtectedField\' is not a structural type because it has a non-static data member that is not public","clang/test/CXX/temp/temp.param/p7.cpp:110:5: note: \'PrivateField\' is not a structural type because it has a non-static data member that is not public","clang/test/CXX/temp/temp.param/p7.cpp:115:5: note: \'Private2Field\' is not a structural type because it has a non-static data member that is not public"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:91:15: note: \'ProtectedBase\' is not a structural type because it has a base class that is not public","clang/test/CXX/temp/temp.param/p7.cpp:95:13: note: \'PrivateBase\' is not a structural type because it has a base class that is not public","clang/test/CXX/temp/temp.param/p7.cpp:99:5: note: \'Private2Base\' is not a structural type because it has a base class that is not public","clang/test/CXX/temp/temp.param/p7.cpp:104:5: note: \'ProtectedField\' is not a structural type because it has a non-static data member that is not public","clang/test/CXX/temp/temp.param/p7.cpp:110:5: note: \'PrivateField\' is not a structural type because it has a non-static data member that is not public","clang/test/CXX/temp/temp.param/p7.cpp:115:5: note: \'Private2Field\' is not a structural type because it has a non-static data member that is not public"} | ||
Line 7,250: | Line 7,262: | ||
}, | }, | ||
["note_not_structural_rvalue_ref_field"]={ | ["note_not_structural_rvalue_ref_field"]={ | ||
[ | [b]={{nil,I,"%0 is not a structural type because it has a non-static data member of rvalue reference type"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not a structural type because it has a non\\-static data member of rvalue reference type", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{s,1374,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Drill down into the reason why the class is non-structural.\n while (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) {\n // All members are required to be public and non-mutable, and can\'t be of\n // rvalue reference type. Check these conditions first to prefer a \"local\"\n // reason over a more distant one.\n for (const FieldDecl *FD : RD->fields()) {\n // ...\n if (FD->getType()->isRValueReferenceType()) {\n Diag(FD->getLocation(), diag::note_not_structural_rvalue_ref_field) << T;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type","clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type","clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type","clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type","clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type","clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type","clang/test/CXX/temp/temp.param/p7.cpp:48:9: note: \'RRef\' is not a structural type because it has a non-static data member of rvalue reference type"} | ||
Line 7,262: | Line 7,274: | ||
}, | }, | ||
["note_not_structural_subobject"]={ | ["note_not_structural_subobject"]={ | ||
[ | [b]={{nil,I,"%0 is not a structural type because it has a %select{non-static data member|base class}1 of non-structural type %2"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is not a structural type because it has a (?:non\\-static data member|base class) of non\\-structural type (.*?)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={mb,1582847864,nb,Cb}, | ||
[i]={{ | [i]={{s,1417,"/// Require the given type to be a structural type, and diagnose if it is not.\n///\n/// \\return \\c true if an error was produced.\nbool Sema::RequireStructuralType(QualType T, SourceLocation Loc) {\n // ...\n // Drill down into the reason why the class is non-structural.\n while (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) {\n // ...\n Diag(SubLoc, diag::note_not_structural_subobject) << T << Kind << SubType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:77:5: note: \'BadBase\' is not a structural type because it has a base class of non-structural type \'RRef\'","clang/test/CXX/temp/temp.param/p7.cpp:81:8: note: \'BadField\' is not a structural type because it has a non-static data member of non-structural type \'RRef\'","clang/test/CXX/temp/temp.param/p7.cpp:86:8: note: \'BadFieldArray\' is not a structural type because it has a non-static data member of non-structural type \'RRef\'","clang/test/CXX/temp/temp.param/p7.cpp:124:44: note: \'BadExtType<_Atomic(float)>\' is not a structural type because it has a non-static data member of non-structural type \'_Atomic(float)\'","clang/test/CXX/temp/temp.param/p7.cpp:124:44: note: \'BadExtType<_Atomic(int)>\' is not a structural type because it has a non-static data member of non-structural type \'_Atomic(int)\'"} | ["clang/test/CXX/temp/temp.param/p7.cpp"]={"clang/test/CXX/temp/temp.param/p7.cpp:77:5: note: \'BadBase\' is not a structural type because it has a base class of non-structural type \'RRef\'","clang/test/CXX/temp/temp.param/p7.cpp:81:8: note: \'BadField\' is not a structural type because it has a non-static data member of non-structural type \'RRef\'","clang/test/CXX/temp/temp.param/p7.cpp:86:8: note: \'BadFieldArray\' is not a structural type because it has a non-static data member of non-structural type \'RRef\'","clang/test/CXX/temp/temp.param/p7.cpp:124:44: note: \'BadExtType<_Atomic(float)>\' is not a structural type because it has a non-static data member of non-structural type \'_Atomic(float)\'","clang/test/CXX/temp/temp.param/p7.cpp:124:44: note: \'BadExtType<_Atomic(int)>\' is not a structural type because it has a non-static data member of non-structural type \'_Atomic(int)\'"} | ||
Line 7,274: | Line 7,286: | ||
}, | }, | ||
["note_nsdictionary_duplicate_key_here"]={ | ["note_nsdictionary_duplicate_key_here"]={ | ||
[ | [b]={{nil,K,"previous equal key is here"}}, | ||
[ | [d]=c, | ||
[ | [e]="previous equal key is here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={ | [h]={Dc,1576908663,Uc,Gc}, | ||
[i]={{ | [i]={{p,923,"/// Check for duplicate keys in an ObjC dictionary literal. For instance:\n/// NSDictionary *nd = @{ @\"foo\" : @\"bar\", @\"foo\" : @\"baz\" };\nstatic void CheckObjCDictionaryLiteralDuplicateKeys(Sema &S, ObjCDictionaryLiteral *Literal) {\n // ...\n auto checkOneKey = [&](auto &Map, const auto &Key, SourceLocation Loc) {\n // ...\n if (!Pair.second) {\n // ...\n S.Diag(Pair.first->second, diag::note_nsdictionary_duplicate_key_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/dictionary-literal-duplicates.m"]={"clang/test/SemaObjC/dictionary-literal-duplicates.m:28:5: note: previous equal key is here","clang/test/SemaObjC/dictionary-literal-duplicates.m:28:5: note: previous equal key is here", | ["clang/test/SemaObjC/dictionary-literal-duplicates.m"]={"clang/test/SemaObjC/dictionary-literal-duplicates.m:28:5: note: previous equal key is here","clang/test/SemaObjC/dictionary-literal-duplicates.m:28:5: note: previous equal key is here",bd,bd,bd,bd,bd,bd,"clang/test/SemaObjC/dictionary-literal-duplicates.m:44:5: note: previous equal key is here","clang/test/SemaObjC/dictionary-literal-duplicates.m:44:5: note: previous equal key is here","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: note: previous equal key is here","clang/test/SemaObjC/dictionary-literal-duplicates.m:55:5: note: previous equal key is here"} | ||
} | } | ||
}, | }, | ||
["note_nullability_fix_it"]={ | ["note_nullability_fix_it"]={ | ||
[ | [b]="insert \'%select{_Nonnull|_Nullable|_Null_unspecified}0\' if the %select{pointer|block pointer|member pointer|array parameter}1 %select{should never be null|may be null|should not declare nullability}0", | ||
[ | [d]=c, | ||
[ | [e]="insert \'(?:_Nonnull|_Nullable|_Null_unspecified)\' if the (?:pointer|block pointer|member pointer|array parameter) (?:should never be null|may be null|should not declare nullability)", | ||
[ | [f]=a, | ||
[ | [g]="Nullability Issue", | ||
[h]={"06dd406e27b4",1482181100,"Add fix-it notes to the nullability consistency warning.","Add fix-it notes to the nullability consistency warning.\n\nThis is especially important for arrays, since no one knows the proper\nsyntax for putting qualifiers in arrays.\n\n nullability.h:3:26: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)\n void arrayParameter(int x[]);\n ^\n nullability.h:3:26: note: insert \'_Nullable\' if the array parameter may be null\n void arrayParameter(int x[]);\n ^\n _Nullable\n nullability.h:3:26: note: insert \'_Nonnull\' if the array parameter should never be null\n void arrayParameter(int x[]);\n ^\n _Nonnull\n\nrdar://problem/29524992\n\nllvm-svn: 290132"}, | [h]={"06dd406e27b4",1482181100,"Add fix-it notes to the nullability consistency warning.","Add fix-it notes to the nullability consistency warning.\n\nThis is especially important for arrays, since no one knows the proper\nsyntax for putting qualifiers in arrays.\n\n nullability.h:3:26: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)\n void arrayParameter(int x[]);\n ^\n nullability.h:3:26: note: insert \'_Nullable\' if the array parameter may be null\n void arrayParameter(int x[]);\n ^\n _Nullable\n nullability.h:3:26: note: insert \'_Nonnull\' if the array parameter should never be null\n void arrayParameter(int x[]);\n ^\n _Nonnull\n\nrdar://problem/29524992\n\nllvm-svn: 290132"}, | ||
[i]={{ | [i]={{H,4476,"static void emitNullabilityConsistencyWarning(Sema &S, SimplePointerKind PointerKind, SourceLocation PointerLoc, SourceLocation PointerEndLoc) {\n // ...\n auto addFixIt = [&](NullabilityKind Nullability) {\n auto Diag = S.Diag(FixItLoc, diag::note_nullability_fix_it);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: note: insert \'_Nullable\' if the block pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: note: insert \'_Nonnull\' if the block pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: note: insert \'_Nullable\' if the block pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: note: insert \'_Nonnull\' if the block pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: note: insert \'_Nonnull\' if the pointer should never be null"} | ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:11:13: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:12: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:43:13: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:46:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: note: insert \'_Nullable\' if the block pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:14: note: insert \'_Nonnull\' if the block pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:51:16: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: note: insert \'_Nullable\' if the block pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:9: note: insert \'_Nonnull\' if the block pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:57:19: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:14: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:64:15: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:74:18: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:19: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:80:20: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:90:13: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:114:12: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:117:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:120:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:125:10: note: insert \'_Nonnull\' if the pointer should never be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: note: insert \'_Nullable\' if the pointer may be null","clang/test/SemaObjCXX/Inputs/nullability-pragmas-1.h:130:4: note: insert \'_Nonnull\' if the pointer should never be null"} | ||
Line 7,298: | Line 7,310: | ||
}, | }, | ||
["note_nullability_here"]={ | ["note_nullability_here"]={ | ||
[ | [b]="%0 specified here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) specified here", | ||
[ | [f]=a, | ||
[ | [g]="Nullability Issue", | ||
[h]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.","Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullable, and\n__null_unspecified that describe the nullability of the pointer type\nto which the specifier appertains. Nullability type specifiers improve\non the existing nonnull attributes in a few ways:\n - They apply to types, so one can represent a pointer to a non-null\n pointer, use them in function pointer types, etc.\n - As type specifiers, they are syntactically more lightweight than\n __attribute__s or [[attribute]]s.\n - They can express both the notion of \'should never be null\' and\n also \'it makes sense for this to be null\', and therefore can more\n easily catch errors of omission where one forgot to annotate the\n nullability of a particular pointer (this will come in a subsequent\n patch).\n\nNullability type specifiers are maintained as type sugar, and\ntherefore have no effect on mangling, encoding, overloading,\netc. Nonetheless, they will be used for warnings about, e.g., passing\n\'null\' to a method that does not accept it.\n\nThis is the C/C++ part of rdar://problem/18868820.\n\nllvm-svn: 240146"}, | [h]={"261a89b0f70b",1434736265,"Introduce type nullability specifiers for C/C++.","Introduce type nullability specifiers for C/C++.\n\nIntroduces the type specifiers __nonnull, __nullable, and\n__null_unspecified that describe the nullability of the pointer type\nto which the specifier appertains. Nullability type specifiers improve\non the existing nonnull attributes in a few ways:\n - They apply to types, so one can represent a pointer to a non-null\n pointer, use them in function pointer types, etc.\n - As type specifiers, they are syntactically more lightweight than\n __attribute__s or [[attribute]]s.\n - They can express both the notion of \'should never be null\' and\n also \'it makes sense for this to be null\', and therefore can more\n easily catch errors of omission where one forgot to annotate the\n nullability of a particular pointer (this will come in a subsequent\n patch).\n\nNullability type specifiers are maintained as type sugar, and\ntherefore have no effect on mangling, encoding, overloading,\netc. Nonetheless, they will be used for warnings about, e.g., passing\n\'null\' to a method that does not accept it.\n\nThis is the C/C++ part of rdar://problem/18868820.\n\nllvm-svn: 240146"}, | ||
[i]={{ | [i]={{H,7527,"/// Applies a nullability type specifier to the given type, if possible.\n///\n/// \\param state The type processing state.\n///\n/// \\param type The type to which the nullability specifier will be\n/// added. On success, this type will be updated appropriately.\n///\n/// \\param attr The attribute as written on the type.\n///\n/// \\param allowOnArrayType Whether to accept nullability specifiers on an\n/// array type (e.g., because it will decay to a pointer).\n///\n/// \\returns true if a problem has been diagnosed, false on success.\nstatic bool checkNullabilityTypeSpecifier(TypeProcessingState &state, QualType &type, ParsedAttr &attr, bool allowOnArrayType) {\n // ...\n // If there is already a different nullability specifier, complain.\n // This (unlike the code above) looks through typedefs that might\n // have nullability specifiers on them, which means we cannot\n // provide a useful Fix-It.\n if (auto existingNullability = desugared->getNullability()) {\n if (nullability != *existingNullability) {\n // ...\n // Try to find the typedef with the existing nullability specifier.\n if (auto typedefType = desugared->getAs<TypedefType>()) {\n // ...\n if (auto typedefNullability = AttributedType::stripOuterNullability(underlyingType)) {\n if (*typedefNullability == *existingNullability) {\n S.Diag(typedefDecl->getLocation(), diag::note_nullability_here) << DiagNullabilityKind(*existingNullability, false);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Sema/nullability.c"]={"clang/test/Sema/nullability.c:15:24: note: \'_Nonnull\' specified here"} | ["clang/test/Sema/nullability.c"]={"clang/test/Sema/nullability.c:15:24: note: \'_Nonnull\' specified here"} | ||
Line 7,310: | Line 7,322: | ||
}, | }, | ||
["note_nullability_type_specifier"]={ | ["note_nullability_type_specifier"]={ | ||
[ | [b]="use nullability type specifier %0 to affect the innermost pointer type of %1", | ||
[ | [d]=c, | ||
[ | [e]="use nullability type specifier (.*?) to affect the innermost pointer type of (.*?)", | ||
[ | [f]=a, | ||
[ | [g]="Nullability Issue", | ||
[h]={"813a066f16df",1434737678,"Extend type nullability qualifiers for Objective-C.","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"}, | [h]={"813a066f16df",1434737678,"Extend type nullability qualifiers for Objective-C.","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"}, | ||
[i]={{ | [i]={{H,7561,"/// Applies a nullability type specifier to the given type, if possible.\n///\n/// \\param state The type processing state.\n///\n/// \\param type The type to which the nullability specifier will be\n/// added. On success, this type will be updated appropriately.\n///\n/// \\param attr The attribute as written on the type.\n///\n/// \\param allowOnArrayType Whether to accept nullability specifiers on an\n/// array type (e.g., because it will decay to a pointer).\n///\n/// \\returns true if a problem has been diagnosed, false on success.\nstatic bool checkNullabilityTypeSpecifier(TypeProcessingState &state, QualType &type, ParsedAttr &attr, bool allowOnArrayType) {\n // ...\n // For the context-sensitive keywords/Objective-C property\n // attributes, require that the type be a single-level pointer.\n if (isContextSensitive) {\n // ...\n if (pointeeType && (pointeeType->isAnyPointerType() || pointeeType->isObjCObjectPointerType() || pointeeType->isMemberPointerType())) {\n // ...\n S.Diag(nullabilityLoc, diag::note_nullability_type_specifier) << DiagNullabilityKind(nullability, false) << type << FixItHint::CreateReplacement(nullabilityLoc, getNullabilitySpelling(nullability));"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:37:4: note: use nullability type specifier \'_Nonnull\' to affect the innermost pointer type of \'NSFoo **\'","clang/test/SemaObjC/nullability.m:43:19: note: use nullability type specifier \'_Nullable\' to affect the innermost pointer type of \'NSFoo **\'","clang/test/SemaObjC/nullability.m:54:19: note: use nullability type specifier \'_Nullable\' to affect the innermost pointer type of \'NSFoo **\'","clang/test/SemaObjC/nullability.m:283:22: note: use nullability type specifier \'_Nonnull\' to affect the innermost pointer type of \'void * _Nullable[2]\'"} | ["clang/test/SemaObjC/nullability.m"]={"clang/test/SemaObjC/nullability.m:37:4: note: use nullability type specifier \'_Nonnull\' to affect the innermost pointer type of \'NSFoo **\'","clang/test/SemaObjC/nullability.m:43:19: note: use nullability type specifier \'_Nullable\' to affect the innermost pointer type of \'NSFoo **\'","clang/test/SemaObjC/nullability.m:54:19: note: use nullability type specifier \'_Nullable\' to affect the innermost pointer type of \'NSFoo **\'","clang/test/SemaObjC/nullability.m:283:22: note: use nullability type specifier \'_Nonnull\' to affect the innermost pointer type of \'void * _Nullable[2]\'"} | ||
Line 7,322: | Line 7,334: | ||
}, | }, | ||
["note_objc_circular_container_declared_here"]={ | ["note_objc_circular_container_declared_here"]={ | ||
[ | [b]={{nil,L,"%0 declared here"},{V,nil,"\'%0\' declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="(.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e1d882c726b5",1425491752,"New ObjC warning: circular containers.","New ObjC warning: circular containers.\n\nThis commit adds new warning to prevent user from creating \'circular containers\'.\n\nMutable collections from NSFoundation allows user to add collection to itself, e.g.: \n\nNSMutableArray *a = [NSMutableArray new]; \n[a addObject:a]; \n\nThe code above leads to really weird behaviour (crashes, \'endless\' recursion) and \nretain cycles (collection retains itself) if ARC enabled.\n\nPatch checks the following collections: \n - NSMutableArray, \n - NSMutableDictionary, \n - NSMutableSet, \n - NSMutableOrderedSet, \n - NSCountedSet. \n\nllvm-svn: 231265"}, | [h]={"e1d882c726b5",1425491752,"New ObjC warning: circular containers.","New ObjC warning: circular containers.\n\nThis commit adds new warning to prevent user from creating \'circular containers\'.\n\nMutable collections from NSFoundation allows user to add collection to itself, e.g.: \n\nNSMutableArray *a = [NSMutableArray new]; \n[a addObject:a]; \n\nThe code above leads to really weird behaviour (crashes, \'endless\' recursion) and \nretain cycles (collection retains itself) if ARC enabled.\n\nPatch checks the following collections: \n - NSMutableArray, \n - NSMutableDictionary, \n - NSMutableSet, \n - NSMutableOrderedSet, \n - NSCountedSet. \n\nllvm-svn: 231265"}, | ||
[i]={{ | [i]={{C,17647,"void Sema::CheckObjCCircularContainer(ObjCMessageExpr *Message) {\n // ...\n if (Message->getReceiverKind() == ObjCMessageExpr::SuperInstance) {\n // ...\n } else {\n // ...\n if (DeclRefExpr *ReceiverRE = dyn_cast<DeclRefExpr>(Receiver)) {\n if (DeclRefExpr *ArgRE = dyn_cast<DeclRefExpr>(Arg)) {\n if (ReceiverRE->getDecl() == ArgRE->getDecl()) {\n // ...\n if (!ArgRE->isObjCSelfExpr()) {\n Diag(Decl->getLocation(), diag::note_objc_circular_container_declared_here) << Decl;"},{C,17660,"void Sema::CheckObjCCircularContainer(ObjCMessageExpr *Message) {\n // ...\n if (Message->getReceiverKind() == ObjCMessageExpr::SuperInstance) {\n // ...\n } else {\n // ...\n if (DeclRefExpr *ReceiverRE = dyn_cast<DeclRefExpr>(Receiver)) {\n // ...\n } else if (ObjCIvarRefExpr *IvarRE = dyn_cast<ObjCIvarRefExpr>(Receiver)) {\n if (ObjCIvarRefExpr *IvarArgRE = dyn_cast<ObjCIvarRefExpr>(Arg)) {\n if (IvarRE->getDecl() == IvarArgRE->getDecl()) {\n // ...\n Diag(Decl->getLocation(), diag::note_objc_circular_container_declared_here) << Decl;"}} | ||
}, | }, | ||
["note_objc_container_start"]={ | ["note_objc_container_start"]={ | ||
[ | [b]="%select{class|protocol|category|class extension|implementation|category implementation}0 started here", | ||
[ | [d]=c, | ||
[ | [e]="(?:class|protocol|category|class extension|implementation|category implementation) started here", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"c6c8d9356dc0",1323163523,"Extend warnings for missing \'@end\'.","Extend warnings for missing \'@end\'.\nFixes PR2709.\n\nllvm-svn: 145928"}, | [h]={"c6c8d9356dc0",1323163523,"Extend warnings for missing \'@end\'.","Extend warnings for missing \'@end\'.\nFixes PR2709.\n\nllvm-svn: 145928"}, | ||
[i]={{ | [i]={{vc,204,"void Parser::CheckNestedObjCContexts(SourceLocation AtLoc) {\n // ...\n if (Decl)\n Diag(Decl->getBeginLoc(), diag::note_objc_container_start) << (int)ock;"},{vc,747,"/// objc-interface-decl-list:\n/// empty\n/// objc-interface-decl-list objc-property-decl [OBJC2]\n/// objc-interface-decl-list objc-method-requirement [OBJC2]\n/// objc-interface-decl-list objc-method-proto \';\'\n/// objc-interface-decl-list declaration\n/// objc-interface-decl-list \';\'\n///\n/// objc-method-requirement: [OBJC2]\n/// @required\n/// @optional\n///\nvoid Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey, Decl *CDecl) {\n // ...\n while (true) {\n // ...\n case tok::objc_implementation:\n case tok::objc_interface:\n // ...\n Diag(CDecl->getBeginLoc(), diag::note_objc_container_start) << (int)Actions.getObjCContainerKind();"},{vc,831,"/// objc-interface-decl-list:\n/// empty\n/// objc-interface-decl-list objc-property-decl [OBJC2]\n/// objc-interface-decl-list objc-method-requirement [OBJC2]\n/// objc-interface-decl-list objc-method-proto \';\'\n/// objc-interface-decl-list declaration\n/// objc-interface-decl-list \';\'\n///\n/// objc-method-requirement: [OBJC2]\n/// @required\n/// @optional\n///\nvoid Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey, Decl *CDecl) {\n // ...\n // We break out of the big loop in two cases: when we see @end or when we see\n // EOF. In the former case, eat the @end. In the later case, emit an error.\n if (Tok.is(tok::code_completion)) {\n // ...\n } else if (Tok.isObjCAtKeyword(tok::objc_end)) {\n // ...\n } else {\n // ...\n Diag(CDecl->getBeginLoc(), diag::note_objc_container_start) << (int)Actions.getObjCContainerKind();"},{vc,2309,"Parser::ObjCImplParsingDataRAII::~ObjCImplParsingDataRAII() {\n if (!Finished) {\n // ...\n if (P.isEofOrEom()) {\n // ...\n P.Diag(Dcl->getBeginLoc(), diag::note_objc_container_start) << Sema::OCK_Implementation;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/missing-atend-metadata.m"]={"clang/test/SemaObjC/missing-atend-metadata.m:6:1: note: implementation started here","clang/test/SemaObjC/missing-atend-metadata.m:12:1: note: implementation started here","clang/test/SemaObjC/missing-atend-metadata.m:19:1: note: implementation started here","clang/test/SemaObjC/missing-atend-metadata.m:22:1: note: implementation started here"} | ["clang/test/SemaObjC/missing-atend-metadata.m"]={"clang/test/SemaObjC/missing-atend-metadata.m:6:1: note: implementation started here","clang/test/SemaObjC/missing-atend-metadata.m:12:1: note: implementation started here","clang/test/SemaObjC/missing-atend-metadata.m:19:1: note: implementation started here","clang/test/SemaObjC/missing-atend-metadata.m:22:1: note: implementation started here"} | ||
Line 7,343: | Line 7,355: | ||
}, | }, | ||
["note_objc_designated_init_marked_here"]={ | ["note_objc_designated_init_marked_here"]={ | ||
[ | [b]="method marked as designated initializer of the class here", | ||
[ | [d]=c, | ||
[ | [e]="method marked as designated initializer of the class here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"22bfa2c28bdb",1386105096,"[objc] Emit a warning when the implementation of a designated initializer does not chain to","[objc] Emit a warning when the implementation of a designated initializer does not chain to\nan init method that is a designated initializer for the superclass.\n\nllvm-svn: 196316"}, | [h]={"22bfa2c28bdb",1386105096,"[objc] Emit a warning when the implementation of a designated initializer does not chain to","[objc] Emit a warning when the implementation of a designated initializer does not chain to\nan init method that is a designated initializer for the superclass.\n\nllvm-svn: 196316"}, | ||
[i]={{ | [i]={{q,15853,"Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, bool IsInstantiation) {\n // ...\n {\n // ...\n if (FD) {\n // ...\n } else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(dcl)) {\n // ...\n if (FSI->ObjCWarnForNoDesignatedInitChain) {\n // ...\n // Don\'t issue this warning for unavailable inits or direct subclasses\n // of NSObject.\n if (!MD->isUnavailable() && !superIsNSObject(MD)) {\n // ...\n Diag(InitMethod->getLocation(), diag::note_objc_designated_init_marked_here);"},{p,3211,"/// 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 (DIFunctionScopeInfo && DIFunctionScopeInfo->ObjCIsDesignatedInit && (SuperLoc.isValid() || isSelfExpr(Receiver))) {\n // ...\n if (!isDesignatedInitChain) {\n // ...\n Diag(InitMethod->getLocation(), diag::note_objc_designated_init_marked_here);"},{cb,2352,"void Sema::DiagnoseMissingDesignatedInitOverrides(const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD) {\n // ...\n for (SmallVector<const ObjCMethodDecl *, 8>::iterator I = DesignatedInits.begin(), E = DesignatedInits.end(); I != E; ++I) {\n // ...\n if (!InitSelSet.count(MD->getSelector())) {\n // ...\n if (!Ignore) {\n // ...\n Diag(MD->getLocation(), diag::note_objc_designated_init_marked_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/attr-designated-init.m"]={"clang/test/SemaObjC/attr-designated-init.m:53:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:55:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:55:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:60:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:60:1: note: method marked as designated initializer of the class here", | ["clang/test/SemaObjC/attr-designated-init.m"]={"clang/test/SemaObjC/attr-designated-init.m:53:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:55:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:55:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:60:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:60:1: note: method marked as designated initializer of the class here",Pc,"clang/test/SemaObjC/attr-designated-init.m:43:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:104:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:104:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:100:1: note: method marked as designated initializer of the class here",Pc,Pc,"clang/test/SemaObjC/attr-designated-init.m:43:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:43:1: note: method marked as designated initializer of the class here",Pc,"clang/test/SemaObjC/attr-designated-init.m:43:1: note: method marked as designated initializer of the class here",Pc,Pc,"clang/test/SemaObjC/attr-designated-init.m:270:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:270:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:270:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:270:1: note: method marked as designated initializer of the class here","clang/test/SemaObjC/attr-designated-init.m:358:1: note: method marked as designated initializer of the class here"} | ||
} | } | ||
}, | }, | ||
["note_objc_literal_comparison_isequal"]={ | ["note_objc_literal_comparison_isequal"]={ | ||
[ | [b]="use \'isEqual:\' instead", | ||
[ | [d]=c, | ||
[ | [e]="use \'isEqual\\:\' instead", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"7660f78fb95b",1342547200,"Now that -Wobjc-literal-compare is a warning, put the fixit on a note.","Now that -Wobjc-literal-compare is a warning, put the fixit on a note.\n\nRecovering as if the user had actually called -isEqual: is a bit too far from\nthe semantics of the program as written, /even though/ it\'s probably what they\nintended.\n\nllvm-svn: 160377"}, | [h]={"7660f78fb95b",1342547200,"Now that -Wobjc-literal-compare is a warning, put the fixit on a note.","Now that -Wobjc-literal-compare is a warning, put the fixit on a note.\n\nRecovering as if the user had actually called -isEqual: is a bit too far from\nthe semantics of the program as written, /even though/ it\'s probably what they\nintended.\n\nllvm-svn: 160377"}, | ||
[i]={{ | [i]={{o,12537,"static void diagnoseObjCLiteralComparison(Sema &S, SourceLocation Loc, ExprResult &LHS, ExprResult &RHS, BinaryOperator::Opcode Opc) {\n // ...\n if (BinaryOperator::isEqualityOp(Opc) && hasIsEqualMethod(S, LHS.get(), RHS.get())) {\n // ...\n S.Diag(Loc, diag::note_objc_literal_comparison_isequal) << FixItHint::CreateInsertion(Start, Opc == BO_EQ ? \"[\" : \"![\") << FixItHint::CreateReplacement(OpRange, \" isEqual:\") << FixItHint::CreateInsertion(End, \"]\");"}}, | ||
[j]={ | [j]={ | ||
["clang/test/FixIt/fixit-nsstring-compare.m"]={"clang/test/FixIt/fixit-nsstring-compare.m:16:28: note: use \'isEqual:\' instead"} | ["clang/test/FixIt/fixit-nsstring-compare.m"]={"clang/test/FixIt/fixit-nsstring-compare.m:16:28: note: use \'isEqual:\' instead"} | ||
Line 7,367: | Line 7,379: | ||
}, | }, | ||
["note_objc_literal_method_param"]={ | ["note_objc_literal_method_param"]={ | ||
[ | [b]="%select{first|second|third}0 parameter has unexpected type %1 (should be %2)", | ||
[ | [d]=c, | ||
[ | [e]="(?:first|second|third) parameter has unexpected type (.*?) \\(should be (.*?)\\)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,","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"}, | [h]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,","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"}, | ||
[i]={{ | [i]={{p,852,"ExprResult Sema::BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements) {\n // ...\n if (!ArrayWithObjectsMethod) {\n // ...\n if (!PtrT || !Context.hasSameUnqualifiedType(PtrT->getPointeeType(), IdT)) {\n // ...\n Diag(Method->parameters()[0]->getLocation(), diag::note_objc_literal_method_param) << 0 << T << Context.getPointerType(IdT.withConst());"},{p,863,"ExprResult Sema::BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements) {\n // ...\n if (!ArrayWithObjectsMethod) {\n // ...\n // Check that the \'count\' parameter is integral.\n if (!Method->parameters()[1]->getType()->isIntegerType()) {\n // ...\n Diag(Method->parameters()[1]->getLocation(), diag::note_objc_literal_method_param) << 1 << Method->parameters()[1]->getType() << \"integral\";"},{p,1023,"ExprResult Sema::BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef<ObjCDictionaryElement> Elements) {\n // ...\n if (!DictionaryWithObjectsMethod) {\n // ...\n if (!PtrValue || !Context.hasSameUnqualifiedType(PtrValue->getPointeeType(), IdT)) {\n // ...\n Diag(Method->parameters()[0]->getLocation(), diag::note_objc_literal_method_param) << 0 << ValueT << Context.getPointerType(IdT.withConst());"},{p,1057,"ExprResult Sema::BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef<ObjCDictionaryElement> Elements) {\n // ...\n if (!DictionaryWithObjectsMethod) {\n // ...\n if (!PtrKey || !Context.hasSameUnqualifiedType(PtrKey->getPointeeType(), IdT)) {\n // ...\n if (err) {\n // ...\n Diag(Method->parameters()[1]->getLocation(), diag::note_objc_literal_method_param) << 1 << KeyT << Context.getPointerType(IdT.withConst());"},{p,1070,"ExprResult Sema::BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef<ObjCDictionaryElement> Elements) {\n // ...\n if (!DictionaryWithObjectsMethod) {\n // ...\n if (!CountType->isIntegerType()) {\n // ...\n Diag(Method->parameters()[2]->getLocation(), diag::note_objc_literal_method_param) << 2 << CountType << \"integral\";"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/objc-literal-sig.m"]={"clang/test/SemaObjC/objc-literal-sig.m:30:38: note: first parameter has unexpected type \'const int *\' (should be \'const id *\')","clang/test/SemaObjC/objc-literal-sig.m:30:38: note: first parameter has unexpected type \'const int *\' (should be \'const id *\')","clang/test/SemaObjC/objc-literal-sig.m:36:43: note: second parameter has unexpected type \'const int *\' (should be \'const id *\')","clang/test/SemaObjC/objc-literal-sig.m:36:43: note: second parameter has unexpected type \'const int *\' (should be \'const id *\')"} | ["clang/test/SemaObjC/objc-literal-sig.m"]={"clang/test/SemaObjC/objc-literal-sig.m:30:38: note: first parameter has unexpected type \'const int *\' (should be \'const id *\')","clang/test/SemaObjC/objc-literal-sig.m:30:38: note: first parameter has unexpected type \'const int *\' (should be \'const id *\')","clang/test/SemaObjC/objc-literal-sig.m:36:43: note: second parameter has unexpected type \'const int *\' (should be \'const id *\')","clang/test/SemaObjC/objc-literal-sig.m:36:43: note: second parameter has unexpected type \'const int *\' (should be \'const id *\')"} | ||
Line 7,379: | Line 7,391: | ||
}, | }, | ||
["note_objc_literal_method_return"]={ | ["note_objc_literal_method_return"]={ | ||
[ | [b]="method returns unexpected type %0 (should be an object type)", | ||
[ | [d]=c, | ||
[ | [e]="method returns unexpected type (.*?) \\(should be an object type\\)", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,","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"}, | [h]={"e65b086e07a6",1331064356,"Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,","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"}, | ||
[i]={{ | [i]={{p,163,"/// Emits an error if the given method does not exist, or if the return\n/// type is not an Objective-C object.\nstatic bool validateBoxingMethod(Sema &S, SourceLocation Loc, const ObjCInterfaceDecl *Class, Selector Sel, const ObjCMethodDecl *Method) {\n // ...\n if (!ReturnType->isObjCObjectPointerType()) {\n // ...\n S.Diag(Method->getLocation(), diag::note_objc_literal_method_return) << ReturnType;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/objc-literal-sig.m"]={"clang/test/SemaObjC/objc-literal-sig.m:19:1: note: method returns unexpected type \'int\' (should be an object type)","clang/test/SemaObjC/objc-literal-sig.m:19:1: note: method returns unexpected type \'int\' (should be an object type)","clang/test/SemaObjC/objc-literal-sig.m:23:1: note: method returns unexpected type \'char\' (should be an object type)","clang/test/SemaObjC/objc-literal-sig.m:23:1: note: method returns unexpected type \'char\' (should be an object type)"} | ["clang/test/SemaObjC/objc-literal-sig.m"]={"clang/test/SemaObjC/objc-literal-sig.m:19:1: note: method returns unexpected type \'int\' (should be an object type)","clang/test/SemaObjC/objc-literal-sig.m:19:1: note: method returns unexpected type \'int\' (should be an object type)","clang/test/SemaObjC/objc-literal-sig.m:23:1: note: method returns unexpected type \'char\' (should be an object type)","clang/test/SemaObjC/objc-literal-sig.m:23:1: note: method returns unexpected type \'char\' (should be an object type)"} | ||
Line 7,391: | Line 7,403: | ||
}, | }, | ||
["note_objc_needs_superclass"]={ | ["note_objc_needs_superclass"]={ | ||
[ | [b]="add a super class to fix this problem", | ||
[ | [d]=c, | ||
[ | [e]="add a super class to fix this problem", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"acfbe9e1f228",1333735942,"Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionall...","Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.\nThe warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger\nthe warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>\n\nllvm-svn: 154187"}, | [h]={"acfbe9e1f228",1333735942,"Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionall...","Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.\nThe warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger\nthe warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>\n\nllvm-svn: 154187"}, | ||
[i]={{ | [i]={{P,4147,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n if (ObjCInterfaceDecl *IDecl = IC->getClassInterface()) {\n // ...\n if (IDecl->getSuperClass() == nullptr) {\n // This class has no superclass, so check that it has been marked with\n // __attribute((objc_root_class)).\n if (!HasRootClassAttr) {\n // ...\n if (NSObjectDecl && NSObjectDecl->getDefinition()) {\n Diag(SuperClassLoc, diag::note_objc_needs_superclass) << FixItHint::CreateInsertion(SuperClassLoc, \" : NSObject \");"},{P,4150,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n if (ObjCInterfaceDecl *IDecl = IC->getClassInterface()) {\n // ...\n if (IDecl->getSuperClass() == nullptr) {\n // This class has no superclass, so check that it has been marked with\n // __attribute((objc_root_class)).\n if (!HasRootClassAttr) {\n // ...\n if (NSObjectDecl && NSObjectDecl->getDefinition()) {\n // ...\n } else {\n Diag(SuperClassLoc, diag::note_objc_needs_superclass);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/method-encoding-2.m"]={"clang/test/SemaObjC/method-encoding-2.m:4:16: note: add a super class to fix this problem"} | ["clang/test/SemaObjC/method-encoding-2.m"]={"clang/test/SemaObjC/method-encoding-2.m:4:16: note: add a super class to fix this problem"} | ||
Line 7,403: | Line 7,415: | ||
}, | }, | ||
["note_objc_type_param_here"]={ | ["note_objc_type_param_here"]={ | ||
[ | [b]="type parameter %0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="type parameter (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]="Generics Issue", | ||
[h]={"85f3f9513dbc",1436241435,"Parsing, semantic analysis, and AST for Objective-C type parameters.","Parsing, semantic analysis, and AST for Objective-C type parameters.\n\nProduce type parameter declarations for Objective-C type parameters,\nand attach lists of type parameters to Objective-C classes,\ncategories, forward declarations, and extensions as\nappropriate. Perform semantic analysis of type bounds for type\nparameters, both in isolation and across classes/categories/extensions\nto ensure consistency.\n\nAlso handle (de-)serialization of Objective-C type parameter lists,\nalong with sundry other things one must do to add a new declaration to\nClang.\n\nNote that Objective-C type parameters are typedef name declarations,\nlike typedefs and C++11 type aliases, in support of type erasure.\n\nPart of rdar://problem/6294649.\n\nllvm-svn: 241541"}, | [h]={"85f3f9513dbc",1436241435,"Parsing, semantic analysis, and AST for Objective-C type parameters.","Parsing, semantic analysis, and AST for Objective-C type parameters.\n\nProduce type parameter declarations for Objective-C type parameters,\nand attach lists of type parameters to Objective-C classes,\ncategories, forward declarations, and extensions as\nappropriate. Perform semantic analysis of type bounds for type\nparameters, both in isolation and across classes/categories/extensions\nto ensure consistency.\n\nAlso handle (de-)serialization of Objective-C type parameter lists,\nalong with sundry other things one must do to add a new declaration to\nClang.\n\nNote that Objective-C type parameters are typedef name declarations,\nlike typedefs and C++11 type aliases, in support of type erasure.\n\nPart of rdar://problem/6294649.\n\nllvm-svn: 241541"}, | ||
[i]={{ | [i]={{P,907,"/// Check consistency between two Objective-C type parameter lists, e.g.,\n/// between a category/extension and an \\@interface or between an \\@class and an\n/// \\@interface.\nstatic bool checkTypeParamListConsistency(Sema &S, ObjCTypeParamList *prevTypeParams, ObjCTypeParamList *newTypeParams, TypeParamListContext newContext) {\n // ...\n // Match up the type parameters.\n for (unsigned i = 0, n = prevTypeParams->size(); i != n; ++i) {\n // ...\n // Check for consistency of the variance.\n if (newTypeParam->getVariance() != prevTypeParam->getVariance()) {\n if (newTypeParam->getVariance() == ObjCTypeParamVariance::Invariant && newContext != TypeParamListContext::Definition) {\n // ...\n } else if (prevTypeParam->getVariance() == ObjCTypeParamVariance::Invariant && !(isa<ObjCInterfaceDecl>(prevTypeParam->getDeclContext()) && cast<ObjCInterfaceDecl>(prevTypeParam->getDeclContext())->getDefinition() == prevTypeParam->getDeclContext())) {\n // ...\n } else {\n // ...\n S.Diag(prevTypeParam->getLocation(), diag::note_objc_type_param_here) << prevTypeParam->getDeclName();"},{P,937,"/// Check consistency between two Objective-C type parameter lists, e.g.,\n/// between a category/extension and an \\@interface or between an \\@class and an\n/// \\@interface.\nstatic bool checkTypeParamListConsistency(Sema &S, ObjCTypeParamList *prevTypeParams, ObjCTypeParamList *newTypeParams, TypeParamListContext newContext) {\n // ...\n // Match up the type parameters.\n for (unsigned i = 0, n = prevTypeParams->size(); i != n; ++i) {\n // ...\n // If the new type parameter\'s bound was explicit, complain about it being\n // different from the original.\n if (newTypeParam->hasExplicitBound()) {\n // ...\n S.Diag(prevTypeParam->getLocation(), diag::note_objc_type_param_here) << prevTypeParam->getDeclName();"},{P,964,"/// Check consistency between two Objective-C type parameter lists, e.g.,\n/// between a category/extension and an \\@interface or between an \\@class and an\n/// \\@interface.\nstatic bool checkTypeParamListConsistency(Sema &S, ObjCTypeParamList *prevTypeParams, ObjCTypeParamList *newTypeParams, TypeParamListContext newContext) {\n // ...\n // Match up the type parameters.\n for (unsigned i = 0, n = prevTypeParams->size(); i != n; ++i) {\n // ...\n // The new type parameter got the implicit bound of \'id\'. That\'s okay for\n // categories and extensions (overwrite it later), but not for forward\n // declarations and @interfaces, because those must be standalone.\n if (newContext == TypeParamListContext::ForwardDeclaration || newContext == TypeParamListContext::Definition) {\n // ...\n S.Diag(prevTypeParam->getLocation(), diag::note_objc_type_param_here) << prevTypeParam->getDeclName();"},{H,971,"/// 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 // Objective-C object pointer types must be substitutable for the bounds.\n if (const auto *typeArgObjC = typeArg->getAs<ObjCObjectPointerType>()) {\n // ...\n S.Diag(typeParam->getLocation(), diag::note_objc_type_param_here) << typeParam->getDeclName();"},{H,999,"/// 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 // Block pointer types are permitted for unqualified \'id\' bounds.\n if (typeArg->isBlockPointerType()) {\n // ...\n S.Diag(typeParam->getLocation(), diag::note_objc_type_param_here) << typeParam->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h:11:22: note: type parameter \'T\' declared here"} | ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-generics-1.h:11:22: note: type parameter \'T\' declared here"} | ||
Line 7,415: | Line 7,427: | ||
}, | }, | ||
["note_objc_unsafe_perform_selector_method_declared_here"]={ | ["note_objc_unsafe_perform_selector_method_declared_here"]={ | ||
[ | [b]={{nil,U,"method %0 that returns %1 declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="method (.*?) that returns (.*?) declared here", | ||
[ | [f]=a, | ||
[ | [g]=k, | ||
[h]={"0e23c61c8755",1488815914,"[Sema][ObjC] Warn about \'performSelector\' calls with selectors","[Sema][ObjC] Warn about \'performSelector\' calls with selectors\nthat return record or vector types\n\nThe performSelector family of methods from Foundation use objc_msgSend to\ndispatch the selector invocations to objects. However, method calls to methods\nthat return record types might have to use the objc_msgSend_stret as the return\nvalue won\'t find into the register. This is also supported by this sentence from\nperformSelector documentation: \"The method should not have a significant return\nvalue and should take a single argument of type id, or no arguments\". This\ncommit adds a new warning that warns when a selector which corresponds to a\nmethod that returns a record type is passed into performSelector.\n\nrdar://12056271\n\nDifferential Revision: https://reviews.llvm.org/D30174\n\nllvm-svn: 297019"}, | [h]={"0e23c61c8755",1488815914,"[Sema][ObjC] Warn about \'performSelector\' calls with selectors","[Sema][ObjC] Warn about \'performSelector\' calls with selectors\nthat return record or vector types\n\nThe performSelector family of methods from Foundation use objc_msgSend to\ndispatch the selector invocations to objects. However, method calls to methods\nthat return record types might have to use the objc_msgSend_stret as the return\nvalue won\'t find into the register. This is also supported by this sentence from\nperformSelector documentation: \"The method should not have a significant return\nvalue and should take a single argument of type id, or no arguments\". This\ncommit adds a new warning that warns when a selector which corresponds to a\nmethod that returns a record type is passed into performSelector.\n\nrdar://12056271\n\nDifferential Revision: https://reviews.llvm.org/D30174\n\nllvm-svn: 297019"}, | ||
[i]={{ | [i]={{p,2536,"static void checkFoundationAPI(Sema &S, SourceLocation Loc, const ObjCMethodDecl *Method, ArrayRef<Expr *> Args, QualType ReceiverType, bool IsClassObjectCall) {\n // ...\n if (Ret->isRecordType() || Ret->isVectorType() || Ret->isExtVectorType()) {\n // ...\n S.Diag(ImpliedMethod->getBeginLoc(), diag::note_objc_unsafe_perform_selector_method_declared_here) << ImpliedMethod->getSelector() << Ret;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/unsafe-perform-selector.m"]={"clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:36:1: note: method \'returnsUnion\' that returns \'Union\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:29:1: note: method \'returnsStruct2\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:52:1: note: method \'returnsStructClass\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:79:1: note: method \'returnsSubStructExt\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:84:1: note: method \'returnsSubStructImpl\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:36:1: note: method \'returnsUnion\' that returns \'Union\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:100:1: note: method \'returnsSubStructClassImpl\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:52:1: note: method \'returnsStructClass\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:49:1: note: method \'returnsExtVector\' that returns \'float3\' (vector of 3 \'float\' values) declared here","clang/test/SemaObjC/unsafe-perform-selector.m:50:1: note: method \'returnsVector\' that returns \'int4\' (vector of 4 \'int\' values) declared here"} | ["clang/test/SemaObjC/unsafe-perform-selector.m"]={"clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:36:1: note: method \'returnsUnion\' that returns \'Union\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:29:1: note: method \'returnsStruct2\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:52:1: note: method \'returnsStructClass\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:79:1: note: method \'returnsSubStructExt\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:84:1: note: method \'returnsSubStructImpl\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:36:1: note: method \'returnsUnion\' that returns \'Union\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:100:1: note: method \'returnsSubStructClassImpl\' that returns \'struct Struct\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:52:1: note: method \'returnsStructClass\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:45:1: note: method \'returnsStruct\' that returns \'Rectangle\' declared here","clang/test/SemaObjC/unsafe-perform-selector.m:49:1: note: method \'returnsExtVector\' that returns \'float3\' (vector of 3 \'float\' values) declared here","clang/test/SemaObjC/unsafe-perform-selector.m:50:1: note: method \'returnsVector\' that returns \'int4\' (vector of 4 \'int\' values) declared here"} | ||
Line 7,427: | Line 7,439: | ||
}, | }, | ||
["note_odr_base"]={ | ["note_odr_base"]={ | ||
[ | [b]="class has base type %0", | ||
[ | [d]=c, | ||
[ | [e]="class has base type (.*?)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1592,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n // Check the base classes.\n for (CXXRecordDecl::base_class_iterator Base1 = D1CXX->bases_begin(), BaseEnd1 = D1CXX->bases_end(), Base2 = D2CXX->bases_begin(); Base1 != BaseEnd1; ++Base1, ++Base2) {\n if (!IsStructurallyEquivalent(Context, Base1->getType(), Base2->getType())) {\n if (Context.Complain) {\n // ...\n Context.Diag2(Base2->getBeginLoc(), diag::note_odr_base) << Base2->getType() << Base2->getSourceRange();"},{w,1594,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n // Check the base classes.\n for (CXXRecordDecl::base_class_iterator Base1 = D1CXX->bases_begin(), BaseEnd1 = D1CXX->bases_end(), Base2 = D2CXX->bases_begin(); Base1 != BaseEnd1; ++Base1, ++Base2) {\n if (!IsStructurallyEquivalent(Context, Base1->getType(), Base2->getType())) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Base1->getBeginLoc(), diag::note_odr_base) << Base1->getType() << Base1->getSourceRange();"},{w,1609,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n // Check the base classes.\n for (CXXRecordDecl::base_class_iterator Base1 = D1CXX->bases_begin(), BaseEnd1 = D1CXX->bases_end(), Base2 = D2CXX->bases_begin(); Base1 != BaseEnd1; ++Base1, ++Base2) {\n // ...\n // Check virtual vs. non-virtual inheritance mismatch.\n if (Base1->isVirtual() != Base2->isVirtual()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Base1->getBeginLoc(), diag::note_odr_base) << Base1->isVirtual() << Base1->getSourceRange();"},{w,1665,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n } else if (D1CXX->getNumBases() > 0) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Base1->getBeginLoc(), diag::note_odr_base) << Base1->getType() << Base1->getSourceRange();"}} | |||
}, | }, | ||
["note_odr_enumerator"]={ | ["note_odr_enumerator"]={ | ||
[ | [b]="enumerator %0 with value %1 here", | ||
[ | [d]=c, | ||
[ | [e]="enumerator (.*?) with value (.*?) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"98c101833744",1266013059,"Implement AST importing and merging for enumeration types and","Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastExprs to make it work.\n\nllvm-svn: 96024"}, | [h]={"98c101833744",1266013059,"Implement AST importing and merging for enumeration types and","Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastExprs to make it work.\n\nllvm-svn: 96024"}, | ||
[i]={{ | [i]={{w,1757,"/// Determine structural equivalence of two enums.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2) {\n // ...\n for (EnumDecl::enumerator_iterator EC1 = D1->enumerator_begin(), EC1End = D1->enumerator_end(); EC1 != EC1End; ++EC1, ++EC2) {\n if (EC2 == EC2End) {\n if (Context.Complain) {\n // ...\n Context.Diag1(EC1->getLocation(), diag::note_odr_enumerator) << EC1->getDeclName() << toString(EC1->getInitVal(), 10);"},{w,1773,"/// Determine structural equivalence of two enums.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2) {\n // ...\n for (EnumDecl::enumerator_iterator EC1 = D1->enumerator_begin(), EC1End = D1->enumerator_end(); EC1 != EC1End; ++EC1, ++EC2) {\n // ...\n if (!llvm::APSInt::isSameValue(Val1, Val2) || !IsStructurallyEquivalent(EC1->getIdentifier(), EC2->getIdentifier())) {\n if (Context.Complain) {\n // ...\n Context.Diag2(EC2->getLocation(), diag::note_odr_enumerator) << EC2->getDeclName() << toString(EC2->getInitVal(), 10);"},{w,1775,"/// Determine structural equivalence of two enums.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2) {\n // ...\n for (EnumDecl::enumerator_iterator EC1 = D1->enumerator_begin(), EC1End = D1->enumerator_end(); EC1 != EC1End; ++EC1, ++EC2) {\n // ...\n if (!llvm::APSInt::isSameValue(Val1, Val2) || !IsStructurallyEquivalent(EC1->getIdentifier(), EC2->getIdentifier())) {\n if (Context.Complain) {\n // ...\n Context.Diag1(EC1->getLocation(), diag::note_odr_enumerator) << EC1->getDeclName() << toString(EC1->getInitVal(), 10);"},{w,1787,"/// Determine structural equivalence of two enums.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2) {\n // ...\n if (EC2 != EC2End) {\n if (Context.Complain) {\n // ...\n Context.Diag2(EC2->getLocation(), diag::note_odr_enumerator) << EC2->getDeclName() << toString(EC2->getInitVal(), 10);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/redefinition-c-tagtypes.m"]={"clang/test/Modules/redefinition-c-tagtypes.m:28:3: note: enumerator \'SND\' with value 44 here","clang/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h:8:3: note: enumerator \'SND\' with value 43 here","clang/test/Modules/redefinition-c-tagtypes.m:44:3: note: enumerator \'MinXOther\' with value 55 here","clang/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h:18:3: note: enumerator \'MinXOther\' with value 11 here"} | ["clang/test/Modules/redefinition-c-tagtypes.m"]={"clang/test/Modules/redefinition-c-tagtypes.m:28:3: note: enumerator \'SND\' with value 44 here","clang/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h:8:3: note: enumerator \'SND\' with value 43 here","clang/test/Modules/redefinition-c-tagtypes.m:44:3: note: enumerator \'MinXOther\' with value 55 here","clang/test/Modules/Inputs/F.framework/PrivateHeaders/NS.h:18:3: note: enumerator \'MinXOther\' with value 11 here"} | ||
Line 7,448: | Line 7,460: | ||
}, | }, | ||
["note_odr_field"]={ | ["note_odr_field"]={ | ||
[ | [b]="field %0 has type %1 here", | ||
[ | [d]=c, | ||
[ | [e]="field (.*?) has type (.*?) here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1333,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, FieldDecl *Field1, FieldDecl *Field2, QualType Owner2Type) {\n // ...\n if (!IsStructurallyEquivalent(Context, Field1->getType(), Field2->getType())) {\n if (Context.Complain) {\n // ...\n Context.Diag2(Field2->getLocation(), diag::note_odr_field) << Field2->getDeclName() << Field2->getType();"},{w,1335,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, FieldDecl *Field1, FieldDecl *Field2, QualType Owner2Type) {\n // ...\n if (!IsStructurallyEquivalent(Context, Field1->getType(), Field2->getType())) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Field1->getLocation(), diag::note_odr_field) << Field1->getDeclName() << Field1->getType();"},{w,1686,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n for (RecordDecl::field_iterator Field1 = D1->field_begin(), Field1End = D1->field_end(); Field1 != Field1End; ++Field1, ++Field2) {\n if (Field2 == Field2End) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Field1->getLocation(), diag::note_odr_field) << Field1->getDeclName() << Field1->getType();"},{w,1702,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (Field2 != Field2End) {\n if (Context.Complain) {\n // ...\n Context.Diag2(Field2->getLocation(), diag::note_odr_field) << Field2->getDeclName() << Field2->getType();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:15:7: note: field \'field2\' has type \'int\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:12:9: note: field \'field2\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:24:36: note: field \'d\' has type \'double\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:24:26: note: field \'f\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:35: note: field \'f\' has type \'int\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:53:37: note: field \'f\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:41: note: field \'Deeper\' has type \'struct DeeperError *\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:53:43: note: field \'Deeper\' has type \'struct DeeperError *\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:75:9: note: field \'i\' has type \'Float\' (aka \'float\') here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:72:7: note: field \'i\' has type \'int\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:131:14: note: field \'i\' has type \'long\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:128:15: note: field \'i\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:132:9: note: field \'S\' has type \'struct (unnamed struct at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7)\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:129:9: note: field \'S\' has type \'struct (unnamed struct at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:127:7)\' here"} | ["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:15:7: note: field \'field2\' has type \'int\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:12:9: note: field \'field2\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:24:36: note: field \'d\' has type \'double\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:24:26: note: field \'f\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:35: note: field \'f\' has type \'int\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:53:37: note: field \'f\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:56:41: note: field \'Deeper\' has type \'struct DeeperError *\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:53:43: note: field \'Deeper\' has type \'struct DeeperError *\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:75:9: note: field \'i\' has type \'Float\' (aka \'float\') here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:72:7: note: field \'i\' has type \'int\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:131:14: note: field \'i\' has type \'long\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:128:15: note: field \'i\' has type \'float\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:132:9: note: field \'S\' has type \'struct (unnamed struct at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:130:7)\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:129:9: note: field \'S\' has type \'struct (unnamed struct at /var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:127:7)\' here"} | ||
Line 7,460: | Line 7,472: | ||
}, | }, | ||
["note_odr_field_name"]={ | ["note_odr_field_name"]={ | ||
[ | [b]={{nil,U,"field has name %0 here"}}, | ||
[ | [d]=c, | ||
[ | [e]="field has name (.*?) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"df0ee34bc252",1498867607,"[Modules] Implement ODR-like semantics for tag types in C/ObjC","[Modules] Implement ODR-like semantics for tag types in C/ObjC\n\nAllow ODR for ObjC/C in the sense that we won\'t keep more that\none definition around (merge them). However, ensure the decl\npass the structural compatibility check in C11 6.2.7/1, for that,\nreuse the structural equivalence checks used by the ASTImporter.\n\nFew other considerations:\n- Create error diagnostics for tag types mismatches and thread\nthem into the structural equivalence checks.\n- Note that by doing this we only support redefinition between types\nthat are considered \"compatible types\" by C.\n\nThis is mixed approach of the suggestions discussed in\nhttp://lists.llvm.org/pipermail/cfe-dev/2017-March/053257.html\n\nDifferential Revision: https://reviews.llvm.org/D31778\n\nrdar://problem/31909368\n\nllvm-svn: 306918"}, | [h]={"df0ee34bc252",1498867607,"[Modules] Implement ODR-like semantics for tag types in C/ObjC","[Modules] Implement ODR-like semantics for tag types in C/ObjC\n\nAllow ODR for ObjC/C in the sense that we won\'t keep more that\none definition around (merge them). However, ensure the decl\npass the structural compatibility check in C11 6.2.7/1, for that,\nreuse the structural equivalence checks used by the ASTImporter.\n\nFew other considerations:\n- Create error diagnostics for tag types mismatches and thread\nthem into the structural equivalence checks.\n- Note that by doing this we only support redefinition between types\nthat are considered \"compatible types\" by C.\n\nThis is mixed approach of the suggestions discussed in\nhttp://lists.llvm.org/pipermail/cfe-dev/2017-March/053257.html\n\nDifferential Revision: https://reviews.llvm.org/D31778\n\nrdar://problem/31909368\n\nllvm-svn: 306918"}, | ||
[i]={{ | [i]={{w,1318,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, FieldDecl *Field1, FieldDecl *Field2, QualType Owner2Type) {\n // ...\n if (!::IsStructurallyEquivalent(Name1, Name2)) {\n if (Context.Complain) {\n // ...\n Context.Diag2(Field2->getLocation(), diag::note_odr_field_name) << Field2->getDeclName();"},{w,1320,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, FieldDecl *Field1, FieldDecl *Field2, QualType Owner2Type) {\n // ...\n if (!::IsStructurallyEquivalent(Name1, Name2)) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Field1->getLocation(), diag::note_odr_field_name) << Field1->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/Modules/elaborated-type-specifier-from-hidden-module.m"]={"clang/test/Modules/elaborated-type-specifier-from-hidden-module.m:10:19: note: field has name \'y\' here","clang/test/Modules/Inputs/elaborated-type-structs.h:3:17: note: field has name \'x\' here"} | ["clang/test/Modules/elaborated-type-specifier-from-hidden-module.m"]={"clang/test/Modules/elaborated-type-specifier-from-hidden-module.m:10:19: note: field has name \'y\' here","clang/test/Modules/Inputs/elaborated-type-structs.h:3:17: note: field has name \'x\' here"} | ||
Line 7,472: | Line 7,484: | ||
}, | }, | ||
["note_odr_friend"]={ | ["note_odr_friend"]={ | ||
[ | [b]={{nil,L,"friend declared here"}}, | ||
[ | [d]=c, | ||
[ | [e]="friend declared here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"b180eebed423",1524677283,"[ASTImporter] FriendDecl importing improvements","[ASTImporter] FriendDecl importing improvements\n\nThere are only a few cases of importing a frienddecl which is currently supported.\nThis patch aims to improve the friend import process.\nSet FriendObjectKind in case of decls, insert friend into the friend chain\ncorrectly, checks structurally equivalent in a more advanced manner.\nTest cases added as well. \n\nllvm-svn: 330847"}, | [h]={"b180eebed423",1524677283,"[ASTImporter] FriendDecl importing improvements","[ASTImporter] FriendDecl importing improvements\n\nThere are only a few cases of importing a frienddecl which is currently supported.\nThis patch aims to improve the friend import process.\nSet FriendObjectKind in case of decls, insert friend into the friend chain\ncorrectly, checks structurally equivalent in a more advanced manner.\nTest cases added as well. \n\nllvm-svn: 330847"}, | ||
[i]={{ | [i]={{w,1628,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n for (CXXRecordDecl::friend_iterator Friend1 = D1CXX->friend_begin(), Friend1End = D1CXX->friend_end(); Friend1 != Friend1End; ++Friend1, ++Friend2) {\n if (Friend2 == Friend2End) {\n if (Context.Complain) {\n // ...\n Context.Diag1((*Friend1)->getFriendLoc(), diag::note_odr_friend);"},{w,1640,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n for (CXXRecordDecl::friend_iterator Friend1 = D1CXX->friend_begin(), Friend1End = D1CXX->friend_end(); Friend1 != Friend1End; ++Friend1, ++Friend2) {\n // ...\n if (!IsStructurallyEquivalent(Context, *Friend1, *Friend2)) {\n if (Context.Complain) {\n // ...\n Context.Diag1((*Friend1)->getFriendLoc(), diag::note_odr_friend);"},{w,1641,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n for (CXXRecordDecl::friend_iterator Friend1 = D1CXX->friend_begin(), Friend1End = D1CXX->friend_end(); Friend1 != Friend1End; ++Friend1, ++Friend2) {\n // ...\n if (!IsStructurallyEquivalent(Context, *Friend1, *Friend2)) {\n if (Context.Complain) {\n // ...\n Context.Diag2((*Friend2)->getFriendLoc(), diag::note_odr_friend);"},{w,1653,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n if (Friend2 != Friend2End) {\n if (Context.Complain) {\n // ...\n Context.Diag2((*Friend2)->getFriendLoc(), diag::note_odr_friend);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/class/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class1.cpp:46:3: note: friend declared here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class1.cpp:39:3: note: friend declared here"} | ["clang/test/ASTMerge/class/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class1.cpp:46:3: note: friend declared here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class1.cpp:39:3: note: friend declared here"} | ||
Line 7,484: | Line 7,496: | ||
}, | }, | ||
["note_odr_missing_base"]={ | ["note_odr_missing_base"]={ | ||
[ | [b]="no corresponding base class here", | ||
[ | [d]=c, | ||
[ | [e]="no corresponding base class here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1667,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n } else if (D1CXX->getNumBases() > 0) {\n if (Context.Complain) {\n // ...\n Context.Diag2(D2->getLocation(), diag::note_odr_missing_base);"}} | |||
}, | }, | ||
["note_odr_missing_enumerator"]={ | ["note_odr_missing_enumerator"]={ | ||
[ | [b]="no corresponding enumerator here", | ||
[ | [d]=c, | ||
[ | [e]="no corresponding enumerator here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"98c101833744",1266013059,"Implement AST importing and merging for enumeration types and","Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastExprs to make it work.\n\nllvm-svn: 96024"}, | [h]={"98c101833744",1266013059,"Implement AST importing and merging for enumeration types and","Implement AST importing and merging for enumeration types and\nenumerators, along with ImplicitCastExprs to make it work.\n\nllvm-svn: 96024"}, | ||
[i]={{ | [i]={{w,1759,"/// Determine structural equivalence of two enums.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2) {\n // ...\n for (EnumDecl::enumerator_iterator EC1 = D1->enumerator_begin(), EC1End = D1->enumerator_end(); EC1 != EC1End; ++EC1, ++EC2) {\n if (EC2 == EC2End) {\n if (Context.Complain) {\n // ...\n Context.Diag2(D2->getLocation(), diag::note_odr_missing_enumerator);"},{w,1789,"/// Determine structural equivalence of two enums.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, EnumDecl *D1, EnumDecl *D2) {\n // ...\n if (EC2 != EC2End) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_missing_enumerator);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/enum/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/enum/Inputs/enum2.c:23:6: note: no corresponding enumerator here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/enum/Inputs/enum1.c:30:6: note: no corresponding enumerator here"} | ["clang/test/ASTMerge/enum/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/enum/Inputs/enum2.c:23:6: note: no corresponding enumerator here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/enum/Inputs/enum1.c:30:6: note: no corresponding enumerator here"} | ||
Line 7,505: | Line 7,517: | ||
}, | }, | ||
["note_odr_missing_field"]={ | ["note_odr_missing_field"]={ | ||
[ | [b]="no corresponding field here", | ||
[ | [d]=c, | ||
[ | [e]="no corresponding field here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1688,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n for (RecordDecl::field_iterator Field1 = D1->field_begin(), Field1End = D1->field_end(); Field1 != Field1End; ++Field1, ++Field2) {\n if (Field2 == Field2End) {\n if (Context.Complain) {\n // ...\n Context.Diag2(D2->getLocation(), diag::note_odr_missing_field);"},{w,1704,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (Field2 != Field2End) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_missing_field);"}}, | |||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:21:8: note: no corresponding field here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:27:8: note: no corresponding field here"} | ["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:21:8: note: no corresponding field here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct1.c:27:8: note: no corresponding field here"} | ||
Line 7,517: | Line 7,529: | ||
}, | }, | ||
["note_odr_missing_friend"]={ | ["note_odr_missing_friend"]={ | ||
[ | [b]={{nil,L,"no corresponding friend here"}}, | ||
[ | [d]=c, | ||
[ | [e]="no corresponding friend here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"b180eebed423",1524677283,"[ASTImporter] FriendDecl importing improvements","[ASTImporter] FriendDecl importing improvements\n\nThere are only a few cases of importing a frienddecl which is currently supported.\nThis patch aims to improve the friend import process.\nSet FriendObjectKind in case of decls, insert friend into the friend chain\ncorrectly, checks structurally equivalent in a more advanced manner.\nTest cases added as well. \n\nllvm-svn: 330847"}, | [h]={"b180eebed423",1524677283,"[ASTImporter] FriendDecl importing improvements","[ASTImporter] FriendDecl importing improvements\n\nThere are only a few cases of importing a frienddecl which is currently supported.\nThis patch aims to improve the friend import process.\nSet FriendObjectKind in case of decls, insert friend into the friend chain\ncorrectly, checks structurally equivalent in a more advanced manner.\nTest cases added as well. \n\nllvm-svn: 330847"}, | ||
[i]={{ | [i]={{w,1629,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n for (CXXRecordDecl::friend_iterator Friend1 = D1CXX->friend_begin(), Friend1End = D1CXX->friend_end(); Friend1 != Friend1End; ++Friend1, ++Friend2) {\n if (Friend2 == Friend2End) {\n if (Context.Complain) {\n // ...\n Context.Diag2(D2->getLocation(), diag::note_odr_missing_friend);"},{w,1654,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n if (Friend2 != Friend2End) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_missing_friend);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/class/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class2.cpp:36:8: note: no corresponding friend here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class2.cpp:30:8: note: no corresponding friend here"} | ["clang/test/ASTMerge/class/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class2.cpp:36:8: note: no corresponding friend here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class/Inputs/class2.cpp:30:8: note: no corresponding friend here"} | ||
Line 7,529: | Line 7,541: | ||
}, | }, | ||
["note_odr_number_of_bases"]={ | ["note_odr_number_of_bases"]={ | ||
[ | [b]="class has %0 base %plural{1:class|:classes}0", | ||
[ | [d]=c, | ||
[ | [e]="class has (.*?) base (?:class|classes)", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1572,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n if (D1CXX->getNumBases() != D2CXX->getNumBases()) {\n if (Context.Complain) {\n // ...\n Context.Diag2(D2->getLocation(), diag::note_odr_number_of_bases) << D2CXX->getNumBases();"},{w,1574,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n if (D1CXX->getNumBases() != D2CXX->getNumBases()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_number_of_bases) << D1CXX->getNumBases();"}} | |||
}, | }, | ||
["note_odr_objc_method_here"]={ | ["note_odr_objc_method_here"]={ | ||
[ | [b]="%select{class|instance}0 method %1 also declared here", | ||
[ | [d]=c, | ||
[ | [e]="(?:class|instance) method (.*?) also declared here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"43f54796ab42",1266372767,"Implement AST importing and checking for Objective-C method declarations.","Implement AST importing and checking for Objective-C method declarations.\n\nllvm-svn: 96442"}, | [h]={"43f54796ab42",1266372767,"Implement AST importing and checking for Objective-C method declarations.","Implement AST importing and checking for Objective-C method declarations.\n\nllvm-svn: 96442"}, | ||
[i]={{ | [i]={{R,4495,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check return types.\n if (!Importer.IsStructurallyEquivalent(D->getReturnType(), FoundMethod->getReturnType())) {\n // ...\n Importer.ToDiag(FoundMethod->getLocation(), diag::note_odr_objc_method_here) << D->isInstanceMethod() << Name;"},{R,4507,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check the number of parameters.\n if (D->param_size() != FoundMethod->param_size()) {\n // ...\n Importer.ToDiag(FoundMethod->getLocation(), diag::note_odr_objc_method_here) << D->isInstanceMethod() << Name;"},{R,4536,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check variadic/non-variadic.\n // Check the number of parameters.\n if (D->isVariadic() != FoundMethod->isVariadic()) {\n // ...\n Importer.ToDiag(FoundMethod->getLocation(), diag::note_odr_objc_method_here) << D->isInstanceMethod() << Name;"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property1.m:10:28: note: instance method \'Prop1\' also declared here"} | ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property1.m:10:28: note: instance method \'Prop1\' also declared here"} | ||
Line 7,550: | Line 7,562: | ||
}, | }, | ||
["note_odr_objc_missing_superclass"]={ | ["note_odr_objc_missing_superclass"]={ | ||
[ | [b]="no corresponding superclass here", | ||
[ | [d]=c, | ||
[ | [e]="no corresponding superclass here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7244b0bb860b",1266366870,"Implement AST importing of Objective-C instance variables. ","Implement AST importing of Objective-C instance variables. \nCheck superclasses when merging two Objective-C @interfaces.\n\nllvm-svn: 96420"}, | [h]={"7244b0bb860b",1266366870,"Implement AST importing of Objective-C instance variables. ","Implement AST importing of Objective-C instance variables. \nCheck superclasses when merging two Objective-C @interfaces.\n\nllvm-svn: 96420"}, | ||
[i]={{ | [i]={{R,5189,"Error ASTNodeImporter::ImportDefinition(ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind) {\n if (To->getDefinition()) {\n // ...\n if ((bool)FromSuper != (bool)ToSuper || (FromSuper && !declaresSameEntity(FromSuper, ToSuper))) {\n // ...\n if (ToSuper)\n // ...\n else\n Importer.ToDiag(To->getLocation(), diag::note_odr_objc_missing_superclass);"},{R,5196,"Error ASTNodeImporter::ImportDefinition(ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind) {\n if (To->getDefinition()) {\n // ...\n if ((bool)FromSuper != (bool)ToSuper || (FromSuper && !declaresSameEntity(FromSuper, ToSuper))) {\n // ...\n if (From->getSuperClass())\n // ...\n else\n Importer.FromDiag(From->getLocation(), diag::note_odr_objc_missing_superclass);"},{R,5458,"ExpectedDecl ASTNodeImporter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {\n // ...\n if (!Impl) {\n // ...\n } else {\n // ...\n // Verify that the existing @implementation has the same superclass.\n if ((Super && !Impl->getSuperClass()) || (!Super && Impl->getSuperClass()) || (Super && Impl->getSuperClass() && !declaresSameEntity(Super->getCanonicalDecl(), Impl->getSuperClass()))) {\n // ...\n // FIXME: It would be nice to have the location of the superclass\n // below.\n if (Impl->getSuperClass())\n // ...\n else\n Importer.ToDiag(Impl->getLocation(), diag::note_odr_objc_missing_superclass);"},{R,5465,"ExpectedDecl ASTNodeImporter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {\n // ...\n if (!Impl) {\n // ...\n } else {\n // ...\n // Verify that the existing @implementation has the same superclass.\n if ((Super && !Impl->getSuperClass()) || (!Super && Impl->getSuperClass()) || (Super && Impl->getSuperClass() && !declaresSameEntity(Super->getCanonicalDecl(), Impl->getSuperClass()))) {\n // ...\n if (D->getSuperClass())\n // ...\n else\n Importer.FromDiag(D->getLocation(), diag::note_odr_objc_missing_superclass);"}} | ||
}, | }, | ||
["note_odr_objc_property_impl_kind"]={ | ["note_odr_objc_property_impl_kind"]={ | ||
[ | [b]="property %0 is implemented with %select{@synthesize|@dynamic}1 here", | ||
[ | [d]=c, | ||
[ | [e]="property (.*?) is implemented with (?:@synthesize|@dynamic) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"14a49e2fbe1c",1291746723,"Implement AST import for Objective-C property implementations","Implement AST import for Objective-C property implementations\n(@synthesize and @dynamic).\n\nllvm-svn: 121159"}, | [h]={"14a49e2fbe1c",1291746723,"Implement AST import for Objective-C property implementations","Implement AST import for Objective-C property implementations\n(@synthesize and @dynamic).\n\nllvm-svn: 121159"}, | ||
[i]={{ | [i]={{R,5607,"ExpectedDecl ASTNodeImporter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) {\n // ...\n if (!ToImpl) {\n // ...\n } else {\n // Check that we have the same kind of property implementation (@synthesize\n // vs. @dynamic).\n if (D->getPropertyImplementation() != ToImpl->getPropertyImplementation()) {\n // ...\n Importer.FromDiag(D->getLocation(), diag::note_odr_objc_property_impl_kind) << D->getPropertyDecl()->getDeclName() << (D->getPropertyImplementation() == ObjCPropertyImplDecl::Dynamic);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property2.m:31:13: note: property \'Prop3\' is implemented with @synthesize here"} | ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property2.m:31:13: note: property \'Prop3\' is implemented with @synthesize here"} | ||
Line 7,571: | Line 7,583: | ||
}, | }, | ||
["note_odr_objc_superclass"]={ | ["note_odr_objc_superclass"]={ | ||
[ | [b]="inherits from superclass %0 here", | ||
[ | [d]=c, | ||
[ | [e]="inherits from superclass (.*?) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"7244b0bb860b",1266366870,"Implement AST importing of Objective-C instance variables. ","Implement AST importing of Objective-C instance variables. \nCheck superclasses when merging two Objective-C @interfaces.\n\nllvm-svn: 96420"}, | [h]={"7244b0bb860b",1266366870,"Implement AST importing of Objective-C instance variables. ","Implement AST importing of Objective-C instance variables. \nCheck superclasses when merging two Objective-C @interfaces.\n\nllvm-svn: 96420"}, | ||
[i]={{ | [i]={{R,5185,"Error ASTNodeImporter::ImportDefinition(ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind) {\n if (To->getDefinition()) {\n // ...\n if ((bool)FromSuper != (bool)ToSuper || (FromSuper && !declaresSameEntity(FromSuper, ToSuper))) {\n // ...\n if (ToSuper)\n Importer.ToDiag(To->getSuperClassLoc(), diag::note_odr_objc_superclass) << To->getSuperClass()->getDeclName();"},{R,5192,"Error ASTNodeImporter::ImportDefinition(ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind) {\n if (To->getDefinition()) {\n // ...\n if ((bool)FromSuper != (bool)ToSuper || (FromSuper && !declaresSameEntity(FromSuper, ToSuper))) {\n // ...\n if (From->getSuperClass())\n Importer.FromDiag(From->getSuperClassLoc(), diag::note_odr_objc_superclass) << From->getSuperClass()->getDeclName();"},{R,5454,"ExpectedDecl ASTNodeImporter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {\n // ...\n if (!Impl) {\n // ...\n } else {\n // ...\n // Verify that the existing @implementation has the same superclass.\n if ((Super && !Impl->getSuperClass()) || (!Super && Impl->getSuperClass()) || (Super && Impl->getSuperClass() && !declaresSameEntity(Super->getCanonicalDecl(), Impl->getSuperClass()))) {\n // ...\n // FIXME: It would be nice to have the location of the superclass\n // below.\n if (Impl->getSuperClass())\n Importer.ToDiag(Impl->getLocation(), diag::note_odr_objc_superclass) << Impl->getSuperClass()->getDeclName();"},{R,5461,"ExpectedDecl ASTNodeImporter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {\n // ...\n if (!Impl) {\n // ...\n } else {\n // ...\n // Verify that the existing @implementation has the same superclass.\n if ((Super && !Impl->getSuperClass()) || (!Super && Impl->getSuperClass()) || (Super && Impl->getSuperClass() && !declaresSameEntity(Super->getCanonicalDecl(), Impl->getSuperClass()))) {\n // ...\n if (D->getSuperClass())\n Importer.FromDiag(D->getLocation(), diag::note_odr_objc_superclass) << D->getSuperClass()->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/interface/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:21:17: note: inherits from superclass \'I2\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:21:17: note: inherits from superclass \'I1\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:23: note: inherits from superclass \'I12\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:99:23: note: inherits from superclass \'I11\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: note: inherits from superclass \'I12\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:99:17: note: inherits from superclass \'I11\' here"} | ["clang/test/ASTMerge/interface/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:21:17: note: inherits from superclass \'I2\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:21:17: note: inherits from superclass \'I1\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:23: note: inherits from superclass \'I12\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:99:23: note: inherits from superclass \'I11\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface1.m:100:17: note: inherits from superclass \'I12\' here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/interface/Inputs/interface2.m:99:17: note: inherits from superclass \'I11\' here"} | ||
Line 7,583: | Line 7,595: | ||
}, | }, | ||
["note_odr_objc_synthesize_ivar_here"]={ | ["note_odr_objc_synthesize_ivar_here"]={ | ||
[ | [b]="property is synthesized to ivar %0 here", | ||
[ | [d]=c, | ||
[ | [e]="property is synthesized to ivar (.*?) here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"14a49e2fbe1c",1291746723,"Implement AST import for Objective-C property implementations","Implement AST import for Objective-C property implementations\n(@synthesize and @dynamic).\n\nllvm-svn: 121159"}, | [h]={"14a49e2fbe1c",1291746723,"Implement AST import for Objective-C property implementations","Implement AST import for Objective-C property implementations\n(@synthesize and @dynamic).\n\nllvm-svn: 121159"}, | ||
[i]={{ | [i]={{R,5623,"ExpectedDecl ASTNodeImporter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D) {\n // ...\n if (!ToImpl) {\n // ...\n } else {\n // ...\n // For @synthesize, check that we have the same\n if (D->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize && Ivar != ToImpl->getPropertyIvarDecl()) {\n // ...\n Importer.FromDiag(D->getPropertyIvarDeclLoc(), diag::note_odr_objc_synthesize_ivar_here) << D->getPropertyIvarDecl()->getDeclName();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property2.m:29:21: note: property is synthesized to ivar \'ivar2\' here"} | ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property2.m:29:21: note: property is synthesized to ivar \'ivar2\' here"} | ||
Line 7,595: | Line 7,607: | ||
}, | }, | ||
["note_odr_parameter_pack_non_pack"]={ | ["note_odr_parameter_pack_non_pack"]={ | ||
[ | [b]="%select{parameter|parameter pack}0 declared here", | ||
[ | [d]=c, | ||
[ | [e]="(?:parameter|parameter pack) declared here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a082a49d9e71",1291144490,"Implement basic AST importing and merging support for class template","Implement basic AST importing and merging support for class template\ndeclarations.\n\nllvm-svn: 120448"}, | [h]={"a082a49d9e71",1291144490,"Implement basic AST importing and merging support for class template","Implement basic AST importing and merging support for class template\ndeclarations.\n\nllvm-svn: 120448"}, | ||
[i]={{ | [i]={{w,1841,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, TemplateTypeParmDecl *D1, TemplateTypeParmDecl *D2) {\n if (D1->isParameterPack() != D2->isParameterPack()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_parameter_pack_non_pack) << D1->isParameterPack();"},{w,1859,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, NonTypeTemplateParmDecl *D1, NonTypeTemplateParmDecl *D2) {\n if (D1->isParameterPack() != D2->isParameterPack()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_parameter_pack_non_pack) << D1->isParameterPack();"},{w,1890,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, TemplateTemplateParmDecl *D1, TemplateTemplateParmDecl *D2) {\n if (D1->isParameterPack() != D2->isParameterPack()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_parameter_pack_non_pack) << D1->isParameterPack();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:117:17: note: parameter declared here"} | ["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:117:17: note: parameter declared here"} | ||
Line 7,607: | Line 7,619: | ||
}, | }, | ||
["note_odr_tag_kind_here"]={ | ["note_odr_tag_kind_here"]={ | ||
[ | [b]="%0 is a %select{struct|interface|union|class|enum}1 here", | ||
[ | [d]=c, | ||
[ | [e]="(.*?) is a (?:struct|interface|union|class|enum) here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1480,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (D1->isUnion() != D2->isUnion()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_tag_kind_here) << D1->getDeclName() << (unsigned)D1->getTagKind();"}}, | |||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:18:7: note: \'S2\' is a union here"} | ["clang/test/ASTMerge/struct/test.c"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/struct/Inputs/struct2.c:18:7: note: \'S2\' is a union here"} | ||
Line 7,619: | Line 7,631: | ||
}, | }, | ||
["note_odr_template_parameter_here"]={ | ["note_odr_template_parameter_here"]={ | ||
[ | [b]="template parameter declared here", | ||
[ | [d]=c, | ||
[ | [e]="template parameter declared here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a082a49d9e71",1291144490,"Implement basic AST importing and merging support for class template","Implement basic AST importing and merging support for class template\ndeclarations.\n\nllvm-svn: 120448"}, | [h]={"a082a49d9e71",1291144490,"Implement basic AST importing and merging support for class template","Implement basic AST importing and merging support for class template\ndeclarations.\n\nllvm-svn: 120448"}, | ||
[i]={{ | [i]={{w,1819,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, TemplateParameterList *Params1, TemplateParameterList *Params2) {\n // ...\n for (unsigned I = 0, N = Params1->size(); I != N; ++I) {\n if (Params1->getParam(I)->getKind() != Params2->getParam(I)->getKind()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Params1->getParam(I)->getLocation(), diag::note_odr_template_parameter_here);"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/class-template/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp:12:18: note: template parameter declared here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp:21:31: note: template parameter declared here"} | ["clang/test/ASTMerge/class-template/test.cpp"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp:12:18: note: template parameter declared here","/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/class-template/Inputs/class-template2.cpp:21:31: note: template parameter declared here"} | ||
Line 7,631: | Line 7,643: | ||
}, | }, | ||
["note_odr_template_parameter_list"]={ | ["note_odr_template_parameter_list"]={ | ||
[ | [b]="template parameter list also declared here", | ||
[ | [d]=c, | ||
[ | [e]="template parameter list also declared here", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"a082a49d9e71",1291144490,"Implement basic AST importing and merging support for class template","Implement basic AST importing and merging support for class template\ndeclarations.\n\nllvm-svn: 120448"}, | [h]={"a082a49d9e71",1291144490,"Implement basic AST importing and merging support for class template","Implement basic AST importing and merging support for class template\ndeclarations.\n\nllvm-svn: 120448"}, | ||
[i]={{ | [i]={{w,1807,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, TemplateParameterList *Params1, TemplateParameterList *Params2) {\n if (Params1->size() != Params2->size()) {\n if (Context.Complain) {\n // ...\n Context.Diag1(Params1->getTemplateLoc(), diag::note_odr_template_parameter_list);"}} | ||
}, | }, | ||
["note_odr_value_here"]={ | ["note_odr_value_here"]={ | ||
[ | [b]="declared here with type %0", | ||
[ | [d]=c, | ||
[ | [e]="declared here with type (.*?)", | ||
[f]=a, | [f]=a, | ||
[g]=a, | |||
[h]={"3aed6cdd5e61",1265663379,"Implement basic importing and merging of variable declarations within","Implement basic importing and merging of variable declarations within\nthe AST importer. This doesn\'t actually do anything (yet), because we\ndon\'t have driver logic for merging ASTs.\n\nllvm-svn: 95570"}, | [h]={"3aed6cdd5e61",1265663379,"Implement basic importing and merging of variable declarations within","Implement basic importing and merging of variable declarations within\nthe AST importer. This doesn\'t actually do anything (yet), because we\ndon\'t have driver logic for merging ASTs.\n\nllvm-svn: 95570"}, | ||
[i]={{ | [i]={{R,3545,"ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {\n // ...\n }\n // Try to find a function in our own (\"to\") context with the same name, same\n // type, and in the same context as the function we\'re importing.\n else if (!LexicalDC->isFunctionOrMethod()) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n // ...\n if (auto *FoundFunction = dyn_cast<FunctionDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(FoundFunction->getLocation(), diag::note_odr_value_here) << FoundFunction->getType();"},{R,3917,"ExpectedDecl ASTNodeImporter::VisitFieldDecl(FieldDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(FoundField->getLocation(), diag::note_odr_value_here) << FoundField->getType();"},{R,3996,"ExpectedDecl ASTNodeImporter::VisitIndirectFieldDecl(IndirectFieldDecl *D) {\n // ...\n for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {\n if (auto *FoundField = dyn_cast<IndirectFieldDecl>(FoundDecls[I])) {\n // ...\n Importer.ToDiag(FoundField->getLocation(), diag::note_odr_value_here) << FoundField->getType();"},{R,4187,"ExpectedDecl ASTNodeImporter::VisitObjCIvarDecl(ObjCIvarDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(FoundIvar->getLocation(), diag::note_odr_value_here) << FoundIvar->getType();"},{R,4298,"ExpectedDecl ASTNodeImporter::VisitVarDecl(VarDecl *D) {\n // ...\n if (D->isFileVarDecl()) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n // ...\n if (auto *FoundVar = dyn_cast<VarDecl>(FoundDecl)) {\n // ...\n Importer.ToDiag(FoundVar->getLocation(), diag::note_odr_value_here) << FoundVar->getType();"},{R,4523,"ExpectedDecl ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecl)) {\n // ...\n // Check parameter types.\n for (ObjCMethodDecl::param_iterator P = D->param_begin(), PEnd = D->param_end(), FoundP = FoundMethod->param_begin(); P != PEnd; ++P, ++FoundP) {\n if (!Importer.IsStructurallyEquivalent((*P)->getType(), (*FoundP)->getType())) {\n // ...\n Importer.ToDiag((*FoundP)->getLocation(), diag::note_odr_value_here) << (*FoundP)->getType();"},{R,5503,"ExpectedDecl ASTNodeImporter::VisitObjCPropertyDecl(ObjCPropertyDecl *D) {\n // ...\n for (auto *FoundDecl : FoundDecls) {\n if (auto *FoundProp = dyn_cast<ObjCPropertyDecl>(FoundDecl)) {\n // ...\n // Check property types.\n if (!Importer.IsStructurallyEquivalent(D->getType(), FoundProp->getType())) {\n // ...\n Importer.ToDiag(FoundProp->getLocation(), diag::note_odr_value_here) << FoundProp->getType();"},{w,1872,"static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, NonTypeTemplateParmDecl *D1, NonTypeTemplateParmDecl *D2) {\n // ...\n // Check types.\n if (!IsStructurallyEquivalent(Context, D1->getType(), D2->getType())) {\n if (Context.Complain) {\n // ...\n Context.Diag1(D1->getLocation(), diag::note_odr_value_here) << D1->getType();"}}, | ||
[j]={ | [j]={ | ||
["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property1.m:10:28: note: declared here with type \'float\'"} | ["clang/test/ASTMerge/property/test.m"]={"/var/jenkins/workspace/llvm_stripf_diag_2/misc/llvm-warnings/llvmorg-17.0.6/clang/test/ASTMerge/property/Inputs/property1.m:10:28: note: declared here with type \'float\'"} | ||
Line 7,652: | Line 7,664: | ||
}, | }, | ||
["note_odr_virtual_base"]={ | ["note_odr_virtual_base"]={ | ||
[ | [b]="%select{non-virtual|virtual}0 derivation here", | ||
[ | [d]=c, | ||
[ | [e]="(?:non\\-virtual|virtual) derivation here", | ||
[f]=a, | [f]=a, | ||
[h]={ | [g]=a, | ||
[i]={{ | [h]={kc,1265916115,jc,ic}, | ||
[i]={{w,1607,"/// Determine structural equivalence of two records.\nstatic bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, RecordDecl *D1, RecordDecl *D2) {\n // ...\n if (auto *D1CXX = dyn_cast<CXXRecordDecl>(D1)) {\n if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {\n // ...\n // Check the base classes.\n for (CXXRecordDecl::base_class_iterator Base1 = D1CXX->bases_begin(), BaseEnd1 = D1CXX->bases_end(), Base2 = D2CXX->bases_begin(); Base1 != BaseEnd1; ++Base1, ++Base2) {\n // ...\n // Check virtual vs. non-virtual inheritance mismatch.\n if (Base1->isVirtual() != Base2->isVirtual()) {\n if (Context.Complain) {\n // ...\n Context.Diag2(Base2->getBeginLoc(), diag::note_odr_virtual_base) << Base2->isVirtual() << Base2->getSourceRange();"}} | |||
}, | }, | ||
["note_omp_assumption_clause_continue_here"]={ | ["note_omp_assumption_clause_continue_here"]={ | ||
[ | [b]={{nil,I,"the ignored tokens spans until here"}}, | ||
[ | [d]=c, | ||
[ | [e]="the ignored tokens spans until here", | ||
[ | [f]=a, | ||
[ | [g]=gb, | ||
[h]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | [h]={"38d18d93534d",1601621202,"[SVE] Add support to vectorize_width loop pragma for scalable vectors","[SVE] Add support to vectorize_width loop pragma for scalable vectors\n\nThis patch adds support for two new variants of the vectorize_width\npragma:\n\n1. vectorize_width(X[, fixed|scalable]) where an optional second\nparameter is passed to the vectorize_width pragma, which indicates if\nthe user wishes to use fixed width or scalable vectorization. For\nexample the user can now write something like:\n\n #pragma clang loop vectorize_width(4, fixed)\nor\n #pragma clang loop vectorize_width(4, scalable)\n\nIn the absence of a second parameter it is assumed the user wants\nfixed width vectorization, in order to maintain compatibility with\nexisting code.\n2. vectorize_width(fixed|scalable) where the width is left unspecified,\nbut the user hints what type of vectorization they prefer, either\nfixed width or scalable.\n\nI have implemented this by making use of the LLVM loop hint attribute:\n\n llvm.loop.vectorize.scalable.enable\n\nTests were added to\n\n clang/test/CodeGenCXX/pragma-loop.cpp\n\nfor both the \'fixed\' and \'scalable\' optional parameter.\n\nSee this thread for context: http://lists.llvm.org/pipermail/cfe-dev/2020-November/067262.html\n\nDifferential Revision: https://reviews.llvm.org/D89031"}, | ||
[i]={{"clang/lib/Parse/ParseOpenMP.cpp",1690,"/// `omp assumes` or `omp begin/end assumes` <clause> [[,]<clause>]...\n/// where\n///\n/// clause:\n/// \'ext_IMPL_DEFINED\'\n/// \'absent\' \'(\' directive-name [, directive-name]* \')\'\n/// \'contains\' \'(\' directive-name [, directive-name]* \')\'\n/// \'holds\' \'(\' scalar-expression \')\'\n/// \'no_openmp\'\n/// \'no_openmp_routines\'\n/// \'no_parallelism\'\n///\nvoid Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind, SourceLocation Loc) {\n // ...\n auto SkipBraces = [&](llvm::StringRef Spelling, bool IssueNote) {\n // ...\n if (IssueNote && T.getCloseLocation().isValid())\n Diag(T.getCloseLocation(), diag::note_omp_assumption_clause_continue_here);"}}, | [i]={{"clang/lib/Parse/ParseOpenMP.cpp",1690,"/// `omp assumes` or `omp begin/end assumes` <clause> [[,]<clause>]...\n/// where\n///\n/// clause:\n/// \'ext_IMPL_DEFINED\'\n/// \'absent\' \'(\' directive-name [, directive-name]* \')\'\n/// \'contains\' \'(\' directive-name [, directive-name]* \')\'\n/// \'holds\' \'(\' scalar-expression \')\'\n/// \'no_openmp\'\n/// \'no_openmp_routines\'\n/// \'no_parallelism\'\n///\nvoid Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind, SourceLocation Loc) {\n // ...\n auto SkipBraces = [&](llvm::StringRef Spelling, bool IssueNote) {\n // ...\n if (IssueNote && T.getCloseLocation().isValid())\n Diag(T.getCloseLocation(), diag::note_omp_assumption_clause_continue_here);"}}, |
edits