|
|
Line 1: |
Line 1: |
| local a=""; | | local a=""; |
| local b="id_hist"; | | local b="id_hist"; |
| local c="regex1"; | | local c="regex2"; |
| local d="category_hist"; | | local d="source"; |
| local e="regex2"; | | local e="category_hist"; |
| local f="regex3"; | | local f="regex3"; |
| local g="note\\: "; | | local g="commit"; |
| local h="message_hist"; | | local h="regex1"; |
| local i="hierarchical_hist"; | | local i="hierarchical_hist"; |
| local j="commit"; | | local j="message_hist"; |
| local k="source"; | | local k="(?:error|fatal error)\\: "; |
| local l="tests2"; | | local l="tests2"; |
| local m="10.0"; | | local m="Semantic Issue"; |
| local n="Semantic Issue"; | | local n="5.0"; |
| local o="clang/lib/AST/ExprConstant.cpp"; | | local o="10.0"; |
| local p="9.0"; | | local p="Lexical or Preprocessor Issue"; |
| local q="16.0"; | | local q="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp..."; |
| local r="clang/lib/Sema/SemaDeclCXX.cpp"; | | local r="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 s="12.0"; | | local s="b1c4d5507fad"; |
| local t="11.0"; | | local t="11.0"; |
| local u="7.0"; | | local u="8.0"; |
| local v="8.0"; | | local v="clang/lib/Parse/ParsePragma.cpp"; |
| local w="15.0"; | | local w="clang/lib/Sema/SemaDeclCXX.cpp"; |
| local x="13.0"; | | local x="9.0"; |
| local y="5.0"; | | local y="Parse Issue"; |
| local z="6.0"; | | local z="clang/lib/Lex/PPDirectives.cpp"; |
| local A="clang/lib/Sema/SemaExpr.cpp"; | | local A="12.0"; |
| local B="clang/lib/Sema/SemaExprObjC.cpp"; | | local B="6.0"; |
| local C="clang/lib/Sema/SemaDecl.cpp"; | | local C="15.0"; |
| local D="destructor"; | | local D="clang/lib/Sema/SemaDecl.cpp"; |
| local E="constructor"; | | local E="clang/lib/Sema/SemaOverload.cpp"; |
| local F="read of"; | | local F="14.0"; |
| local G="clang/lib/Sema/SemaTemplate.cpp"; | | local G="clang/lib/Serialization/ASTReader.cpp"; |
| local H="clang/test/SemaObjC/non-trivial-c-union.m:5:9: note: \'U0\' has subobjects that are non-trivial to destruct"; | | local H="clang/lib/Lex/Pragma.cpp"; |
| local I="clang/test/SemaObjC/non-trivial-c-union.m:6:6: note: f0 has type \'__strong id\' that is non-trivial to destruct"; | | local I="clang/lib/Sema/SemaChecking.cpp"; |
| local J="clang/test/SemaObjC/non-trivial-c-union.m:7:13: note: f1 has type \'__weak id\' that is non-trivial to destruct"; | | local J="clang/lib/Sema/SemaAttr.cpp"; |
| local K="clang/lib/AST/ASTStructuralEquivalence.cpp"; | | local K="7.0"; |
| local L="method D"; | | local L="5a8987ca5113"; |
| local M="clang/lib/AST/Interp/Interp.cpp"; | | local M="Update tablegen diagnostic files to be in sync with the def files."; |
| local N="clang/lib/Sema/JumpDiagnostics.cpp"; | | local N="Update tablegen diagnostic files to be in sync with the def files.\n\nllvm-svn: 67004"; |
| local O="assignment to"; | | local O="clang/lib/Sema/SemaExpr.cpp"; |
| local P="increment of"; | | local P="clang/lib/Sema/SemaInit.cpp"; |
| local Q="decrement of";
| | local Q="clang/lib/Sema/SemaExprCXX.cpp"; |
| local R="clang/test/SemaObjC/non-trivial-c-union.m:5:9: note: \'U0\' has subobjects that are non-trivial to copy";
| | local R="0a849f47d2f7"; |
| local S="clang/test/SemaObjC/non-trivial-c-union.m:6:6: note: f0 has type \'__strong id\' that is non-trivial to copy";
| | local S="Add #pragma clang attribute\n\nThe new \'#pragma clang attribute\' directive can be used to apply attributes to\nmultiple declarations. An attribute must satisfy the following conditions to\nbe supported by the pragma:\n- It must have a subject list that\'s defined in the TableGen file.\n- It must be documented.\n- It must not be late parsed.\n- It must have a GNU/C++11 spelling.\n\nDifferential Revision: https://reviews.llvm.org/D30009\n\nllvm-svn: 300539"; |
| local T="clang/test/SemaObjC/non-trivial-c-union.m:7:13: note: f1 has type \'__weak id\' that is non-trivial to copy";
| | local T="Add #pragma clang attribute"; |
| local U="14.0"; | | local U="13.0"; |
| local V="clang/lib/Sema/SemaChecking.cpp"; | | local V="AST Deserialization Issue"; |
| local W="clang/lib/Sema/SemaTemplateInstantiate.cpp"; | | local W="clang/lib/Sema/SemaTemplate.cpp"; |
| local X="clang/lib/Sema/SemaStmt.cpp"; | | local X="clang/test/Parser/pragma-attribute.cpp"; |
| local Y="clang/lib/Sema/SemaType.cpp"; | | local Y="clang/lib/Lex/PPExpressions.cpp"; |
| local Z="clang/lib/Sema/SemaOpenMP.cpp"; | | local Z="clang/lib/Sema/SemaDeclObjC.cpp"; |
| local ab="clang/lib/Sema/SemaInit.cpp"; | | local ab="clang/lib/Lex/PPMacroExpansion.cpp"; |
| local bb="clang/lib/Driver/Driver.cpp"; | | local bb="f881267db9a9"; |
| local cb="clang/lib/AST/ODRDiagsEmitter.cpp"; | | local cb="clang/lib/Sema/SemaExprMember.cpp"; |
| local db="clang/lib/Sema/SemaDeclObjC.cpp"; | | local db="Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit\n\nSee\nhttps://docs.google.com/document/d/1xMkTZMKx9llnMPgso0jrx3ankI4cv60xeZ0y4ksf4wc/preview\nfor background discussion.\n\nThis adds a warning, flags and pragmas to limit the number of\npre-processor tokens either at a certain point in a translation unit, or\noverall.\n\nThe idea is that this would allow projects to limit the size of certain\nwidely included headers, or for translation units overall, as a way to\ninsert backstops for header bloat and prevent compile-time regressions.\n\nDifferential revision: https://reviews.llvm.org/D72703"; |
| local eb="typeid applied to";
| | local eb="Mass-rename the handful of error_* diagnostics to err_*."; |
| local fb="clang/lib/AST/ASTImporter.cpp";
| | local fb="Mass-rename the handful of error_* diagnostics to err_*.\n\nllvm-svn: 288545"; |
| local gb="clang/lib/Sema/SemaDeclAttr.cpp";
| | local gb="739b410f1ff5"; |
| local hb="clang/lib/Sema/SemaExprCXX.cpp";
| | local hb="Add a warning, flags and pragmas to limit the number of pre-processor tokens in a translation unit"; |
| local ib="clang/lib/Sema/SemaCoroutine.cpp"; | | local ib="95f50964fbf5"; |
| local jb="For P0784R7: Add support for dynamic allocation with new / delete during"; | | local jb="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 kb="member call on"; | | local kb="Implement P2361 Unevaluated string literals"; |
| local lb="For P0784R7: Add support for dynamic allocation with new / delete during\nconstant evaluation.\n\nllvm-svn: 373036"; | | local lb="clang/lib/Sema/SemaExprObjC.cpp"; |
| local mb="dynamic_cast of"; | | local mb="16.0"; |
| local nb="AST Deserialization Issue"; | | local nb="[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 ob="da1b4347e41a";
| | local ob="invalid"; |
| local pb="clang/test/CXX/expr/expr.const/p2-0x.cpp";
| | local pb="clang/lib/Basic/Targets/PPC.cpp"; |
| local qb="clang/lib/Sema/SemaObjCProperty.cpp";
| | local qb="931fcd3ba011"; |
| local rb=" ";
| | local rb="clang/lib/Sema/SemaType.cpp"; |
| local sb="but in \'A\' found ";
| | local sb="[WebAssembly] Improve clang diagnostics for wasm attributes"; |
| local tb=" is ";
| | local tb="clang/lib/Sema/SemaTemplateVariadic.cpp"; |
| local ub="clang/test/SemaCXX/constant-expression-cxx2a.cpp";
| | local ub="clang/test/SemaCXX/overloaded-operator-decl.cpp"; |
| local vb="clang/lib/Sema/SemaConcept.cpp";
| | local vb=" B"; |
| local wb="class"; | | local wb="clang/lib/Sema/SemaObjCProperty.cpp"; |
| local xb="clang/lib/Sema/SemaOverload.cpp"; | | local xb="static_cast"; |
| local yb="and"; | | local yb="Add #pragma clang module begin/end pragmas and generate them when preprocessing a module.\n\nThese pragmas are intended to simulate the effect of entering or leaving a file\nwith an associated module. This is not completely implemented yet: declarations\nbetween the pragmas will not be attributed to the correct module, but macro\nvisibility is already functional.\n\nModules named by #pragma clang module begin must already be known to clang (in\nsome module map that\'s either loaded or on the search path).\n\nllvm-svn: 302098"; |
| local zb="because"; | | local zb="missing"; |
| local Ab="Parse Issue";
| | local Ab="14f6bfcb52e7"; |
| local Bb="clang/test/SemaObjC/non-trivial-c-union.m:6:6: note: f0 has type \'__strong id\' that is non-trivial to default-initialize";
| | local Bb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata"; |
| local Cb="clang/test/SemaObjC/non-trivial-c-union.m:5:9: note: \'U0\' has subobjects that are non-trivial to default-initialize";
| | local Cb="expected \'begin\' or \'end\'"; |
| local Db=" is not allowed in a constant expression";
| | local Db="[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 Eb="Lexical or Preprocessor Issue";
| | local Eb="clang/lib/Sema/SemaStmt.cpp"; |
| local Fb="clang/test/SemaObjC/non-trivial-c-union.m:7:13: note: f1 has type \'__weak id\' that is non-trivial to default-initialize";
| | local Fb="Refactoring Invocation Issue"; |
| local Gb="destruction of"; | | local Gb="11.1"; |
| local Hb="reference"; | | local Hb="clang/lib/Lex/PPLexerChange.cpp"; |
| local Ib="Improve static checks for sprintf and __builtin___sprintf_chk"; | | local Ib="d13863008b38"; |
| local Jb="Implement P2361 Unevaluated string literals"; | | local Jb="Add #pragma clang module begin/end pragmas and generate them when preprocessing a module."; |
| local Kb="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 Kb="clang/lib/Parse/ParseDecl.cpp"; |
| local Lb="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 Lb=" option"; |
| local Mb="61d065e21ff3"; | | local Mb="C-style cast"; |
| local Nb="[clang] Implement objc_non_runtime_protocol to remove protocol metadata\n\nSummary:\nMotivated by the new objc_direct attribute, this change adds a new\nattribute that remotes metadata from Protocols that the programmer knows\nisn\'t going to be used at runtime. We simply have the frontend skip\ngenerating any protocol metadata entries (e.g. OBJC_CLASS_NAME,\n_OBJC_$_PROTOCOL_INSTANCE_METHDOS, _OBJC_PROTOCOL, etc) for a protocol\nmarked with `__attribute__((objc_non_runtime_protocol))`.\n\nThere are a few APIs used to retrieve a protocol at runtime.\n`@protocol(SomeProtocol)` will now error out of the requested protocol\nis marked with attribute. `objc_getProtocol` will return `NULL` which\nis consistent with the behavior of a non-existing protocol.\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D75574"; | | local Nb="reinterpret_cast"; |
| local Ob="[clang] Implement objc_non_runtime_protocol to remove protocol metadata"; | | local Ob="clang/lib/Parse/ParseExprCXX.cpp"; |
| local Pb="14f6bfcb52e7"; | | local Pb="clang/test/Parser/cxx2a-concepts-requires-expr.cpp"; |
| local Qb="clang/lib/Sema/SemaModule.cpp"; | | local Qb="dynamic_cast"; |
| local Rb="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 Rb="clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp"; |
| local Sb="Let clang atomic builtins fetch add/sub support floating point types"; | | local Sb="functional-style cast"; |
| local Tb="When checking scopes for indirect goto, be more permissive (but still safe)";
| | local Tb="61d065e21ff3"; |
| local Ub="base class";
| | local Ub="Let clang atomic builtins fetch add/sub support floating point types"; |
| local Vb="95f50964fbf5"; | | local Vb="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 Wb=" here"; | | local Wb="Add explicit attributes to mark functions as having had their\nCoreFoundation object-transfer properties audited, and add a #pragma\nto cause them to be automatically applied to functions in a particular\nspan of code. This has to be implemented largely in the preprocessor\nbecause of the requirement that the region be entirely contained in\na single file; that\'s hard to impose from the parser without registering\nfor a ton of callbacks.\n\nllvm-svn: 140846"; |
| local Xb="cf819ab38311"; | | local Xb="Add explicit attributes to mark functions as having had their"; |
| local Yb="clang/lib/Sema/SemaAvailability.cpp"; | | local Yb="32f5fe1467c4"; |
| local Zb="clang/lib/Sema/AnalysisBasedWarnings.cpp"; | | local Zb="unavailable"; |
| local ac="6d485ff455ea"; | | local ac="deleted"; |
| local bc="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 bc="lvalue"; |
| local cc="[c++20] Determine whether a defaulted comparison should be deleted or\nconstexpr."; | | local cc="rvalue"; |
| local dc="constexpr: semantic checking for constexpr functions and constructors. Based in"; | | local dc="clang/lib/Sema/SemaDeclAttr.cpp"; |
| local ec="[Clang] Implement P2738R1 - constexpr cast from void*"; | | local ec="clang/test/Preprocessor/line-directive.c"; |
| local fc="copy"; | | local fc="Modules Issue"; |
| local gc="clang/test/SemaCXX/constexpr-string.cpp"; | | local gc="__global__"; |
| local hc="eb3c10c248ac"; | | local hc="__host__"; |
| local ic="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 ic="__host__ __device__"; |
| local jc="[c++20] Determine whether a defaulted comparison should be deleted or";
| | local jc="__device__"; |
| local kc="copy constructor";
| | local kc="clang/lib/Parse/ParseDeclCXX.cpp"; |
| local lc="move constructor";
| | local lc="Nullability Issue"; |
| local mc="clang/lib/Lex/PPMacroExpansion.cpp";
| | local mc="fatal error\\: "; |
| local nc="5253d9138eb3";
| | local nc="Improve diagnostics for malformed delete operator function declarations.\n\nllvm-svn: 91180"; |
| local oc="copy assignment operator";
| | local oc="Improve diagnostics for malformed delete operator function declarations."; |
| local pc="move assignment operator";
| | local pc="12308f41e7e2"; |
| local qc="clang/lib/Lex/ModuleMap.cpp";
| | local qc="2a20bd1a9457"; |
| local rc="f27afedc6c86";
| | local rc="clang/lib/Parse/ParseStmt.cpp"; |
| local sc="no";
| | local sc="Introduced pragmas for audited nullability regions."; |
| local tc="Documentation Issue";
| | local tc="clang/test/Sema/pragma-arc-cf-code-audited.c"; |
| local uc="clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp";
| | local uc="Introduced pragmas for audited nullability regions.\n\nIntroduce the clang pragmas \"assume_nonnull begin\" and \"assume_nonnull\nend\" in which we make default assumptions about the nullability of many\nunannotated pointers:\n\n - Single-level pointers are inferred to __nonnull\n - NSError** in a (function or method) parameter list is inferred to\n NSError * __nullable * __nullable.\n - CFErrorRef * in a (function or method) parameter list is inferred\n to CFErrorRef __nullable * __nullable.\n - Other multi-level pointers are never inferred to anything.\n\nImplements rdar://problem/19191042.\n\nllvm-svn: 240156"; |
| local vc="[Clang] Implement P2738R1 - constexpr cast from void*\n\nReviewed By: #clang-language-wg, erichkeane\n\nDifferential Revision: https://reviews.llvm.org/D153702";
| |
| local wc="default constructor";
| |
| local xc="C++1y: support simple variable assignments in constexpr functions.\n\nllvm-svn: 180603";
| |
| local yc="no ";
| |
| local zc="construction of";
| |
| local Ac="clang/lib/AST/CommentSema.cpp";
| |
| local Bc="C++1y: support simple variable assignments in constexpr functions.";
| |
| local Cc="default";
| |
| local Dc="3da88fac5416";
| |
| local Ec="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 Fc="The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp...";
| |
| local Gc="clang/test/Sema/flexible-array-init.c:20:7: note: initialized flexible array member \'y\' is here";
| |
| local Hc="b1c4d5507fad";
| |
| local Ic="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 Jc="but in ";
| |
| local Kc="clang/test/SemaSYCL/zero-length-arrays.cpp:25:10: note: field of illegal type \'double[0]\' declared here";
| |
| local Lc="Add a warning for not packing non-POD members in packed structs\n\nDifferential Revision: https://reviews.llvm.org/D118511";
| |
| local Mc=" found ";
| |
| local Nc="Add a warning for not packing non-POD members in packed structs";
| |
| local Oc="92f241f18812";
| |
| local Pc="ec273d3e3a8c";
| |
| local Qc="function";
| |
| local Rc="\'B\'";
| |
| local Sc="Properly compute triviality for explicitly-defaulted or deleted special members.";
| |
| local Tc="definition here";
| |
| local Uc="357362d00b04";
| |
| local Vc="[clang] New __attribute__((__clang_arm_mve_alias)).";
| |
| local Wc="clang/lib/Parse/ParseObjc.cpp";
| |
| local Xc="[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 Yc="Add checks and diagnostics for many of the cases which C++11 considers to not\nbe constant expressions.\n\nllvm-svn: 146479";
| |
| local Zc="Add checks and diagnostics for many of the cases which C++11 considers to not";
| |
| local ad="7c11da0cfd33";
| |
| local bd="clang/lib/Sema/SemaLookup.cpp";
| |
| local cd="clang/test/SemaCXX/constant-expression-cxx11.cpp";
| |
| local dd="Automatic Reference Counting.";
| |
| local ed="PR10217: Provide diagnostics explaining why an implicitly-deleted special";
| |
| local fd="field";
| |
| local gd="31168b077c36";
| |
| local hd="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 id="temporary";
| |
| local jd="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 kd="When AST merging for record declarations fails, warn about the";
| |
| local ld="7eeb59752a60";
| |
| local md="PR10217: Provide diagnostics explaining why an implicitly-deleted special\nmember function is deleted.\n\nllvm-svn: 153773";
| |
| local nd="852265ff1c19";
| |
| local od="256d39d47d27";
| |
| local pd="clang/test/CXX/class/class.union/p1.cpp";
| |
| local qd="objc-arc: Diagnose when captured variable in block literals";
| |
| local rd="[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 sd="Coroutines Issue";
| |
| local td="[WebAssembly] Improve clang diagnostics for wasm attributes";
| |
| local ud="clang/lib/Serialization/ASTReader.cpp";
| |
| local vd="clang/test/Modules/odr_hash.cpp";
| |
| local wd="931fcd3ba011";
| |
| local xd="clang/test/SemaObjC/dictionary-literal-duplicates.m:33:5: note: previous equal key is here";
| |
| local yd="3dbcea8b957a";
| |
| local zd="clang/test/CXX/basic/basic.types/p10.cpp";
| |
| local Ad="clang/test/SemaObjC/attr-designated-init.m:38:1: note: method marked as designated initializer of the class here";
| |
| local Bd="clang/test/Sema/nonnull.c:161:16: note: declared \'returns_nonnull\' here";
| |
| local Cd="clang/lib/Sema/SemaStmtAsm.cpp";
| |
| local Dd="volatile";
| |
| local Ed="memcpy";
| |
| local Fd="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 Gd="ARC Casting Rules";
| |
| local Hd="bd8791610948";
| |
| local Id="Reland [clang] Check unsupported types in expressions";
| |
| local Jd="previous documentation";
| |
| local Kd="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 Ld="Modules Issue";
| |
| local Md="pointer";
| |
| local Nd="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";
| |
|
| |
|
| return { | | return { |
| ["note_access_protected_restricted_noobject"]={ | | ["err_operator_arrow_circular"]={ |
| [b]="note_access_protected_restricted_noobject", | | [b]="err_operator_arrow_circular", |
| [h]="must name member using the type of the current context %0", | | [j]="circular pointer delegation detected", |
| [i]="must name member using the type of the current context A", | | [i]="circular pointer delegation detected", |
| [c]=g, | | [h]=k, |
| [e]="must name member using the type of the current context (.*?)", | | [c]="circular pointer delegation detected", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"10ce958550c7",1254269981,"self-referecing operator \'->\' member function was causing","self-referecing operator \'->\' member function was causing\ninfinit recursion. This patch fixes it. [13.3.1.2]-p2\n\nllvm-svn: 83124"}, |
| [k]={{"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);"}}, | | [d]={{Q,7630,"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 (!CTypes.insert(CBaseType).second) {\n Diag(OpLoc, diag::err_operator_arrow_circular) << StartingType;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/class.access/class.protected/p1.cpp"]={"clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:250:10: note: must name member using the type of the current context \'test7::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::C\'","clang/test/CXX/class.access/class.protected/p1.cpp:288:10: note: must name member using the type of the current context \'test8::D\'","clang/test/CXX/class.access/class.protected/p1.cpp:434:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:436:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:438:29: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:441:10: note: must name member using the type of the current context \'test14::B\'","clang/test/CXX/class.access/class.protected/p1.cpp:445:10: note: must name member using the type of the current context \'test14::B\'"} | | ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:275:4: error: circular pointer delegation detected","clang/test/SemaCXX/overloaded-operator.cpp:291:4: error: circular pointer delegation detected"} |
| } | | } |
| }, | | }, |
| ["note_access_protected_restricted_object"]={ | | ["err_operator_arrow_depth_exceeded"]={ |
| [b]="note_access_protected_restricted_object", | | [b]="err_operator_arrow_depth_exceeded", |
| [h]="can only access this member on an object of type %0", | | [j]="use of \'operator->\' on type %0 would invoke a sequence of more than %1 \'operator->\' calls", |
| [i]="can only access this member on an object of type A", | | [i]="use of \'operator->\' on type A would invoke a sequence of more than B \'operator->\' calls", |
| [c]=g, | | [h]=k, |
| [e]="can only access this member on an object of type (.*?)", | | [c]="use of \'operator\\-\\>\' on type (.*?) would invoke a sequence of more than (.*?) \'operator\\-\\>\' calls", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"79c927bfe9fc",1383766311,"Add a limit to the length of a sequence of \'operator->\' functions we will","Add a limit to the length of a sequence of \'operator->\' functions we will\nfollow when building a class member access expression. Based on a patch by\nRahul Jain!\n\nllvm-svn: 194161"}, |
| [k]={{"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);"}}, | | [d]={{Q,7588,"ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor) {\n // ...\n // C++ [over.match.oper]p8:\n // [...] When operator->returns, the operator-> is applied to the value\n // returned, with the original second operand.\n if (OpKind == tok::arrow) {\n // ...\n while (BaseType->isRecordType()) {\n if (OperatorArrows.size() >= getLangOpts().ArrowDepth) {\n Diag(OpLoc, diag::err_operator_arrow_depth_exceeded) << StartingType << getLangOpts().ArrowDepth << Base->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp"]={"clang/test/CXX/dcl.decl/dcl.decomp/p4.cpp:223:9: note: can only access this member on an object of type \'p0969r0::D\'"} | | ["clang/test/SemaCXX/operator-arrow-depth.cpp"]={"clang/test/SemaCXX/operator-arrow-depth.cpp:25:12: error: use of \'operator->\' on type \'B<10 / 2 + 1>\' would invoke a sequence of more than 10 \'operator->\' calls"} |
| } | | } |
| }, | | }, |
| ["note_add_deprecation_attr"]={ | | ["err_operator_delete_dependent_param_type"]={ |
| [b]="note_add_deprecation_attr", | | [b]="err_operator_delete_dependent_param_type", |
| [h]="add a deprecation attribute to the declaration to silence this warning", | | [j]="%0 cannot take a dependent type as first parameter; use %1 instead", |
| [i]="add a deprecation attribute to the declaration to silence this warning", | | [i]="A cannot take a dependent type as first parameter; use B instead", |
| [c]=g, | | [h]=k, |
| [e]="add a deprecation attribute to the declaration to silence this warning", | | [c]="(.*?) cannot take a dependent type as first parameter; use (.*?) instead", |
| [f]=a, | | [f]=a, |
| [d]=tc, | | [e]=m, |
| [j]={"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"}, | | [g]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, |
| [k]={{Ac,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);"}}, | | [d]={{w,16101,"static bool CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidTy, ExpectedFirstParamType, diag::err_operator_delete_dependent_param_type, diag::err_operator_delete_param_type))"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/cxx2a-destroying-delete.cpp"]={"clang/test/SemaCXX/cxx2a-destroying-delete.cpp:141:10: error: \'operator delete\' cannot take a dependent type as first parameter; use \'D<T> *\' instead"} |
| } | | } |
| }, | | }, |
| ["note_add_synthesize_directive"]={ | | ["err_operator_delete_param_type"]={ |
| [b]={{nil,y,"note_add_synthesize_directive"}}, | | [b]="err_operator_delete_param_type", |
| [h]={{nil,y,"add a \'@synthesize\' directive"}}, | | [j]="first parameter of %0 must have type %1", |
| [i]={{nil,y,"add a \'@synthesize\' directive"}}, | | [i]="first parameter of A must have type B", |
| [c]=g, | | [h]=k, |
| [e]="add a \'@synthesize\' directive", | | [c]="first parameter of (.*?) must have type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={pc,1260573802,oc,nc}, |
| [k]={{qb,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);"}}, | | [d]={{w,16102,"static bool CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidTy, ExpectedFirstParamType, diag::err_operator_delete_dependent_param_type, diag::err_operator_delete_param_type))"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/default-synthesize.m"]={"clang/test/SemaObjC/default-synthesize.m:140:1: note: add a \'@synthesize\' directive"} | | ["clang/test/SemaCXX/cxx2a-destroying-delete.cpp"]={"clang/test/SemaCXX/cxx2a-destroying-delete.cpp:19:6: error: first parameter of \'operator delete\' must have type \'void *\'","clang/test/SemaCXX/cxx2a-destroying-delete.cpp:30:8: error: first parameter of \'operator delete\' must have type \'A *\'"} |
| } | | } |
| }, | | }, |
| ["note_additional_parens_for_variable_declaration"]={ | | ["err_operator_new_default_arg"]={ |
| [b]="note_additional_parens_for_variable_declaration", | | [b]="err_operator_new_default_arg", |
| [h]="add a pair of parentheses to declare a variable", | | [j]="parameter of %0 cannot have a default argument", |
| [i]="add a pair of parentheses to declare a variable", | | [i]="parameter of A cannot have a default argument", |
| [c]=g, | | [h]=k, |
| [e]="add a pair of parentheses to declare a variable", | | [c]="parameter of (.*?) cannot have a default argument", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"7e0b207e5478",1260726823,"More improvements to checking allocation and deallocation functions.","More improvements to checking allocation and deallocation functions.\n\nllvm-svn: 91244"}, |
| [k]={{Y,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, \")\");"}}, | | [d]={{w,16070,"static bool CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n // C++ [basic.stc.dynamic.allocation]p1:\n // The first parameter shall not have an associated default argument.\n if (FnDecl->getParamDecl(0)->hasDefaultArg())\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_default_arg) << FnDecl->getDeclName() << FnDecl->getParamDecl(0)->getDefaultArgRange();"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [Rb]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:28:9: error: parameter of \'operator new\' cannot have a default argument"} |
| } | | } |
| }, | | }, |
| ["note_addrof_ovl_candidate_disabled_by_enable_if_attr"]={ | | ["err_operator_new_delete_declared_in_namespace"]={ |
| [b]="note_addrof_ovl_candidate_disabled_by_enable_if_attr", | | [b]="err_operator_new_delete_declared_in_namespace", |
| [h]="candidate function made ineligible by enable_if", | | [j]="%0 cannot be declared inside a namespace", |
| [i]="candidate function made ineligible by enable_if", | | [i]="A cannot be declared inside a namespace", |
| [c]=g, | | [h]=k, |
| [e]="candidate function made ineligible by enable_if", | | [c]="(.*?) cannot be declared inside a namespace", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={pc,1260573802,oc,nc}, |
| [k]={{xb,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);"}}, | | [d]={{w,15951,"static inline bool CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (isa<NamespaceDecl>(DC)) {\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_declared_in_namespace) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:8:8: error: \'operator delete\' cannot be declared inside a namespace"} |
| } | | } |
| }, | | }, |
| ["note_alias_mangled_name_alternative"]={ | | ["err_operator_new_delete_declared_static"]={ |
| [b]="note_alias_mangled_name_alternative", | | [b]="err_operator_new_delete_declared_static", |
| [h]="function by that name is mangled as \"%0\"", | | [j]="%0 cannot be declared static in global scope", |
| [i]="function by that name is mangled as \"A\"", | | [i]="A cannot be declared static in global scope", |
| [c]=g, | | [h]=k, |
| [e]="function by that name is mangled as \"(.*?)\"", | | [c]="(.*?) cannot be declared static in global scope", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={pc,1260573802,oc,nc}, |
| [k]={{"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());"}}, | | [d]={{w,15958,"static inline bool CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (isa<TranslationUnitDecl>(DC) && FnDecl->getStorageClass() == SC_Static) {\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_declared_static) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CodeGen/attr-ifunc.cpp"]={"clang/test/CodeGen/attr-ifunc.cpp:5:30: note: function by that name is mangled as \"_Z8f1_ifuncv\"","clang/test/CodeGen/attr-ifunc.cpp:12:40: note: function by that name is mangled as \"_Z20f6_resolver_resolverv\"","clang/test/CodeGen/attr-ifunc.cpp:17:30: note: function by that name is mangled as \"_Z11f6_resolverv\""} | | ["clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp"]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp:12:13: error: \'operator delete\' cannot be declared static in global scope"} |
| } | | } |
| }, | | }, |
| ["note_alias_requires_mangled_name"]={ | | ["err_operator_new_delete_dependent_result_type"]={ |
| [b]="note_alias_requires_mangled_name", | | [b]="err_operator_new_delete_dependent_result_type", |
| [h]="the %select{function or variable|function}0 specified in an %select{alias|ifunc}1 must refer to its mangled name", | | [j]="%0 cannot have a dependent return type; use %1 instead", |
| [i]={{nil,nil,{"the ",{"function or variable",Qc}," specified in an ",{"alias","ifunc"}," must refer to its mangled name"}}}, | | [i]="A cannot have a dependent return type; use B instead", |
| [c]=g, | | [h]=k, |
| [e]="the (?:function or variable|function) specified in an (?:alias|ifunc) must refer to its mangled name", | | [c]="(.*?) cannot have a dependent return type; use (.*?) instead", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, |
| [k]={{"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;"}}, | | [d]={{w,16000,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // Check that the result type is what we expect.\n if (SemaRef.Context.getCanonicalType(ResultType) != ExpectedResultType) {\n // ...\n return SemaRef.Diag(FnDecl->getLocation(), ResultType->isDependentType() ? diag::err_operator_new_delete_dependent_result_type : diag::err_operator_new_delete_invalid_result_type) << FnDecl->getDeclName() << ExpectedResultType;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/attr-alias-elf.c"]={"clang/test/Sema/attr-alias-elf.c:7:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:10:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:49:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:52:30: note: the function or variable specified in an alias must refer to its mangled name","clang/test/Sema/attr-alias-elf.c:56:30: note: the function or variable specified in an alias must refer to its mangled name"} | | [Rb]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:36:26: error: \'operator new\' cannot have a dependent return type; use \'void *\' instead"} |
| } | | } |
| }, | | }, |
| ["note_alignas_on_declaration"]={ | | ["err_operator_new_delete_invalid_result_type"]={ |
| [b]="note_alignas_on_declaration", | | [b]="err_operator_new_delete_invalid_result_type", |
| [h]="declared with %0 attribute here", | | [j]="%0 must return type %1", |
| [i]="declared with A attribute here", | | [i]="A must return type B", |
| [c]=g, | | [h]=k, |
| [e]="declared with (.*?) attribute here", | | [c]="(.*?) must return type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={pc,1260573802,oc,nc}, |
| [k]={{C,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;"},{C,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;"}}, | | [d]={{w,16001,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // Check that the result type is what we expect.\n if (SemaRef.Context.getCanonicalType(ResultType) != ExpectedResultType) {\n // ...\n return SemaRef.Diag(FnDecl->getLocation(), ResultType->isDependentType() ? diag::err_operator_new_delete_dependent_result_type : diag::err_operator_new_delete_invalid_result_type) << FnDecl->getDeclName() << ExpectedResultType;"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [Rb]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:16:8: error: \'operator new\' must return type \'void *\'"} |
| } | | } |
| }, | | }, |
| ["note_allocated_here"]={ | | ["err_operator_new_delete_template_too_few_parameters"]={ |
| [b]="note_allocated_here", | | [b]="err_operator_new_delete_template_too_few_parameters", |
| [h]="allocated with \'new%select{[]|}0\' here", | | [j]="%0 template must have at least two parameters", |
| [i]={{nil,nil,{"allocated with \'new",{"[]",a},"\' here"}}}, | | [i]="A template must have at least two parameters", |
| [c]=g, | | [h]=k, |
| [e]="allocated with \'new(?:\\[\\]|)\' here", | | [c]="(.*?) template must have at least two parameters", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, |
| [k]={{hb,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;"}}, | | [d]={{w,16008,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // A function template must have at least 2 parameters.\n if (FnDecl->getDescribedFunctionTemplate() && FnDecl->getNumParams() < 2)\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_template_too_few_parameters) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CodeGenCXX/default-arguments.cpp"]={"clang/test/CodeGenCXX/default-arguments.cpp:63:10: note: allocated with \'new[]\' here"} | | [Rb]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:44:30: error: \'operator new\' template must have at least two parameters"} |
| } | | } |
| }, | | }, |
| ["note_also_found"]={ | | ["err_operator_new_delete_too_few_parameters"]={ |
| [b]="note_also_found", | | [b]="err_operator_new_delete_too_few_parameters", |
| [h]="also found", | | [j]="%0 must have at least one parameter", |
| [i]="also found", | | [i]="A must have at least one parameter", |
| [c]=g, | | [h]=k, |
| [e]="also found", | | [c]="(.*?) must have at least one parameter", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={pc,1260573802,oc,nc}, |
| [k]={{db,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();"}}, | | [d]={{w,16014,"static inline bool CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, CanQualType ExpectedResultType, CanQualType ExpectedFirstParamType, unsigned DependentParamTypeDiag, unsigned InvalidParamTypeDiag) {\n // ...\n // The function decl must have at least 1 parameter.\n if (FnDecl->getNumParams() == 0)\n return SemaRef.Diag(FnDecl->getLocation(), diag::err_operator_new_delete_too_few_parameters) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/PR12778.cpp"]={"clang/test/SemaCXX/PR12778.cpp:3:6: error: \'operator delete\' must have at least one parameter"} |
| } | | } |
| }, | | }, |
| ["note_ambig_member_ref_object_type"]={ | | ["err_operator_new_dependent_param_type"]={ |
| [b]="note_ambig_member_ref_object_type", | | [b]="err_operator_new_dependent_param_type", |
| [h]="lookup in the object type %0 refers here", | | [j]="%0 cannot take a dependent type as first parameter; use size_t (%1) instead", |
| [i]="lookup in the object type A refers here", | | [i]="A cannot take a dependent type as first parameter; use size_t (B) instead", |
| [c]=g, | | [h]=k, |
| [e]="lookup in the object type (.*?) refers here", | | [c]="(.*?) cannot take a dependent type as first parameter; use size_t \\((.*?)\\) instead", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"c0b2ce14cdc1",1260576962,"More work on improving the operator delete diagnostics.","More work on improving the operator delete diagnostics.\n\nllvm-svn: 91187"}, |
| [k]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",684,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (AcceptSpec) {\n if (!ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (isAcceptableNestedNameSpecifier(OuterDecl) && OuterDecl->getCanonicalDecl() != SD->getCanonicalDecl() && (!isa<TypeDecl>(OuterDecl) || !isa<TypeDecl>(SD) || !Context.hasSameType(Context.getTypeDeclType(cast<TypeDecl>(OuterDecl)), Context.getTypeDeclType(cast<TypeDecl>(SD))))) {\n // ...\n Diag(SD->getLocation(), diag::note_ambig_member_ref_object_type) << ObjectType;"},{G,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;"}}, | | [d]={{w,16062,"static bool CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidPtrTy, SizeTy, diag::err_operator_new_dependent_param_type, diag::err_operator_new_param_type))"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [Rb]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:40:30: error: \'operator new\' cannot take a dependent type as first parameter; use size_t (\'unsigned long\') instead"} |
| } | | } |
| }, | | }, |
| ["note_ambig_member_ref_scope"]={ | | ["err_operator_new_param_type"]={ |
| [b]="note_ambig_member_ref_scope", | | [b]="err_operator_new_param_type", |
| [h]="lookup from the current scope refers here", | | [j]="%0 takes type size_t (%1) as first parameter", |
| [i]="lookup from the current scope refers here", | | [i]="A takes type size_t (B) as first parameter", |
| [c]=g, | | [h]=k, |
| [e]="lookup from the current scope refers here", | | [c]="(.*?) takes type size_t \\((.*?)\\) as first parameter", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"4e088941ad99",1257896838,"Diagnose illegally typed operator new/new[].","Diagnose illegally typed operator new/new[].\n\nllvm-svn: 86755"}, |
| [k]={{"clang/lib/Sema/SemaCXXScopeSpec.cpp",686,"/// Build a new nested-name-specifier for \"identifier::\", as described\n/// by ActOnCXXNestedNameSpecifier.\n///\n/// \\param S Scope in which the nested-name-specifier occurs.\n/// \\param IdInfo Parser information about an identifier in the\n/// nested-name-spec.\n/// \\param EnteringContext If true, enter the context specified by the\n/// nested-name-specifier.\n/// \\param SS Optional nested name specifier preceding the identifier.\n/// \\param ScopeLookupResult Provides the result of name lookup within the\n/// scope of the nested-name-specifier that was computed at template\n/// definition time.\n/// \\param ErrorRecoveryLookup Specifies if the method is called to improve\n/// error recovery and what kind of recovery is performed.\n/// \\param IsCorrectedToColon If not null, suggestion of replace \'::\' -> \':\'\n/// are allowed. The bool value pointed by this parameter is set to\n/// \'true\' if the identifier is treated as if it was followed by \':\',\n/// not \'::\'.\n/// \\param OnlyNamespace If true, only considers namespaces in lookup.\n///\n/// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in\n/// that it contains an extra parameter \\p ScopeLookupResult, which provides\n/// the result of name lookup within the scope of the nested-name-specifier\n/// that was computed at template definition time.\n///\n/// If ErrorRecoveryLookup is true, then this call is used to improve error\n/// recovery. This means that it should not emit diagnostics, it should\n/// just return true on failure. It also means it should only return a valid\n/// scope if it *knows* that the result is correct. It should not return in a\n/// dependent context, for example. Nor will it extend \\p SS with the scope\n/// specifier.\nbool Sema::BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon, bool OnlyNamespace) {\n // ...\n if (AcceptSpec) {\n if (!ObjectType.isNull() && !ObjectTypeSearchedInScope && !getLangOpts().CPlusPlus11) {\n // ...\n if (isAcceptableNestedNameSpecifier(OuterDecl) && OuterDecl->getCanonicalDecl() != SD->getCanonicalDecl() && (!isa<TypeDecl>(OuterDecl) || !isa<TypeDecl>(SD) || !Context.hasSameType(Context.getTypeDeclType(cast<TypeDecl>(OuterDecl)), Context.getTypeDeclType(cast<TypeDecl>(SD))))) {\n // ...\n Diag(OuterDecl->getLocation(), diag::note_ambig_member_ref_scope);"},{G,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);"}}, | | [d]={{w,16063,"static bool CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {\n // ...\n if (CheckOperatorNewDeleteTypes(SemaRef, FnDecl, SemaRef.Context.VoidPtrTy, SizeTy, diag::err_operator_new_dependent_param_type, diag::err_operator_new_param_type))"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/qual-id-test.cpp"]={"clang/test/SemaCXX/qual-id-test.cpp:94:25: note: lookup from the current scope refers here"} | | [Rb]={"clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp:24:9: error: \'operator new\' takes type size_t (\'unsigned long\') as first parameter"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_atomic_constraints"]={ | | ["err_operator_overload_default_arg"]={ |
| [b]={{nil,m,"note_ambiguous_atomic_constraints"}}, | | [b]="err_operator_overload_default_arg", |
| [h]={{nil,m,"similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"}}, | | [j]="parameter of overloaded %0 cannot have a default argument", |
| [i]={{nil,m,"similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept"}}, | | [i]="parameter of overloaded A cannot have a default argument", |
| [c]=g, | | [h]=k, |
| [e]="similar constraint expressions not considered equivalent; constraint expressions cannot be considered equivalent unless they originate from the same concept", | | [c]="parameter of overloaded (.*?) cannot have a default argument", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{vb,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();"}},
| | [d]={{w,16198,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p8:\n // An operator function cannot have default arguments (8.3.6),\n // except where explicitly stated below.\n //\n // Only the function-call operator (C++ [over.call]p1) and the subscript\n // operator (CWG2507) allow default arguments.\n if (Op != OO_Call) {\n // ...\n if (FirstDefaultedParam) {\n if (Op == OO_Subscript) {\n // ...\n } else {\n return Diag(FirstDefaultedParam->getLocation(), diag::err_operator_overload_default_arg) << FnDecl->getDeclName() << FirstDefaultedParam->getDefaultArgRange();"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:25:18: error: parameter of overloaded \'operator*\' cannot have a default argument"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_atomic_constraints_similar_expression"]={ | | ["err_operator_overload_must_be"]={ |
| [b]={{nil,m,"note_ambiguous_atomic_constraints_similar_expression"}}, | | [b]="err_operator_overload_must_be", |
| [h]={{nil,m,"similar constraint expression here"}}, | | [j]="overloaded %0 must be a %select{unary|binary|unary or binary}2 operator (has %1 parameter%s1)", |
| [i]={{nil,m,"similar constraint expression here"}}, | | [i]={{nil,nil,{"overloaded A must be a ",{"unary","binary","unary or binary"}," operator (has B parameterB)"}}}, |
| [c]=g, | | [h]=k, |
| [e]="similar constraint expression here", | | [c]="overloaded (.*?) must be a (?:unary|binary|unary or binary) operator \\(has (.*?) parameter(.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{vb,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();"}},
| | [d]={{w,16237,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n if (Op != OO_Call && Op != OO_Subscript && ((NumParams == 1 && !CanBeUnaryOperator) || (NumParams == 2 && !CanBeBinaryOperator) || (NumParams < 1) || (NumParams > 2))) {\n // ...\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_must_be) << FnDecl->getDeclName() << NumParams << ErrorKind;"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:29:3: error: overloaded \'operator%\' must be a binary operator (has 1 parameter)"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_candidate"]={ | | ["err_operator_overload_must_be_member"]={ |
| [b]="note_ambiguous_candidate", | | [b]="err_operator_overload_must_be_member", |
| [h]="candidate found by name lookup is %q0", | | [j]="overloaded %0 must be a non-static member function", |
| [i]="candidate found by name lookup is A", | | [i]="overloaded A must be a non-static member function", |
| [c]=g, | | [h]=k, |
| [e]="candidate found by name lookup is (.*?)", | | [c]="overloaded (.*?) must be a non\\-static member function", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{bd,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;"}}, | | [d]={{w,16259,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n // Some operators must be member functions.\n if (MustBeMemberOperator && !isa<CXXMethodDecl>(FnDecl)) {\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_must_be_member) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["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\'"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:31:6: error: overloaded \'operator()\' must be a non-static member function"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_inherited_constructor_using"]={ | | ["err_operator_overload_needs_class_or_enum"]={ |
| [b]="note_ambiguous_inherited_constructor_using", | | [b]="err_operator_overload_needs_class_or_enum", |
| [h]="inherited from base class %0 here", | | [j]="overloaded %0 must have at least one parameter of class or enumeration type", |
| [i]="inherited from base class A here", | | [i]="overloaded A must have at least one parameter of class or enumeration type", |
| [c]=g, | | [h]=k, |
| [e]="inherited from base class (.*?) here", | | [c]="overloaded (.*?) must have at least one parameter of class or enumeration type", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{r,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;"},{r,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;"}}, | | [d]={{w,16171,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p7:\n // An operator function shall either be a member function or\n // be a non-member function and have at least one parameter\n // whose type is a class, a reference to a class, an enumeration,\n // or a reference to an enumeration.\n // Note: Before C++23, a member function could not be static. The only member\n // function allowed to be static is the call operator function.\n if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {\n // ...\n } else {\n // ...\n if (!ClassOrEnumParam)\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_needs_class_or_enum) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp"]={"clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp:12:15: note: inherited from base class \'C2\' here","clang/test/CXX/special/class.init/class.inhctor.init/p2.cpp:11:15: note: inherited from base class \'C1\' here"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:23:3: error: overloaded \'operator+\' must have at least one parameter of class or enumeration type"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_member_found"]={ | | ["err_operator_overload_post_incdec_must_be_int"]={ |
| [b]="note_ambiguous_member_found", | | [b]="err_operator_overload_post_incdec_must_be_int", |
| [h]="member found by ambiguous name lookup", | | [j]="parameter of overloaded post-%select{increment|decrement}1 operator must have type \'int\' (not %0)", |
| [i]="member found by ambiguous name lookup", | | [i]={{nil,nil,{"parameter of overloaded post-",{"increment","decrement"}," operator must have type \'int\' (not A)"}}}, |
| [c]=g, | | [h]=k, |
| [e]="member found by ambiguous name lookup", | | [c]="parameter of overloaded post\\-(?:increment|decrement) operator must have type \'int\' \\(not (.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{bd,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);"},{bd,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);"}}, | | [d]={{w,16280,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n // C++ [over.inc]p1:\n // The user-defined function called operator++ implements the\n // prefix and postfix ++ operator. If this function is a member\n // function with no parameters, or a non-member function with one\n // parameter of class or enumeration type, it defines the prefix\n // increment operator ++ for objects of that type. If the function\n // is a member function with one parameter (which shall be of type\n // int) or a non-member function with two parameters (the second\n // of which shall be of type int), it defines the postfix\n // increment operator ++ for objects of that type.\n if ((Op == OO_PlusPlus || Op == OO_MinusMinus) && NumParams == 2) {\n // ...\n if (!ParamType->isSpecificBuiltinType(BuiltinType::Int) && !ParamType->isDependentType())\n return Diag(LastParam->getLocation(), diag::err_operator_overload_post_incdec_must_be_int) << LastParam->getType() << (Op == OO_MinusMinus);"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:37:23: error: parameter of overloaded post-increment operator must have type \'int\' (not \'FLOAT\' (aka \'float\'))"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_member_type_found"]={ | | ["err_operator_overload_static"]={ |
| [b]={{nil,s,"note_ambiguous_member_type_found"}}, | | [b]="err_operator_overload_static", |
| [h]={{nil,s,"member type %0 found by ambiguous name lookup"}}, | | [j]="overloaded %0 cannot be a static member function", |
| [i]={{nil,s,"member type A found by ambiguous name lookup"}}, | | [i]="overloaded A cannot be a static member function", |
| [c]=g, | | [h]=k, |
| [e]="member type (.*?) found by ambiguous name lookup", | | [c]="overloaded (.*?) cannot be a static member function", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]=m, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={L,1237025389,M,N}, |
| [k]={{bd,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();"},{bd,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);"}}, | | [d]={{w,16155,"/// CheckOverloadedOperatorDeclaration - Check whether the declaration\n/// of this overloaded operator is well-formed. If so, returns false;\n/// otherwise, emits appropriate diagnostics and returns true.\nbool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {\n // ...\n // C++ [over.oper]p7:\n // An operator function shall either be a member function or\n // be a non-member function and have at least one parameter\n // whose type is a class, a reference to a class, an enumeration,\n // or a reference to an enumeration.\n // Note: Before C++23, a member function could not be static. The only member\n // function allowed to be static is the call operator function.\n if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) {\n if (MethodDecl->isStatic()) {\n if (Op == OO_Call || Op == OO_Subscript)\n // ...\n else\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_static) << FnDecl;"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:15:14: error: overloaded \'operator+\' cannot be a static member function"} |
| } | | } |
| }, | | }, |
| ["note_ambiguous_type_conversion"]={ | | ["err_operator_overload_variadic"]={ |
| [b]="note_ambiguous_type_conversion", | | [b]="err_operator_overload_variadic", |
| [h]="because of ambiguity in conversion %diff{of $ to $|between types}0,1", | | [j]="overloaded %0 cannot be variadic", |
| [i]={{nil,nil,{"because of ambiguity in conversion ",{"of A to B","between types"}}}}, | | [i]="overloaded A cannot be variadic", |
| [c]=g, | | [h]=k, |
| [e]="because of ambiguity in conversion (?:of (.*?) to (.*?)|between types)", | | [c]="overloaded (.*?) cannot be variadic", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{xb,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));"}},
| | [d]={{w,16252,"#include \"clang/Basic/OperatorKinds.def\"\n // ...\n // Overloaded operators other than operator() and operator[] cannot be\n // variadic.\n if (Op != OO_Call && FnDecl->getType()->castAs<FunctionProtoType>()->isVariadic()) {\n return Diag(FnDecl->getLocation(), diag::err_operator_overload_variadic) << FnDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["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 *\'"} | | [ub]={"clang/test/SemaCXX/overloaded-operator-decl.cpp:27:3: error: overloaded \'operator/\' cannot be variadic"} |
| } | | } |
| }, | | }, |
| ["note_anonymous_namespace"]={ | | ["err_opt_not_valid_on_target"]={ |
| [b]={{nil,p,"note_anonymous_namespace"}}, | | [b]={{nil,K,"err_opt_not_valid_on_target"}}, |
| [h]={{nil,p,"anonymous namespace begins here"}}, | | [j]={{nil,K,"option \'%0\' cannot be specified on this target"}}, |
| [i]={{nil,p,"anonymous namespace begins here"}}, | | [i]={{nil,K,"option \'A\' cannot be specified on this target"}}, |
| [c]=g, | | [h]=k, |
| [e]="anonymous namespace begins here", | | [c]="option \'(.*?)\' cannot be specified on this target", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,Ld}}, | | [e]={{nil,K,a}}, |
| [j]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"}, | | [g]={"0fb8c877c4a3",1526644581,"This patch aims to match the changes introduced","This patch aims to match the changes introduced\nin gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html.\nThe -mibt feature flag is being removed, and the -fcf-protection\noption now also defines a CET macro and causes errors when used\non non-X86 targets, while X86 targets no longer check for -mibt\nand -mshstk to determine if -fcf-protection is supported. -mshstk\nis now used only to determine availability of shadow stack intrinsics.\n\nComes with an LLVM patch (D46882).\n\nPatch by mike.dvoretsky\n\nDifferential Revision: https://reviews.llvm.org/D46881\n\nllvm-svn: 332704"}, |
| [k]={{Qb,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);"}}, | | [d]={{"clang/lib/Basic/TargetInfo.cpp",197,"bool TargetInfo::checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const {\n Diags.Report(diag::err_opt_not_valid_on_target) << \"cf-protection=branch\";"},{"clang/lib/Basic/TargetInfo.cpp",203,"bool TargetInfo::checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const {\n Diags.Report(diag::err_opt_not_valid_on_target) << \"cf-protection=return\";"},{"clang/lib/Basic/TargetInfo.cpp",511,"/// adjust - Set forced language options.\n/// Apply changes to the target information with respect to certain\n/// language options which change the target configuration and adjust\n/// the language based on the target options where applicable.\nvoid TargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {\n // ...\n if (Opts.ProtectParens && !checkArithmeticFenceSupported()) {\n Diags.Report(diag::err_opt_not_valid_on_target) << \"-fprotect-parens\";"},{"clang/lib/CodeGen/CodeGenFunction.cpp",1098,"#include \"clang/Basic/Sanitizers.def\"\n // ...\n if (CGM.getCodeGenOpts().PackedStack) {\n if (getContext().getTargetInfo().getTriple().getArch() != llvm::Triple::systemz)\n CGM.getDiags().Report(diag::err_opt_not_valid_on_target) << \"-mpacked-stack\";"}} |
| | }, |
| | ["err_opt_not_valid_with_opt"]={ |
| | [b]="err_opt_not_valid_with_opt", |
| | [j]="option \'%0\' cannot be specified with \'%1\'", |
| | [i]="option \'A\' cannot be specified with \'B\'", |
| | [h]=k, |
| | [c]="option \'(.*?)\' cannot be specified with \'(.*?)\'", |
| | [f]=a, |
| | [e]=a, |
| | [g]={"26c3534b84f2",1436533894,"Add missing builtins to altivec.h for ABI compliance (vol. 3)","Add missing builtins to altivec.h for ABI compliance (vol. 3)\n\nThis patch corresponds to review:\nhttp://reviews.llvm.org/D10972\n\nFix for the handling of dependent features that are enabled by default\non some CPU\'s (such as -mvsx, -mpower8-vector).\n\nAlso provides a number of new interfaces or fixes existing ones in\naltivec.h.\n\nChanged signatures to conform to ABI:\nvector short vec_perm(vector signed short, vector signed short, vector unsigned char)\nvector int vec_perm(vector signed int, vector signed int, vector unsigned char)\nvector long long vec_perm(vector signed long long, vector signed long long, vector unsigned char)\nvector signed char vec_sld(vector signed char, vector signed char, const int)\nvector unsigned char vec_sld(vector unsigned char, vector unsigned char, const int)\nvector bool char vec_sld(vector bool char, vector bool char, const int)\nvector unsigned short vec_sld(vector unsigned short, vector unsigned short, const int)\nvector signed short vec_sld(vector signed short, vector signed short, const int)\nvector signed int vec_sld(vector signed int, vector signed int, const int)\nvector unsigned int vec_sld(vector unsigned int, vector unsigned int, const int)\nvector float vec_sld(vector float, vector float, const int)\nvector signed char vec_splat(vector signed char, const int)\nvector unsigned char vec_splat(vector unsigned char, const int)\nvector bool char vec_splat(vector bool char, const int)\nvector signed short vec_splat(vector signed short, const int)\nvector unsigned short vec_splat(vector unsigned short, const int)\nvector bool short vec_splat(vector bool short, const int)\nvector pixel vec_splat(vector pixel, const int)\nvector signed int vec_splat(vector signed int, const int)\nvector unsigned int vec_splat(vector unsigned int, const int)\nvector bool int vec_splat(vector bool int, const int)\nvector float vec_splat(vector float, const int)\n\nAdded a VSX path to:\nvector float vec_round(vector float)\n\nAdded interfaces:\nvector signed char vec_eqv(vector signed char, vector signed char)\nvector signed char vec_eqv(vector bool char, vector signed char)\nvector signed char vec_eqv(vector signed char, vector bool char)\nvector unsigned char vec_eqv(vector unsigned char, vector unsigned char)\nvector unsigned char vec_eqv(vector bool char, vector unsigned char)\nvector unsigned char vec_eqv(vector unsigned char, vector bool char)\nvector signed short vec_eqv(vector signed short, vector signed short)\nvector signed short vec_eqv(vector bool short, vector signed short)\nvector signed short vec_eqv(vector signed short, vector bool short)\nvector unsigned short vec_eqv(vector unsigned short, vector unsigned short)\nvector unsigned short vec_eqv(vector bool short, vector unsigned short)\nvector unsigned short vec_eqv(vector unsigned short, vector bool short)\nvector signed int vec_eqv(vector signed int, vector signed int)\nvector signed int vec_eqv(vector bool int, vector signed int)\nvector signed int vec_eqv(vector signed int, vector bool int)\nvector unsigned int vec_eqv(vector unsigned int, vector unsigned int)\nvector unsigned int vec_eqv(vector bool int, vector unsigned int)\nvector unsigned int vec_eqv(vector unsigned int, vector bool int)\nvector signed long long vec_eqv(vector signed long long, vector signed long long)\nvector signed long long vec_eqv(vector bool long long, vector signed long long)\nvector signed long long vec_eqv(vector signed long long, vector bool long long)\nvector unsigned long long vec_eqv(vector unsigned long long, vector unsigned long long)\nvector unsigned long long vec_eqv(vector bool long long, vector unsigned long long)\nvector unsigned long long vec_eqv(vector unsigned long long, vector bool long long)\nvector float vec_eqv(vector float, vector float)\nvector float vec_eqv(vector bool int, vector float)\nvector float vec_eqv(vector float, vector bool int)\nvector double vec_eqv(vector double, vector double)\nvector double vec_eqv(vector bool long long, vector double)\nvector double vec_eqv(vector double, vector bool long long)\nvector bool long long vec_perm(vector bool long long, vector bool long long, vector unsigned char)\nvector double vec_round(vector double)\nvector double vec_splat(vector double, const int)\nvector bool long long vec_splat(vector bool long long, const int)\nvector signed long long vec_splat(vector signed long long, const int)\nvector unsigned long long vec_splat(vector unsigned long long,\nvector bool int vec_sld(vector bool int, vector bool int, const int)\nvector bool short vec_sld(vector bool short, vector bool short, const int)\n\nllvm-svn: 241904"}, |
| | [d]={{"clang/lib/Basic/Targets/Mips.cpp",258,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // -mfp32 and n32/n64 ABIs are incompatible\n if (FPMode != FP64 && FPMode != FPXX && !IsSingleFloat && (ABI == \"n32\" || ABI == \"n64\")) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mfpxx\" << CPU;"},{"clang/lib/Basic/Targets/Mips.cpp",264,"bool MipsTargetInfo::validateTarget(DiagnosticsEngine &Diags) const {\n // ...\n // Mips revision 6 and -mfp32 are incompatible\n if (FPMode != FP64 && FPMode != FPXX && (CPU == \"mips32r6\" || CPU == \"mips64r6\")) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mfp32\" << CPU;"},{pb,459,"// Handle explicit options being passed to the compiler here: if we\'ve\n// explicitly turned off vsx and turned on any of:\n// - power8-vector\n// - direct-move\n// - float128\n// - power9-vector\n// - paired-vector-memops\n// - mma\n// - power10-vector\n// then go ahead and error since the customer has expressed an incompatible\n// set of options.\nstatic bool ppcUserFeaturesCheck(DiagnosticsEngine &Diags, const std::vector<std::string> &FeaturesVec) {\n // ...\n auto FindVSXSubfeature = [&](StringRef Feature, StringRef Option) {\n if (llvm::is_contained(FeaturesVec, Feature)) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << Option << \"-mno-vsx\";"},{pb,593,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr7) && (ArchDefs & ArchDefinePpcgr) && llvm::is_contained(FeaturesVec, \"+float128\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mfloat128\" << CPU;"},{pb,600,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n if (llvm::is_contained(FeaturesVec, \"+mma\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mmma\" << CPU;"},{pb,629,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr8) && llvm::is_contained(FeaturesVec, \"+rop-protect\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mrop-protect\" << CPU;"},{pb,635,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr8) && llvm::is_contained(FeaturesVec, \"+privileged\")) {\n Diags.Report(diag::err_opt_not_valid_with_opt) << \"-mprivileged\" << CPU;"},{"clang/lib/Basic/Targets/WebAssembly.cpp",265,"bool WebAssemblyTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, DiagnosticsEngine &Diags) {\n for (const auto &Feature : Features) {\n // ...\n Diags.Report(diag::err_opt_not_valid_with_opt) << Feature << \"-target-feature\";"},{"clang/lib/Driver/Driver.cpp",3158,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// Base class for CUDA/HIP action builder. It injects device code in\n /// the host backend action.\n class CudaActionBuilderBase : public DeviceActionBuilder {\n // ...\n bool initialize() override {\n // ...\n // --offload and --offload-arch options are mutually exclusive.\n if (Args.hasArgNoClaim(options::OPT_offload_EQ) && Args.hasArgNoClaim(options::OPT_offload_arch_EQ, options::OPT_no_offload_arch_EQ)) {\n C.getDriver().Diag(diag::err_opt_not_valid_with_opt) << \"--offload-arch\""},{"clang/lib/Driver/Driver.cpp",3383,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// \\brief HIP action builder. It injects device code in the host backend\n /// action.\n class HIPActionBuilder final : public CudaActionBuilderBase {\n // ...\n HIPActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {\n // ...\n if (Args.hasArg(options::OPT_fhip_emit_relocatable, options::OPT_fno_hip_emit_relocatable)) {\n // ...\n if (*EmitReloc) {\n if (Relocatable) {\n C.getDriver().Diag(diag::err_opt_not_valid_with_opt) << \"-fhip-emit-relocatable\""},{"clang/lib/Driver/Driver.cpp",4411,"llvm::DenseSet<StringRef> Driver::getOffloadArchs(Compilation &C, const llvm::opt::DerivedArgList &Args, Action::OffloadKind Kind, const ToolChain *TC, bool SuppressError) const {\n // ...\n // --offload and --offload-arch options are mutually exclusive.\n if (Args.hasArgNoClaim(options::OPT_offload_EQ) && Args.hasArgNoClaim(options::OPT_offload_arch_EQ, options::OPT_no_offload_arch_EQ)) {\n C.getDriver().Diag(diag::err_opt_not_valid_with_opt) << \"--offload\" << (Args.hasArgNoClaim(options::OPT_offload_arch_EQ) ? \"--offload-arch\" : \"--no-offload-arch\");"},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",851,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n // Generate execute-only output (no data access to code sections).\n // This only makes sense for the compiler, not for the assembler.\n // It\'s not needed for multilib selection and may hide an unused\n // argument diagnostic if the code is always run.\n if (!ForAS && !ForMultilib) {\n // Supported only on ARMv6T2 and ARMv7 and above.\n // Cannot be combined with -mno-movt.\n if (Arg *A = Args.getLastArg(options::OPT_mexecute_only, options::OPT_mno_execute_only)) {\n if (A->getOption().matches(options::OPT_mexecute_only)) {\n if (getARMSubArchVersionNumber(Triple) < 7 && llvm::ARM::parseArch(Triple.getArchName()) != llvm::ARM::ArchKind::ARMV6T2)\n // ...\n else if (Arg *B = Args.getLastArg(options::OPT_mno_movt))\n D.Diag(diag::err_opt_not_valid_with_opt) << A->getAsString(Args) << B->getAsString(Args);"}} |
| | }, |
| | ["err_opt_not_valid_without_opt"]={ |
| | [b]={{nil,K,"err_opt_not_valid_without_opt"}}, |
| | [j]={{nil,K,"option \'%0\' cannot be specified without \'%1\'"}}, |
| | [i]={{nil,K,"option \'A\' cannot be specified without \'B\'"}}, |
| | [h]=k, |
| | [c]="option \'(.*?)\' cannot be specified without \'(.*?)\'", |
| | [f]=a, |
| | [e]={{nil,K,a}}, |
| | [g]={"57cc1a5d77d8",1515488039,"Added Control Flow Protection Flag","Added Control Flow Protection Flag\n\nCf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc.\nFor example in X86 this flag will be used to instrument Indirect Branch Tracking instructions.\n\nDifferential Revision: https://reviews.llvm.org/D40478\n\nChange-Id: I5126e766c0e6b84118cae0ee8a20fe78cc373dea\nllvm-svn: 322063"}, |
| | [d]={{pb,606,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n // ...\n if (llvm::is_contained(FeaturesVec, \"+pcrel\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_without_opt) << \"-mpcrel\""},{pb,613,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n // ...\n if (llvm::is_contained(FeaturesVec, \"+prefixed\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_without_opt) << \"-mprefixed\""},{pb,619,"bool PPCTargetInfo::initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector<std::string> &FeaturesVec) const {\n // ...\n if (!(ArchDefs & ArchDefinePwr10)) {\n // ...\n if (llvm::is_contained(FeaturesVec, \"+paired-vector-memops\")) {\n // ...\n Diags.Report(diag::err_opt_not_valid_without_opt) << \"-mpaired-vector-memops\""},{"clang/lib/CodeGen/CodeGenFunction.cpp",1081,"#include \"clang/Basic/Sanitizers.def\"\n // ...\n // Since emitting the mcount call here impacts optimizations such as function\n // inlining, we just add an attribute to insert a mcount call in backend.\n // The attribute \"counting-function\" is set to mcount function name which is\n // architecture dependent.\n if (CGM.getCodeGenOpts().InstrumentForProfiling) {\n // Calls to fentry/mcount should not be generated if function has\n // the no_instrument_function attribute.\n if (!CurFuncDecl || !CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>()) {\n // ...\n if (CGM.getCodeGenOpts().MNopMCount) {\n if (!CGM.getCodeGenOpts().CallFEntry)\n CGM.getDiags().Report(diag::err_opt_not_valid_without_opt) << \"-mnop-mcount\""},{"clang/lib/CodeGen/CodeGenFunction.cpp",1088,"#include \"clang/Basic/Sanitizers.def\"\n // ...\n // Since emitting the mcount call here impacts optimizations such as function\n // inlining, we just add an attribute to insert a mcount call in backend.\n // The attribute \"counting-function\" is set to mcount function name which is\n // architecture dependent.\n if (CGM.getCodeGenOpts().InstrumentForProfiling) {\n // Calls to fentry/mcount should not be generated if function has\n // the no_instrument_function attribute.\n if (!CurFuncDecl || !CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>()) {\n // ...\n if (CGM.getCodeGenOpts().RecordMCount) {\n if (!CGM.getCodeGenOpts().CallFEntry)\n CGM.getDiags().Report(diag::err_opt_not_valid_without_opt) << \"-mrecord-mcount\""},{"clang/lib/Driver/Driver.cpp",3389,"/// Provides a convenient interface for different programming models to generate\n/// the required device actions.\nclass OffloadingActionBuilder final {\n // ...\n /// \\brief HIP action builder. It injects device code in the host backend\n /// action.\n class HIPActionBuilder final : public CudaActionBuilderBase {\n // ...\n HIPActionBuilder(Compilation &C, DerivedArgList &Args, const Driver::InputList &Inputs) : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {\n // ...\n if (Args.hasArg(options::OPT_fhip_emit_relocatable, options::OPT_fno_hip_emit_relocatable)) {\n // ...\n if (*EmitReloc) {\n // ...\n if (!CompileDeviceOnly) {\n C.getDriver().Diag(diag::err_opt_not_valid_without_opt) << \"-fhip-emit-relocatable\""},{"clang/lib/Driver/ToolChains/Arch/ARM.cpp",807,"llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features, bool ForAS, bool ForMultilib) {\n // ...\n if (Arg *A = Args.getLastArg(options::OPT_mfix_cmse_cve_2021_35465, options::OPT_mno_fix_cmse_cve_2021_35465)) {\n if (!Args.getLastArg(options::OPT_mcmse))\n D.Diag(diag::err_opt_not_valid_without_opt) << A->getOption().getName() << \"-mcmse\";"}} |
| | }, |
| | ["err_os_log_argument_too_big"]={ |
| | [b]="err_os_log_argument_too_big", |
| | [j]="os_log() argument %0 is too big (%1 bytes, max %2)", |
| | [i]="os_log() argument A is too big (B bytes, max C)", |
| | [h]=k, |
| | [c]="os_log\\(\\) argument (.*?) is too big \\((.*?) bytes, max (.*?)\\)", |
| | [f]=a, |
| | [e]=m, |
| | [g]={"29034362ae87",1477328183,"Add support for __builtin_os_log_format[_buffer_size]","Add support for __builtin_os_log_format[_buffer_size]\n\nThese new builtins support a mechanism for logging OS events, using a\nprintf-like format string to specify the layout of data in a buffer.\nThe _buffer_size version of the builtin can be used to determine the size\nof the buffer to allocate to hold the data, and then __builtin_os_log_format\ncan write data into that buffer. This implements format checking to report\nmismatches between the format string and the data arguments. Most of this\ncode was written by Chris Willmore.\n\nDifferential Revision: https://reviews.llvm.org/D25888\n\nllvm-svn: 284990"}, |
| | [d]={{I,8743,"bool Sema::SemaBuiltinOSLogFormat(CallExpr *TheCall) {\n // ...\n while (i < NumArgs) {\n // ...\n if (ArgSize.getQuantity() >= 0x100) {\n return Diag(Arg.get()->getEndLoc(), diag::err_os_log_argument_too_big) << i << (int)ArgSize.getQuantity() << 0xff << TheCall->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjC/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:41:38: error: os_log() argument 2 is too big (256 bytes, max 255)"} |
| } | | } |
| }, | | }, |
| ["note_arc_bridge"]={ | | ["err_os_log_format_not_string_constant"]={ |
| [b]="note_arc_bridge", | | [b]="err_os_log_format_not_string_constant", |
| [h]="use __bridge to convert directly (no change in ownership)", | | [j]="os_log() format argument is not a string constant", |
| [i]="use __bridge to convert directly (no change in ownership)", | | [i]="os_log() format argument is not a string constant", |
| [c]=g, | | [h]=k, |
| [e]="use __bridge to convert directly \\(no change in ownership\\)", | | [c]="os_log\\(\\) format argument is not a string constant", |
| [f]=a, | | [f]=a, |
| [d]=Gd, | | [e]=m, |
| [j]={gd,1308178962,dd,jd}, | | [g]={"29034362ae87",1477328183,"Add support for __builtin_os_log_format[_buffer_size]","Add support for __builtin_os_log_format[_buffer_size]\n\nThese new builtins support a mechanism for logging OS events, using a\nprintf-like format string to specify the layout of data in a buffer.\nThe _buffer_size version of the builtin can be used to determine the size\nof the buffer to allocate to hold the data, and then __builtin_os_log_format\ncan write data into that buffer. This implements format checking to report\nmismatches between the format string and the data arguments. Most of this\ncode was written by Chris Willmore.\n\nDifferential Revision: https://reviews.llvm.org/D25888\n\nllvm-svn: 284990"}, |
| [k]={{B,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);"},{B,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);"},{B,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\");"},{B,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 \");"}},
| | [d]={{I,8014,"/// CheckObjCString - Checks that the format string argument to the os_log()\n/// and os_trace() functions is correct, and converts it to const char *.\nExprResult Sema::CheckOSLogFormatStringArg(Expr *Arg) {\n // ...\n if (!Literal || (!Literal->isOrdinary() && !Literal->isUTF8())) {\n return ExprError(Diag(Arg->getBeginLoc(), diag::err_os_log_format_not_string_constant) << Arg->getSourceRange());"}}, |
| [l]={ | | [l]={ |
| ["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/format-strings-oslog.m"]={"clang/test/SemaObjC/format-strings-oslog.m:23:32: error: os_log() format argument is not a string constant"} |
| } | | } |
| }, | | }, |
| ["note_arc_bridge_retained"]={ | | ["err_out_of_line_constructor_template_id"]={ |
| [b]="note_arc_bridge_retained", | | [b]="err_out_of_line_constructor_template_id", |
| [h]="use %select{__bridge_retained|CFBridgingRetain call}1 to make an ARC object available as a +1 %0", | | [j]="out-of-line constructor for %0 cannot have template arguments", |
| [i]={{nil,nil,{"use ",{"__bridge_retained","CFBridgingRetain call"}," to make an ARC object available as a +1 A"}}}, | | [i]="out-of-line constructor for A cannot have template arguments", |
| [c]=g, | | [h]=k, |
| [e]="use (?:__bridge_retained|CFBridgingRetain call) to make an ARC object available as a \\+1 (.*?)", | | [c]="out\\-of\\-line constructor for (.*?) cannot have template arguments", |
| [f]=a, | | [f]=a, |
| [d]=Gd, | | [e]=y, |
| [j]={gd,1308178962,dd,jd}, | | [g]={"9de54ea41bdc",1263403896,"Reimplement constructor declarator parsing to cope with template-ids","Reimplement constructor declarator parsing to cope with template-ids\nthat name constructors, the endless joys of out-of-line constructor\ndefinitions, and various other corner cases that the previous hack\nnever imagined. Fixes PR5688 and tightens up semantic analysis for\nconstructor names.\n\nAdditionally, fixed a problem where we wouldn\'t properly enter the\ndeclarator scope of a parenthesized declarator. We were entering the\nscope, then leaving it when we saw the \")\"; now, we re-enter the\ndeclarator scope before parsing the parameter list.\n\nNote that we are forced to perform some tentative parsing within a\nclass (call it C) to tell the difference between\n\n C(int); // constructor\n\nand\n\n C (f)(int); // member function\n\nwhich is rather unfortunate. And, although it isn\'t necessary for\ncorrectness, we use the same tentative-parsing mechanism for\nout-of-line constructors to improve diagnostics in icky cases like:\n\n C::C C::f(int); // error: C::C refers to the constructor name, but\n // we complain nicely and recover by treating it as\n // a type.\n\nllvm-svn: 93322"}, |
| [k]={{B,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;"},{B,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\");"}}, | | [d]={{Ob,2964,"/// Parse a C++ unqualified-id (or a C identifier), which describes the\n/// name of an entity.\n///\n/// \\code\n/// unqualified-id: [C++ expr.prim.general]\n/// identifier\n/// operator-function-id\n/// conversion-function-id\n/// [C++0x] literal-operator-id [TODO]\n/// ~ class-name\n/// template-id\n///\n/// \\endcode\n///\n/// \\param SS The nested-name-specifier that preceded this unqualified-id. If\n/// non-empty, then we are parsing the unqualified-id of a qualified-id.\n///\n/// \\param ObjectType if this unqualified-id occurs within a member access\n/// expression, the type of the base object whose member is being accessed.\n///\n/// \\param ObjectHadErrors if this unqualified-id occurs within a member access\n/// expression, indicates whether the original subexpressions had any errors.\n/// When true, diagnostics for missing \'template\' keyword will be supressed.\n///\n/// \\param EnteringContext whether we are entering the scope of the\n/// nested-name-specifier.\n///\n/// \\param AllowDestructorName whether we allow parsing of a destructor name.\n///\n/// \\param AllowConstructorName whether we allow parsing a constructor name.\n///\n/// \\param AllowDeductionGuide whether we allow parsing a deduction guide name.\n///\n/// \\param Result on a successful parse, contains the parsed unqualified-id.\n///\n/// \\returns true if parsing fails, false otherwise.\nbool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType, bool ObjectHadErrors, bool EnteringContext, bool AllowDestructorName, bool AllowConstructorName, bool AllowDeductionGuide, SourceLocation *TemplateKWLoc, UnqualifiedId &Result) {\n // ...\n // unqualified-id:\n // template-id (already parsed and annotated)\n if (Tok.is(tok::annot_template_id)) {\n // ...\n // If the template-name names the current class, then this is a constructor\n if (AllowConstructorName && TemplateId->Name && Actions.isCurrentClassName(*TemplateId->Name, getCurScope(), &SS)) {\n if (SS.isSet()) {\n // ...\n Diag(TemplateId->TemplateNameLoc, diag::err_out_of_line_constructor_template_id) << TemplateId->Name << FixItHint::CreateRemoval(SourceRange(TemplateId->LAngleLoc, TemplateId->RAngleLoc));"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:26:29: error: out-of-line constructor for \'X1\' cannot have template arguments","clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp:27:30: error: out-of-line constructor for \'X1\' cannot have template arguments"} |
| } | | } |
| }, | | }, |
| ["note_arc_bridge_transfer"]={ | | ["err_out_of_line_default_deletes"]={ |
| [b]="note_arc_bridge_transfer", | | [b]="err_out_of_line_default_deletes", |
| [h]="use %select{__bridge_transfer|CFBridgingRelease call}1 to transfer ownership of a +1 %0 into ARC", | | [j]="defaulting this %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}0 would delete it after its first declaration", |
| [i]={{nil,nil,{"use ",{"__bridge_transfer","CFBridgingRelease call"}," to transfer ownership of a +1 A into ARC"}}}, | | [i]={{nil,nil,{"defaulting this ",{"default constructor","copy constructor","move constructor","copy assignment operator","move assignment operator","destructor"}," would delete it after its first declaration"}}}, |
| [c]=g, | | [h]=k, |
| [e]="use (?:__bridge_transfer|CFBridgingRelease call) to transfer ownership of a \\+1 (.*?) into ARC", | | [c]="defaulting this (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) would delete it after its first declaration", |
| [f]=a, | | [f]=a, |
| [d]=Gd, | | [e]=m, |
| [j]={gd,1308178962,dd,jd}, | | [g]={"b315302bf94a",1305172308,"Implement deletion of explicitly defaulted default constructors.","Implement deletion of explicitly defaulted default constructors.\n\nWe still don\'t parse out-of-line defaults correctly, which is needed to\nget the full effect out of this patch.\n\nllvm-svn: 131223"}, |
| [k]={{B,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;"},{B,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 \");"}},
| | [d]={{w,7790,"bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, SourceLocation DefaultLoc) {\n // ...\n if (ShouldDeleteForTypeMismatch || ShouldDeleteSpecialMember(MD, CSM)) {\n if (First) {\n // ...\n } else {\n // ...\n Diag(MD->getLocation(), diag::err_out_of_line_default_deletes) << CSM;"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/special/class.copy/p11.0x.copy.cpp"]={"clang/test/CXX/special/class.copy/p11.0x.copy.cpp:167:6: error: defaulting this copy constructor would delete it after its first declaration"} |
| } | | } |
| }, | | }, |
| ["note_arc_cstyle_bridge"]={ | | ["err_out_of_line_qualified_id_type_names_constructor"]={ |
| [b]="note_arc_cstyle_bridge", | | [b]={{nil,n,"err_out_of_line_qualified_id_type_names_constructor"}}, |
| [h]="use __bridge with C-style cast to convert directly (no change in ownership)", | | [j]={{nil,n,"qualified reference to %0 is a constructor name rather than a %select{template name|type}1 in this context"}}, |
| [i]="use __bridge with C-style cast to convert directly (no change in ownership)", | | [i]={{nil,n,{"qualified reference to A is a constructor name rather than a ",{"template name","type"}," in this context"}}}, |
| [c]=g, | | [h]=k, |
| [e]="use __bridge with C\\-style cast to convert directly \\(no change in ownership\\)", | | [c]="qualified reference to (.*?) is a constructor name rather than a (?:template name|type) in this context", |
| [f]=a, | | [f]=a, |
| [d]=Gd, | | [e]={{nil,n,m}}, |
| [j]={"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"}, | | [g]={"74f02347ca16",1484859613,"PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).","PR13403 (+duplicates): implement C++ DR1310 (http://wg21.link/cwg1310).\n\nUnder this defect resolution, the injected-class-name of a class or class\ntemplate cannot be used except in very limited circumstances (when declaring a\nconstructor, in a nested-name-specifier, in a base-specifier, or in an\nelaborated-type-specifier). This is apparently done to make parsing easier, but\nit\'s a pain for us since we don\'t know whether a template-id using the\ninjected-class-name is valid at the point when we annotate it (we don\'t yet\nknow whether the template-id will become part of an elaborated-type-specifier).\n\nAs a tentative resolution to a perceived language defect, mem-initializer-ids\nare added to the list of exceptions here (they generally follow the same rules\nas base-specifiers).\n\nWhen the reference to the injected-class-name uses the \'typename\' or \'template\'\nkeywords, we permit it to be used to name a type or template as an extension;\nother compilers also accept some cases in this area. There are also a couple of\ncorner cases with dependent template names that we do not yet diagnose, but\nwhich will also get this treatment.\n\nllvm-svn: 292518"}, |
| [k]={{B,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);"},{B,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);"}}, | | [d]={{D,548,"/// If the identifier refers to a type name within this scope,\n/// return the declaration of that type.\n///\n/// This routine performs ordinary name lookup of the identifier II\n/// within the given scope, with optional C++ scope specifier SS, to\n/// determine whether the name refers to a type. If so, returns an\n/// opaque pointer (actually a QualType) corresponding to that\n/// type. Otherwise, returns NULL.\nParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS, bool isClassName, bool HasTrailingDot, ParsedType ObjectTypePtr, bool IsCtorOrDtorName, bool WantNontrivialTypeSourceInfo, bool IsClassTemplateDeductionContext, ImplicitTypenameContext AllowImplicitTypename, IdentifierInfo **CorrectedII) {\n // ...\n if (TypeDecl *TD = dyn_cast<TypeDecl>(IIDecl)) {\n // ...\n if (!isClassName && !IsCtorOrDtorName && LookupRD && FoundRD && FoundRD->isInjectedClassName() && declaresSameEntity(LookupRD, cast<Decl>(FoundRD->getParent())))\n Diag(NameLoc, diag::err_out_of_line_qualified_id_type_names_constructor) << &II << /*Type*/ 1;"},{W,4172,"TypeResult Sema::ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc, bool IsCtorOrDtorName, bool IsClassName, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n if (!IsCtorOrDtorName && !IsClassName && SS.isSet()) {\n // ...\n if (LookupRD && LookupRD->getIdentifier() == TemplateII) {\n Diag(TemplateIILoc, TemplateKWLoc.isInvalid() ? diag::err_out_of_line_qualified_id_type_names_constructor : diag::ext_out_of_line_qualified_id_type_names_constructor) << TemplateII << 0 /*injected-class-name used as template name*/"}}, |
| [l]={ | | [l]={ |
| ["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/SemaTemplate/injected-class-name.cpp"]={"clang/test/SemaTemplate/injected-class-name.cpp:14:11: error: qualified reference to \'X\' is a constructor name rather than a template name in this context","clang/test/SemaTemplate/injected-class-name.cpp:16:13: error: qualified reference to \'X\' is a constructor name rather than a template name in this context"} |
| } | | } |
| }, | | }, |
| ["note_arc_cstyle_bridge_retained"]={ | | ["err_overflow_builtin_bit_int_max_size"]={ |
| [b]="note_arc_cstyle_bridge_retained", | | [b]={{nil,F,"err_overflow_builtin_bit_int_max_size"}}, |
| [h]="use __bridge_retained with C-style cast to make an ARC object available as a +1 %0", | | [j]={{nil,F,"__builtin_mul_overflow does not support \'signed _BitInt\' operands of more than %0 bits"}}, |
| [i]="use __bridge_retained with C-style cast to make an ARC object available as a +1 A", | | [i]={{nil,F,"__builtin_mul_overflow does not support \'signed _BitInt\' operands of more than A bits"}}, |
| [c]=g, | | [h]=k, |
| [e]="use __bridge_retained with C\\-style cast to make an ARC object available as a \\+1 (.*?)", | | [c]="__builtin_mul_overflow does not support \'signed _BitInt\' operands of more than (.*?) bits", |
| [f]=a, | | [f]=a, |
| [d]=Gd, | | [e]={{nil,F,m}}, |
| [j]={"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"}, | | [g]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, |
| [k]={{B,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;"}}, | | [d]={{I,417,"static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall, unsigned BuiltinID) {\n // ...\n // Disallow signed bit-precise integer args larger than 128 bits to mul\n // function until we improve backend support.\n if (BuiltinID == Builtin::BI__builtin_mul_overflow) {\n for (unsigned I = 0; I < 3; ++I) {\n // ...\n if (Ty->isBitIntType() && Ty->isSignedIntegerType() && S.getASTContext().getIntWidth(Ty) > 128)\n return S.Diag(Arg->getBeginLoc(), diag::err_overflow_builtin_bit_int_max_size) << 128;"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/builtins-overflow.c"]={"clang/test/Sema/builtins-overflow.c:40:43: error: __builtin_mul_overflow does not support \'signed _BitInt\' operands of more than 128 bits"} |
| } | | } |
| }, | | }, |
| ["note_arc_cstyle_bridge_transfer"]={ | | ["err_overflow_builtin_must_be_int"]={ |
| [b]="note_arc_cstyle_bridge_transfer", | | [b]="err_overflow_builtin_must_be_int", |
| [h]="use __bridge_transfer with C-style cast to transfer ownership of a +1 %0 into ARC", | | [j]="operand argument to overflow builtin must be an integer (%0 invalid)", |
| [i]="use __bridge_transfer with C-style cast to transfer ownership of a +1 A into ARC", | | [i]="operand argument to overflow builtin must be an integer (A invalid)", |
| [c]=g, | | [h]=k, |
| [e]="use __bridge_transfer with C\\-style cast to transfer ownership of a \\+1 (.*?) into ARC", | | [c]="operand argument to overflow builtin must be an integer \\((.*?) invalid\\)", |
| [f]=a, | | [f]=a, |
| [d]=Gd, | | [e]=m, |
| [j]={"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"}, | | [g]={"03107a4ef015",1446151681,"Add support for __builtin_{add,sub,mul}_overflow.","Add support for __builtin_{add,sub,mul}_overflow.\n\nPatch by David Grayson!\n\nllvm-svn: 251651"}, |
| [k]={{B,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;"}}, | | [d]={{I,381,"static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall, unsigned BuiltinID) {\n // ...\n // First two arguments should be integers.\n for (unsigned I = 0; I < 2; ++I) {\n // ...\n if (!Ty->isIntegerType()) {\n S.Diag(Arg.get()->getBeginLoc(), diag::err_overflow_builtin_must_be_int) << Ty << Arg.get()->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/builtins-overflow.c"]={"clang/test/Sema/builtins-overflow.c:17:26: error: operand argument to overflow builtin must be an integer (\'const char *\' invalid)","clang/test/Sema/builtins-overflow.c:18:29: error: operand argument to overflow builtin must be an integer (\'const char *\' invalid)"} |
| } | | } |
| }, | | }, |
| ["note_arc_field_with_ownership"]={ | | ["err_overflow_builtin_must_be_ptr_int"]={ |
| [b]="note_arc_field_with_ownership", | | [b]="err_overflow_builtin_must_be_ptr_int", |
| [h]="field has non-trivial ownership qualification", | | [j]="result argument to overflow builtin must be a pointer to a non-const integer (%0 invalid)", |
| [i]="field has non-trivial ownership qualification", | | [i]="result argument to overflow builtin must be a pointer to a non-const integer (A invalid)", |
| [c]=g, | | [h]=k, |
| [e]="field has non\\-trivial ownership qualification", | | [c]="result argument to overflow builtin must be a pointer to a non\\-const integer \\((.*?) invalid\\)", |
| [f]=a, | | [f]=a, |
| [d]="ARC Restrictions", | | [e]=m, |
| [j]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | | [g]={"03107a4ef015",1446151681,"Add support for __builtin_{add,sub,mul}_overflow.","Add support for __builtin_{add,sub,mul}_overflow.\n\nPatch by David Grayson!\n\nllvm-svn: 251651"}, |
| [k]={{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;"}}, | | [d]={{I,401,"static bool SemaBuiltinOverflow(Sema &S, CallExpr *TheCall, unsigned BuiltinID) {\n // ...\n // Third argument should be a pointer to a non-const integer.\n // IRGen correctly handles volatile, restrict, and address spaces, and\n // the other qualifiers aren\'t possible.\n {\n // ...\n if (!PtrTy || !PtrTy->getPointeeType()->isIntegerType() || PtrTy->getPointeeType().isConstQualified()) {\n S.Diag(Arg.get()->getBeginLoc(), diag::err_overflow_builtin_must_be_ptr_int) << Ty << Arg.get()->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/builtins-overflow.c"]={"clang/test/Sema/builtins-overflow.c:19:32: error: result argument to overflow builtin must be a pointer to a non-const integer (\'int\' invalid)","clang/test/Sema/builtins-overflow.c:20:32: error: result argument to overflow builtin must be a pointer to a non-const integer (\'float *\' invalid)","clang/test/Sema/builtins-overflow.c:21:32: error: result argument to overflow builtin must be a pointer to a non-const integer (\'const unsigned int *\' invalid)"} |
| } | | } |
| }, | | }, |
| ["note_arc_forbidden_type"]={ | | ["err_override_control_interface"]={ |
| [b]="note_arc_forbidden_type", | | [b]="err_override_control_interface", |
| [h]="declaration uses type that is ill-formed in ARC", | | [j]="\'%0\' keyword not permitted with interface types", |
| [i]="declaration uses type that is ill-formed in ARC", | | [i]="\'A\' keyword not permitted with interface types", |
| [c]=g, | | [h]=k, |
| [e]="declaration uses type that is ill\\-formed in ARC", | | [c]="\'(.*?)\' keyword not permitted with interface types", |
| [f]=a, | | [f]=a, |
| [d]="ARC Restrictions", | | [e]=y, |
| [j]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | | [g]={"db632ac004ae",1348558359,"Fix for r163013 regression and further __interface enhancement.","Fix for r163013 regression and further __interface enhancement.\nPatch by Andy Gibbs!\n\nllvm-svn: 164590"}, |
| [k]={{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;"}}, | | [d]={{kc,2462,"/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.\n///\n/// virt-specifier-seq:\n/// virt-specifier\n/// virt-specifier-seq virt-specifier\nvoid Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface, SourceLocation FriendLoc) {\n while (true) {\n // ...\n if (IsInterface && (Specifier == VirtSpecifiers::VS_Final || Specifier == VirtSpecifiers::VS_Sealed)) {\n Diag(Tok.getLocation(), diag::err_override_control_interface) << VirtSpecifiers::getSpecifierName(Specifier);"},{kc,3524,"/// ParseCXXMemberSpecification - Parse the class definition.\n///\n/// member-specification:\n/// member-declaration member-specification[opt]\n/// access-specifier \':\' member-specification[opt]\n///\nvoid Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AttrFixitLoc, ParsedAttributes &Attrs, unsigned TagType, Decl *TagDecl) {\n // ...\n // Parse the optional \'final\' keyword.\n if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {\n while (true) {\n // ...\n if (TagType == DeclSpec::TST_interface)\n Diag(FinalLoc, diag::err_override_control_interface) << VirtSpecifiers::getSpecifierName(Specifier);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/ms-interface.cpp"]={"clang/test/SemaCXX/ms-interface.cpp:41:16: error: \'final\' keyword not permitted with interface types","clang/test/SemaCXX/ms-interface.cpp:47:14: error: \'final\' keyword not permitted with interface types"} |
| } | | } |
| }, | | }, |
| ["note_arc_gained_method_convention"]={ | | ["err_override_exception_spec"]={ |
| [b]="note_arc_gained_method_convention", | | [b]="err_override_exception_spec", |
| [h]="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", | | [j]="exception specification of overriding function is more lax than base version", |
| [i]={{nil,nil,{"declaration in interface is not in the \'",{"alloc",fc,"init","new"},"\' family because ",{"its result type is not an object pointer","its result type is unrelated to its receiver type"}}}}, | | [i]="exception specification of overriding function is more lax than base version", |
| [c]=g, | | [h]=k, |
| [e]="declaration in interface is not in the \'(?:alloc|copy|init|new)\' family because (?:its result type is not an object pointer|its result type is unrelated to its receiver type)", | | [c]="exception specification of overriding function is more lax than base version", |
| [f]=a, | | [f]=a, |
| [d]="ARC Semantic Issue", | | [e]=m, |
| [j]={gd,1308178962,dd,jd}, | | [g]={"86be854fa869",1246998597,"Implement checking of exception spec compatibility for overriding virtual functions.","Implement checking of exception spec compatibility for overriding virtual functions.\n\nllvm-svn: 74943"}, |
| [k]={{db,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;"}}, | | [d]={{"clang/lib/Sema/SemaExceptionSpec.cpp",990,"bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old) {\n // ...\n unsigned DiagID = diag::err_override_exception_spec;"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/except/except.spec/p5-delayed.cpp"]={"clang/test/CXX/except/except.spec/p5-delayed.cpp:13:10: error: exception specification of overriding function is more lax than base version"} |
| } | | } |
| }, | | }, |
| ["note_arc_init_returns_unrelated"]={ | | ["err_ovl_ambiguous_call"]={ |
| [b]="note_arc_init_returns_unrelated", | | [b]="err_ovl_ambiguous_call", |
| [h]="init method must return a type related to its receiver type", | | [j]="call to %0 is ambiguous", |
| [i]="init method must return a type related to its receiver type", | | [i]="call to A is ambiguous", |
| [c]=g, | | [h]=k, |
| [e]="init method must return a type related to its receiver type", | | [c]="call to (.*?) is ambiguous", |
| [f]=a, | | [f]=a, |
| [d]="ARC Restrictions", | | [e]=m, |
| [j]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | | [g]={s,1236199783,q,r}, |
| [k]={{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;"}}
| | [d]={{Q,2617,"static bool resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range, SmallVectorImpl<Expr *> &Args, bool &PassAlignment, FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates, Expr *AlignArg, bool Diagnose) {\n // ...\n case OR_Ambiguous:\n if (Diagnose) {\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_ambiguous_call) << R.getLookupName() << Range), S, OCD_AmbiguousCandidates, Args);"},{Q,3881,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_Ambiguous:\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_ambiguous_call) << R.getLookupName() << Range), S, OCD_AmbiguousCandidates, Args);"},{"clang/lib/Sema/SemaLookup.cpp",3764,"/// LookupLiteralOperator - Determine which literal operator should be used for\n/// a user-defined literal, per C++11 [lex.ext].\n///\n/// Normal overload resolution is not used to select which literal operator to\n/// call for a user-defined literal. Look up the provided literal operator name,\n/// and filter the results to the appropriate set for the given argument types.\nSema::LiteralOperatorLookupResult Sema::LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef<QualType> ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplatePack, bool DiagnoseMissing, StringLiteral *StringLit) {\n // ...\n // C++11 [lex.ext]p3, p4: S shall contain a raw literal operator or a literal\n // operator template, but not both.\n if (FoundRaw && FoundTemplate) {\n Diag(R.getNameLoc(), diag::err_ovl_ambiguous_call) << R.getLookupName();"},{E,13536,"/// FinishOverloadedCallExpr - given an OverloadCandidateSet, builds and returns\n/// the completed call expression. If overload resolution fails, emits\n/// diagnostics and returns ExprError()\nstatic ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, OverloadCandidateSet *CandidateSet, OverloadCandidateSet::iterator *Best, OverloadingResult OverloadResult, bool AllowTypoCorrection) {\n // ...\n case OR_Ambiguous:\n CandidateSet->NoteCandidates(PartialDiagnosticAt(Fn->getBeginLoc(), SemaRef.PDiag(diag::err_ovl_ambiguous_call) << ULE->getName() << Fn->getSourceRange()), SemaRef, OCD_AmbiguousCandidates, Args);"},{E,15371,"/// BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to\n/// a literal operator described by the provided lookup results.\nExprResult Sema::BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef<Expr *> Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *TemplateArgs) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), PDiag(diag::err_ovl_ambiguous_call) << R.getLookupName()), *this, OCD_AmbiguousCandidates, Args);"}}, |
| | [l]={ |
| | ["clang/test/Sema/overloadable-complex.c"]={"clang/test/Sema/overloadable-complex.c:34:14: error: call to \'promote_or_convert\' is ambiguous","clang/test/Sema/overloadable-complex.c:35:14: error: call to \'promote_or_convert\' is ambiguous"} |
| | } |
| }, | | }, |
| ["note_arc_lost_method_convention"]={ | | ["err_ovl_ambiguous_conversion_in_cast"]={ |
| [b]="note_arc_lost_method_convention", | | [b]="err_ovl_ambiguous_conversion_in_cast", |
| [h]="declaration in interface", | | [j]={{nil,t,"ambiguous conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2"},{o,nil,"ambiguous conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2"}}, |
| [i]="declaration in interface", | | [i]={{nil,t,{"ambiguous conversion for ",{a,xb,Nb,Qb,Mb,Sb,a}," from B to C"}},{o,nil,{"ambiguous conversion for ",{a,xb,Nb,Qb,Mb,Sb}," from B to C"}}}, |
| [c]=g, | | [h]=k, |
| [e]="declaration in interface", | | [c]="ambiguous conversion for (?:|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?)", |
| [f]=a, | | [f]=a, |
| [d]="ARC Semantic Issue", | | [e]=m, |
| [j]={gd,1308178962,dd,jd}, | | [g]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, |
| [k]={{db,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;"}}, | | [d]={{"clang/lib/Sema/SemaCast.cpp",498,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_Ambiguous:\n msg = diag::err_ovl_ambiguous_conversion_in_cast;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/cast-conversion.cpp"]={"clang/test/SemaCXX/cast-conversion.cpp:73:10: error: ambiguous conversion for static_cast from \'AmbiguousCast\' to \'long long\'"} |
| } | | } |
| }, | | }, |
| ["note_arc_retain_cycle_owner"]={ | | ["err_ovl_ambiguous_init"]={ |
| [b]="note_arc_retain_cycle_owner", | | [b]="err_ovl_ambiguous_init", |
| [h]="block will be retained by %select{the captured object|an object strongly retained by the captured object}0", | | [j]="call to constructor of %0 is ambiguous", |
| [i]={{nil,nil,{"block will be retained by ",{"the captured object","an object strongly retained by the captured object"}}}}, | | [i]="call to constructor of A is ambiguous", |
| [c]=g, | | [h]=k, |
| [e]="block will be retained by (?:the captured object|an object strongly retained by the captured object)", | | [c]="call to constructor of (.*?) is ambiguous", |
| [f]=a, | | [f]=a, |
| [d]="ARC Retain Cycle", | | [e]=m, |
| [j]={gd,1308178962,dd,jd}, | | [g]={s,1236199783,q,r}, |
| [k]={{V,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;"}}, | | [d]={{P,9857,"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_Ambiguous:\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), S.PDiag(diag::err_ovl_ambiguous_init) << DestType << ArgsRange), S, OCD_AmbiguousCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp"]={"clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:15:4: error: call to constructor of \'D1\' is ambiguous","clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp:93:7: error: call to constructor of \'D\' is ambiguous"} |
| } | | } |
| }, | | }, |
| ["note_arc_weak_also_accessed_here"]={ | | ["err_ovl_ambiguous_member_call"]={ |
| [b]="note_arc_weak_also_accessed_here", | | [b]="err_ovl_ambiguous_member_call", |
| [h]="also accessed here", | | [j]="call to member function %0 is ambiguous", |
| [i]="also accessed here", | | [i]="call to member function A is ambiguous", |
| [c]=g, | | [h]=k, |
| [e]="also accessed here", | | [c]="call to member function (.*?) is ambiguous", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{Zb,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();"}},
| | [d]={{E,14831,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (isa<MemberExpr>(NakedMemExpr)) {\n // ...\n } else {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UnresExpr->getMemberLoc(), PDiag(diag::err_ovl_ambiguous_member_call) << DeclName << MemExprE->getSourceRange()), *this, OCD_AmbiguousCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaTemplate/concepts-using-decl.cpp"]={"clang/test/SemaTemplate/concepts-using-decl.cpp:91:9: error: call to member function \'foo\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:127:10: error: call to member function \'foo1\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:128:10: error: call to member function \'foo2\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:129:10: error: call to member function \'foo3\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:130:10: error: call to member function \'foo1\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:131:10: error: call to member function \'foo2\' is ambiguous","clang/test/SemaTemplate/concepts-using-decl.cpp:132:10: error: call to member function \'foo3\' is ambiguous"} |
| } | | } |
| }, | | }, |
| ["note_arc_weak_disabled"]={ | | ["err_ovl_ambiguous_object_call"]={ |
| [b]="note_arc_weak_disabled", | | [b]="err_ovl_ambiguous_object_call", |
| [h]="declaration uses __weak, but ARC is disabled", | | [j]="call to object of type %0 is ambiguous", |
| [i]="declaration uses __weak, but ARC is disabled", | | [i]="call to object of type A is ambiguous", |
| [c]=g, | | [h]=k, |
| [e]="declaration uses __weak, but ARC is disabled", | | [c]="call to object of type (.*?) is ambiguous", |
| [f]=a, | | [f]=a, |
| [d]="ARC Restrictions", | | [e]=m, |
| [j]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | | [g]={s,1236199783,q,r}, |
| [k]={{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;"}}, | | [d]={{E,15081,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Object.get()->getBeginLoc(), PDiag(diag::err_ovl_ambiguous_object_call) << Object.get()->getType() << Object.get()->getSourceRange()), *this, OCD_AmbiguousCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:211:3: error: call to object of type \'ConvertToFunc\' is ambiguous","clang/test/SemaCXX/overloaded-operator.cpp:216:3: error: call to object of type \'ConvertToFuncDerived\' is ambiguous"} |
| } | | } |
| }, | | }, |
| ["note_arc_weak_no_runtime"]={ | | ["err_ovl_ambiguous_oper_binary"]={ |
| [b]="note_arc_weak_no_runtime", | | [b]="err_ovl_ambiguous_oper_binary", |
| [h]="declaration uses __weak, which the current deployment target does not support", | | [j]="use of overloaded operator \'%0\' is ambiguous (with operand types %1 and %2)", |
| [i]="declaration uses __weak, which the current deployment target does not support", | | [i]="use of overloaded operator \'A\' is ambiguous (with operand types B and C)", |
| [c]=g, | | [h]=k, |
| [e]="declaration uses __weak, which the current deployment target does not support", | | [c]="use of overloaded operator \'(.*?)\' is ambiguous \\(with operand types (.*?) and (.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]="ARC Restrictions", | | [e]=m, |
| [j]={"c6af8c606dae",1446008599,"Refine r251469 to give better (and more localizable) diagnostics","Refine r251469 to give better (and more localizable) diagnostics\nfor all the reasons that ARC makes things implicitly unavailable.\n\nllvm-svn: 251496"}, | | [g]={"052caec1f3ff",1289678798,"When complaining about ambiguous overload resolution for a unary or","When complaining about ambiguous overload resolution for a unary or\nbinary operator, provide the types.\n\nllvm-svn: 119008"}, |
| [k]={{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;"}} | | [d]={{E,14284,"/// 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_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_ambiguous_oper_binary) << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getType() << Args[1]->getType() << Args[0]->getSourceRange() << Args[1]->getSourceRange()), *this, OCD_AmbiguousCandidates, Args, BinaryOperator::getOpcodeStr(Opc), OpLoc);"},{E,14618,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_Ambiguous:\n if (Args.size() == 2) {\n CandidateSet.NoteCandidates(PartialDiagnosticAt(LLoc, PDiag(diag::err_ovl_ambiguous_oper_binary) << \"[]\" << Args[0]->getType() << Args[1]->getType() << Args[0]->getSourceRange() << Range), *this, OCD_AmbiguousCandidates, Args, \"[]\", LLoc);"}}, |
| | [l]={ |
| | ["clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp"]={"clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp:43:19: error: use of overloaded operator \'->*\' is ambiguous (with operand types \'C1\' and \'int E::*\')"} |
| | } |
| }, | | }, |
| ["note_array_declared_here"]={ | | ["err_ovl_ambiguous_oper_unary"]={ |
| [b]={{nil,m,"note_array_declared_here"}}, | | [b]="err_ovl_ambiguous_oper_unary", |
| [h]={{nil,m,"array %0 declared here"}}, | | [j]="use of overloaded operator \'%0\' is ambiguous (operand type %1)", |
| [i]={{nil,m,"array A declared here"}}, | | [i]="use of overloaded operator \'A\' is ambiguous (operand type B)", |
| [c]=g, | | [h]=k, |
| [e]="array (.*?) declared here", | | [c]="use of overloaded operator \'(.*?)\' is ambiguous \\(operand type (.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={ad,1567434909,Vc,Xc}, | | [g]={"052caec1f3ff",1289678798,"When complaining about ambiguous overload resolution for a unary or","When complaining about ambiguous overload resolution for a unary or\nbinary operator, provide the types.\n\nllvm-svn: 119008"}, |
| [k]={{V,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);"},{V,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);"},{A,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;"}}, | | [d]={{E,13796,"/// Create a unary 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 UnaryOperatorKind 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 CreateOverloadedUnaryOp().\n///\n/// \\param Input The input argument.\nExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *Input, bool PerformADL) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_ambiguous_oper_unary) << UnaryOperator::getOpcodeStr(Opc) << Input->getType() << Input->getSourceRange()), *this, OCD_AmbiguousCandidates, ArgsArray, UnaryOperator::getOpcodeStr(Opc), OpLoc);"},{E,15289,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_Ambiguous:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_ambiguous_oper_unary) << \"->\" << Base->getType() << Base->getSourceRange()), *this, OCD_AmbiguousCandidates, Base);"}}, |
| [l]={ | | [l]={ |
| ["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/ambiguous-builtin-unary-operator.cpp"]={"clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp:16:3: error: use of overloaded operator \'++\' is ambiguous (operand type \'C\')","clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp:30:3: error: use of overloaded operator \'++\' is ambiguous (operand type \'C1\')"} |
| } | | } |
| }, | | }, |
| ["note_array_init_plain_string_into_char8_t"]={ | | ["err_ovl_ambiguous_subscript_call"]={ |
| [b]={{nil,u,"note_array_init_plain_string_into_char8_t"}}, | | [b]={{nil,C,"err_ovl_ambiguous_subscript_call"}}, |
| [h]={{nil,u,"add \'u8\' prefix to form a \'char8_t\' string literal"}}, | | [j]={{nil,C,"call to subscript operator of type %0 is ambiguous"}}, |
| [i]={{nil,u,"add \'u8\' prefix to form a \'char8_t\' string literal"}}, | | [i]={{nil,C,"call to subscript operator of type A is ambiguous"}}, |
| [c]=g, | | [h]=k, |
| [e]="add \'u8\' prefix to form a \'char8_t\' string literal", | | [c]="call to subscript operator of type (.*?) is ambiguous", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]={{nil,C,m}}, |
| [j]={"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"}, | | [g]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, |
| [k]={{ab,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\");"}}, | | [d]={{E,14625,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_Ambiguous:\n if (Args.size() == 2) {\n // ...\n } else {\n CandidateSet.NoteCandidates(PartialDiagnosticAt(LLoc, PDiag(diag::err_ovl_ambiguous_subscript_call) << Args[0]->getType() << Args[0]->getSourceRange() << Range), *this, OCD_AmbiguousCandidates, Args, \"[]\", LLoc);"}}, |
| [l]={ | | [l]={ |
| ["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/cxx2b-overloaded-operator.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:51:20: error: call to subscript operator of type \'S\' is ambiguous"} |
| } | | } |
| }, | | }, |
| ["note_array_size_conversion"]={ | | ["err_ovl_deleted_call"]={ |
| [b]="note_array_size_conversion", | | [b]="err_ovl_deleted_call", |
| [h]="conversion to %select{integral|enumeration}0 type %1 declared here", | | [j]={{nil,x,"call to deleted function %0"},{u,nil,"call to %select{unavailable|deleted}0 function %1%2"}}, |
| [i]={{nil,nil,{"conversion to ",{"integral","enumeration"}," type B declared here"}}},
| | [i]={{nil,x,"call to deleted function A"},{u,nil,{"call to ",{Zb,ac}," function BC"}}}, |
| [c]=g, | | [h]=k, |
| [e]="conversion to (?:integral|enumeration) type (.*?) declared here",
| | [c]="call to deleted function (.*?)", |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{hb,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; }"},{hb,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"]={
| |
| [b]="note_asm_input_duplicate_first",
| |
| [h]="constraint \'%0\' is already present here", | |
| [i]="constraint \'A\' is already present here",
| |
| [c]=g, | |
| [e]="constraint \'(.*?)\' is already present here",
| |
| [f]=a, | | [f]=a, |
| [d]="Inline Assembly Issue", | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{Cd,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;"}},
| | [d]={{"clang/lib/ARCMigrate/TransGCCalls.cpp",56,"class GCCollectableCallsChecker : public RecursiveASTVisitor<GCCollectableCallsChecker> {\n // ...\n bool VisitCallExpr(CallExpr *E) {\n // ...\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {\n if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) {\n // ...\n if (FD->getIdentifier() == NSMakeCollectableII) {\n // ...\n TA.clearDiagnostic(diag::err_unavailable, diag::err_unavailable_message,\n diag::err_ovl_deleted_call, // ObjC++"},{Q,2627,"static bool resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range, SmallVectorImpl<Expr *> &Args, bool &PassAlignment, FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates, Expr *AlignArg, bool Diagnose) {\n // ...\n case OR_Deleted: {\n if (Diagnose) {\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_deleted_call) << R.getLookupName() << Range), S, OCD_AllCandidates, Args);"},{Q,3888,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_Deleted: {\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_deleted_call) << R.getLookupName() << Range), S, OCD_AllCandidates, Args);"},{E,13544,"/// FinishOverloadedCallExpr - given an OverloadCandidateSet, builds and returns\n/// the completed call expression. If overload resolution fails, emits\n/// diagnostics and returns ExprError()\nstatic ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, OverloadCandidateSet *CandidateSet, OverloadCandidateSet::iterator *Best, OverloadingResult OverloadResult, bool AllowTypoCorrection) {\n // ...\n case OR_Deleted: {\n CandidateSet->NoteCandidates(PartialDiagnosticAt(Fn->getBeginLoc(), SemaRef.PDiag(diag::err_ovl_deleted_call) << ULE->getName() << Fn->getSourceRange()), SemaRef, OCD_AllCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/asm.c"]={"clang/test/Sema/asm.c:291:17: note: constraint \'1\' is already present here"} | | ["clang/test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.scs/p3.cpp"]={"clang/test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.scs/p3.cpp:10:3: error: call to deleted function \'f\'"} |
| } | | } |
| }, | | }, |
| ["note_asm_missing_constraint_modifier"]={ | | ["err_ovl_deleted_comparison"]={ |
| [b]="note_asm_missing_constraint_modifier", | | [b]={{nil,o,"err_ovl_deleted_comparison"}}, |
| [h]="use constraint modifier \"%0\"", | | [j]={{nil,o,"object of type %0 cannot be compared because its %1 is implicitly deleted"}}, |
| [i]="use constraint modifier \"A\"", | | [i]={{nil,o,"object of type A cannot be compared because its B is implicitly deleted"}}, |
| [c]=g, | | [h]=k, |
| [e]="use constraint modifier \"(.*?)\"", | | [c]="object of type (.*?) cannot be compared because its (.*?) is implicitly deleted", |
| [f]=a, | | [f]=a, |
| [d]="Inline Assembly Issue", | | [e]={{nil,o,m}}, |
| [j]={"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"}, | | [g]={"5253d9138eb3",1573070592,"[c++20] Determine whether a defaulted comparison should be deleted or","[c++20] Determine whether a defaulted comparison should be deleted or\nconstexpr."}, |
| [k]={{Cd,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;"}},
| | [d]={{E,14303,"/// 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_Deleted:\n if (isImplicitlyDeleted(Best->Function)) {\n // ...\n if (DFK.isSpecialMember()) {\n // ...\n } else {\n // ...\n Diag(OpLoc, diag::err_ovl_deleted_comparison) << Args[0]->getType() << DeletedFD;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/arm64-inline-asm.c"]={"clang/test/Sema/arm64-inline-asm.c:8:21: note: use constraint modifier \"w\""} | | ["clang/test/CXX/class/class.compare/class.compare.default/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:24:10: error: object of type \'A1\' cannot be compared because its \'operator==\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:25:10: error: object of type \'A1\' cannot be compared because its \'operator==\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:26:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:27:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:28:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:29:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:30:10: error: object of type \'A1\' cannot be compared because its \'operator<=>\' is implicitly deleted"} |
| } | | } |
| }, | | }, |
| ["note_assign_lhs_incomplete"]={ | | ["err_ovl_deleted_conversion_in_cast"]={ |
| [b]="note_assign_lhs_incomplete", | | [b]="err_ovl_deleted_conversion_in_cast", |
| [h]="type %0 is incomplete", | | [j]={{nil,t,"%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2 uses deleted function"},{o,nil,"%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2 uses deleted function"}}, |
| [i]="type A is incomplete", | | [i]={{nil,t,{{a,xb,Nb,Qb,Mb,Sb,a}," from B to C uses deleted function"}},{o,nil,{{a,xb,Nb,Qb,Mb,Sb}," from B to C uses deleted function"}}}, |
| [c]=g, | | [h]=k, |
| [e]="type (.*?) is incomplete", | | [c]="(?:|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?) uses deleted function", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"a31efa07ff70",1377722135,"Improve error for assignment to incomplete class.","Improve error for assignment to incomplete class.\n\nPR7681.\n\nllvm-svn: 189510"}, | | [g]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, |
| [k]={{xb,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();"}}, | | [d]={{"clang/lib/Sema/SemaCast.cpp",503,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_Deleted:\n msg = diag::err_ovl_deleted_conversion_in_cast;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/overloaded-operator.cpp"]={"clang/test/SemaCXX/overloaded-operator.cpp:452:12: note: type \'PointerUnion<int *, float *>\' is incomplete"} | | ["clang/test/SemaCXX/deleted-function.cpp"]={"clang/test/SemaCXX/deleted-function.cpp:78:15: error: C-style cast from \'int\' to \'DelCtor\' uses deleted function","clang/test/SemaCXX/deleted-function.cpp:79:15: error: functional-style cast from \'int\' to \'DelCtor\' uses deleted function"} |
| } | | } |
| }, | | }, |
| ["note_atomic_constraint_evaluated_to_false"]={ | | ["err_ovl_deleted_init"]={ |
| [b]="note_atomic_constraint_evaluated_to_false", | | [b]="err_ovl_deleted_init", |
| [h]={{nil,m,"%select{and|because}0 \'%1\' evaluated to false"}}, | | [j]={{nil,x,"call to deleted constructor of %0"},{u,nil,"call to %select{unavailable|deleted}0 constructor of %1"}}, |
| [i]={{nil,m,{{yb,zb}," \'B\' evaluated to false"}}}, | | [i]={{nil,x,"call to deleted constructor of A"},{u,nil,{"call to ",{Zb,ac}," constructor of B"}}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:and|because) \'(.*?)\' evaluated to false", | | [c]="call to deleted constructor of (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={Hd,1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | | [g]={s,1236199783,q,r}, |
| [k]={{vb,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;"}},
| | [d]={{P,9922,"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_Deleted: {\n // ...\n if (Ovl != OR_Deleted) {\n S.Diag(Kind.getLocation(), diag::err_ovl_deleted_init) << DestType << ArgsRange;"},{P,9936,"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_Deleted: {\n // ...\n // If this is a defaulted or implicitly-declared function, then\n // it was implicitly deleted. Make it clear that the deletion was\n // implicit.\n if (S.isImplicitlyDeleted(Best->Function))\n // ...\n else\n S.Diag(Kind.getLocation(), diag::err_ovl_deleted_init) << DestType << ArgsRange;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/cxx11-call-to-deleted-constructor.cpp"]={"clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp:37:12: error: call to deleted constructor of \'Matrix<double> &&\'"} |
| } | | } |
| }, | | }, |
| ["note_atomic_constraint_evaluated_to_false_elaborated"]={ | | ["err_ovl_deleted_member_call"]={ |
| [b]={{nil,m,"note_atomic_constraint_evaluated_to_false_elaborated"}}, | | [b]="err_ovl_deleted_member_call", |
| [h]={{nil,m,"%select{and|because}0 \'%1\' (%2 %3 %4) evaluated to false"}}, | | [j]={{nil,x,"call to deleted member function %0"},{u,nil,"call to %select{unavailable|deleted}0 member function %1%2"}}, |
| [i]={{nil,m,{{yb,zb}," \'B\' (C D E) evaluated to false"}}}, | | [i]={{nil,x,"call to deleted member function A"},{u,nil,{"call to ",{Zb,ac}," member function BC"}}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:and|because) \'(.*?)\' \\((.*?) (.*?) (.*?)\\) evaluated to false", | | [c]="call to deleted member function (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={Hd,1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | | [g]={s,1236199783,q,r}, |
| [k]={{vb,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);"}},
| | [d]={{E,14838,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (isa<MemberExpr>(NakedMemExpr)) {\n // ...\n } else {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UnresExpr->getMemberLoc(), PDiag(diag::err_ovl_deleted_member_call) << DeclName << MemExprE->getSourceRange()), *this, OCD_AllCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/co_await-range-for.cpp"]={"clang/test/SemaCXX/co_await-range-for.cpp:53:23: error: call to deleted member function \'await_transform\'","clang/test/SemaCXX/co_await-range-for.cpp:75:23: error: call to deleted member function \'await_transform\'","clang/test/SemaCXX/co_await-range-for.cpp:82:23: error: call to deleted member function \'await_transform\'"} |
| } | | } |
| }, | | }, |
| ["note_atomic_property_fixup_suggest"]={ | | ["err_ovl_deleted_object_call"]={ |
| [b]="note_atomic_property_fixup_suggest", | | [b]="err_ovl_deleted_object_call", |
| [h]={{nil,q,"setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"},{w,nil,"setter and getter must both be synthesized, or both be user defined,or the property must be nonatomic"}}, | | [j]={{nil,x,"call to deleted function call operator in type %0"},{u,nil,"call to %select{unavailable|deleted}0 function call operator in type %1%2"}}, |
| [i]={{nil,q,"setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic"},{w,nil,"setter and getter must both be synthesized, or both be user defined,or the property must be nonatomic"}}, | | [i]={{nil,x,"call to deleted function call operator in type A"},{u,nil,{"call to ",{Zb,ac}," function call operator in type BC"}}}, |
| [c]=g, | | [h]=k, |
| [e]="setter and getter must both be synthesized, or both be user defined, or the property must be nonatomic", | | [c]="call to deleted function call operator in type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{qb,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);"},{qb,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) \");"},{qb,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);"}}, | | [d]={{E,15090,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(Object.get()->getBeginLoc(), PDiag(diag::err_ovl_deleted_object_call) << Object.get()->getType() << Object.get()->getSourceRange()), *this, OCD_AllCandidates, Args);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_attribute"]={ | | ["err_ovl_deleted_oper"]={ |
| [b]="note_attribute", | | [b]="err_ovl_deleted_oper", |
| [h]="attribute is here", | | [j]={{nil,x,"overload resolution selected deleted operator \'%0\'"},{u,nil,"overload resolution selected %select{unavailable|deleted}0 operator \'%1\'%2"}}, |
| [i]="attribute is here", | | [i]={{nil,x,"overload resolution selected deleted operator \'A\'"},{u,nil,{"overload resolution selected ",{Zb,ac}," operator \'B\'C"}}}, |
| [c]=g, | | [h]=k, |
| [e]="attribute is here", | | [c]="overload resolution selected deleted operator \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{C,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);"},{C,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);"},{C,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);"},{r,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);"},{Cd,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);"},{Cd,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);"},{G,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);"},{G,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);"}}, | | [d]={{E,13805,"/// Create a unary 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 UnaryOperatorKind 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 CreateOverloadedUnaryOp().\n///\n/// \\param Input The input argument.\nExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *Input, bool PerformADL) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << UnaryOperator::getOpcodeStr(Opc) << Input->getSourceRange()), *this, OCD_AllCandidates, ArgsArray, UnaryOperator::getOpcodeStr(Opc), OpLoc);"},{E,14314,"/// 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_Deleted:\n // ...\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << getOperatorSpelling(Best->Function->getDeclName().getCXXOverloadedOperator()) << Args[0]->getSourceRange() << Args[1]->getSourceRange()), *this, OCD_AllCandidates, Args, BinaryOperator::getOpcodeStr(Opc), OpLoc);"},{E,14634,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(LLoc, PDiag(diag::err_ovl_deleted_oper) << \"[]\" << Args[0]->getSourceRange() << Range), *this, OCD_AllCandidates, Args, \"[]\", LLoc);"},{E,15297,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_Deleted:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(OpLoc, PDiag(diag::err_ovl_deleted_oper) << \"->\" << Base->getSourceRange()), *this, OCD_AllCandidates, Base);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/rval-references-examples.cpp"]={"clang/test/SemaCXX/rval-references-examples.cpp:80:6: error: overload resolution selected deleted operator \'=\'"} |
| } | | } |
| }, | | }, |
| ["note_attribute_has_no_effect_on_compile_time_if_here"]={ | | ["err_ovl_deleted_special_init"]={ |
| [b]={{nil,U,"note_attribute_has_no_effect_on_compile_time_if_here"}}, | | [b]="err_ovl_deleted_special_init", |
| [h]={{nil,U,"annotating the \'if %select{constexpr|consteval}0\' statement here"}}, | | [j]="call to implicitly-deleted %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|function}0 of %1", |
| [i]={{nil,U,{"annotating the \'if ",{"constexpr","consteval"},"\' statement here"}}}, | | [i]={{nil,nil,{"call to implicitly-deleted ",{"default constructor","copy constructor","move constructor","copy assignment operator","move assignment operator","destructor","function"}," of B"}}}, |
| [c]=g, | | [h]=k, |
| [e]="annotating the \'if (?:constexpr|consteval)\' statement here", | | [c]="call to implicitly\\-deleted (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor|function) of (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,U,n}}, | | [e]=m, |
| [j]={yd,1615397021,Id,Kd}, | | [g]={"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"}, |
| [k]={{X,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));"}}, | | [d]={{P,9932,"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_Deleted: {\n // ...\n // If this is a defaulted or implicitly-declared function, then\n // it was implicitly deleted. Make it clear that the deletion was\n // implicit.\n if (S.isImplicitlyDeleted(Best->Function))\n S.Diag(Kind.getLocation(), diag::err_ovl_deleted_special_init) << S.getSpecialMember(cast<CXXMethodDecl>(Best->Function)) << DestType << ArgsRange;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/dr1301.cpp"]={"clang/test/SemaCXX/dr1301.cpp:17:9: error: call to implicitly-deleted default constructor of \'C\'","clang/test/SemaCXX/dr1301.cpp:23:9: error: call to implicitly-deleted default constructor of \'D\'","clang/test/SemaCXX/dr1301.cpp:40:9: error: call to implicitly-deleted default constructor of \'G\'","clang/test/SemaCXX/dr1301.cpp:52:9: error: call to implicitly-deleted default constructor of \'I\'","clang/test/SemaCXX/dr1301.cpp:66:10: error: call to implicitly-deleted default constructor of \'K\'","clang/test/SemaCXX/dr1301.cpp:67:10: error: call to implicitly-deleted default constructor of \'K\'"} |
| } | | } |
| }, | | }, |
| ["note_attribute_has_no_effect_on_infinite_loop_here"]={ | | ["err_ovl_deleted_special_oper"]={ |
| [b]={{nil,s,"note_attribute_has_no_effect_on_infinite_loop_here"}}, | | [b]="err_ovl_deleted_special_oper", |
| [h]={{nil,s,"annotating the infinite loop here"}}, | | [j]="object of type %0 cannot be %select{constructed|copied|moved|assigned|assigned|destroyed}1 because its %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}1 is implicitly deleted", |
| [i]={{nil,s,"annotating the infinite loop here"}}, | | [i]={{nil,nil,{"object of type A cannot be ",{"constructed","copied","moved","assigned","assigned","destroyed"}," because its ",{"default constructor","copy constructor","move constructor","copy assignment operator","move assignment operator","destructor"}," is implicitly deleted"}}}, |
| [c]=g, | | [h]=k, |
| [e]="annotating the infinite loop here", | | [c]="object of type (.*?) cannot be (?:constructed|copied|moved|assigned|assigned|destroyed) because its (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) is implicitly deleted", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]=m, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={"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"}, |
| [k]={{"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());"}}, | | [d]={{E,14299,"/// 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_Deleted:\n if (isImplicitlyDeleted(Best->Function)) {\n // ...\n if (DFK.isSpecialMember()) {\n Diag(OpLoc, diag::err_ovl_deleted_special_oper) << Args[0]->getType() << DFK.asSpecialMember();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp"]={"clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp:63:3: note: annotating the infinite loop here"} | | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:16:11: error: object of type \'(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18)\' cannot be assigned because its copy assignment operator is implicitly deleted","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:19:11: error: object of type \'(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18)\' cannot be assigned because its copy assignment operator is implicitly deleted"} |
| } | | } |
| }, | | }, |
| ["note_attribute_overloadable_prev_overload"]={ | | ["err_ovl_diff_return_type"]={ |
| [b]="note_attribute_overloadable_prev_overload", | | [b]="err_ovl_diff_return_type", |
| [h]="previous overload of function is here", | | [j]="functions that differ only in their return type cannot be overloaded", |
| [i]="previous overload of function is here", | | [i]="functions that differ only in their return type cannot be overloaded", |
| [c]=g, | | [h]=k, |
| [e]="previous (?:unmarked |)overload of function is here", | | [c]="functions that differ only in their return type cannot be overloaded", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={Hc,1236199783,Fc,Ec}, | | [g]={s,1236199783,q,r}, |
| [k]={{C,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;"},{C,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;"}}, | | [d]={{D,3939,"/// 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 (!Context.hasSameType(OldDeclaredReturnType, NewDeclaredReturnType) && canFullyTypeCheckRedeclaration(New, Old, NewDeclaredReturnType, OldDeclaredReturnType)) {\n // ...\n if (ResQT.isNull()) {\n if (New->isCXXClassMember() && New->isOutOfLine())\n // ...\n else\n Diag(New->getLocation(), diag::err_ovl_diff_return_type) << New->getReturnTypeSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:163:14: error: functions that differ only in their return type cannot be overloaded","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:174:9: error: functions that differ only in their return type cannot be overloaded"} |
| } | | } |
| }, | | }, |
| ["note_auto_readonly_iboutlet_fixup_suggest"]={ | | ["err_ovl_no_conversion_in_cast"]={ |
| [b]="note_auto_readonly_iboutlet_fixup_suggest", | | [b]="err_ovl_no_conversion_in_cast", |
| [h]="property should be changed to be readwrite", | | [j]="cannot convert %1 to %2 without a conversion operator", |
| [i]="property should be changed to be readwrite", | | [i]="cannot convert B to C without a conversion operator", |
| [c]=g, | | [h]=k, |
| [e]="property should be changed to be readwrite", | | [c]="cannot convert (.*?) to (.*?) without a conversion operator", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, |
| [k]={{qb,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\");"}}, | | [d]={{"clang/lib/Sema/SemaCast.cpp",491,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_No_Viable_Function:\n if (candidates.empty())\n msg = diag::err_ovl_no_conversion_in_cast;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjCXX/cstyle-cast.mm"]={"clang/test/SemaObjCXX/cstyle-cast.mm:21:3: error: cannot convert \'X\' to \'id\' without a conversion operator"} |
| } | | } |
| }, | | }, |
| ["note_availability_specified_here"]={ | | ["err_ovl_no_oper"]={ |
| [b]="note_availability_specified_here", | | [b]="err_ovl_no_oper", |
| [h]={{nil,v,"%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"}}, | | [j]="type %0 does not provide a %select{subscript|call}1 operator", |
| [i]={{nil,v,{"A has been explicitly marked ",{"unavailable","deleted","deprecated"},Wb}},{"7.1",nil,{"A has been explicitly marked ",{"unavailable","deleted","deprecated","partial"},Wb}}}, | | [i]={{nil,nil,{"type A does not provide a ",{"subscript","call"}," operator"}}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) has been explicitly marked (?:unavailable|deleted|deprecated) here", | | [c]="type (.*?) does not provide a (?:subscript|call) operator", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"0237485287e9",1262829855,"Improve the lead diagnostic for C++ object subscript expressions with","Improve the lead diagnostic for C++ object subscript expressions with\nno viable overloads. Use a different message when the class provides\nno operator[] overloads at all; use it for operator(), too.\n\nPartially addresses PR 5900.\n\nllvm-svn: 92894"}, |
| [k]={{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."},{A,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;"}}, | | [d]={{E,14604,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Args[0]->getType() << /*subscript*/ 0 << Args[0]->getSourceRange() << Range) : (PDiag(diag::err_ovl_no_viable_subscript) << Args[0]->getType() << Args[0]->getSourceRange() << Range);"},{E,15068,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Object.get()->getType() << /*call*/ 1 << Object.get()->getSourceRange()) : (PDiag(diag::err_ovl_no_viable_object_call) << Object.get()->getType() << Object.get()->getSourceRange());"}}, |
| [l]={ | | [l]={ |
| ["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/cxx2b-overloaded-operator.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:101:13: error: type \'int[3]\' does not provide a subscript operator","clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:101:13: error: type \'int[3]\' does not provide a subscript operator"} |
| } | | } |
| }, | | }, |
| ["note_await_ready_no_bool_conversion"]={ | | ["err_ovl_no_viable_conversion_in_cast"]={ |
| [b]={{nil,y,"note_await_ready_no_bool_conversion"}}, | | [b]="err_ovl_no_viable_conversion_in_cast", |
| [h]={{nil,y,"return type of \'await_ready\' is required to be contextually convertible to \'bool\'"}}, | | [j]={{nil,t,"no matching conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast|}0 from %1 to %2"},{o,nil,"no matching conversion for %select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2"}}, |
| [i]={{nil,y,"return type of \'await_ready\' is required to be contextually convertible to \'bool\'"}}, | | [i]={{nil,t,{"no matching conversion for ",{a,xb,Nb,Qb,Mb,Sb,a}," from B to C"}},{o,nil,{"no matching conversion for ",{a,xb,Nb,Qb,Mb,Sb}," from B to C"}}}, |
| [c]=g, | | [h]=k, |
| [e]="return type of \'await_ready\' is required to be contextually convertible to \'bool\'", | | [c]="no matching conversion for (?:|static_cast|reinterpret_cast|dynamic_cast|C\\-style cast|functional\\-style cast|) from (.*?) to (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,sd}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"909acf820969",1297708450,"Provide overload diagnostics when explicit casts involving class types fail.","Provide overload diagnostics when explicit casts involving class types fail.\nPR8626.\n\nllvm-svn: 125506"}, |
| [k]={{ib,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);"}}, | | [d]={{"clang/lib/Sema/SemaCast.cpp",493,"/// Try to diagnose a failed overloaded cast. Returns true if\n/// diagnostics were emitted.\nstatic bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, SourceRange range, Expr *src, QualType destType, bool listInitialization) {\n // ...\n case OR_No_Viable_Function:\n if (candidates.empty())\n // ...\n else\n msg = diag::err_ovl_no_viable_conversion_in_cast;"}}, |
| [l]={ | | [l]={ |
| ["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/vector-casts.cpp"]={"clang/test/SemaCXX/vector-casts.cpp:36:9: error: no matching conversion for C-style cast from \'__v2si\' (vector of 2 \'int\' values) to \'S\'"} |
| } | | } |
| }, | | }, |
| ["note_bad_memaccess_silence"]={ | | ["err_ovl_no_viable_function_in_call"]={ |
| [b]="note_bad_memaccess_silence", | | [b]="err_ovl_no_viable_function_in_call", |
| [h]="explicitly cast the pointer to silence this warning", | | [j]="no matching function for call to %0", |
| [i]="explicitly cast the pointer to silence this warning", | | [i]="no matching function for call to A", |
| [c]=g, | | [h]=k, |
| [e]="explicitly cast the pointer to silence this warning", | | [c]="no matching function for call to (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{V,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*)\"));"}},
| | [d]={{O,6910,"static void checkDirectCallValidity(Sema &S, const Expr *Fn, FunctionDecl *Callee, MultiExprArg ArgExprs) {\n // ...\n if (const EnableIfAttr *Attr = S.CheckEnableIf(Callee, Fn->getBeginLoc(), ArgExprs, true)) {\n S.Diag(Fn->getBeginLoc(), isa<CXXMethodDecl>(Callee) ? diag::err_ovl_no_viable_member_function_in_call : diag::err_ovl_no_viable_function_in_call) << Callee << Callee->getSourceRange();"},{Q,2604,"static bool resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range, SmallVectorImpl<Expr *> &Args, bool &PassAlignment, FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates, Expr *AlignArg, bool Diagnose) {\n // ...\n case OR_No_Viable_Function:\n // ...\n if (Diagnose) {\n // ...\n S.Diag(R.getNameLoc(), diag::err_ovl_no_viable_function_in_call) << R.getLookupName() << Range;"},{Q,3873,"static bool resolveBuiltinNewDeleteOverload(Sema &S, CallExpr *TheCall, bool IsDelete, FunctionDecl *&Operator) {\n // ...\n case OR_No_Viable_Function:\n Candidates.NoteCandidates(PartialDiagnosticAt(R.getNameLoc(), S.PDiag(diag::err_ovl_no_viable_function_in_call) << R.getLookupName() << Range), S, OCD_AllCandidates, Args);"},{E,13527,"/// FinishOverloadedCallExpr - given an OverloadCandidateSet, builds and returns\n/// the completed call expression. If overload resolution fails, emits\n/// diagnostics and returns ExprError()\nstatic ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, OverloadCandidateSet *CandidateSet, OverloadCandidateSet::iterator *Best, OverloadingResult OverloadResult, bool AllowTypoCorrection) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n CandidateSet->NoteCandidates(PartialDiagnosticAt(Fn->getBeginLoc(), SemaRef.PDiag(diag::err_ovl_no_viable_function_in_call) << ULE->getName() << Fn->getSourceRange()), SemaRef, OCD_AllCandidates, Args);"},{E,15364,"/// BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to\n/// a literal operator described by the provided lookup results.\nExprResult Sema::BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef<Expr *> Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *TemplateArgs) {\n // ...\n case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UDSuffixLoc, PDiag(diag::err_ovl_no_viable_function_in_call) << R.getLookupName()), *this, OCD_AllCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaOpenCL/queue_t_overload.cl"]={"clang/test/SemaOpenCL/queue_t_overload.cl:10:3: error: no matching function for call to \'foo\'","clang/test/SemaOpenCL/queue_t_overload.cl:11:3: error: no matching function for call to \'foo\'"} |
| } | | } |
| }, | | }, |
| ["note_base_class_specified_here"]={ | | ["err_ovl_no_viable_function_in_init"]={ |
| [b]="note_base_class_specified_here", | | [b]="err_ovl_no_viable_function_in_init", |
| [h]="base class %0 specified here", | | [j]="no matching constructor for initialization of %0", |
| [i]="base class A specified here", | | [i]="no matching constructor for initialization of A", |
| [c]=g, | | [h]=k, |
| [e]="base class (.*?) specified here", | | [c]="no matching constructor for initialization of (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{r,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;"},{r,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();"}}, | | [d]={{P,9912,"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 // ...\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), S.PDiag(diag::err_ovl_no_viable_function_in_init) << DestType << ArgsRange), S, OCD_AllCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/code-seg.cpp"]={"clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here","clang/test/SemaCXX/code-seg.cpp:24:40: note: base class \'Base1\' specified here","clang/test/SemaCXX/code-seg.cpp:25:8: note: base class \'Base2\' specified here"} | | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:13:21: error: no matching constructor for initialization of \'decltype(lambda1)\' (aka \'(lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp:10:18)\')"} |
| } | | } |
| }, | | }, |
| ["note_bitfield_decl"]={ | | ["err_ovl_no_viable_literal_operator"]={ |
| [b]="note_bitfield_decl", | | [b]="err_ovl_no_viable_literal_operator", |
| [h]="bit-field is declared here", | | [j]="no matching literal operator for call to %0%select{| with argument of type %2| with arguments of types %2 and %3}1%select{| or \'const char *\'}4%select{|, and no matching literal operator template}5", |
| [i]="bit-field is declared here", | | [i]={{nil,nil,{"no matching literal operator for call to A",{a," with argument of type C"," with arguments of types C and D"},{a," or \'const char *\'"},{a,", and no matching literal operator template"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="bit\\-field is declared here", | | [c]="no matching literal operator for call to (.*?)(?:| with argument of type (.*?)| with arguments of types (.*?) and (.*?))(?:| or \'const char \\*\')(?:|, and no matching literal operator template)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"bcc22fc4e1b2",1331280036,"Support for raw and template forms of numeric user-defined literals,","Support for raw and template forms of numeric user-defined literals,\nand lots of tidying up.\n\nllvm-svn: 152392"}, |
| [k]={{A,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);"},{ab,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);"},{Cd,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);"}}, | | [d]={{"clang/lib/Sema/SemaLookup.cpp",3781,"/// LookupLiteralOperator - Determine which literal operator should be used for\n/// a user-defined literal, per C++11 [lex.ext].\n///\n/// Normal overload resolution is not used to select which literal operator to\n/// call for a user-defined literal. Look up the provided literal operator name,\n/// and filter the results to the appropriate set for the given argument types.\nSema::LiteralOperatorLookupResult Sema::LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef<QualType> ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplatePack, bool DiagnoseMissing, StringLiteral *StringLit) {\n // ...\n // Didn\'t find anything we could use.\n if (DiagnoseMissing) {\n Diag(R.getNameLoc(), diag::err_ovl_no_viable_literal_operator) << R.getLookupName() << (int)ArgTys.size() << ArgTys[0] << (ArgTys.size() == 2 ? ArgTys[1] : QualType()) << AllowRaw << (AllowTemplate || AllowStringTemplatePack);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:70:12: note: bit-field is declared here"} | | ["clang/test/Lexer/half-literal.cpp"]={"clang/test/Lexer/half-literal.cpp:2:14: error: no matching literal operator for call to \'operator\"\"h\' with argument of type \'long double\' or \'const char *\', and no matching literal operator template"} |
| } | | } |
| }, | | }, |
| ["note_block_var_fixit_add_initialization"]={ | | ["err_ovl_no_viable_member_function_in_call"]={ |
| [b]="note_block_var_fixit_add_initialization", | | [b]="err_ovl_no_viable_member_function_in_call", |
| [h]="did you mean to use __block %0?", | | [j]="no matching member function for call to %0", |
| [i]="did you mean to use __block A?", | | [i]="no matching member function for call to A", |
| [c]=g, | | [h]=k, |
| [e]="did you mean to use __block (.*?)\\?", | | [c]="no matching member function for call to (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{Zb,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 \");"}}, | | [d]={{O,6907,"static void checkDirectCallValidity(Sema &S, const Expr *Fn, FunctionDecl *Callee, MultiExprArg ArgExprs) {\n // ...\n if (const EnableIfAttr *Attr = S.CheckEnableIf(Callee, Fn->getBeginLoc(), ArgExprs, true)) {\n S.Diag(Fn->getBeginLoc(), isa<CXXMethodDecl>(Callee) ? diag::err_ovl_no_viable_member_function_in_call : diag::err_ovl_no_viable_function_in_call) << Callee << Callee->getSourceRange();"},{E,14824,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (isa<MemberExpr>(NakedMemExpr)) {\n // ...\n } else {\n // ...\n case OR_No_Viable_Function:\n CandidateSet.NoteCandidates(PartialDiagnosticAt(UnresExpr->getMemberLoc(), PDiag(diag::err_ovl_no_viable_member_function_in_call) << DeclName << MemExprE->getSourceRange()), *this, OCD_AllCandidates, Args);"},{E,14903,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n // In the case the method to call was not selected by the overloading\n // resolution process, we still need to handle the enable_if attribute. Do\n // that here, so it will not hide previous -- and more relevant -- errors.\n if (auto *MemE = dyn_cast<MemberExpr>(NakedMemExpr)) {\n if (const EnableIfAttr *Attr = CheckEnableIf(Method, LParenLoc, Args, true)) {\n Diag(MemE->getMemberLoc(), diag::err_ovl_no_viable_member_function_in_call) << Method << Method->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaOpenCLCXX/method-overload-address-space.clcpp"]={"clang/test/SemaOpenCLCXX/method-overload-address-space.clcpp:19:10: error: no matching member function for call to \'m1\'"} |
| } | | } |
| }, | | }, |
| ["note_bracket_depth"]={ | | ["err_ovl_no_viable_object_call"]={ |
| [b]="note_bracket_depth", | | [b]="err_ovl_no_viable_object_call", |
| [h]="use -fbracket-depth=N to increase maximum nesting level", | | [j]="no matching function for call to object of type %0", |
| [i]="use -fbracket-depth=N to increase maximum nesting level", | | [i]="no matching function for call to object of type A", |
| [c]=g, | | [h]=k, |
| [e]="use \\-fbracket\\-depth\\=N to increase maximum nesting level", | | [c]="no matching function for call to object of type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{"clang/lib/Parse/Parser.cpp",2698,"bool BalancedDelimiterTracker::diagnoseOverflow() {\n // ...\n P.Diag(P.Tok, diag::note_bracket_depth);"}},
| | [d]={{E,15071,"/// BuildCallToObjectOfClassType - Build a call to an object of class\n/// type (C++ [over.call.object]), which can end up invoking an\n/// overloaded function call operator (@c operator()) or performing a\n/// user-defined conversion on the object argument.\nExprResult Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Object.get()->getType() << /*call*/ 1 << Object.get()->getSourceRange()) : (PDiag(diag::err_ovl_no_viable_object_call) << Object.get()->getType() << Object.get()->getSourceRange());"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/fold_expr_expansion_limit.cpp"]={"clang/test/SemaCXX/fold_expr_expansion_limit.cpp:4:43: note: use -fbracket-depth=N to increase maximum nesting level"} | | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:31:3: error: no matching function for call to object of type \'const decltype(ml)\' (aka \'const (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\')","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:36:3: error: no matching function for call to object of type \'volatile decltype(l)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:22:12)\')","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:37:3: error: no matching function for call to object of type \'volatile decltype(ml)\' (aka \'volatile (lambda at clang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp:27:13)\')"} |
| } | | } |
| }, | | }, |
| ["note_building_builtin_dump_struct_call"]={ | | ["err_ovl_no_viable_oper"]={ |
| [b]={{nil,w,"note_building_builtin_dump_struct_call"}}, | | [b]="err_ovl_no_viable_oper", |
| [h]={{nil,w,"in call to printing function with arguments \'(%0)\' while dumping struct"}}, | | [j]="no viable overloaded \'%0\'", |
| [i]={{nil,w,"in call to printing function with arguments \'(A)\' while dumping struct"}}, | | [i]="no viable overloaded \'A\'", |
| [c]=g, | | [h]=k, |
| [e]="in call to printing function with arguments \'\\((.*?)\\)\' while dumping struct", | | [c]="no viable overloaded \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,w,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{W,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));"}},
| | [d]={{E,14256,"/// 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 Diag(OpLoc, diag::err_ovl_no_viable_oper) << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getSourceRange() << Args[1]->getSourceRange();"},{E,15282,"/// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->\n/// (if one exists), where @c Base is an expression of class type and\n/// @c Member is the name of the member we\'re trying to find.\nExprResult Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound) {\n // ...\n case OR_No_Viable_Function: {\n // ...\n if (CandidateSet.empty()) {\n // ...\n } else\n Diag(OpLoc, diag::err_ovl_no_viable_oper) << \"operator->\" << Base->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCUDA/implicit-member-target-inherited.cu"]={"clang/test/SemaCUDA/implicit-member-target-inherited.cu:172:6: error: no viable overloaded \'=\'","clang/test/SemaCUDA/implicit-member-target-inherited.cu:204:6: error: no viable overloaded \'=\'"} |
| } | | } |
| }, | | }, |
| ["note_called_by"]={ | | ["err_ovl_no_viable_subscript"]={ |
| [b]="note_called_by", | | [b]="err_ovl_no_viable_subscript", |
| [h]="called by %0", | | [j]="no viable overloaded operator[] for type %0", |
| [i]="called by A", | | [i]="no viable overloaded operator[] for type A", |
| [c]=g, | | [h]=k, |
| [e]="called by (.*?)", | | [c]="no viable overloaded operator\\[\\] for type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"0237485287e9",1262829855,"Improve the lead diagnostic for C++ object subscript expressions with","Improve the lead diagnostic for C++ object subscript expressions with\nno viable overloads. Use a different message when the class provides\nno operator[] overloads at all; use it for operator(), too.\n\nPartially addresses PR 5900.\n\nllvm-svn: 92894"}, |
| [k]={{"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));"}}, | | [d]={{E,14607,"ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg ArgExpr) {\n // ...\n case OR_No_Viable_Function: {\n PartialDiagnostic PD = CandidateSet.empty() ? (PDiag(diag::err_ovl_no_oper) << Args[0]->getType() << /*subscript*/ 0 << Args[0]->getSourceRange() << Range) : (PDiag(diag::err_ovl_no_viable_subscript) << Args[0]->getType() << Args[0]->getSourceRange() << Range);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaSYCL/prohibit-thread-local.cpp"]={"clang/test/SemaSYCL/prohibit-thread-local.cpp:46:48: note: called by \'operator()\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:42:39: note: called by \'kernel_single_task<fake_kernel, (lambda at clang/test/SemaSYCL/prohibit-thread-local.cpp:46:41)>\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:27:3: note: called by \'usage\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:46:48: note: called by \'operator()\'","clang/test/SemaSYCL/prohibit-thread-local.cpp:42:39: note: called by \'kernel_single_task<fake_kernel, (lambda at clang/test/SemaSYCL/prohibit-thread-local.cpp:46:41)>\'"} | | ["clang/test/SemaCXX/cxx2b-overloaded-operator.cpp"]={"clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:11:6: error: no viable overloaded operator[] for type \'S\'","clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:20:20: error: no viable overloaded operator[] for type \'S\'","clang/test/SemaCXX/cxx2b-overloaded-operator.cpp:65:29: error: no viable overloaded operator[] for type \'T1<int, int>\'"} |
| } | | } |
| }, | | }, |
| ["note_called_once_gets_called_twice"]={ | | ["err_ovl_rewrite_equalequal_not_bool"]={ |
| [b]={{nil,s,"note_called_once_gets_called_twice"}}, | | [b]={{nil,o,"err_ovl_rewrite_equalequal_not_bool"}}, |
| [h]={{nil,s,"previous call is here%select{; set to nil to indicate it cannot be called afterwards|}0"}}, | | [j]={{nil,o,"return type %0 of selected \'operator==\' function for rewritten \'%1\' comparison is not \'bool\'"}}, |
| [i]={{nil,s,{"previous call is here",{"; set to nil to indicate it cannot be called afterwards",a}}}}, | | [i]={{nil,o,"return type A of selected \'operator==\' function for rewritten \'B\' comparison is not \'bool\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="previous call is here(?:; set to nil to indicate it cannot be called afterwards|)", | | [c]="return type (.*?) of selected \'operator\\=\\=\' function for rewritten \'(.*?)\' comparison is not \'bool\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]={{nil,o,m}}, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, |
| [k]={{Zb,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;"}}, | | [d]={{E,14011,"/// Create a binary operation that may resolve to an overloaded\n/// operator.\n///\n/// \\param OpLoc The location of the operator itself (e.g., \'+\').\n///\n/// \\param Opc The BinaryOperatorKind that describes this operator.\n///\n/// \\param Fns The set of non-member functions that will be\n/// considered by overload resolution. The caller needs to build this\n/// set based on the context using, e.g.,\n/// LookupOverloadedOperatorName() and ArgumentDependentLookup(). This\n/// set should not contain any member functions; those will be added\n/// by CreateOverloadedBinOp().\n///\n/// \\param LHS Left-hand argument.\n/// \\param RHS Right-hand argument.\n/// \\param PerformADL Whether to consider operator candidates found by ADL.\n/// \\param AllowRewrittenCandidates Whether to consider candidates found by\n/// C++20 operator rewrites.\n/// \\param DefaultedFn If we are synthesizing a defaulted operator function,\n/// the function in question. Such a function is never a candidate in\n/// our overload resolution. This also enables synthesizing a three-way\n/// comparison from < and == as described in C++20 [class.spaceship]p1.\nExprResult Sema::CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool PerformADL, bool AllowRewrittenCandidates, FunctionDecl *DefaultedFn) {\n // ...\n case OR_Success: {\n // ...\n if (FnDecl) {\n // ...\n // C++2a [over.match.oper]p9:\n // If a rewritten operator== candidate is selected by overload\n // resolution for an operator@, its return type shall be cv bool\n if (Best->RewriteKind && ChosenOp == OO_EqualEqual && !FnDecl->getReturnType()->isBooleanType()) {\n // ...\n Diag(OpLoc, IsExtension ? diag::ext_ovl_rewrite_equalequal_not_bool : diag::err_ovl_rewrite_equalequal_not_bool) << FnDecl->getReturnType() << BinaryOperator::getOpcodeStr(Opc) << Args[0]->getSourceRange() << Args[1]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp"]={"clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:9:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'==\' comparison is not \'bool\'","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:10:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'!=\' comparison is not \'bool\'","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:11:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'!=\' comparison is not \'bool\'","clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p9-2a.cpp:18:14: error: return type \'double\' of selected \'operator==\' function for rewritten \'!=\' comparison is not \'bool\'"} |
| } | | } |
| }, | | }, |
| ["note_callee_decl"]={ | | ["err_ovl_static_nonstatic_member"]={ |
| [b]="note_callee_decl", | | [b]="err_ovl_static_nonstatic_member", |
| [h]="%0 declared here", | | [j]="static and non-static member functions with the same parameter types cannot be overloaded", |
| [i]="A declared here", | | [i]="static and non-static member functions with the same parameter types cannot be overloaded", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) declared here", | | [c]="static and non\\-static member functions with the same parameter types cannot be overloaded", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{A,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();"},{A,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();"},{A,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;"},{A,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;"},{qb,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;"}} | | [d]={{D,3987,"/// 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 (OldMethod && NewMethod) {\n // ...\n if (!isFriend && NewMethod->getLexicalDeclContext()->isRecord() && !IsClassScopeExplicitSpecialization) {\n // -- Member function declarations with the same name and the\n // same parameter types cannot be overloaded if any of them\n // is a static member function declaration.\n if (OldMethod->isStatic() != NewMethod->isStatic()) {\n Diag(New->getLocation(), diag::err_ovl_static_nonstatic_member);"}}, |
| },
| |
| ["note_callee_static_array"]={
| |
| [b]="note_callee_static_array",
| |
| [h]="callee declares array parameter as static here",
| |
| [i]="callee declares array parameter as static here",
| |
| [c]=g,
| |
| [e]="callee declares array parameter as static here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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();"}},
| |
| [l]={ | | [l]={ |
| ["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/SemaCXX/overload-decl.cpp"]={"clang/test/SemaCXX/overload-decl.cpp:30:15: error: static and non-static member functions with the same parameter types cannot be overloaded"} |
| } | | } |
| }, | | }, |
| ["note_cannot_use_trivial_abi_reason"]={ | | ["err_ovl_unresolvable"]={ |
| [b]={{nil,t,"note_cannot_use_trivial_abi_reason"}}, | | [b]="err_ovl_unresolvable", |
| [h]={{nil,t,"\'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"}}, | | [j]={{nil,K,"reference to %select{overloaded|multiversioned}1 function could not be resolved; did you mean to call it%select{| with no arguments}0?"},{B,nil,"reference to overloaded function could not be resolved; did you mean to call it%select{| with no arguments}0?"}}, |
| [i]={{nil,t,{"\'trivial_abi\' is disallowed on A because ",{"its copy constructors and move constructors are all deleted","it is polymorphic","it has a base of a non-trivial class type","it has a virtual base","it has a __weak field","it has a field of a non-trivial class type"}}}}, | | [i]={{nil,K,{"reference to ",{"overloaded","multiversioned"}," function could not be resolved; did you mean to call it",{a," with no arguments"},"?"}},{B,nil,{"reference to overloaded function could not be resolved; did you mean to call it",{a," with no arguments"},"?"}}}, |
| [c]=g, | | [h]=k, |
| [e]="\'trivial_abi\' is disallowed on (.*?) because (?:its copy constructors and move constructors are all deleted|it is polymorphic|it has a base of a non\\-trivial class type|it has a virtual base|it has a __weak field|it has a field of a non\\-trivial class type)", | | [c]="reference to (?:overloaded|multiversioned) function could not be resolved; did you mean to call it(?:| with no arguments)\\?", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,n}}, | | [e]=m, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={"36226621f600",1286849357,"Progress.","Progress.\n\nllvm-svn: 116287"}, |
| [k]={{r,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;"}}, | | [d]={{O,21546,"/// Check for operands with placeholder types and complain if found.\n/// Returns ExprError() if there was an error and no recovery was possible.\nExprResult Sema::CheckPlaceholderExpr(Expr *E) {\n // ...\n // Overloaded expressions.\n case BuiltinType::Overload: {\n // ...\n tryToRecoverWithCall(Result, PDiag(diag::err_ovl_unresolvable),"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/attr-trivial-abi.cpp"]={"clang/test/SemaCXX/attr-trivial-abi.cpp:28:23: note: \'trivial_abi\' is disallowed on \'S3\' because it is polymorphic","clang/test/SemaCXX/attr-trivial-abi.cpp:35:18: note: \'trivial_abi\' is disallowed on \'S3_2\' because it is polymorphic","clang/test/SemaCXX/attr-trivial-abi.cpp:38:23: note: \'trivial_abi\' is disallowed on \'S3_3\' because it has a field of a non-trivial class type","clang/test/SemaCXX/attr-trivial-abi.cpp:53:23: note: \'trivial_abi\' is disallowed on \'S3_4\' because it has a field of a non-trivial class type","clang/test/SemaCXX/attr-trivial-abi.cpp:64:23: note: \'trivial_abi\' is disallowed on \'S5\' because it has a virtual base","clang/test/SemaCXX/attr-trivial-abi.cpp:117:23: note: \'trivial_abi\' is disallowed on \'CopyMoveDeleted\' because its copy constructors and move constructors are all deleted","clang/test/SemaCXX/attr-trivial-abi.cpp:127:23: note: \'trivial_abi\' is disallowed on \'S18\' because its copy constructors and move constructors are all deleted","clang/test/SemaCXX/attr-trivial-abi.cpp:152:23: note: \'trivial_abi\' is disallowed on \'S19\' because its copy constructors and move constructors are all deleted"} | | ["clang/test/Sema/PR28181.c"]={"clang/test/Sema/PR28181.c:12:21: error: reference to overloaded function could not be resolved; did you mean to call it?"} |
| } | | } |
| }, | | }, |
| ["note_carries_dependency_missing_first_decl"]={ | | ["err_ownership_returns_index_mismatch"]={ |
| [b]="note_carries_dependency_missing_first_decl", | | [b]="err_ownership_returns_index_mismatch", |
| [h]="declaration missing \'[[carries_dependency]]\' attribute is here", | | [j]="\'ownership_returns\' attribute index does not match; here it is %0", |
| [i]="declaration missing \'[[carries_dependency]]\' attribute is here", | | [i]="\'ownership_returns\' attribute index does not match; here it is A", |
| [c]=g, | | [h]=k, |
| [e]="declaration missing \'\\[\\[carries_dependency\\]\\]\' attribute is here", | | [c]="\'ownership_returns\' attribute index does not match; here it is (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"ef7aef8fe5d3",1406839466,"Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declar...","Implemented a diagnostic to handle multiple, distinct ownership_return attributes on the same declaration. This removes a FIXME from the code.\n\nllvm-svn: 214436"}, |
| [k]={{C,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*/;"},{C,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*/;"}}, | | [d]={{dc,1895,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned i = 1; i < AL.getNumArgs(); ++i) {\n // ...\n // Check we don\'t have a conflict with another ownership attribute.\n for (const auto *I : D->specific_attrs<OwnershipAttr>()) {\n // Cannot have two ownership attributes of different kinds for the same\n // index.\n if (I->getOwnKind() != K && llvm::is_contained(I->args(), Idx)) {\n // ...\n } else if (K == OwnershipAttr::Returns && I->getOwnKind() == OwnershipAttr::Returns) {\n // A returns attribute conflicts with any other returns attribute using\n // a different index.\n if (!llvm::is_contained(I->args(), Idx)) {\n S.Diag(I->getLocation(), diag::err_ownership_returns_index_mismatch) << I->args_begin()->getSourceIndex();"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/attr-ownership.cpp"]={"clang/test/Sema/attr-ownership.cpp:5:22: error: \'ownership_returns\' attribute index does not match; here it is 2"} |
| } | | } |
| }, | | }, |
| ["note_cast_operand_to_int"]={ | | ["err_ownership_type"]={ |
| [b]={{nil,U,"note_cast_operand_to_int"}}, | | [b]="err_ownership_type", |
| [h]={{nil,U,"cast one or both operands to int to silence this warning"}}, | | [j]="%0 attribute only applies to %select{pointer|integer}1 arguments", |
| [i]={{nil,U,"cast one or both operands to int to silence this warning"}}, | | [i]={{nil,nil,{"A attribute only applies to ",{"pointer","integer"}," arguments"}}}, |
| [c]=g, | | [h]=k, |
| [e]="cast one or both operands to int to silence this warning", | | [c]="(.*?) attribute only applies to (?:pointer|integer) arguments", |
| [f]=a, | | [f]=a, |
| [d]={{nil,U,n}}, | | [e]=m, |
| [j]={yd,1615397021,Id,Kd}, | | [g]={"d21139a34f51",1280541131,"After a lengthy design discussion, add support for \"ownership attributes\" for malloc/free checking. ...","After a lengthy design discussion, add support for \"ownership attributes\" for malloc/free checking. Patch by Andrew McGregor!\n\nllvm-svn: 109939"}, |
| [k]={{V,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);"}}, | | [d]={{dc,1875,"static void handleOwnershipAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n for (unsigned i = 1; i < AL.getNumArgs(); ++i) {\n // ...\n if (-1 != Err) {\n S.Diag(AL.getLoc(), diag::err_ownership_type) << AL << Err << Ex->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/attr-ownership.c"]={"clang/test/Sema/attr-ownership.c:15:35: error: \'ownership_returns\' attribute only applies to integer arguments","clang/test/Sema/attr-ownership.c:16:57: error: \'ownership_returns\' attribute only applies to integer arguments"} |
| } | | } |
| }, | | }, |
| ["note_cast_to_void"]={ | | ["err_pack_expansion_length_conflict"]={ |
| [b]="note_cast_to_void", | | [b]="err_pack_expansion_length_conflict", |
| [h]="cast expression to void to silence warning", | | [j]="pack expansion contains parameter packs %0 and %1 that have different lengths (%2 vs. %3)", |
| [i]="cast expression to void to silence warning", | | [i]="pack expansion contains parameter packs A and B that have different lengths (C vs. D)", |
| [c]=g, | | [h]=k, |
| [e]="cast expression to void to silence warning", | | [c]="pack expansion contains parameter packs (.*?) and (.*?) that have different lengths \\((.*?) vs\\. (.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"840bd6cce5ac",1292882700,"Implement basic support for template instantiation of pack expansions","Implement basic support for template instantiation of pack expansions\nwhose patterns are template arguments. We can now instantiate, e.g.,\n\n typedef tuple<pair<OuterTypes, InnerTypes>...> type;\n\nwhere OuterTypes and InnerTypes are template type parameter packs.\n\nThere is a horrible inefficiency in\nTemplateArgumentLoc::getPackExpansionPattern(), where we need to\ncreate copies of TypeLoc data because our interfaces traffic in\nTypeSourceInfo pointers where they should traffic in TypeLocs\ninstead. I\'ve isolated in efficiency in this one routine; once we\nrefactor our interfaces to traffic in TypeLocs, we can eliminate it.\n\nllvm-svn: 122278"}, |
| [k]={{A,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()), \")\");"}}, | | [d]={{tb,770,"bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {\n // ...\n for (UnexpandedParameterPack ParmPack : Unexpanded) {\n // ...\n if (NewPackSize != *NumExpansions) {\n // C++0x [temp.variadic]p5:\n // All of the parameter packs expanded by a pack expansion shall have\n // the same number of arguments specified.\n if (HaveFirstPack)\n Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict) << FirstPack.first << Name << *NumExpansions << NewPackSize << SourceRange(FirstPack.second) << SourceRange(ParmPack.second);"}}, |
| [l]={ | | [l]={ |
| ["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/attr-cxx0x.cpp"]={"clang/test/SemaCXX/attr-cxx0x.cpp:28:35: error: pack expansion contains parameter packs \'A\' and \'B\' that have different lengths (1 vs. 2)"} |
| } | | } |
| }, | | }, |
| ["note_cat_conform_to_noescape_prot"]={ | | ["err_pack_expansion_length_conflict_multilevel"]={ |
| [b]={{nil,u,"note_cat_conform_to_noescape_prot"}}, | | [b]="err_pack_expansion_length_conflict_multilevel", |
| [h]={{nil,u,"%select{category|class extension}0 conforms to protocol %1 which defines method %2"}}, | | [j]="pack expansion contains parameter pack %0 that has a different length (%1 vs. %2) from outer parameter packs", |
| [i]={{nil,u,{{"category","class extension"}," conforms to protocol B which defines method C"}}}, | | [i]="pack expansion contains parameter pack A that has a different length (B vs. C) from outer parameter packs", |
| [c]=g, | | [h]=k, |
| [e]="(?:category|class extension) conforms to protocol (.*?) which defines method (.*?)", | | [c]="pack expansion contains parameter pack (.*?) that has a different length \\((.*?) vs\\. (.*?)\\) from outer parameter packs", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"0dca5fdb4e03",1295024684,"Keep track of the number of expansions to be produced from a type pack","Keep track of the number of expansions to be produced from a type pack\nexpansion, when it is known due to the substitution of an out\nparameter pack. This allows us to properly handle substitution into\npack expansions that involve multiple parameter packs at different\ntemplate parameter levels, even when this substitution happens one\nlevel at a time (as with partial specializations of member class\ntemplates and the signatures of member function templates).\n\nNote that the diagnostic we provide when there is an arity mismatch\nbetween an outer parameter pack and an inner parameter pack in this\ncase isn\'t as clear as the normal diagnostic for an arity\nmismatch. However, this doesn\'t matter because these cases are very,\nvery rare and (even then) only typically occur in a SFINAE context.\n\nThe other kinds of pack expansions (expression, template, etc.) still\nneed to support optional tracking of the number of expansions, and we\nneed the moral equivalent of SubstTemplateTypeParmPackType for\nsubstituted argument packs of template template and non-type template\nparameters.\n\nllvm-svn: 123448"}, |
| [k]={{db,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());"}}, | | [d]={{tb,774,"bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {\n // ...\n for (UnexpandedParameterPack ParmPack : Unexpanded) {\n // ...\n if (NewPackSize != *NumExpansions) {\n // C++0x [temp.variadic]p5:\n // All of the parameter packs expanded by a pack expansion shall have\n // the same number of arguments specified.\n if (HaveFirstPack)\n // ...\n else\n Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict_multilevel) << Name << *NumExpansions << NewPackSize << SourceRange(ParmPack.second);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaTemplate/cxx1z-fold-expressions.cpp"]={"clang/test/SemaTemplate/cxx1z-fold-expressions.cpp:100:61: error: pack expansion contains parameter pack \'Js\' that has a different length (1 vs. 2) from outer parameter packs"} |
| } | | } |
| }, | | }, |
| ["note_cc1_round_trip_generated"]={ | | ["err_pack_expansion_length_conflict_partial"]={ |
| [b]={{nil,x,"note_cc1_round_trip_generated"}}, | | [b]={{nil,K,"err_pack_expansion_length_conflict_partial"}}, |
| [h]={{nil,U,"generated arguments #%0 in round-trip: %1"},{x,x,"Generated arguments #%0 in round-trip: %1"}}, | | [j]={{nil,K,"pack expansion contains parameter pack %0 that has a different length (at least %1 vs. %2) from outer parameter packs"}}, |
| [i]={{nil,U,"generated arguments #A in round-trip: B"},{x,x,"Generated arguments #A in round-trip: B"}}, | | [i]={{nil,K,"pack expansion contains parameter pack A that has a different length (at least B vs. C) from outer parameter packs"}}, |
| [c]=g, | | [h]=k, |
| [e]="generated arguments \\#(.*?) in round\\-trip\\: (.*?)", | | [c]="pack expansion contains parameter pack (.*?) that has a different length \\(at least (.*?) vs\\. (.*?)\\) from outer parameter packs", |
| [f]=a,
| |
| [d]={{nil,x,a}},
| |
| [j]={"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"},
| |
| [k]={{"clang/lib/Frontend/CompilerInvocation.cpp",756,"#endif\n // ...\n // The first parse on original arguments succeeded, but second parse of\n // generated arguments failed. Something must be wrong with the generator.\n if (!Success2) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{"clang/lib/Frontend/CompilerInvocation.cpp",784,"#endif\n // ...\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 1 << SerializeArgs(GeneratedArgs);"},{"clang/lib/Frontend/CompilerInvocation.cpp",786,"#endif\n // ...\n // If we generated different arguments from what we assume are two\n // semantically equivalent CompilerInvocations, the Generate function may\n // be non-deterministic.\n if (!Equal(GeneratedArgs, ComparisonArgs)) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_generated) << 2 << SerializeArgs(ComparisonArgs);"}}
| |
| },
| |
| ["note_cc1_round_trip_original"]={
| |
| [b]={{nil,x,"note_cc1_round_trip_original"}},
| |
| [h]={{nil,U,"original arguments in round-trip: %0"},{x,x,"Original arguments in round-trip: %0"}},
| |
| [i]={{nil,U,"original arguments in round-trip: A"},{x,x,"Original arguments in round-trip: A"}},
| |
| [c]=g,
| |
| [e]="original arguments in round\\-trip\\: (.*?)",
| |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,a}}, | | [e]={{nil,K,m}}, |
| [j]={"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"}, | | [g]={"4a8f3518cb14",1532026837,"Fix template argument deduction when a parameter pack has a value","Fix template argument deduction when a parameter pack has a value\nprovided by an outer template.\n\nWe made the incorrect assumption in various places that the only way we\ncan have any arguments already provided for a pack during template\nargument deduction was from a partially-specified pack. That\'s not true;\nwe can also have arguments from an enclosing already-instantiated\ntemplate, and that can even result in the function template\'s own pack\nparameters having a fixed length and not being packs for the purposes of\ntemplate argument deduction.\n\nllvm-svn: 337481"}, |
| [k]={{"clang/lib/Frontend/CompilerInvocation.cpp",728,"#endif\n // ...\n // Run the first parse on the original arguments with the dummy invocation and\n // diagnostics.\n if (!Parse(DummyInvocation, CommandLineArgs, DummyDiags, Argv0) || DummyDiags.getNumWarnings() != 0) {\n // ...\n Diags.Report(diag::note_cc1_round_trip_original) << SerializeArgs(CommandLineArgs);"}} | | [d]={{tb,794,"bool Sema::CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef<UnexpandedParameterPack> Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, std::optional<unsigned> &NumExpansions) {\n // ...\n // If we\'re performing a partial expansion but we also have a full expansion,\n // expand to the number of common arguments. For example, given:\n //\n // template<typename ...T> struct A {\n // template<typename ...U> void f(pair<T, U>...);\n // };\n //\n // ... a call to \'A<int, int>().f<int>\' should expand the pack once and\n // retain an expansion.\n if (NumPartialExpansions) {\n if (NumExpansions && *NumExpansions < *NumPartialExpansions) {\n // ...\n Diag(EllipsisLoc, diag::err_pack_expansion_length_conflict_partial) << PartialPack << *NumPartialExpansions << *NumExpansions << SourceRange(PartiallySubstitutedPackLoc);"}} |
| }, | | }, |
| ["note_change_bitfield_sign"]={ | | ["err_pack_expansion_member_init"]={ |
| [b]={{nil,y,"note_change_bitfield_sign"}}, | | [b]="err_pack_expansion_member_init", |
| [h]={{nil,y,"consider making the bitfield type %select{unsigned|signed}0"}}, | | [j]="pack expansion for initialization of member %0", |
| [i]={{nil,y,{"consider making the bitfield type ",{"unsigned","signed"}}}}, | | [i]="pack expansion for initialization of member A", |
| [c]=g, | | [h]=k, |
| [e]="consider making the bitfield type (?:unsigned|signed)", | | [c]="pack expansion for initialization of member (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"44e7df67d963",1294101176,"Implement pack expansion of base initializers, so that we can","Implement pack expansion of base initializers, so that we can\ninitialize those lovely mixins that come from pack expansions of base\nspecifiers.\n\nllvm-svn: 122793"}, |
| [k]={{V,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;"}}, | | [d]={{w,4392,"/// 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 // Look for a member, first.\n if (ValueDecl *Member = tryLookupCtorInitMemberDecl(ClassDecl, SS, TemplateTypeTy, MemberOrBase)) {\n if (EllipsisLoc.isValid())\n Diag(EllipsisLoc, diag::err_pack_expansion_member_init) << MemberOrBase << SourceRange(IdLoc, Init->getSourceRange().getEnd());"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/temp/temp.decls/temp.variadic/p4.cpp"]={"clang/test/CXX/temp/temp.decls/temp.variadic/p4.cpp:144:17: error: pack expansion for initialization of member \'member\'"} |
| } | | } |
| }, | | }, |
| ["note_change_calling_conv_fixit"]={ | | ["err_pack_expansion_without_parameter_packs"]={ |
| [b]="note_change_calling_conv_fixit", | | [b]="err_pack_expansion_without_parameter_packs", |
| [h]="consider defining %0 with the \'%1\' calling convention", | | [j]="pack expansion does not contain any unexpanded parameter packs", |
| [i]="consider defining A with the \'B\' calling convention", | | [i]="pack expansion does not contain any unexpanded parameter packs", |
| [c]=g, | | [h]=k, |
| [e]="consider defining (.*?) with the \'(.*?)\' calling convention", | | [c]="pack expansion does not contain any unexpanded parameter packs", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"d2fa766ad03e",1292811851,"Introduce a new type, PackExpansionType, to capture types that are","Introduce a new type, PackExpansionType, to capture types that are\npack expansions, e.g. given\n\n template<typename... Types> struct tuple;\n\n template<typename... Types>\n struct tuple_of_refs {\n typedef tuple<Types&...> types;\n };\n\nthe type of the \"types\" typedef is a PackExpansionType whose pattern\nis Types&. \n\nThis commit introduces support for creating pack expansions for\ntemplate type arguments, as above, but not for any other kind of pack\nexpansion, nor for any form of instantiation.\n\nllvm-svn: 122223"}, |
| [k]={{"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);"}},
| | [d]={{dc,4358,"static void handleAlignedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n if (AL.hasParsedType()) {\n // ...\n if (AL.isPackExpansion() && !TInfo->getType()->containsUnexpandedParameterPack()) {\n S.Diag(AL.getEllipsisLoc(), diag::err_pack_expansion_without_parameter_packs);"},{dc,4385,"static void handleAlignedAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (AL.isPackExpansion() && !E->containsUnexpandedParameterPack()) {\n S.Diag(AL.getEllipsisLoc(), diag::err_pack_expansion_without_parameter_packs);"},{w,2670,"/// 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 (EllipsisLoc.isValid() && !TInfo->getType()->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << TInfo->getTypeLoc().getSourceRange();"},{w,4705,"MemInitResult Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc) {\n // ...\n if (EllipsisLoc.isValid()) {\n // This is a pack expansion.\n if (!BaseType->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << SourceRange(BaseLoc, InitRange.getEnd());"},{w,12080,"Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList) {\n // ...\n if (EllipsisLoc.isInvalid()) {\n // ...\n } else {\n if (!SS.getScopeRep()->containsUnexpandedParameterPack() && !TargetNameInfo.containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << SourceRange(SS.getBeginLoc(), TargetNameInfo.getEndLoc());"},{lb,1110,"ExprResult Sema::BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef<ObjCDictionaryElement> Elements) {\n // ...\n for (ObjCDictionaryElement &Element : Elements) {\n // ...\n if (!Element.Key->containsUnexpandedParameterPack() && !Element.Value->containsUnexpandedParameterPack()) {\n Diag(Element.EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << SourceRange(Element.Key->getBeginLoc(), Element.Value->getEndLoc());"},{"clang/lib/Sema/SemaLambda.cpp",1198,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // ...\n if (C->EllipsisLoc.isValid()) {\n if (Var->isParameterPack()) {\n // ...\n } else {\n Diag(C->EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << (C->Init.isUsable() ? C->Init.get()->getSourceRange() : SourceRange(C->Loc));"},{tb,582,"ParsedTemplateArgument Sema::ActOnPackExpansion(const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc) {\n // ...\n case ParsedTemplateArgument::Template:\n if (!Arg.getAsTemplate().get().containsUnexpandedParameterPack()) {\n // ...\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << R;"},{tb,637,"QualType Sema::CheckPackExpansion(QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, std::optional<unsigned> NumExpansions) {\n // C++11 [temp.variadic]p5:\n // The pattern of a pack expansion shall name one or more\n // parameter packs that are not expanded by a nested pack\n // expansion.\n //\n // A pattern containing a deduced type can\'t occur \"naturally\" but arises in\n // the desugaring of an init-capture pack.\n if (!Pattern->containsUnexpandedParameterPack() && !Pattern->getContainedDeducedType()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << PatternRange;"},{tb,660,"ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, std::optional<unsigned> NumExpansions) {\n // ...\n // C++0x [temp.variadic]p5:\n // The pattern of a pack expansion shall name one or more\n // parameter packs that are not expanded by a nested pack\n // expansion.\n if (!Pattern->containsUnexpandedParameterPack()) {\n Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << Pattern->getSourceRange();"},{tb,1214,"ExprResult Sema::ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) {\n // ...\n // [expr.prim.fold]p3:\n // In a binary fold, op1 and op2 shall be the same fold-operator, and\n // either e1 shall contain an unexpanded parameter pack or e2 shall contain\n // an unexpanded parameter pack, but not both.\n if (LHS && RHS && LHS->containsUnexpandedParameterPack() == RHS->containsUnexpandedParameterPack()) {\n // ...\n return Diag(EllipsisLoc, LHS->containsUnexpandedParameterPack() ? diag::err_fold_expression_packs_both_sides : diag::err_pack_expansion_without_parameter_packs) << LHS->getSourceRange() << RHS->getSourceRange();"},{tb,1226,"ExprResult Sema::ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) {\n // ...\n // [expr.prim.fold]p2:\n // In a unary fold, the cast-expression shall contain an unexpanded\n // parameter pack.\n if (!LHS || !RHS) {\n // ...\n if (!Pack->containsUnexpandedParameterPack()) {\n // ...\n return Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs) << Pack->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/callingconv-cast.c"]={"clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:16:6: note: consider defining \'mismatched\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:7:6: note: consider defining \'mismatched_before_winapi\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:19:6: note: consider defining \'mismatched_declaration\' with the \'stdcall\' calling convention","clang/test/Sema/callingconv-cast.c:22:6: note: consider defining \'suggest_fix_first_redecl\' with the \'stdcall\' calling convention"} | | ["clang/test/SemaTemplate/stmt-expr.cpp"]={"clang/test/SemaTemplate/stmt-expr.cpp:9:8: error: pack expansion does not contain any unexpanded parameter packs"} |
| } | | } |
| }, | | }, |
| ["note_checking_constraints_for_class_spec_id_here"]={ | | ["err_param_default_argument"]={ |
| [b]={{nil,m,"note_checking_constraints_for_class_spec_id_here"}}, | | [b]="err_param_default_argument", |
| [h]={{nil,m,"while checking constraint satisfaction for class template partial specialization \'%0\' required here"}}, | | [j]="C does not support default arguments", |
| [i]={{nil,m,"while checking constraint satisfaction for class template partial specialization \'A\' required here"}}, | | [i]="C does not support default arguments", |
| [c]=g, | | [h]=k, |
| [e]="while checking constraint satisfaction for class template partial specialization \'(.*?)\' required here", | | [c]="C does not support default arguments", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={Hd,1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | | [g]={s,1236199783,q,r}, |
| [k]={{W,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;"}}, | | [d]={{w,341,"/// ActOnParamDefaultArgument - Check whether the default argument\n/// provided for a function parameter is well-formed. If so, attach it\n/// to the parameter declaration.\nvoid Sema::ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *DefaultArg) {\n // ...\n // Default arguments are only permitted in C++\n if (!getLangOpts().CPlusPlus) {\n Diag(EqualLoc, diag::err_param_default_argument) << DefaultArg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/default1.c"]={"clang/test/Sema/default1.c:2:14: error: C does not support default arguments"} |
| } | | } |
| }, | | }, |
| ["note_checking_constraints_for_function_here"]={ | | ["err_param_default_argument_member_template_redecl"]={ |
| [b]={{nil,m,"note_checking_constraints_for_function_here"}}, | | [b]="err_param_default_argument_member_template_redecl", |
| [h]={{nil,m,"while checking constraint satisfaction for function \'%0\' required here"}}, | | [j]="default arguments cannot be added to an out-of-line definition of a member of a %select{class template|class template partial specialization|nested class in a template}0", |
| [i]={{nil,m,"while checking constraint satisfaction for function \'A\' required here"}}, | | [i]={{nil,nil,{"default arguments cannot be added to an out-of-line definition of a member of a ",{"class template","class template partial specialization","nested class in a template"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="while checking constraint satisfaction for function \'(.*?)\' required here", | | [c]="default arguments cannot be added to an out\\-of\\-line definition of a member of a (?:class template|class template partial specialization|nested class in a template)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"c732aba9a98c",1252694672,"Cleanup and test C++ default arguments. Improvements include:","Cleanup and test C++ default arguments. Improvements include:\n\n - Diagnose attempts to add default arguments to templates (or member\n functions of templates) after the initial declaration (DR217).\n - Improve diagnostics when a default argument is redefined. Now, the\n note will always point at the place where the default argument was\n previously defined, rather than pointing to the most recent\n declaration of the function.\n\nllvm-svn: 81548"}, |
| [k]={{W,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;"}},
| | [d]={{w,644,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n } else if (OldParamHasDfl) {\n // ...\n } else if (NewParamHasDfl) {\n if (New->getDescribedFunctionTemplate()) {\n // ...\n } else if (New->getTemplateSpecializationKind() != TSK_ImplicitInstantiation && New->getTemplateSpecializationKind() != TSK_Undeclared) {\n // ...\n } else if (New->getDeclContext()->isDependentContext()) {\n // ...\n Diag(NewParam->getLocation(), diag::err_param_default_argument_member_template_redecl) << WhichKind << NewParam->getDefaultArgRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp:29:19: error: default arguments cannot be added to an out-of-line definition of a member of a class template","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp:33:26: error: default arguments cannot be added to an out-of-line definition of a member of a nested class in a template"} |
| } | | } |
| }, | | }, |
| ["note_checking_constraints_for_template_id_here"]={ | | ["err_param_default_argument_missing"]={ |
| [b]={{nil,m,"note_checking_constraints_for_template_id_here"}}, | | [b]="err_param_default_argument_missing", |
| [h]={{nil,m,"while checking constraint satisfaction for template \'%0\' required here"}}, | | [j]="missing default argument on parameter", |
| [i]={{nil,m,"while checking constraint satisfaction for template \'A\' required here"}}, | | [i]="missing default argument on parameter", |
| [c]=g, | | [h]=k, |
| [e]="while checking constraint satisfaction for template \'(.*?)\' required here", | | [c]="missing default argument on parameter", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={Hd,1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | | [g]={s,1236199783,q,r}, |
| [k]={{W,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;"}}, | | [d]={{w,1659,"/// CheckCXXDefaultArguments - Verify that the default arguments for a\n/// function declaration are well-formed according to C++\n/// [dcl.fct.default].\nvoid Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {\n // ...\n // C++20 [dcl.fct.default]p4:\n // In a given function declaration, each parameter subsequent to a parameter\n // with a default argument shall have a default argument supplied in this or\n // a previous declaration, unless the parameter was expanded from a\n // parameter pack, or shall be a function parameter pack.\n for (; ParamIdx < NumParams; ++ParamIdx) {\n // ...\n if (!Param->hasDefaultArg() && !Param->isParameterPack() && !(CurrentInstantiationScope && CurrentInstantiationScope->isLocalPackExpansion(Param))) {\n if (Param->isInvalidDecl())\n // ...\n else if (Param->getIdentifier())\n // ...\n else\n Diag(Param->getLocation(), diag::err_param_default_argument_missing);"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp:40:24: error: missing default argument on parameter"} |
| } | | } |
| }, | | }, |
| ["note_checking_constraints_for_var_spec_id_here"]={ | | ["err_param_default_argument_missing_name"]={ |
| [b]={{nil,m,"note_checking_constraints_for_var_spec_id_here"}}, | | [b]="err_param_default_argument_missing_name", |
| [h]={{nil,m,"while checking constraint satisfaction for variable template partial specialization \'%0\' required here"}}, | | [j]="missing default argument on parameter %0", |
| [i]={{nil,m,"while checking constraint satisfaction for variable template partial specialization \'A\' required here"}}, | | [i]="missing default argument on parameter A", |
| [c]=g, | | [h]=k, |
| [e]="while checking constraint satisfaction for variable template partial specialization \'(.*?)\' required here", | | [c]="missing default argument on parameter (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={Hd,1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | | [g]={s,1236199783,q,r}, |
| [k]={{W,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;"}}, | | [d]={{w,1655,"/// CheckCXXDefaultArguments - Verify that the default arguments for a\n/// function declaration are well-formed according to C++\n/// [dcl.fct.default].\nvoid Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {\n // ...\n // C++20 [dcl.fct.default]p4:\n // In a given function declaration, each parameter subsequent to a parameter\n // with a default argument shall have a default argument supplied in this or\n // a previous declaration, unless the parameter was expanded from a\n // parameter pack, or shall be a function parameter pack.\n for (; ParamIdx < NumParams; ++ParamIdx) {\n // ...\n if (!Param->hasDefaultArg() && !Param->isParameterPack() && !(CurrentInstantiationScope && CurrentInstantiationScope->isLocalPackExpansion(Param))) {\n if (Param->isInvalidDecl())\n // ...\n else if (Param->getIdentifier())\n Diag(Param->getLocation(), diag::err_param_default_argument_missing_name) << Param->getIdentifier();"}}, |
| [l]={ | | [l]={ |
| ["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/expr/expr.post/expr.call/p4.cpp"]={"clang/test/CXX/expr/expr.post/expr.call/p4.cpp:3:23: error: missing default argument on parameter \'y\'"} |
| } | | } |
| }, | | }, |
| ["note_class_declared"]={ | | ["err_param_default_argument_nonfunc"]={ |
| [b]="note_class_declared", | | [b]="err_param_default_argument_nonfunc", |
| [h]="class is declared here", | | [j]="default arguments can only be specified for parameters in a function declaration", |
| [i]="class is declared here", | | [i]="default arguments can only be specified for parameters in a function declaration", |
| [c]=g, | | [h]=k, |
| [e]="class is declared here", | | [c]="default arguments can only be specified for parameters in a function declaration", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{db,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);"},{db,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);"},{Y,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);"}}, | | [d]={{w,441,"/// CheckExtraCXXDefaultArguments - Check for any extra default\n/// arguments in the declarator, which is not a function declaration\n/// or definition and therefore is not permitted to have default\n/// arguments. This routine should be invoked for every declarator\n/// that is not a function declaration or definition.\nvoid Sema::CheckExtraCXXDefaultArguments(Declarator &D) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n if (chunk.Kind == DeclaratorChunk::Function) {\n // ...\n for (unsigned argIdx = 0, e = chunk.Fun.NumParams; argIdx != e; ++argIdx) {\n // ...\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n Diag(Param->getLocation(), diag::err_param_default_argument_nonfunc) << SR;"},{w,444,"/// CheckExtraCXXDefaultArguments - Check for any extra default\n/// arguments in the declarator, which is not a function declaration\n/// or definition and therefore is not permitted to have default\n/// arguments. This routine should be invoked for every declarator\n/// that is not a function declaration or definition.\nvoid Sema::CheckExtraCXXDefaultArguments(Declarator &D) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n if (chunk.Kind == DeclaratorChunk::Function) {\n // ...\n for (unsigned argIdx = 0, e = chunk.Fun.NumParams; argIdx != e; ++argIdx) {\n // ...\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n } else if (Param->getDefaultArg()) {\n Diag(Param->getLocation(), diag::err_param_default_argument_nonfunc) << Param->getDefaultArg()->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp:13:22: error: default arguments can only be specified for parameters in a function declaration"} |
| } | | } |
| }, | | }, |
| ["note_cocoa_naming_declare_family"]={ | | ["err_param_default_argument_on_parameter_pack"]={ |
| [b]="note_cocoa_naming_declare_family", | | [b]="err_param_default_argument_on_parameter_pack", |
| [h]="explicitly declare getter %objcinstance0 with \'%1\' to return an \'unowned\' object", | | [j]="parameter pack cannot have a default argument", |
| [i]="explicitly declare getter A with \'B\' to return an \'unowned\' object", | | [i]="parameter pack cannot have a default argument", |
| [c]=g, | | [h]=k, |
| [e]="explicitly declare getter (.*?) with \'(.*?)\' to return an \'unowned\' object", | | [c]="parameter pack cannot have a default argument", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"3b8044c02d33",1427464711,"[Sema] Diagnose default argument on a parameter pack.","[Sema] Diagnose default argument on a parameter pack.\n\nThis is ill-formed (and cannot be used anyways).\n\nPR23028.\n\nllvm-svn: 233376"}, |
| [k]={{qb,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;"}}, | | [d]={{w,355,"/// ActOnParamDefaultArgument - Check whether the default argument\n/// provided for a function parameter is well-formed. If so, attach it\n/// to the parameter declaration.\nvoid Sema::ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *DefaultArg) {\n // ...\n // C++11 [dcl.fct.default]p3\n // A default argument expression [...] shall not be specified for a\n // parameter pack.\n if (Param->isParameterPack()) {\n Diag(EqualLoc, diag::err_param_default_argument_on_parameter_pack) << DefaultArg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p3.cpp:19:24: error: parameter pack cannot have a default argument"} |
| } | | } |
| }, | | }, |
| ["note_collapse_loop_count"]={ | | ["err_param_default_argument_redefinition"]={ |
| [b]="note_collapse_loop_count", | | [b]="err_param_default_argument_redefinition", |
| [h]="parameter of the \'collapse\' clause", | | [j]="redefinition of default argument", |
| [i]="parameter of the \'collapse\' clause", | | [i]="redefinition of default argument", |
| [c]=g, | | [h]=k, |
| [e]="parameter of the \'collapse\' clause", | | [c]="redefinition of default argument", |
| [f]=a, | | [f]=a, |
| [d]="OpenMP Issue", | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{Z,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();"}}, | | [d]={{w,538,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n unsigned DiagDefaultParamID = diag::err_param_default_argument_redefinition;"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p6.cpp:9:15: error: redefinition of default argument"} |
| } | | } |
| }, | | }, |
| ["note_comparison_synthesized_at"]={ | | ["err_param_default_argument_references_local"]={ |
| [b]={{nil,m,"note_comparison_synthesized_at"}}, | | [b]="err_param_default_argument_references_local", |
| [h]={{nil,m,"in defaulted %select{<ERROR>|equality|three-way|equality|relational}0 comparison operator for %1 first required here"}}, | | [j]="default argument references local variable %0 of enclosing function", |
| [i]={{nil,m,{"in defaulted ",{"equality","three-way","equality","relational"}," comparison operator for B first required here"}}}, | | [i]="default argument references local variable A of enclosing function", |
| [c]=g, | | [h]=k, |
| [e]="in defaulted (?:equality|three\\-way|equality|relational) comparison operator for (.*?) first required here", | | [c]="default argument references local variable (.*?) of enclosing function", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={"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."}, | | [g]={s,1236199783,q,r}, |
| [k]={{W,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;"}}, | | [d]={{w,128,"/// VisitDeclRefExpr - Visit a reference to a declaration, to\n/// determine whether this declaration can be used in the default\n/// argument expression.\nbool CheckDefaultArgumentVisitor::VisitDeclRefExpr(const DeclRefExpr *DRE) {\n // ...\n if (const auto *Param = dyn_cast<ParmVarDecl>(Decl)) {\n // ...\n } else if (auto *VD = Decl->getPotentiallyDecomposedVarDecl()) {\n // C++ [dcl.fct.default]p7:\n // Local variables shall not be used in default argument\n // expressions.\n //\n // C++17 [dcl.fct.default]p7 (by CWG 2082):\n // A local variable shall not appear as a potentially-evaluated\n // expression in a default argument.\n //\n // C++20 [dcl.fct.default]p7 (DR as part of P0588R1, see also CWG 2346):\n // Note: A local variable cannot be odr-used (6.3) in a default\n // argument.\n //\n if (VD->isLocalVarDecl() && !DRE->isNonOdrUse())\n return S.Diag(DRE->getBeginLoc(), diag::err_param_default_argument_references_local) << Decl << DefaultArg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:5:26: error: default argument references local variable \'i1\' of enclosing function","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:13:34: error: default argument references local variable \'i3\' of enclosing function","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:24:24: error: default argument references local variable \'\' of enclosing function","clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp:30:24: error: default argument references local variable \'x\' of enclosing function"} |
| } | | } |
| }, | | }, |
| ["note_compat_assoc"]={ | | ["err_param_default_argument_references_param"]={ |
| [b]="note_compat_assoc", | | [b]="err_param_default_argument_references_param", |
| [h]="compatible type %0 specified here", | | [j]="default argument references parameter %0", |
| [i]="compatible type A specified here", | | [i]="default argument references parameter A", |
| [c]=g, | | [h]=k, |
| [e]="compatible type (.*?) specified here", | | [c]="default argument references parameter (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{A,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();"},{A,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();"}}, | | [d]={{w,111,"/// VisitDeclRefExpr - Visit a reference to a declaration, to\n/// determine whether this declaration can be used in the default\n/// argument expression.\nbool CheckDefaultArgumentVisitor::VisitDeclRefExpr(const DeclRefExpr *DRE) {\n // ...\n if (const auto *Param = dyn_cast<ParmVarDecl>(Decl)) {\n // C++ [dcl.fct.default]p9:\n // [...] parameters of a function shall not be used in default\n // argument expressions, even if they are not evaluated. [...]\n //\n // C++17 [dcl.fct.default]p9 (by CWG 2082):\n // [...] A parameter shall not appear as a potentially-evaluated\n // expression in a default argument. [...]\n //\n if (DRE->isNonOdrUse() != NOUR_Unevaluated)\n return S.Diag(DRE->getBeginLoc(), diag::err_param_default_argument_references_param) << Param->getDeclName() << DefaultArg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp"]={"clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p11.cpp:6:17: error: default argument references parameter \'a\'"} |
| } | | } |
| }, | | }, |
| ["note_compound_token_split_second_token_here"]={ | | ["err_param_default_argument_references_this"]={ |
| [b]={{nil,s,"note_compound_token_split_second_token_here"}}, | | [b]="err_param_default_argument_references_this", |
| [h]={{nil,s,"%select{|second }0%1 token is here"}}, | | [j]="default argument references \'this\'", |
| [i]={{nil,s,{{a,"second "},"B token is here"}}}, | | [i]="default argument references \'this\'", |
| [c]=g, | | [h]=k, |
| [e]="(?:|second )(.*?) token is here", | | [c]="default argument references \'this\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,Ab}}, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{"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);"}}, | | [d]={{w,140,"/// VisitCXXThisExpr - Visit a C++ \"this\" expression.\nbool CheckDefaultArgumentVisitor::VisitCXXThisExpr(const CXXThisExpr *ThisE) {\n // ...\n return S.Diag(ThisE->getBeginLoc(), diag::err_param_default_argument_references_this) << ThisE->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/compound-token-split.cpp"]={"clang/test/Parser/compound-token-split.cpp:15:15: note: \'{\' token is here","clang/test/Parser/compound-token-split.cpp:15:3: note: \')\' token is here","clang/test/Parser/compound-token-split.cpp:29:18: note: \')\' token is here"} | | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p8.cpp:13:23: error: default argument references \'this\'"} |
| } | | } |
| }, | | }, |
| ["note_concatenated_string_literal_silence"]={ | | ["err_param_default_argument_template_redecl"]={ |
| [b]={{nil,s,"note_concatenated_string_literal_silence"}}, | | [b]="err_param_default_argument_template_redecl", |
| [h]={{nil,s,"place parentheses around the string literal to silence warning"}}, | | [j]="default arguments cannot be added to a function template that has already been declared", |
| [i]={{nil,s,"place parentheses around the string literal to silence warning"}}, | | [i]="default arguments cannot be added to a function template that has already been declared", |
| [c]=g, | | [h]=k, |
| [e]="place parentheses around the string literal to silence warning", | | [c]="default arguments cannot be added to a function template that has already been declared", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]=m, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={"c732aba9a98c",1252694672,"Cleanup and test C++ default arguments. Improvements include:","Cleanup and test C++ default arguments. Improvements include:\n\n - Diagnose attempts to add default arguments to templates (or member\n functions of templates) after the initial declaration (DR217).\n - Improve diagnostics when a default argument is redefined. Now, the\n note will always point at the place where the default argument was\n previously defined, rather than pointing to the most recent\n declaration of the function.\n\nllvm-svn: 81548"}, |
| [k]={{C,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);"}}, | | [d]={{w,601,"/// MergeCXXFunctionDecl - Merge two declarations of the same C++\n/// function, once we already know that they have the same\n/// type. Subroutine of MergeFunctionDecl. Returns true if there was an\n/// error, false otherwise.\nbool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S) {\n // ...\n // C++ [dcl.fct.default]p4:\n // For non-template functions, default arguments can be added in\n // later declarations of a function in the same\n // scope. Declarations in different scopes have completely\n // distinct sets of default arguments. That is, declarations in\n // inner scopes do not acquire default arguments from\n // declarations in outer scopes, and vice versa. In a given\n // function declaration, all parameters subsequent to a\n // parameter with a default argument shall have default\n // arguments supplied in this or previous declarations. A\n // default argument shall not be redefined by a later\n // declaration (not even to the same value).\n //\n // C++ [dcl.fct.default]p6:\n // Except for member functions of class templates, the default arguments\n // in a member function definition that appears outside of the class\n // definition are added to the set of default arguments provided by the\n // member function declaration in the class definition.\n for (unsigned p = 0, NumParams = PrevForDefaultArgs ? PrevForDefaultArgs->getNumParams() : 0; p < NumParams; ++p) {\n // ...\n if (OldParamHasDfl && NewParamHasDfl) {\n // ...\n } else if (OldParamHasDfl) {\n // ...\n } else if (NewParamHasDfl) {\n if (New->getDescribedFunctionTemplate()) {\n // ...\n Diag(NewParam->getLocation(), diag::err_param_default_argument_template_redecl) << NewParam->getDefaultArgRange();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/temp/temp.spec/temp.expl.spec/p21.cpp"]={"clang/test/CXX/temp/temp.spec/temp.expl.spec/p21.cpp:19:25: error: default arguments cannot be added to a function template that has already been declared"} |
| } | | } |
| }, | | }, |
| ["note_concept_specialization_constraint_evaluated_to_false"]={ | | ["err_param_redefinition"]={ |
| [b]="note_concept_specialization_constraint_evaluated_to_false", | | [b]="err_param_redefinition", |
| [h]={{nil,m,"%select{and|because}0 \'%1\' evaluated to false"}}, | | [j]="redefinition of parameter %0", |
| [i]={{nil,m,{{yb,zb}," \'B\' evaluated to false"}}}, | | [i]="redefinition of parameter A", |
| [c]=g, | | [h]=k, |
| [e]="(?:and|because) \'(.*?)\' evaluated to false", | | [c]="redefinition of parameter (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=y, |
| [j]={Hd,1569403888,"[clang] Add no_builtin attribute","[clang] Add no_builtin attribute\n\nSummary:\nThis is a follow up on https://reviews.llvm.org/D61634\nThis patch is simpler and only adds the no_builtin attribute.\n\nReviewers: tejohnson, courbet, theraven, t.p.northover, jdoerfert\n\nSubscribers: mgrang, cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D68028"}, | | [g]={s,1236199783,q,r}, |
| [k]={{vb,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;"}}
| | [d]={{Kb,7241,"/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator\n/// we found a K&R-style identifier list instead of a typed parameter list.\n///\n/// After returning, ParamInfo will hold the parsed parameters.\n///\n/// identifier-list: [C99 6.7.5]\n/// identifier\n/// identifier-list \',\' identifier\n///\nvoid Parser::ParseFunctionDeclaratorIdentifierList(Declarator &D, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo) {\n // ...\n do {\n // ...\n // Verify that the argument identifier has not already been mentioned.\n if (!ParamsSoFar.insert(ParmII).second) {\n Diag(Tok, diag::err_param_redefinition) << ParmII;"},{"clang/lib/Parse/Parser.cpp",1573,"/// ParseKNRParamDeclarations - Parse \'declaration-list[opt]\' which provides\n/// types for a function with a K&R-style identifier list for arguments.\nvoid Parser::ParseKNRParamDeclarations(Declarator &D) {\n // ...\n // Read all the argument declarations.\n while (isDeclarationSpecifier(ImplicitTypenameContext::No)) {\n // ...\n // Handle the full declarator list.\n while (true) {\n // ...\n if (Param &&\n // ...\n // Scan the argument list looking for the correct param to apply this\n // type.\n for (unsigned i = 0;; ++i) {\n // ...\n if (FTI.Params[i].Ident == ParmDeclarator.getIdentifier()) {\n // Reject redefinitions of parameters.\n if (FTI.Params[i].Param) {\n Diag(ParmDeclarator.getIdentifierLoc(), diag::err_param_redefinition) << ParmDeclarator.getIdentifier();"},{D,14782,"/// ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator()\n/// to introduce parameters into function prototype scope.\nDecl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {\n // ...\n if (II) {\n // ...\n if (R.isSingleResult()) {\n // ...\n if (PrevDecl->isTemplateParameter()) {\n // ...\n } else if (S->isDeclScope(PrevDecl)) {\n Diag(D.getIdentifierLoc(), diag::err_param_redefinition) << II;"}}, |
| },
| |
| ["note_concept_specialization_here"]={
| |
| [b]={{nil,m,"note_concept_specialization_here"}},
| |
| [h]={{nil,m,"while checking the satisfaction of concept \'%0\' requested here"}},
| |
| [i]={{nil,m,"while checking the satisfaction of concept \'A\' requested here"}},
| |
| [c]=g,
| |
| [e]="while checking the satisfaction of concept \'(.*?)\' requested here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ad,1567434909,Vc,Xc},
| |
| [k]={{W,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;"}},
| |
| [l]={ | | [l]={ |
| ["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/Parser/declarators.c"]={"clang/test/Parser/declarators.c:34:15: error: redefinition of parameter \'x\'"} |
| } | | } |
| }, | | }, |
| ["note_condition_assign_silence"]={ | | ["err_param_with_void_type"]={ |
| [b]="note_condition_assign_silence", | | [b]="err_param_with_void_type", |
| [h]="place parentheses around the assignment to silence this warning", | | [j]="argument may not have \'void\' type", |
| [i]="place parentheses around the assignment to silence this warning", | | [i]="argument may not have \'void\' type", |
| [c]=g, | | [h]=k, |
| [e]="place parentheses around the assignment to silence this warning", | | [c]="argument may not have \'void\' type", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{A,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, \")\");"}},
| | [d]={{"clang/lib/Sema/SemaTemplateInstantiate.cpp",2853,"ParmVarDecl *Sema::SubstParmVarDecl(ParmVarDecl *OldParm, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, std::optional<unsigned> NumExpansions, bool ExpectParameterPack, bool EvaluateConstraint) {\n // ...\n if (NewDI->getType()->isVoidType()) {\n Diag(OldParm->getLocation(), diag::err_param_with_void_type);"},{rb,3025,"QualType Sema::BuildFunctionType(QualType T, MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) {\n // ...\n for (unsigned Idx = 0, Cnt = ParamTypes.size(); Idx < Cnt; ++Idx) {\n // ...\n if (ParamType->isVoidType()) {\n Diag(Loc, diag::err_param_with_void_type);"},{rb,5508,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // If this is something like \'float(int, void)\', reject it. \'void\'\n // is an incomplete type (C99 6.2.5p19) and function decls cannot\n // have parameters of incomplete type.\n if (FTI.NumParams != 1 || FTI.isVariadic) {\n // ...\n } else if (FTI.Params[i].Ident) {\n // ...\n S.Diag(FTI.Params[i].IdentLoc, diag::err_param_with_void_type);"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/void_arg.c"]={"clang/test/Sema/void_arg.c:9:24: error: argument may not have \'void\' type","clang/test/Sema/void_arg.c:13:24: error: argument may not have \'void\' type"} |
| } | | } |
| }, | | }, |
| ["note_condition_assign_to_comparison"]={ | | ["err_parameter_shadow_capture"]={ |
| [b]="note_condition_assign_to_comparison", | | [b]={{nil,u,"err_parameter_shadow_capture"}}, |
| [h]="use \'==\' to turn this assignment into an equality comparison", | | [j]={{nil,u,"a lambda parameter cannot shadow an explicitly captured entity"}}, |
| [i]="use \'==\' to turn this assignment into an equality comparison", | | [i]={{nil,u,"a lambda parameter cannot shadow an explicitly captured entity"}}, |
| [c]=g, | | [h]=k, |
| [e]="use \'\\=\\=\' to turn this assignment into an equality comparison", | | [c]="a lambda parameter cannot shadow an explicitly captured entity", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,u,"Lambda Issue"}}, |
| [j]={"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"}, | | [g]={"3cde5e4a4c69",1540498503,"[C++17] Reject shadowing of capture by parameter in lambda","[C++17] Reject shadowing of capture by parameter in lambda\n\nSummary:\nThis change rejects the shadowing of a capture by a parameter in lambdas in C++17.\n\n```\nint main() {\n int a;\n auto f = [a](int a) { return a; };\n}\n```\n\nresults in:\n\n```\nmain.cpp:3:20: error: a lambda parameter cannot shadow an explicitly captured entity\n auto f = [a](int a) { return a; };\n ^\nmain.cpp:3:13: note: variable a is explicitly captured here\n auto f = [a](int a) { return a; };\n ^\n```\n\nReviewers: rsmith\n\nReviewed By: rsmith\n\nSubscribers: lebedev.ri, erik.pilkington, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D53595\n\nllvm-svn: 345308"}, |
| [k]={{A,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, \"==\");"}}, | | [d]={{"clang/lib/Sema/SemaLambda.cpp",1351,"void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, const DeclSpec &DS) {\n // ...\n auto CheckRedefinition = [&](ParmVarDecl *Param) {\n for (const auto &Capture : Intro.Captures) {\n if (Capture.Id == Param->getIdentifier()) {\n Diag(Param->getLocation(), diag::err_parameter_shadow_capture);"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/expr.prim.lambda.capture/p5.cpp:5:20: error: a lambda parameter cannot shadow an explicitly captured entity"} |
| } | | } |
| }, | | }, |
| ["note_condition_or_assign_to_comparison"]={ | | ["err_parameters_retval_cannot_have_fp16_type"]={ |
| [b]="note_condition_or_assign_to_comparison", | | [b]="err_parameters_retval_cannot_have_fp16_type", |
| [h]="use \'!=\' to turn this compound assignment into an inequality comparison", | | [j]="%select{parameters|function return value}0 cannot have __fp16 type; did you forget * ?", |
| [i]="use \'!=\' to turn this compound assignment into an inequality comparison", | | [i]={{nil,nil,{{"parameters","function return value"}," cannot have __fp16 type; did you forget * ?"}}}, |
| [c]=g, | | [h]=k, |
| [e]="use \'\\!\\=\' to turn this compound assignment into an inequality comparison", | | [c]="(?:parameters|function return value) cannot have __fp16 type; did you forget \\* \\?", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"f0c267e6e05c",1318634595,"Provide half floating point support as a storage only type.","Provide half floating point support as a storage only type.\nLack of half FP was a regression compared to llvm-gcc.\n\nllvm-svn: 142016"}, |
| [k]={{A,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, \"!=\");"}}, | | [d]={{rb,2920,"bool Sema::CheckFunctionReturnType(QualType T, SourceLocation Loc) {\n // ...\n // Functions cannot return half FP.\n if (T->isHalfType() && !getLangOpts().NativeHalfArgsAndReturns && !Context.getTargetInfo().allowHalfArgsAndReturns()) {\n Diag(Loc, diag::err_parameters_retval_cannot_have_fp16_type) << 1 << FixItHint::CreateInsertion(Loc, \"*\");"},{rb,3030,"QualType Sema::BuildFunctionType(QualType T, MutableArrayRef<QualType> ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI) {\n // ...\n for (unsigned Idx = 0, Cnt = ParamTypes.size(); Idx < Cnt; ++Idx) {\n // ...\n if (ParamType->isVoidType()) {\n // ...\n } else if (ParamType->isHalfType() && !getLangOpts().NativeHalfArgsAndReturns && !Context.getTargetInfo().allowHalfArgsAndReturns()) {\n // ...\n Diag(Loc, diag::err_parameters_retval_cannot_have_fp16_type) << 0 << FixItHint::CreateInsertion(Loc, \"*\");"},{rb,5292,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // Do not allow returning half FP value.\n // FIXME: This really should be in BuildFunctionType.\n if (T->isHalfType()) {\n if (S.getLangOpts().OpenCL) {\n // ...\n } else if (!S.getLangOpts().NativeHalfArgsAndReturns && !S.Context.getTargetInfo().allowHalfArgsAndReturns()) {\n S.Diag(D.getIdentifierLoc(), diag::err_parameters_retval_cannot_have_fp16_type) << 1;"},{rb,5533,"static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, QualType declSpecType, TypeSourceInfo *TInfo) {\n // ...\n for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {\n // ...\n case DeclaratorChunk::Function: {\n // ...\n // OpenCL disallows functions without a prototype, but it doesn\'t enforce\n // strict prototypes as in C2x because it allows a function definition to\n // have an identifier list. See OpenCL 3.0 6.11/g for more details.\n if (!FTI.NumParams && !FTI.isVariadic && !LangOpts.requiresStrictPrototypes() && !LangOpts.OpenCL) {\n // ...\n } else {\n // ...\n for (unsigned i = 0, e = FTI.NumParams; i != e; ++i) {\n // ...\n // Look for \'void\'. void is allowed only as a single parameter to a\n // function with no other parameters (C99 6.7.5.3p10). We record\n // int(void) as a FunctionProtoType with an empty parameter list.\n if (ParamTy->isVoidType()) {\n // ...\n } else if (ParamTy->isHalfType()) {\n // Disallow half FP parameters.\n // FIXME: This really should be in BuildFunctionType.\n if (S.getLangOpts().OpenCL) {\n // ...\n } else if (!S.getLangOpts().NativeHalfArgsAndReturns && !S.Context.getTargetInfo().allowHalfArgsAndReturns()) {\n S.Diag(Param->getLocation(), diag::err_parameters_retval_cannot_have_fp16_type) << 0;"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/fp16-sema.c"]={"clang/test/Sema/fp16-sema.c:5:22: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:8:26: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:11:26: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:15:9: error: parameters cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:23:15: error: function return value cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:26:17: error: function return value cannot have __fp16 type; did you forget * ?","clang/test/Sema/fp16-sema.c:29:18: error: function return value cannot have __fp16 type; did you forget * ?"} |
| } | | } |
| }, | | }, |
| ["note_conflicting_attribute"]={ | | ["err_paren_sizeof_parameter_pack"]={ |
| [b]="note_conflicting_attribute", | | [b]="err_paren_sizeof_parameter_pack", |
| [h]="conflicting attribute is here", | | [j]="missing parentheses around the size of parameter pack %0", |
| [i]="conflicting attribute is here", | | [i]="missing parentheses around the size of parameter pack A", |
| [c]=g, | | [h]=k, |
| [e]="conflicting attribute is here", | | [c]="missing parentheses around the size of parameter pack (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=y, |
| [j]={"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"}, | | [g]={"820ba7ba43a2",1294162438,"Implement the sizeof...(pack) expression to compute the length of a","Implement the sizeof...(pack) expression to compute the length of a\nparameter pack.\n\nNote that we\'re missing proper libclang support for the new\nSizeOfPackExpr expression node.\n\nllvm-svn: 122813"}, |
| [k]={{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{gb,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);"},{X,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\";"}}, | | [d]={{"clang/lib/Parse/ParseExpr.cpp",2472,"/// Parse a sizeof or alignof expression.\n///\n/// \\verbatim\n/// unary-expression: [C99 6.5.3]\n/// \'sizeof\' unary-expression\n/// \'sizeof\' \'(\' type-name \')\'\n/// [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n/// [GNU] \'__alignof\' unary-expression\n/// [GNU] \'__alignof\' \'(\' type-name \')\'\n/// [C11] \'_Alignof\' \'(\' type-name \')\'\n/// [C++11] \'alignof\' \'(\' type-id \')\'\n/// \\endverbatim\nExprResult Parser::ParseUnaryExprOrTypeTraitExpression() {\n // ...\n // [C++11] \'sizeof\' \'...\' \'(\' identifier \')\'\n if (Tok.is(tok::ellipsis) && OpTok.is(tok::kw_sizeof)) {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (Tok.is(tok::identifier)) {\n // ...\n Diag(LParenLoc, diag::err_paren_sizeof_parameter_pack) << Name << FixItHint::CreateInsertion(LParenLoc, \"(\") << FixItHint::CreateInsertion(RParenLoc, \")\");"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp"]={"clang/test/CXX/expr/expr.unary/expr.sizeof/p5-0x.cpp:35:42: error: missing parentheses around the size of parameter pack \'Type\'"} |
| } | | } |
| }, | | }, |
| ["note_conflicting_prototype"]={ | | ["err_parens_pointer_member_function"]={ |
| [b]={{nil,w,"note_conflicting_prototype"}}, | | [b]="err_parens_pointer_member_function", |
| [h]={{nil,w,"conflicting prototype is here"}}, | | [j]="cannot parenthesize the name of a method when forming a member pointer", |
| [i]={{nil,w,"conflicting prototype is here"}}, | | [i]="cannot parenthesize the name of a method when forming a member pointer", |
| [c]=g, | | [h]=k, |
| [e]="conflicting prototype is here", | | [c]="cannot parenthesize the name of a method when forming a member pointer", |
| [f]=a, | | [f]=a, |
| [d]={{nil,w,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"8d08b9b408ca",1282900108,"Propagate whether an id-expression is the immediate argument of","Propagate whether an id-expression is the immediate argument of\nan \'&\' expression from the second caller of ActOnIdExpression.\n\nTeach template argument deduction that an overloaded id-expression\ndoesn\'t give a valid type for deduction purposes to a non-static\nmember function unless the expression has the correct syntactic\nform.\n\nTeach ActOnIdExpression that it shouldn\'t try to create implicit\nmember expressions for \'&function\', because this isn\'t a \npermitted form of use for member functions.\n\nTeach CheckAddressOfOperand to diagnose these more carefully.\nSome of these cases aren\'t reachable right now because earlier\ndiagnostics interrupt them.\n\nllvm-svn: 112258"}, |
| [k]={{C,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);"}}, | | [d]={{O,14965,"/// CheckAddressOfOperand - The operand of & must be either a function\n/// designator or an lvalue designating an object. If it is an lvalue, the\n/// object cannot be declared with storage class register or be a bit field.\n/// Note: The usual conversions are *not* applied to the operand of the &\n/// operator (C99 6.3.2.1p[2-4]), and its result is never an lvalue.\n/// In C++, the operand might be an overloaded function name, in which case\n/// we allow the \'&\' but retain the overloaded-function type.\nQualType Sema::CheckAddressOfOperand(ExprResult &OrigOp, SourceLocation OpLoc) {\n // ...\n if (lval == Expr::LV_ClassTemporary || lval == Expr::LV_ArrayTemporary) {\n // ...\n } else if (isa<ObjCSelectorExpr>(op)) {\n // ...\n } else if (lval == Expr::LV_MemberFunction) {\n // ...\n // The id-expression was parenthesized.\n if (OrigOp.get() != DRE) {\n Diag(OpLoc, diag::err_parens_pointer_member_function) << OrigOp.get()->getSourceRange();"}} |
| [l]={
| |
| ["clang/test/SemaObjC/nonnull.m"]={"clang/test/SemaObjC/nonnull.m:63:6: note: conflicting prototype is here"}
| |
| }
| |
| }, | | }, |
| ["note_conflicting_try_here"]={ | | ["err_partial_spec_args_match_primary_template"]={ |
| [b]="note_conflicting_try_here", | | [b]="err_partial_spec_args_match_primary_template", |
| [h]="conflicting %0 here", | | [j]="%select{class|variable}0 template partial specialization does not specialize any template argument; to %select{declare|define}1 the primary template, remove the template argument list", |
| [i]="conflicting A here", | | [i]={{nil,nil,{{"class","variable"}," template partial specialization does not specialize any template argument; to ",{"declare","define"}," the primary template, remove the template argument list"}}}, |
| [c]=g, | | [h]=k, |
| [e]="conflicting (.*?) here", | | [c]="(?:class|variable) template partial specialization does not specialize any template argument; to (?:declare|define) the primary template, remove the template argument list", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"09a3023e65d1",1244844486,"Diagnose C++ [temp.class.spec]p9b3, where a class template partial","Diagnose C++ [temp.class.spec]p9b3, where a class template partial\nspecialization\'s arguments are identical to the implicit template\narguments of the primary template. Typically, this is meant to be a\ndeclaration/definition of the primary template, so we give that\nadvice.\n\nllvm-svn: 73259"}, |
| [k]={{X,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\'\";"},{X,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\'\";"},{X,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\'\");"}}, | | [d]={{W,4588,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n // Find the variable template (partial) specialization declaration that\n // corresponds to these arguments.\n if (IsPartialSpecialization) {\n // ...\n if (isSameAsPrimaryTemplate(VarTemplate->getTemplateParameters(), CanonicalConverted) && (!Context.getLangOpts().CPlusPlus20 || !TemplateParams->hasAssociatedConstraints())) {\n // ...\n Diag(TemplateNameLoc, diag::err_partial_spec_args_match_primary_template) << /*variable template*/ 1 << /*is definition*/ (SC != SC_Extern && !CurContext->isRecord()) << FixItHint::CreateRemoval(SourceRange(LAngleLoc, RAngleLoc));"},{W,8799,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n if (isPartialSpecialization) {\n // ...\n if (Context.hasSameType(CanonType, ClassTemplate->getInjectedClassNameSpecialization()) && (!Context.getLangOpts().CPlusPlus20 || !TemplateParams->hasAssociatedConstraints())) {\n // ...\n Diag(TemplateNameLoc, diag::err_partial_spec_args_match_primary_template) << /*class template*/ 0 << (TUK == TUK_Definition) << FixItHint::CreateRemoval(SourceRange(LAngleLoc, RAngleLoc));"}}, |
| [l]={ | | [l]={ |
| ["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/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:33:6: error: variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list","clang/test/CXX/temp/temp.constr/temp.constr.order/var-template-partial-specializations.cpp:39:6: error: variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list"} |
| } | | } |
| }, | | }, |
| ["note_consteval_address_accessible"]={ | | ["err_partial_spec_fully_specialized"]={ |
| [b]={{nil,t,"note_consteval_address_accessible"}}, | | [b]="err_partial_spec_fully_specialized", |
| [h]={{nil,t,"%select{pointer|reference}0 to a consteval declaration is not a constant expression"}}, | | [j]="partial specialization of %0 does not use any of its template parameters", |
| [i]={{nil,t,{{Md,Hb}," to a consteval declaration is not a constant expression"}}}, | | [i]="partial specialization of A does not use any of its template parameters", |
| [c]=g, | | [h]=k, |
| [e]="(?:pointer|reference) to a consteval declaration is not a constant expression", | | [c]="partial specialization of (.*?) does not use any of its template parameters", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,a}}, | | [e]=m, |
| [j]={"474177c05381",1579695612,"[AST] Improve overflow diagnostics for fixed-point constant evaluation.","[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"}, | | [g]={"92354b6b552e",1265675852,"Implement a specific diagnostic when a class template partial","Implement a specific diagnostic when a class template partial\nspecialization does not use any of its template parameters, then\nrecover far more gracefully. Fixes PR6181.\n\nllvm-svn: 95629"}, |
| [k]={{o,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();"},{o,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;"}}, | | [d]={{W,4575,"DeclResult Sema::ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization) {\n // ...\n // Find the variable template (partial) specialization declaration that\n // corresponds to these arguments.\n if (IsPartialSpecialization) {\n // ...\n // FIXME: Move these checks to CheckTemplatePartialSpecializationArgs so we\n // also do them during instantiation.\n if (!Name.isDependent() && !TemplateSpecializationType::anyDependentTemplateArguments(TemplateArgs, CanonicalConverted)) {\n Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << VarTemplate->getDeclName();"},{W,8754,"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 // Find the class template (partial) specialization declaration that\n // corresponds to these arguments.\n if (isPartialSpecialization) {\n // ...\n // FIXME: Move this to CheckTemplatePartialSpecializationArgs so we\n // also do it during instantiation.\n if (!Name.isDependent() && !TemplateSpecializationType::anyDependentTemplateArguments(TemplateArgs, CanonicalConverted)) {\n Diag(TemplateNameLoc, diag::err_partial_spec_fully_specialized) << ClassTemplate->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:50:20: note: pointer to a consteval declaration is not a constant expression","clang/test/CXX/expr/expr.const/p6-2a.cpp:50:16: note: pointer to a consteval declaration is not a constant expression"} | | ["clang/test/SemaTemplate/temp_class_spec.cpp"]={"clang/test/SemaTemplate/temp_class_spec.cpp:359:9: error: partial specialization of \'a\' does not use any of its template parameters","clang/test/SemaTemplate/temp_class_spec.cpp:374:7: error: partial specialization of \'Bar\' does not use any of its template parameters","clang/test/SemaTemplate/temp_class_spec.cpp:386:7: error: partial specialization of \'Foo\' does not use any of its template parameters"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_deleted_object"]={ | | ["err_partial_spec_ordering_ambiguous"]={ |
| [b]={{nil,m,"note_constexpr_access_deleted_object"}}, | | [b]="err_partial_spec_ordering_ambiguous", |
| [h]={{nil,m,"%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"}}, | | [j]="ambiguous partial specializations of %0", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb}," heap allocated object that has been deleted"}}}, | | [i]="ambiguous partial specializations of A", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) heap allocated object that has been deleted", | | [c]="ambiguous partial specializations of (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=m, |
| [j]={ob,1569547607,jb,lb}, | | [g]={"be999390ebc7",1253031831,"Implement partial ordering of class template partial specializations ","Implement partial ordering of class template partial specializations \n(C++ [temp.class.order]).\n\nllvm-svn: 81866"}, |
| [k]={{o,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;"}}, | | [d]={{W,4852,"DeclResult Sema::CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs) {\n // ...\n if (AmbiguousPartialSpec) {\n // ...\n Diag(PointOfInstantiation, diag::err_partial_spec_ordering_ambiguous) << Decl;"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",3691,"/// Get the instantiation pattern to use to instantiate the definition of a\n/// given ClassTemplateSpecializationDecl (either the pattern of the primary\n/// template or of a partial specialization).\nstatic ActionResult<CXXRecordDecl *> getPatternForClassTemplateSpecialization(Sema &S, SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK) {\n // ...\n if (!Specialized.is<ClassTemplatePartialSpecializationDecl *>()) {\n // ...\n if (Matched.size() >= 1) {\n // ...\n if (Matched.size() == 1) {\n // ...\n } else {\n // ...\n if (Ambiguous) {\n // ...\n S.Diag(PointOfInstantiation, diag::err_partial_spec_ordering_ambiguous) << ClassTemplateSpec;"}}, |
| [l]={ | | [l]={ |
| [uc]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:111:5: note: construction of heap allocated object that has been deleted"} | | ["clang/test/SemaTemplate/temp_class_order.cpp"]={"clang/test/SemaTemplate/temp_class_order.cpp:41:16: error: ambiguous partial specializations of \'X2<int *, int *>\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_inactive_union_member"]={ | | ["err_partial_spec_redeclared"]={ |
| [b]="note_constexpr_access_inactive_union_member", | | [b]="err_partial_spec_redeclared", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,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"}}, | | [j]="class template partial specialization %0 cannot be redeclared", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,"construction of subobject of",Gb}," member B of union with ",{"active member D","no active member"},Db}},{p,p,{{F,O,P,Q,kb,mb,eb}," member B of union with ",{"active member D","no active member"},Db}},{v,nil,{{F,O,P,Q}," member B of union with ",{"active member D","no active member"},Db}}}, | | [i]="class template partial specialization A cannot be redeclared", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of) member (.*?) of union with (?:active member (.*?)|no active member) is not allowed in a constant expression", | | [c]="class template partial specialization (.*?) cannot be redeclared", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={"21610380de97",1256774651,"Implement support for semantic checking and template instantiation of","Implement support for semantic checking and template instantiation of\nclass template partial specializations of member templates. Also,\nfixes a silly little bug in the marking of \"used\" template parameters\nin member templates. Fixes PR5236.\n\nllvm-svn: 85447"}, |
| [k]={{o,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;"},{M,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;"}}, | | [d]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",4244,"/// Instantiate the declaration of a class template partial\n/// specialization.\n///\n/// \\param ClassTemplate the (instantiated) class template that is partially\n// specialized by the instantiation of \\p PartialSpec.\n///\n/// \\param PartialSpec the (uninstantiated) class template partial\n/// specialization that we are instantiating.\n///\n/// \\returns The instantiated partial specialization, if successful; otherwise,\n/// NULL to indicate an error.\nClassTemplatePartialSpecializationDecl *TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(ClassTemplateDecl *ClassTemplate, ClassTemplatePartialSpecializationDecl *PartialSpec) {\n // ...\n if (PrevDecl) {\n // ...\n SemaRef.Diag(PartialSpec->getLocation(), diag::err_partial_spec_redeclared) << WrittenTy->getType();"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/temp/temp.decls/temp.class.spec/p6.cpp"]={"clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:42:31: error: class template partial specialization \'Inner<int, Y>\' cannot be redeclared","clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp:84:29: error: class template partial specialization \'Bar<0, int, Y>\' cannot be redeclared"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_mutable"]={ | | ["err_partial_specialization_friend"]={ |
| [b]={{nil,m,"note_constexpr_access_mutable"}}, | | [b]="err_partial_specialization_friend", |
| [h]={{nil,m,"%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"}}, | | [j]="partial specialization cannot be declared as a friend", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb}," mutable member B is not allowed in a constant expression"}}}, | | [i]="partial specialization cannot be declared as a friend", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) mutable member (.*?) is not allowed in a constant expression", | | [c]="partial specialization cannot be declared as a friend", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"ec9518be89c9",1292919297,"A class template partial specialization cannot be a friend. Fixes PR8649.","A class template partial specialization cannot be a friend. Fixes PR8649.\n\nllvm-svn: 122325"}, |
| [k]={{o,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;"},{o,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;"},{M,231,"bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_mutable, 1) << AK_Read << Field;"}}, | | [d]={{W,8662,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n if (TemplateParams && TemplateParams->size() > 0) {\n // ...\n if (TUK == TUK_Friend) {\n Diag(KWLoc, diag::err_partial_specialization_friend) << SourceRange(LAngleLoc, RAngleLoc);"}}, |
| [l]={ | | [l]={ |
| ["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/temp/temp.decls/temp.friend/p8.cpp"]={"clang/test/CXX/temp/temp.decls/temp.friend/p8.cpp:5:28: error: partial specialization cannot be declared as a friend"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_null"]={ | | ["err_partition_import_outside_module"]={ |
| [b]="note_constexpr_access_null", | | [b]={{nil,C,"err_partition_import_outside_module"}}, |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,nil,"%select{read of|assignment to|increment of|decrement of}0 dereferenced null pointer is not allowed in a constant expression"}},
| | [j]={{nil,C,"module partition imports must be within a module purview"}}, |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb}," dereferenced null pointer is not allowed in a constant expression"}},{p,p,{{F,O,P,Q,kb,mb,eb}," dereferenced null pointer is not allowed in a constant expression"}},{v,nil,{{F,O,P,Q}," dereferenced null pointer is not allowed in a constant expression"}}}, | | [i]={{nil,C,"module partition imports must be within a module purview"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) dereferenced null pointer is not allowed in a constant expression", | | [c]="module partition imports must be within a module purview", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,C,fc}}, |
| [j]={Dc,1366986990,Bc,xc},
| | [g]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, |
| [k]={{o,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; });"},{o,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;"},{M,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;"}}, | | [d]={{"clang/lib/Parse/Parser.cpp",2555,"/// Parse a module import declaration. This is essentially the same for\n/// Objective-C and C++20 except for the leading \'@\' (in ObjC) and the\n/// trailing optional attributes (in C++).\n///\n/// [ObjC] @import declaration:\n/// \'@\' \'import\' module-name \';\'\n/// [ModTS] module-import-declaration:\n/// \'import\' module-name attribute-specifier-seq[opt] \';\'\n/// [C++20] module-import-declaration:\n/// \'export\'[opt] \'import\' module-name\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' module-partition\n/// attribute-specifier-seq[opt] \';\'\n/// \'export\'[opt] \'import\' header-name\n/// attribute-specifier-seq[opt] \';\'\nDecl *Parser::ParseModuleImport(SourceLocation AtLoc, Sema::ModuleImportState &ImportState) {\n // ...\n case Sema::ModuleImportState::FirstDecl:\n case Sema::ModuleImportState::NotACXX20Module:\n // We can only import a partition within a module purview.\n if (IsPartition)\n Diag(ImportLoc, diag::err_partition_import_outside_module);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_access_past_end"]={ | | ["err_pascal_string_too_long"]={ |
| [b]="note_constexpr_access_past_end", | | [b]="err_pascal_string_too_long", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,nil,"%select{read of|assignment to|increment of|decrement of}0 dereferenced one-past-the-end pointer is not allowed in a constant expression"}}, | | [j]="Pascal string is too long", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb}," dereferenced one-past-the-end pointer is not allowed in a constant expression"}},{p,p,{{F,O,P,Q,kb,mb,eb}," dereferenced one-past-the-end pointer is not allowed in a constant expression"}},{v,nil,{{F,O,P,Q}," dereferenced one-past-the-end pointer is not allowed in a constant expression"}}}, | | [i]="Pascal string is too long", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) dereferenced one\\-past\\-the\\-end pointer is not allowed in a constant expression", | | [c]="Pascal string is too long", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"},{o,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;"},{o,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;"},{o,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;"},{o,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;"},{M,191,"bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_access_past_end) << AK;"}}, | | [d]={{"clang/lib/Lex/LiteralSupport.cpp",2209,"void StringLiteralParser::init(ArrayRef<Token> StringToks) {\n // ...\n if (Pascal) {\n // ...\n // Verify that pascal strings aren\'t too large.\n if (GetStringLength() > 256) {\n if (Diags)\n Diags->Report(StringToks.front().getLocation(), diag::err_pascal_string_too_long) << SourceRange(StringToks.front().getLocation(), StringToks.back().getLocation());"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_access_static_temporary"]={ | | ["err_paste_at_end"]={ |
| [b]="note_constexpr_access_static_temporary", | | [b]="err_paste_at_end", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,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"}}, | | [j]="\'##\' cannot appear at end of macro expansion", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,"reconstruction of",Gb}," temporary is not allowed in a constant expression outside the expression that created the temporary"}},{p,p,{{F,O,P,Q,kb,mb,eb}," temporary is not allowed in a constant expression outside the expression that created the temporary"}},{v,nil,{{F,O,P,Q}," temporary is not allowed in a constant expression outside the expression that created the temporary"}}}, | | [i]="\'##\' cannot appear at end of macro expansion", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|reconstruction of|destruction of) temporary is not allowed in a constant expression outside the expression that created the temporary", | | [c]="\'\\#\\#\' cannot appear at end of macro expansion", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"},{M,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;"}}, | | [d]={{z,3080,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n if (NumTokens != 0) {\n // ...\n if (MI->getReplacementToken(NumTokens - 1).is(tok::hashhash)) {\n Diag(MI->getReplacementToken(NumTokens - 1), diag::err_paste_at_end);"}}, |
| [l]={ | | [l]={ |
| ["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/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:10:18: error: \'##\' cannot appear at end of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:11:18: error: \'##\' cannot appear at end of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:12:15: error: \'##\' cannot appear at end of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:13:15: error: \'##\' cannot appear at end of macro expansion"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_uninit"]={ | | ["err_paste_at_start"]={ |
| [b]="note_constexpr_access_uninit", | | [b]="err_paste_at_start", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,nil,"%select{read of|assignment to|increment of|decrement of}0 object outside its lifetime is not allowed in a constant expression"}}, | | [j]="\'##\' cannot appear at start of macro expansion", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,"construction of subobject of",Gb},rb,{"object outside its lifetime","uninitialized object"},Db}},{p,p,{{F,O,P,Q,kb,mb,eb},rb,{"object outside its lifetime","uninitialized object"},Db}},{v,nil,{{F,O,P,Q}," object outside its lifetime is not allowed in a constant expression"}}}, | | [i]="\'##\' cannot appear at start of macro expansion", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of subobject of|destruction of) (?:object outside its lifetime|uninitialized object) is not allowed in a constant expression", | | [c]="\'\\#\\#\' cannot appear at start of macro expansion", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"},{M,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;"}}, | | [d]={{z,3076,"/// HandleDefineDirective - Implements \\#define. This consumes the entire macro\n/// line then lets the caller lex the next real token.\nvoid Preprocessor::HandleDefineDirective(Token &DefineTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n if (NumTokens != 0) {\n if (MI->getReplacementToken(0).is(tok::hashhash)) {\n Diag(MI->getReplacementToken(0), diag::err_paste_at_start);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constexpr-value-init.cpp"]={"clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression","clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression","clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression","clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression","clang/test/SemaCXX/constexpr-value-init.cpp:4:21: note: read of object outside its lifetime is not allowed in a constant expression"} | | ["clang/test/Preprocessor/macro_paste_bad.c"]={"clang/test/Preprocessor/macro_paste_bad.c:16:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:17:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:18:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:19:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:20:13: error: \'##\' cannot appear at start of macro expansion","clang/test/Preprocessor/macro_paste_bad.c:21:13: error: \'##\' cannot appear at start of macro expansion"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_unreadable_object"]={ | | ["err_pch_diagopt_mismatch"]={ |
| [b]={{nil,p,"note_constexpr_access_unreadable_object"}}, | | [b]="err_pch_diagopt_mismatch", |
| [h]={{nil,m,"%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"},{p,p,"%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"}}, | | [j]="%0 is currently enabled, but was not in the PCH file", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb}," object \'B\' whose value is not known"}},{p,p,{{F,O,P,Q,kb,mb,eb}," object \'B\' whose value is not known"}}}, | | [i]="A is currently enabled, but was not in the PCH file", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) object \'(.*?)\' whose value is not known", | | [c]="(.*?) is currently enabled, but was not in the PCH file", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=V, |
| [j]={"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"}, | | [g]={"be84adbf1b7d",1398731813,"Check -Werror options during module validation","Check -Werror options during module validation\n\nThis patch checks whether the diagnostic options that could lead to\nerrors (principally -Werror) are consistent between when a module was\nbuilt and when it is loaded. If there are new -Werror flags, then the\nmodule is rebuilt. In order to canonicalize the options we do this\ncheck at the level of the constructed DiagnosticsEngine, which contains\nthe final set of diag to diagnostic level mappings. Currently we only\nrebuild with the new diagnostic options, but we intend to refine this in\nthe future to include the union of the new and old flags, since we know\nthe old ones did not cause errors. System modules are only rebuilt when\n-Wsystem-headers is enabled.\n\nOne oddity is that unlike checking language options, we don’t perform\nthis diagnostic option checking when loading from a precompiled header.\nThe reason for this is that the compiler cannot rebuild the PCH, so\nanything that requires it to be rebuilt effectively leaks into the build\nsystem. And in this case, that would mean the build system\nunderstanding the complex relationship between diagnostic options and\nthe underlying diagnostic mappings, which is unreasonable. Skipping the\ncheck is safe, because these options do not affect the generated AST.\nYou simply won’t get new build errors due to changed -Werror options\nautomatically, which is also true for non-module cases.\n\nllvm-svn: 207477"}, |
| [k]={{o,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));"}}, | | [d]={{G,493,"static bool checkDiagnosticGroupMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool Complain) {\n // ...\n for (DiagnosticsEngine *MappingSource : MappingSources) {\n for (auto DiagIDMappingPair : MappingSource->getDiagnosticMappings()) {\n // ...\n if (StoredLevel < DiagnosticsEngine::Error) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Werror=\" + Diags.getDiagnosticIDs()->getWarningOptionForDiag(DiagID).str();"},{G,520,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // Top-level options\n if (IsSystem) {\n // ...\n // If -Wsystem-headers was not enabled before, be conservative\n if (StoredDiags.getSuppressSystemWarnings()) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Wsystem-headers\";"},{G,527,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // ...\n if (Diags.getWarningsAsErrors() && !StoredDiags.getWarningsAsErrors()) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Werror\";"},{G,534,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // ...\n if (Diags.getWarningsAsErrors() && Diags.getEnableAllWarnings() && !StoredDiags.getEnableAllWarnings()) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-Weverything -Werror\";"},{G,541,"static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags, DiagnosticsEngine &Diags, bool IsSystem, bool Complain) {\n // ...\n if (isExtHandlingFromDiagsError(Diags) && !isExtHandlingFromDiagsError(StoredDiags)) {\n if (Complain)\n Diags.Report(diag::err_pch_diagopt_mismatch) << \"-pedantic-errors\";"}} |
| [l]={
| |
| ["clang/test/SemaCXX/typeid.cpp"]={"clang/test/SemaCXX/typeid.cpp:32:30: note: read of object \'typeid(int).name\' whose value is not known"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_access_unsized_array"]={ | | ["err_pch_different_branch"]={ |
| [b]={{nil,z,"note_constexpr_access_unsized_array"}}, | | [b]="err_pch_different_branch", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,z,"%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"}}, | | [j]="PCH file built from a different branch (%0) than the compiler (%1)", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb}," element of array without known bound is not allowed in a constant expression"}},{p,p,{{F,O,P,Q,kb,mb,eb}," element of array without known bound is not allowed in a constant expression"}},{v,z,{{F,O,P,Q}," pointer to element of array without known bound is not allowed in a constant expression"}}}, | | [i]="PCH file built from a different branch (A) than the compiler (B)", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) element of array without known bound is not allowed in a constant expression", | | [c]="PCH file built from a different branch \\((.*?)\\) than the compiler \\((.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,z,a}}, | | [e]=V, |
| [j]={"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"}, | | [g]={"2228cd3f070d",1392133209,"Rename some PCH-related errors to have \'err_\' as their prefix","Rename some PCH-related errors to have \'err_\' as their prefix\n\nllvm-svn: 201157"}, |
| [k]={{o,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;"},{o,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;"}} | | [d]={{G,2869,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n // ...\n if (StringRef(CurBranch) != ASTBranch && !DisableValidation) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(diag::err_pch_different_branch) << ASTBranch << CurBranch;"}} |
| }, | | }, |
| ["note_constexpr_access_volatile_obj"]={ | | ["err_pch_langopt_mismatch"]={ |
| [b]="note_constexpr_access_volatile_obj", | | [b]="err_pch_langopt_mismatch", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,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"}}, | | [j]="%0 was %select{disabled|enabled}1 in PCH file but is currently %select{disabled|enabled}2", |
| [i]={{nil,m,{{F,F,O,P,Q}," volatile ",{id,"object C","member C"},Db}},{p,nil,{{F,O,P,Q}," volatile ",{id,"object C","member C"},Db}}}, | | [i]={{nil,nil,{"A was ",{"disabled","enabled"}," in PCH file but is currently ",{"disabled","enabled"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of) volatile (?:temporary|object (.*?)|member (.*?)) is not allowed in a constant expression", | | [c]="(.*?) was (?:disabled|enabled) in PCH file but is currently (?:disabled|enabled)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=V, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={"c2ae8800701c",1315938399,"Switch the serialization of LangOptions over to use the .def file. We","Switch the serialization of LangOptions over to use the .def file. We\nshould no longer have the serialization of LangOptions out of sync\nwith the structure itself (yay).\n\nllvm-svn: 139613"}, |
| [k]={{o,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;"}}, | | [d]={{G,285,"#define LANGOPT(Name, Bits, Default, Description) \\\n if (ExistingLangOpts.Name != LangOpts.Name) { \\\n if (Diags) { \\\n if (Bits == 1) \\\n Diags->Report(diag::err_pch_langopt_mismatch) << Description << LangOpts.Name << ExistingLangOpts.Name; \\"}}, |
| [l]={ | | [l]={ |
| [pb]={"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"} | | ["clang/test/Modules/prebuilt-implicit-modules.m"]={"error: signed char was disabled in PCH file but is currently enabled"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_access_volatile_type"]={ | | ["err_pch_langopt_value_mismatch"]={ |
| [b]="note_constexpr_access_volatile_type", | | [b]="err_pch_langopt_value_mismatch", |
| [h]={{nil,m,"%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"},{p,p,"%select{read of|assignment to|increment of|decrement of|<ERROR>|<ERROR>}0 volatile-qualified type %1 is not allowed in a constant expression"},{v,nil,"%select{read of|assignment to|increment of|decrement of}0 volatile-qualified type %1 is not allowed in a constant expression"}}, | | [j]="%0 differs in PCH file vs. current file", |
| [i]={{nil,m,{{F,F,O,P,Q}," volatile-qualified type B is not allowed in a constant expression"}},{p,nil,{{F,O,P,Q}," volatile-qualified type B is not allowed in a constant expression"}}}, | | [i]="A differs in PCH file vs. current file", |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of) volatile\\-qualified type (.*?) is not allowed in a constant expression", | | [c]="(.*?) differs in PCH file vs\\. current file", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=V, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={"c2ae8800701c",1315938399,"Switch the serialization of LangOptions over to use the .def file. We","Switch the serialization of LangOptions over to use the .def file. We\nshould no longer have the serialization of LangOptions out of sync\nwith the structure itself (yay).\n\nllvm-svn: 139613"}, |
| [k]={{o,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;"}}, | | [d]={{G,288,"#define LANGOPT(Name, Bits, Default, Description) \\\n if (ExistingLangOpts.Name != LangOpts.Name) { \\\n if (Diags) { \\\n if (Bits == 1) \\\n Diags->Report(diag::err_pch_langopt_mismatch) << Description << LangOpts.Name << ExistingLangOpts.Name; \\\n else \\\n Diags->Report(diag::err_pch_langopt_value_mismatch) << Description; \\"},{G,297,"#define VALUE_LANGOPT(Name, Bits, Default, Description) \\\n if (ExistingLangOpts.Name != LangOpts.Name) { \\\n if (Diags) \\\n Diags->Report(diag::err_pch_langopt_value_mismatch) << Description; \\"},{G,305,"#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \\\n if (ExistingLangOpts.get##Name() != LangOpts.get##Name()) { \\\n if (Diags) \\\n Diags->Report(diag::err_pch_langopt_value_mismatch) << Description; \\"},{G,329,"#include \"clang/Basic/LangOptions.def\"\n if (ExistingLangOpts.ModuleFeatures != LangOpts.ModuleFeatures) {\n if (Diags)\n Diags->Report(diag::err_pch_langopt_value_mismatch) << \"module features\";"},{G,335,"#include \"clang/Basic/LangOptions.def\"\n // ...\n if (ExistingLangOpts.ObjCRuntime != LangOpts.ObjCRuntime) {\n if (Diags)\n Diags->Report(diag::err_pch_langopt_value_mismatch) << \"target Objective-C runtime\";"},{G,343,"#include \"clang/Basic/LangOptions.def\"\n // ...\n if (ExistingLangOpts.CommentOpts.BlockCommandNames != LangOpts.CommentOpts.BlockCommandNames) {\n if (Diags)\n Diags->Report(diag::err_pch_langopt_value_mismatch) << \"block command names\";"}} |
| [l]={ | | }, |
| [pb]={"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"}
| | ["err_pch_macro_def_conflict"]={ |
| } | | [b]="err_pch_macro_def_conflict", |
| | [j]="definition of macro \'%0\' differs between the precompiled header (\'%1\') and the command line (\'%2\')", |
| | [i]="definition of macro \'A\' differs between the precompiled header (\'B\') and the command line (\'C\')", |
| | [h]=k, |
| | [c]="definition of macro \'(.*?)\' differs between the precompiled header \\(\'(.*?)\'\\) and the command line \\(\'(.*?)\'\\)", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"b63687519610",1351122110,"Teach the PCH validator to check the preprocessor options, especially","Teach the PCH validator to check the preprocessor options, especially\nthe macros that are #define\'d or #undef\'d on the command line. This\nchecking happens much earlier than the current macro-definition\nchecking and is far cleaner, because it does a direct comparison\nrather than a diff of the predefines buffers. Moreover, it allows us\nto use the result of this check to skip over PCH files within a\ndirectory that have non-matching -D\'s or -U\'s on the command\nline. Finally, it improves the diagnostics a bit for mismatches,\nfixing <rdar://problem/8612222>.\n\nThe old predefines-buffer diff\'ing will go away in a subsequent commit.\n\nllvm-svn: 166641"}, |
| | [d]={{G,721,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {\n // ...\n // The macro bodies differ; complain.\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_conflict) << MacroName << Known->second.first << Existing.first;"}} |
| | }, |
| | ["err_pch_macro_def_undef"]={ |
| | [b]="err_pch_macro_def_undef", |
| | [j]="macro \'%0\' was %select{defined|undef\'d}1 in the precompiled header but %select{undef\'d|defined}1 on the command line", |
| | [i]={{nil,nil,{"macro \'A\' was ",{"defined","undef\'d"}," in the precompiled header but ",{"undef\'d","defined"}," on the command line"}}}, |
| | [h]=k, |
| | [c]="macro \'(.*?)\' was (?:defined|undef\'d) in the precompiled header but (?:undef\'d|defined) on the command line", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"b63687519610",1351122110,"Teach the PCH validator to check the preprocessor options, especially","Teach the PCH validator to check the preprocessor options, especially\nthe macros that are #define\'d or #undef\'d on the command line. This\nchecking happens much earlier than the current macro-definition\nchecking and is far cleaner, because it does a direct comparison\nrather than a diff of the predefines buffers. Moreover, it allows us\nto use the result of this check to skip over PCH files within a\ndirectory that have non-matching -D\'s or -U\'s on the command\nline. Finally, it improves the diagnostics a bit for mismatches,\nfixing <rdar://problem/8612222>.\n\nThe old predefines-buffer diff\'ing will go away in a subsequent commit.\n\nllvm-svn: 166641"}, |
| | [d]={{G,680,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {\n // ...\n if (Validation == OptionValidateNone || Known == ASTFileMacros.end()) {\n if (Validation == OptionValidateStrictMatches) {\n // If strict matches are requested, don\'t tolerate any extra defines on\n // the command line that are missing in the AST file.\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_undef) << MacroName << true;"},{G,706,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n for (unsigned I = 0, N = ExistingMacroNames.size(); I != N; ++I) {\n // ...\n // If the macro was defined in one but undef\'d in the other, we have a\n // conflict.\n if (Existing.second != Known->second.second) {\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_undef) << MacroName << Known->second.second;"},{G,735,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n if (Validation == OptionValidateStrictMatches) {\n // If strict matches are requested, don\'t tolerate any extra defines in\n // the AST file that are missing on the command line.\n for (const auto &MacroName : ASTFileMacros.keys()) {\n if (Diags) {\n Diags->Report(diag::err_pch_macro_def_undef) << MacroName << false;"}} |
| | }, |
| | ["err_pch_modulecache_mismatch"]={ |
| | [b]="err_pch_modulecache_mismatch", |
| | [j]="PCH was compiled with module cache path \'%0\', but the path is currently \'%1\'", |
| | [i]="PCH was compiled with module cache path \'A\', but the path is currently \'B\'", |
| | [h]=k, |
| | [c]="PCH was compiled with module cache path \'(.*?)\', but the path is currently \'(.*?)\'", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"bd0b651bd249",1424376740,"[PCH/Modules] Check that the specific module cache path the PCH was built with, is the same as","[PCH/Modules] Check that the specific module cache path the PCH was built with, is the same as\nthe one in the current compiler invocation. If they differ reject the PCH.\n\nThis protects against the badness occurring from getting modules loaded from different module caches (see crashes).\n\nrdar://19889860\n\nllvm-svn: 229909"}, |
| | [d]={{G,833,"/// Check the header search options deserialized from the control block\n/// against the header search options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\nstatic bool checkHeaderSearchOptions(const HeaderSearchOptions &HSOpts, StringRef SpecificModuleCachePath, StringRef ExistingModuleCachePath, DiagnosticsEngine *Diags, const LangOptions &LangOpts, const PreprocessorOptions &PPOpts) {\n if (LangOpts.Modules) {\n if (SpecificModuleCachePath != ExistingModuleCachePath && !PPOpts.AllowPCHWithDifferentModulesCachePath) {\n if (Diags)\n Diags->Report(diag::err_pch_modulecache_mismatch) << SpecificModuleCachePath << ExistingModuleCachePath;"}} |
| | }, |
| | ["err_pch_pp_detailed_record"]={ |
| | [b]="err_pch_pp_detailed_record", |
| | [j]="%select{command line contains|precompiled header was built with}0 \'-detailed-preprocessing-record\' but %select{precompiled header was not built with it|it is not present on the command line}0", |
| | [i]={{nil,nil,{{"command line contains","precompiled header was built with"}," \'-detailed-preprocessing-record\' but ",{"precompiled header was not built with it","it is not present on the command line"}}}}, |
| | [h]=k, |
| | [c]="(?:command line contains|precompiled header was built with) \'\\-detailed\\-preprocessing\\-record\' but (?:precompiled header was not built with it|it is not present on the command line)", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"d3afa0c7fbac",1367012020,"[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.","[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.\n\nThe preprocessing record becomes important when modules are enabled, since it is used to calculate the\nmodule cache hash.\n\nllvm-svn: 180635"}, |
| | [d]={{G,755,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n // Detailed record is important since it is used for the module cache hash.\n if (LangOpts.Modules && PPOpts.DetailedRecord != ExistingPPOpts.DetailedRecord && Validation != OptionValidateNone) {\n if (Diags) {\n Diags->Report(diag::err_pch_pp_detailed_record) << PPOpts.DetailedRecord;"}} |
| | }, |
| | ["err_pch_targetopt_feature_mismatch"]={ |
| | [b]="err_pch_targetopt_feature_mismatch", |
| | [j]={{nil,K,"%select{AST file was|current translation unit is}0 compiled with the target feature \'%1\' but the %select{current translation unit is|AST file was}0 not"},{B,nil,"%select{AST file|current translation unit}0 was compiled with the target feature\'%1\' but the %select{current translation unit is|AST file was}0 not"}}, |
| | [i]={{nil,K,{{"AST file was","current translation unit is"}," compiled with the target feature \'B\' but the ",{"current translation unit is","AST file was"}," not"}},{B,nil,{{"AST file","current translation unit"}," was compiled with the target feature\'B\' but the ",{"current translation unit is","AST file was"}," not"}}}, |
| | [h]=k, |
| | [c]="(?:AST file was|current translation unit is) compiled with the target feature \'(.*?)\' but the (?:current translation unit is|AST file was) not", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"cb177f15e788",1350430858,"Serialize TargetOptions into an AST file, and make sure that we keep","Serialize TargetOptions into an AST file, and make sure that we keep\ntarget options around so they can be accessed at any point (rather\nthan keeping them transient).\n\nllvm-svn: 166072"}, |
| | [d]={{G,366,"#define SANITIZER(NAME, ID) \\\n { \\\n bool InExistingModule = ExistingSanitizers.has(SanitizerKind::ID); \\\n bool InImportedModule = ImportedSanitizers.has(SanitizerKind::ID); \\\n if (InExistingModule != InImportedModule) \\\n Diags->Report(diag::err_pch_targetopt_feature_mismatch) << InExistingModule << (Flag + NAME); \\"},{G,436,"/// Compare the given set of target options against an existing set of\n/// target options.\n///\n/// \\param Diags If non-NULL, diagnostics will be emitted via this engine.\n///\n/// \\returns true if the target options mis-match, false otherwise.\nstatic bool checkTargetOptions(const TargetOptions &TargetOpts, const TargetOptions &ExistingTargetOpts, DiagnosticsEngine *Diags, bool AllowCompatibleDifferences = true) {\n // ...\n if (Diags) {\n for (StringRef Feature : UnmatchedReadFeatures)\n Diags->Report(diag::err_pch_targetopt_feature_mismatch) << /* is-existing-feature */ false << Feature;"},{G,439,"/// Compare the given set of target options against an existing set of\n/// target options.\n///\n/// \\param Diags If non-NULL, diagnostics will be emitted via this engine.\n///\n/// \\returns true if the target options mis-match, false otherwise.\nstatic bool checkTargetOptions(const TargetOptions &TargetOpts, const TargetOptions &ExistingTargetOpts, DiagnosticsEngine *Diags, bool AllowCompatibleDifferences = true) {\n // ...\n if (Diags) {\n // ...\n for (StringRef Feature : UnmatchedExistingFeatures)\n Diags->Report(diag::err_pch_targetopt_feature_mismatch) << /* is-existing-feature */ true << Feature;"}} |
| | }, |
| | ["err_pch_targetopt_mismatch"]={ |
| | [b]="err_pch_targetopt_mismatch", |
| | [j]="PCH file was compiled for the %0 \'%1\' but the current translation unit is being compiled for target \'%2\'", |
| | [i]="PCH file was compiled for the A \'B\' but the current translation unit is being compiled for target \'C\'", |
| | [h]=k, |
| | [c]="PCH file was compiled for the (.*?) \'(.*?)\' but the current translation unit is being compiled for target \'(.*?)\'", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"cb177f15e788",1350430858,"Serialize TargetOptions into an AST file, and make sure that we keep","Serialize TargetOptions into an AST file, and make sure that we keep\ntarget options around so they can be accessed at any point (rather\nthan keeping them transient).\n\nllvm-svn: 166072"}, |
| | [d]={{G,391,"#define CHECK_TARGET_OPT(Field, Name) \\\n if (TargetOpts.Field != ExistingTargetOpts.Field) { \\\n if (Diags) \\\n Diags->Report(diag::err_pch_targetopt_mismatch) << Name << TargetOpts.Field << ExistingTargetOpts.Field; \\"}} |
| | }, |
| | ["err_pch_undef"]={ |
| | [b]="err_pch_undef", |
| | [j]="%select{command line contains|precompiled header was built with}0 \'-undef\' but %select{precompiled header was not built with it|it is not present on the command line}0", |
| | [i]={{nil,nil,{{"command line contains","precompiled header was built with"}," \'-undef\' but ",{"precompiled header was not built with it","it is not present on the command line"}}}}, |
| | [h]=k, |
| | [c]="(?:command line contains|precompiled header was built with) \'\\-undef\' but (?:precompiled header was not built with it|it is not present on the command line)", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"b63687519610",1351122110,"Teach the PCH validator to check the preprocessor options, especially","Teach the PCH validator to check the preprocessor options, especially\nthe macros that are #define\'d or #undef\'d on the command line. This\nchecking happens much earlier than the current macro-definition\nchecking and is far cleaner, because it does a direct comparison\nrather than a diff of the predefines buffers. Moreover, it allows us\nto use the result of this check to skip over PCH files within a\ndirectory that have non-matching -D\'s or -U\'s on the command\nline. Finally, it improves the diagnostics a bit for mismatches,\nfixing <rdar://problem/8612222>.\n\nThe old predefines-buffer diff\'ing will go away in a subsequent commit.\n\nllvm-svn: 166641"}, |
| | [d]={{G,745,"/// Check the preprocessor options deserialized from the control block\n/// against the preprocessor options in an existing preprocessor.\n///\n/// \\param Diags If non-null, produce diagnostics for any mismatches incurred.\n/// \\param Validation If set to OptionValidateNone, ignore differences in\n/// preprocessor options. If set to OptionValidateContradictions,\n/// require that options passed both in the AST file and on the command\n/// line (-D or -U) match, but tolerate options missing in one or the\n/// other. If set to OptionValidateContradictions, require that there\n/// are no differences in the options between the two.\nstatic bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, const PreprocessorOptions &ExistingPPOpts, DiagnosticsEngine *Diags, FileManager &FileMgr, std::string &SuggestedPredefines, const LangOptions &LangOpts, OptionValidation Validation = OptionValidateContradictions) {\n // ...\n // Check whether we\'re using predefines.\n if (PPOpts.UsePredefines != ExistingPPOpts.UsePredefines && Validation != OptionValidateNone) {\n if (Diags) {\n Diags->Report(diag::err_pch_undef) << ExistingPPOpts.UsePredefines;"}} |
| | }, |
| | ["err_pch_version_too_new"]={ |
| | [b]="err_pch_version_too_new", |
| | [j]="PCH file uses a newer PCH format that cannot be read", |
| | [i]="PCH file uses a newer PCH format that cannot be read", |
| | [h]=k, |
| | [c]="PCH file uses a newer PCH format that cannot be read", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"2228cd3f070d",1392133209,"Rename some PCH-related errors to have \'err_\' as their prefix","Rename some PCH-related errors to have \'err_\' as their prefix\n\nllvm-svn: 201157"}, |
| | [d]={{G,2833,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n if (Record[0] != VERSION_MAJOR && !DisableValidation) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(Record[0] < VERSION_MAJOR ? diag::err_pch_version_too_old : diag::err_pch_version_too_new);"}} |
| | }, |
| | ["err_pch_version_too_old"]={ |
| | [b]="err_pch_version_too_old", |
| | [j]="PCH file uses an older PCH format that is no longer supported", |
| | [i]="PCH file uses an older PCH format that is no longer supported", |
| | [h]=k, |
| | [c]="PCH file uses an older PCH format that is no longer supported", |
| | [f]=a, |
| | [e]=V, |
| | [g]={"2228cd3f070d",1392133209,"Rename some PCH-related errors to have \'err_\' as their prefix","Rename some PCH-related errors to have \'err_\' as their prefix\n\nllvm-svn: 201157"}, |
| | [d]={{G,2832,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n if (Record[0] != VERSION_MAJOR && !DisableValidation) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(Record[0] < VERSION_MAJOR ? diag::err_pch_version_too_old : diag::err_pch_version_too_new);"},{G,4701,"ASTReader::ASTReadResult ASTReader::ReadASTCore(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, ModuleFile *ImportedBy, SmallVectorImpl<ImportedModule> &Loaded, off_t ExpectedSize, time_t ExpectedModTime, ASTFileSignature ExpectedSignature, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case AST_BLOCK_ID:\n if (!HaveReadControlBlock) {\n if ((ClientLoadCapabilities & ARR_VersionMismatch) == 0)\n Diag(diag::err_pch_version_too_old);"}} |
| }, | | }, |
| ["note_constexpr_alignment_adjust"]={ | | ["err_pch_with_compiler_errors"]={ |
| [b]={{nil,m,"note_constexpr_alignment_adjust"}}, | | [b]="err_pch_with_compiler_errors", |
| [h]={{nil,m,"cannot constant evaluate the result of adjusting alignment to %0"}}, | | [j]="PCH file contains compiler errors", |
| [i]={{nil,m,"cannot constant evaluate the result of adjusting alignment to A"}}, | | [i]="PCH file contains compiler errors", |
| [c]=g, | | [h]=k, |
| [e]="cannot constant evaluate the result of adjusting alignment to (.*?)", | | [c]="PCH file contains compiler errors", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=V, |
| [j]={"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"}, | | [g]={"4a280ff48fd6",1331085077,"[PCH] Mark a PCH file with a flag to indicate if the serialized AST had","[PCH] Mark a PCH file with a flag to indicate if the serialized AST had\ncompiler errors or not.\n\n-Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader\'s creation time.\nBy default, such a PCH file will be rejected with an error when trying to load it.\n\n[libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors\noccurred.\n-Have libclang API calls accept a PCH that had compiler errors.\n\nThe general idea is that we want libclang to stay functional even if a PCH had a compiler error.\nrdar://10976363.\n\nllvm-svn: 152192"}, |
| [k]={{o,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;"}}, | | [d]={{G,2846,"ASTReader::ASTReadResult ASTReader::ReadControlBlock(ModuleFile &F, SmallVectorImpl<ImportedModule> &Loaded, const ModuleFile *ImportedBy, unsigned ClientLoadCapabilities) {\n // ...\n while (true) {\n // ...\n case METADATA: {\n // ...\n if (hasErrors && !DisableValidation) {\n // ...\n if (!AllowASTWithCompilerErrors) {\n Diag(diag::err_pch_with_compiler_errors);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:176:54: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:178:34: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:207:36: note: cannot constant evaluate the result of adjusting alignment to 64","clang/test/SemaCXX/builtin-align-cxx.cpp:228:55: note: cannot constant evaluate the result of adjusting alignment to 64"} | | ["clang/test/Modules/load-module-with-errors.m"]={"clang/test/Modules/load-module-with-errors.m:5:2: error: PCH file contains compiler errors"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_alignment_compute"]={ | | ["err_placeholder_constraints_not_satisfied"]={ |
| [b]={{nil,m,"note_constexpr_alignment_compute"}}, | | [b]={{nil,o,"err_placeholder_constraints_not_satisfied"}}, |
| [h]={{nil,m,"cannot constant evaluate whether run-time alignment is at least %0"}}, | | [j]={{nil,o,"deduced type %0 does not satisfy %1"}}, |
| [i]={{nil,m,"cannot constant evaluate whether run-time alignment is at least A"}}, | | [i]={{nil,o,"deduced type A does not satisfy B"}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot constant evaluate whether run\\-time alignment is at least (.*?)", | | [c]="deduced type (.*?) does not satisfy (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]={{nil,o,m}}, |
| [j]={"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"}, | | [g]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk","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"}, |
| [k]={{o,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;"}}, | | [d]={{"clang/lib/Sema/SemaTemplateDeduction.cpp",4733,"static bool CheckDeducedPlaceholderConstraints(Sema &S, const AutoType &Type, AutoTypeLoc TypeLoc, QualType Deduced) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n // ...\n S.Diag(TypeLoc.getConceptNameLoc(), diag::err_placeholder_constraints_not_satisfied) << Deduced << Buf << TypeLoc.getLocalSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:215:37: note: cannot constant evaluate whether run-time alignment is at least 64"} | | ["clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp"]={"clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:23:3: error: deduced type \'char\' does not satisfy \'Large\'","clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:29:3: error: deduced type \'int\' does not satisfy \'LargerThan<10>\'","clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:22:1: error: deduced type \'char\' does not satisfy \'Large\'","clang/test/CXX/dcl/dcl.spec/dcl.type/dcl.spec.auto/p6.cpp:37:1: error: deduced type \'int\' does not satisfy \'LargerThan<4>\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_alignment_too_big"]={ | | ["err_placeholder_expected_auto_or_decltype_auto"]={ |
| [b]={{nil,m,"note_constexpr_alignment_too_big"}}, | | [b]={{nil,o,"err_placeholder_expected_auto_or_decltype_auto"}}, |
| [h]={{nil,m,"requested alignment must be %0 or less for type %1; %2 is invalid"}}, | | [j]={{nil,o,"expected \'auto\' or \'decltype(auto)\' after concept name"}}, |
| [i]={{nil,m,"requested alignment must be A or less for type B; C is invalid"}}, | | [i]={{nil,o,"expected \'auto\' or \'decltype(auto)\' after concept name"}}, |
| [c]=g, | | [h]=k, |
| [e]="requested alignment must be (.*?) or less for type (.*?); (.*?) is invalid", | | [c]="expected \'auto\' or \'decltype\\(auto\\)\' after concept name", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]={{nil,o,"Concepts Issue"}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{o,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;"}},
| | [d]={{Kb,3800,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::annot_template_id: {\n // ...\n if (TemplateId->Kind == TNK_Concept_template) {\n // ...\n // Any of the following tokens are likely the start of the user\n // forgetting \'auto\' or \'decltype(auto)\', so diagnose.\n // Note: if updating this list, please make sure we update\n // isCXXDeclarationSpecifier\'s check for IsPlaceholderSpecifier to have\n // a matching list.\n if (NextToken().isOneOf(tok::identifier, tok::kw_const, tok::kw_volatile, tok::kw_restrict, tok::amp, tok::ampamp)) {\n Diag(Loc, diag::err_placeholder_expected_auto_or_decltype_auto) << FixItHint::CreateInsertion(NextToken().getLocation(), \"auto\");"},{Kb,3824,"/// ParseDeclarationSpecifiers\n/// declaration-specifiers: [C99 6.7]\n/// storage-class-specifier declaration-specifiers[opt]\n/// type-specifier declaration-specifiers[opt]\n/// [C99] function-specifier declaration-specifiers[opt]\n/// [C11] alignment-specifier declaration-specifiers[opt]\n/// [GNU] attributes declaration-specifiers[opt]\n/// [Clang] \'__module_private__\' declaration-specifiers[opt]\n/// [ObjC1] \'__kindof\' declaration-specifiers[opt]\n///\n/// storage-class-specifier: [C99 6.7.1]\n/// \'typedef\'\n/// \'extern\'\n/// \'static\'\n/// \'auto\'\n/// \'register\'\n/// [C++] \'mutable\'\n/// [C++11] \'thread_local\'\n/// [C11] \'_Thread_local\'\n/// [GNU] \'__thread\'\n/// function-specifier: [C99 6.7.4]\n/// [C99] \'inline\'\n/// [C++] \'virtual\'\n/// [C++] \'explicit\'\n/// [OpenCL] \'__kernel\'\n/// \'friend\': [C++ dcl.friend]\n/// \'constexpr\': [C++0x dcl.constexpr]\nvoid Parser::ParseDeclarationSpecifiers(DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS, DeclSpecContext DSContext, LateParsedAttrList *LateAttrs, ImplicitTypenameContext AllowImplicitTypename) {\n // ...\n while (true) {\n // ...\n case tok::annot_template_id: {\n // ...\n if (TemplateId->Kind == TNK_Concept_template) {\n // ...\n if (TryConsumeToken(tok::kw_decltype)) {\n // ...\n if (Tracker.consumeOpen()) {\n // ...\n } else {\n if (!TryConsumeToken(tok::kw_auto)) {\n // ...\n Diag(Tok, diag::err_placeholder_expected_auto_or_decltype_auto) << FixItHint::CreateReplacement(SourceRange(AutoLoc, Tok.getLocation()), \"auto\");"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment must be 32768 or less for type \'short\'; 1048576 is invalid","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment must be 2147483648 or less for type \'int\'; 8589934592 is invalid","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment must be 128 or less for type \'char\'; 4194304 is invalid"} | | ["clang/test/Parser/cxx2a-placeholder-type-constraint.cpp"]={"clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:30:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:32:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:34:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:36:4: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:40:18: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:45:11: error: expected \'auto\' or \'decltype(auto)\' after concept name","clang/test/Parser/cxx2a-placeholder-type-constraint.cpp:48:17: error: expected \'auto\' or \'decltype(auto)\' after concept name"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_array_index"]={ | | ["err_placeholder_in_source"]={ |
| [b]="note_constexpr_array_index", | | [b]={{nil,n,"err_placeholder_in_source"}}, |
| [h]="cannot refer to element %0 of %select{array of %2 elements|non-array object}1 in a constant expression",
| | [j]={{nil,n,"editor placeholder in source file"}}, |
| [i]={{nil,y,{"cannot refer to element A of ",{{"array of C element",{a,"s"}},"non-array object"}," in a constant expression"}},{nil,nil,{"cannot refer to element A of ",{"array of C elements","non-array object"}," in a constant expression"}}}, | | [i]={{nil,n,"editor placeholder in source file"}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot refer to element (.*?) of (?:array of (.*?) element(?:|s)|non\\-array object) in a constant expression", | | [c]="editor placeholder in source file", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,n,p}}, |
| [j]={"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"}, | | [g]={"1be800c511c8",1492592336,"Add support for editor placeholders to Clang","Add support for editor placeholders to Clang\n\nThis commit teaches Clang to recognize editor placeholders that are produced\nwhen an IDE like Xcode inserts a code-completion result that includes a\nplaceholder. Now when the lexer sees a placeholder token, it emits an\n\'editor placeholder in source file\' error and creates an identifier token\nthat represents the placeholder. The parser/sema can now recognize the\nplaceholders and can suppress the diagnostics related to the placeholders. This\nensures that live issues in an IDE like Xcode won\'t get spurious diagnostics\nrelated to placeholders.\n\nThis commit also adds a new compiler option named \'-fallow-editor-placeholders\'\nthat silences the \'editor placeholder in source file\' error. This is useful\nfor an IDE like Xcode as we don\'t want to display those errors in live issues.\n\nrdar://31581400\n\nDifferential Revision: https://reviews.llvm.org/D32081\n\nllvm-svn: 300667"}, |
| [k]={{o,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());"},{o,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;"}},
| | [d]={{"clang/lib/Lex/Lexer.cpp",3241,"bool Lexer::lexEditorPlaceholder(Token &Result, const char *CurPtr) {\n // ...\n if (!LangOpts.AllowEditorPlaceholders)\n Diag(Start, diag::err_placeholder_in_source);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constexpr-printing.cpp"]={"clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 12 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 12 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 13 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 14 elements in a constant expression","clang/test/SemaCXX/constexpr-printing.cpp:73:46: note: cannot refer to element -1 of array of 14 elements in a constant expression"} | | ["clang/test/Frontend/pp-only-no-editor-placeholders.c"]={"clang/test/Frontend/pp-only-no-editor-placeholders.c:4:1: error: editor placeholder in source file"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_baa_insufficient_alignment"]={ | | ["err_placement_new_non_placement_delete"]={ |
| [b]="note_constexpr_baa_insufficient_alignment", | | [b]="err_placement_new_non_placement_delete", |
| [h]="%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", | | [j]="\'new\' expression with placement arguments refers to non-placement \'operator delete\'", |
| [i]={{nil,nil,{{"alignment of","offset of the aligned pointer from"}," the base pointee object (B ",{"byte","bytes"},") is ",{"less than","not a multiple of"}," the asserted C ",{"byte","bytes"}}}}, | | [i]="\'new\' expression with placement arguments refers to non-placement \'operator delete\'", |
| [c]=g, | | [h]=k, |
| [e]="(?:alignment of|offset of the aligned pointer from) the base pointee object \\((.*?) (?:byte|bytes)\\) is (?:less than|not a multiple of) the asserted (.*?) (?:byte|bytes)", | | [c]="\'new\' expression with placement arguments refers to non\\-placement \'operator delete\'", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"6642ca217e73",1267160778,"Implement semantic analysis for C++ [expr.new]p18-20, which describe","Implement semantic analysis for C++ [expr.new]p18-20, which describe\nhow we find the operator delete that matches withe operator new we\nfound in a C++ new-expression.\n\nThis will also need CodeGen support. On a happy note, we\'re now a\n\"nans\" away from building tramp3d-v4.\n\nllvm-svn: 97209"}, |
| [k]={{o,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();"},{o,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();"}}, | | [d]={{Q,2926,"bool Sema::FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose) {\n // ...\n // C++ [expr.new]p20:\n // [...] If the lookup finds a single matching deallocation\n // function, that function will be called; otherwise, no\n // deallocation function will be called.\n if (Matches.size() == 1) {\n // ...\n // C++1z [expr.new]p23:\n // If the lookup finds a usual deallocation function (3.7.4.2)\n // with a parameter of type std::size_t and that function, considered\n // as a placement deallocation function, would have been\n // selected as a match for the allocation function, the program\n // is ill-formed.\n if (getLangOpts().CPlusPlus11 && isPlacementNew && isNonPlacementDeallocationFunction(*this, OperatorDelete)) {\n // ...\n if (IsSizedDelete) {\n // ...\n Diag(StartLoc, diag::err_placement_new_non_placement_delete) << R;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-assume-aligned.cpp"]={"clang/test/SemaCXX/builtin-assume-aligned.cpp:16:46: note: alignment of the base pointee object (4 bytes) is less than the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:20:47: note: offset of the aligned pointer from the base pointee object (-2 bytes) is not a multiple of the asserted 4 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:23:47: note: offset of the aligned pointer from the base pointee object (2 bytes) is not a multiple of the asserted 4 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:30:47: note: alignment of the base pointee object (1 byte) is less than the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:35:47: note: offset of the aligned pointer from the base pointee object (2 bytes) is not a multiple of the asserted 16 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:39:47: note: offset of the aligned pointer from the base pointee object (1 byte) is not a multiple of the asserted 16 bytes"} | | ["clang/test/SemaCXX/cxx1y-sized-deallocation.cpp"]={"clang/test/SemaCXX/cxx1y-sized-deallocation.cpp:18:3: error: \'new\' expression with placement arguments refers to non-placement \'operator delete\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_baa_value_insufficient_alignment"]={ | | ["err_pointer_to_member_call_drops_quals"]={ |
| [b]="note_constexpr_baa_value_insufficient_alignment", | | [b]="err_pointer_to_member_call_drops_quals", |
| [h]="value of the aligned pointer (%0) is not a multiple of the asserted %1 %plural{1:byte|:bytes}1", | | [j]="call to pointer to member function of type %0 drops \'%1\' qualifier%s2", |
| [i]={{nil,nil,{"value of the aligned pointer (A) is not a multiple of the asserted B ",{"byte","bytes"}}}}, | | [i]="call to pointer to member function of type A drops \'B\' qualifierC", |
| [c]=g, | | [h]=k, |
| [e]="value of the aligned pointer \\((.*?)\\) is not a multiple of the asserted (.*?) (?:byte|bytes)", | | [c]="call to pointer to member function of type (.*?) drops \'(.*?)\' qualifier(.*?)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"125fa40c34a4",1296824269,"When calling a bound pointer to member function, check the","When calling a bound pointer to member function, check the\ncv-qualifiers on the object against the cv-qualifiers on the member\nfunction. Fixes PR8315.\n\nllvm-svn: 124865"}, |
| [k]={{o,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();"}},
| | [d]={{E,14691,"/// BuildCallToMemberFunction - Build a call to a member\n/// function. MemExpr is the expression that refers to the member\n/// function (and includes the object parameter), Args/NumArgs are the\n/// arguments to the function call (not including the object\n/// parameter). The caller needs to validate that the member\n/// expression refers to a non-static member function or an overloaded\n/// member function.\nExprResult Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n // Determine whether this is a call to a pointer-to-member function.\n if (BinaryOperator *op = dyn_cast<BinaryOperator>(NakedMemExpr)) {\n // ...\n if (difference) {\n // ...\n Diag(LParenLoc, diag::err_pointer_to_member_call_drops_quals) << fnType.getUnqualifiedType() << qualsString << (qualsString.find(\' \') == std::string::npos ? 1 : 2);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-assume-aligned.cpp"]={"clang/test/SemaCXX/builtin-assume-aligned.cpp:44:47: note: value of the aligned pointer (255) is not a multiple of the asserted 32 bytes","clang/test/SemaCXX/builtin-assume-aligned.cpp:47:47: note: value of the aligned pointer (250) is not a multiple of the asserted 32 bytes"} | | ["clang/test/CXX/expr/expr.mptr.oper/p5.cpp"]={"clang/test/CXX/expr/expr.mptr.oper/p5.cpp:27:12: error: call to pointer to member function of type \'void ()\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:29:13: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:32:12: error: call to pointer to member function of type \'void ()\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:33:13: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:37:13: error: call to pointer to member function of type \'void ()\' drops \'const volatile\' qualifiers","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:38:14: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:39:14: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:47:11: error: call to pointer to member function of type \'void ()\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:49:12: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:52:11: error: call to pointer to member function of type \'void ()\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:53:12: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:57:12: error: call to pointer to member function of type \'void ()\' drops \'const volatile\' qualifiers","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:58:13: error: call to pointer to member function of type \'void () const\' drops \'volatile\' qualifier","clang/test/CXX/expr/expr.mptr.oper/p5.cpp:59:13: error: call to pointer to member function of type \'void () volatile\' drops \'const\' qualifier"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_bit_cast_indet_dest"]={ | | ["err_pointer_to_member_oper_value_classify"]={ |
| [b]={{nil,p,"note_constexpr_bit_cast_indet_dest"}}, | | [b]="err_pointer_to_member_oper_value_classify", |
| [h]={{nil,p,"indeterminate value can only initialize an object of type \'unsigned char\'%select{, \'char\',|}1 or \'std::byte\'; %0 is invalid"}}, | | [j]="pointer-to-member function type %0 can only be called on an %select{rvalue|lvalue}1", |
| [i]={{nil,p,{"indeterminate value can only initialize an object of type \'unsigned char\'",{", \'char\',",a}," or \'std::byte\'; A is invalid"}}}, | | [i]={{nil,nil,{"pointer-to-member function type A can only be called on an ",{cc,bc}}}}, |
| [c]=g, | | [h]=k, |
| [e]="indeterminate value can only initialize an object of type \'unsigned char\'(?:, \'char\',|) or \'std\\:\\:byte\'; (.*?) is invalid", | | [c]="pointer\\-to\\-member function type (.*?) can only be called on an (?:rvalue|lvalue)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=m, |
| [j]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast","[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"}, | | [g]={"1d042091d39c",1296060018,"Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,","Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,\nthe restrictions on .* and ->* for ref-qualified pointer-to-member\nfunctions.\n\nllvm-svn: 124294"}, |
| [k]={{o,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;"}},
| | [d]={{Q,6094,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n // C++0x [expr.mptr.oper]p6:\n // In a .* expression whose object expression is an rvalue, the program is\n // ill-formed if the second operand is a pointer to member function with\n // ref-qualifier &. In a ->* expression or in a .* expression whose object\n // expression is an lvalue, the program is ill-formed if the second operand\n // is a pointer to member function with ref-qualifier &&.\n if (const FunctionProtoType *Proto = Result->getAs<FunctionProtoType>()) {\n // ...\n case RQ_LValue:\n if (!isIndirect && !LHS.get()->Classify(Context).isLValue()) {\n // C++2a allows functions with ref-qualifier & if their cv-qualifier-seq\n // is (exactly) \'const\'.\n if (Proto->isConst() && !Proto->isVolatile())\n // ...\n else\n Diag(Loc, diag::err_pointer_to_member_oper_value_classify) << RHSType << 1 << LHS.get()->getSourceRange();"},{Q,6101,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n // C++0x [expr.mptr.oper]p6:\n // In a .* expression whose object expression is an rvalue, the program is\n // ill-formed if the second operand is a pointer to member function with\n // ref-qualifier &. In a ->* expression or in a .* expression whose object\n // expression is an lvalue, the program is ill-formed if the second operand\n // is a pointer to member function with ref-qualifier &&.\n if (const FunctionProtoType *Proto = Result->getAs<FunctionProtoType>()) {\n // ...\n case RQ_RValue:\n if (isIndirect || !LHS.get()->Classify(Context).isRValue())\n Diag(Loc, diag::err_pointer_to_member_oper_value_classify) << RHSType << 0 << LHS.get()->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'signed char\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'signed char\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:238:45: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'unsigned long\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:373:30: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'my_byte\' is invalid","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:378:28: note: indeterminate value can only initialize an object of type \'unsigned char\' or \'std::byte\'; \'char\' is invalid"} | | ["clang/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp"]={"clang/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp:14:7: error: pointer-to-member function type \'void (X::*)() &\' can only be called on an lvalue","clang/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp:16:7: error: pointer-to-member function type \'void (X::*)() const volatile &\' can only be called on an lvalue"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_bit_cast_invalid_subtype"]={ | | ["err_pointer_to_member_type"]={ |
| [b]={{nil,p,"note_constexpr_bit_cast_invalid_subtype"}}, | | [b]="err_pointer_to_member_type", |
| [h]={{nil,p,"invalid type %0 is a %select{member|base}1 of %2"}}, | | [j]="invalid use of pointer to member type after %select{.*|->*}0", |
| [i]={{nil,p,{"invalid type A is a ",{"member","base"}," of C"}}}, | | [i]={{nil,nil,{"invalid use of pointer to member type after ",{".*","->*"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="invalid type (.*?) is a (?:member|base) of (.*?)", | | [c]="invalid use of pointer to member type after (?:\\.\\*|\\-\\>\\*)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=m, |
| [j]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast","[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"}, | | [g]={"9a14b84ac559",1256331699,"Diagnose misuse of \'.*\' and \'->*\' operators during parse","Diagnose misuse of \'.*\' and \'->*\' operators during parse\ninstead of crashing in code gen.\n\nllvm-svn: 84968"}, |
| [k]={{o,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;"}}, | | [d]={{Q,6061,"QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation Loc, bool isIndirect) {\n // ...\n if (isa<CXXScalarValueInitExpr>(RHS.get()->IgnoreParens())) {\n // ...\n Diag(Loc, diag::err_pointer_to_member_type) << isIndirect;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:189:5: note: invalid type \'int *\' is a member of \'has_pointer\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:189:5: note: invalid type \'int *\' is a member of \'has_pointer\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:203:5: note: invalid type \'int *\' is a member of \'A\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:208:5: note: invalid type \'A[10]\' is a member of \'B\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:212:14: note: invalid type \'B\' is a base of \'C\'","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:326:3: note: invalid type \'int vol_mem::*\' is a member of \'mem_ptr\'"} | | ["clang/test/SemaCXX/cxx-member-pointer-op.cpp"]={"clang/test/SemaCXX/cxx-member-pointer-op.cpp:11:4: error: invalid use of pointer to member type after ->*","clang/test/SemaCXX/cxx-member-pointer-op.cpp:13:5: error: invalid use of pointer to member type after .*","clang/test/SemaCXX/cxx-member-pointer-op.cpp:14:4: error: invalid use of pointer to member type after ->*","clang/test/SemaCXX/cxx-member-pointer-op.cpp:15:5: error: invalid use of pointer to member type after .*"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_bit_cast_invalid_type"]={ | | ["err_postfix_after_unary_requires_parens"]={ |
| [b]={{nil,p,"note_constexpr_bit_cast_invalid_type"}}, | | [b]={{nil,t,"err_postfix_after_unary_requires_parens"}}, |
| [h]={{nil,p,"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"}}, | | [j]={{nil,t,"expression cannot be followed by a postfix %0 operator; add parentheses"}}, |
| [i]={{nil,p,{"bit_cast ",{"from","to"}," a ",{a,"type with a "},{"union",Md,"member pointer",Dd,Hb},rb,{"type","member"},Db}}}, | | [i]={{nil,t,"expression cannot be followed by a postfix A operator; add parentheses"}}, |
| [c]=g, | | [h]=k, |
| [e]="bit_cast (?:from|to) a (?:|type with a )(?:union|pointer|member pointer|volatile|reference) (?:type|member) is not allowed in a constant expression", | | [c]="expression cannot be followed by a postfix (.*?) operator; add parentheses", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]={{nil,t,y}}, |
| [j]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast","[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"}, | | [g]={"4d1b7e9820ee",1593465134,"Fix a few cases that were incorrectly parsed as unary-expressions","Fix a few cases that were incorrectly parsed as unary-expressions\ninstead of postfix-expressions, and improve error recovery for postfix\noperators after unary-expressions.\n\nThis covers nullptr, __null, and some calls to type traits with special\nparsing rules. We would previously not parse a postfix-expression suffix\nfor these expressions, so would reject expressions such as\n__is_trivial(int)[\"foo\"].\n\nFor the case where a postfix-expression suffix is *not* permitted after\na unary-expression (for example, after a new-expression or sizeof\nexpression), produce a diagnostic if one appears there anyway. That\'s\nalways ill-formed, but previously produced very bad diagnostics."}, |
| [k]={{o,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;"}}, | | [d]={{"clang/lib/Parse/ParseExpr.cpp",1844,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n if (!AllowSuffix) {\n // ...\n Diag(Tok.getLocation(), diag::err_postfix_after_unary_requires_parens) << Tok.getKind() << Res.get()->getSourceRange() << FixItHint::CreateInsertion(Res.get()->getBeginLoc(), \"(\") << FixItHint::CreateInsertion(PP.getLocForEndOfToken(PrevTokLocation), \")\");"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:182:19: note: bit_cast from a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:185:19: note: bit_cast to a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:194:33: note: bit_cast from a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:197:33: note: bit_cast to a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:221:19: note: bit_cast from a pointer type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:306:39: note: bit_cast from a type with a reference member is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:315:23: note: bit_cast from a union type is not allowed in a constant expression","clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:330:29: note: bit_cast from a member pointer type is not allowed in a constant expression"} | | ["clang/test/Parser/expressions.cpp"]={"clang/test/Parser/expressions.cpp:9:17: error: expression cannot be followed by a postfix \'->\' operator; add parentheses","clang/test/Parser/expressions.cpp:12:31: error: expression cannot be followed by a postfix \'(\' operator; add parentheses","clang/test/Parser/expressions.cpp:14:23: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:15:24: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:16:23: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:17:32: error: expression cannot be followed by a postfix \'[\' operator; add parentheses","clang/test/Parser/expressions.cpp:21:19: error: expression cannot be followed by a postfix \'->\' operator; add parentheses"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_bit_cast_unrepresentable_value"]={ | | ["err_pp_arc_cf_code_audited_syntax"]={ |
| [b]={{nil,s,"note_constexpr_bit_cast_unrepresentable_value"}}, | | [b]="err_pp_arc_cf_code_audited_syntax", |
| [h]={{nil,s,"value %1 cannot be represented in type %0"}}, | | [j]=Cb, |
| [i]={{nil,s,"value B cannot be represented in type A"}}, | | [i]=Cb, |
| [c]=g, | | [h]=k, |
| [e]="value (.*?) cannot be represented in type (.*?)", | | [c]=Cb, |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={Yb,1317359532,Xb,Wb}, |
| [k]={{o,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);"}}, | | [d]={{H,1881,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (BeginEnd && BeginEnd->isStr(\"begin\")) {\n // ...\n } else if (BeginEnd && BeginEnd->isStr(\"end\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pp_arc_cf_code_audited_syntax);"}} |
| | }, |
| | ["err_pp_assume_nonnull_syntax"]={ |
| | [b]="err_pp_assume_nonnull_syntax", |
| | [j]=Cb, |
| | [i]=Cb, |
| | [h]=k, |
| | [c]=Cb, |
| | [f]=a, |
| | [e]=lc, |
| | [g]={qc,1434738357,sc,uc}, |
| | [d]={{H,1936,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (BeginEnd && BeginEnd->isStr(\"begin\")) {\n // ...\n } else if (BeginEnd && BeginEnd->isStr(\"end\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pp_assume_nonnull_syntax);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp"]={"clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:35:10: note: value 65 cannot be represented in type \'bool\'"} | | [tc]={"clang/test/Sema/pragma-arc-cf-code-audited.c:3:35: error: expected \'begin\' or \'end\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_bit_cast_unsupported_bitfield"]={ | | ["err_pp_bad_paste"]={ |
| [b]={{nil,p,"note_constexpr_bit_cast_unsupported_bitfield"}}, | | [b]="err_pp_bad_paste", |
| [h]={{nil,p,"constexpr bit_cast involving bit-field is not yet supported"}}, | | [j]="pasting formed \'%0\', an invalid preprocessing token", |
| [i]={{nil,p,"constexpr bit_cast involving bit-field is not yet supported"}}, | | [i]="pasting formed \'A\', an invalid preprocessing token", |
| [c]=g, | | [h]=k, |
| [e]="constexpr bit_cast involving bit\\-field is not yet supported", | | [c]="pasting formed \'(.*?)\', an invalid preprocessing token", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=p, |
| [j]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast","[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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"},{o,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);"}},
| | [d]={{"clang/lib/Lex/TokenLexer.cpp",870,"/// LHSTok is the LHS of a ## operator, and CurTokenIdx is the ##\n/// operator. Read the ## and RHS, and paste the LHS/RHS together. If there\n/// are more ## after it, chomp them iteratively. Return the result as LHSTok.\n/// If this returns true, the caller should immediately return the token.\nbool TokenLexer::pasteTokens(Token &LHSTok, ArrayRef<Token> TokenStream, unsigned int &CurIdx) {\n // ...\n do {\n // ...\n if (LHSTok.isAnyIdentifier() && RHS.isAnyIdentifier()) {\n // ...\n } else {\n // ...\n // If pasting the two tokens didn\'t form a full new token, this is an\n // error. This occurs with \"x ## +\" and other stuff. Return with LHSTok\n // unmodified and with RHS as the next token to lex.\n if (isInvalid) {\n // ...\n // Do not emit the error when preprocessing assembler code.\n if (!PP.getLangOpts().AsmPreprocessor) {\n // ...\n PP.Diag(Loc, PP.getLangOpts().MicrosoftExt ? diag::ext_pp_bad_paste_ms : diag::err_pp_bad_paste) << Buffer;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:226:15: note: constexpr bit_cast involving bit-field is not yet supported"} | | ["clang/test/CXX/lex/lex.pptoken/p3-0x.cpp"]={"clang/test/CXX/lex/lex.pptoken/p3-0x.cpp:11:9: error: pasting formed \':::\', an invalid preprocessing token"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_bit_cast_unsupported_type"]={ | | ["err_pp_colon_without_question"]={ |
| [b]={{nil,p,"note_constexpr_bit_cast_unsupported_type"}}, | | [b]="err_pp_colon_without_question", |
| [h]={{nil,p,"constexpr bit_cast involving type %0 is not yet supported"}}, | | [j]="\':\' without preceding \'?\'", |
| [i]={{nil,p,"constexpr bit_cast involving type A is not yet supported"}}, | | [i]="\':\' without preceding \'?\'", |
| [c]=g, | | [h]=k, |
| [e]="constexpr bit_cast involving type (.*?) is not yet supported", | | [c]="\'\\:\' without preceding \'\\?\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=p, |
| [j]={"eee944e7f9e6",1562092093,"[C++2a] Add __builtin_bit_cast, used to implement std::bit_cast","[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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"},{o,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;"}}
| | [d]={{Y,851,"/// 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::colon:\n // ...\n PP.Diag(OpLoc, diag::err_pp_colon_without_question) << LHS.getRange() << RHS.getRange();"}} |
| }, | | }, |
| ["note_constexpr_body_previous_return"]={ | | ["err_pp_directive_required"]={ |
| [b]="note_constexpr_body_previous_return", | | [b]="err_pp_directive_required", |
| [h]="previous return statement is here", | | [j]="%0 must be used within a preprocessing directive", |
| [i]="previous return statement is here", | | [i]="A must be used within a preprocessing directive", |
| [c]=g, | | [h]=k, |
| [e]="previous return statement is here", | | [c]="(.*?) must be used within a preprocessing directive", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=p, |
| [j]={hc,1317436288,dc,ic}, | | [g]={"6ce0000dd528",1358364741,"No longer crashing with an assert when __has_include or __has_include_next is used outside of a prep...","No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837.\n\nllvm-svn: 172639"}, |
| [k]={{r,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);"}}, | | [d]={{ab,1192,"/// 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 // These expressions are only allowed within a preprocessor directive.\n if (!PP.isParsingIfOrElifDirective()) {\n PP.Diag(LParenLoc, diag::err_pp_directive_required) << II;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:128:3: note: previous return statement is here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:217:3: note: previous return statement is here"} | | ["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:96:3: error: \'__has_include_next\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:97:3: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:100:1: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:103:1: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:108:1: error: \'__has_include\' must be used within a preprocessing directive","clang/test/Preprocessor/has_include.c:152:1: error: \'__has_include\' must be used within a preprocessing directive"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_call_here"]={ | | ["err_pp_division_by_zero"]={ |
| [b]="note_constexpr_call_here", | | [b]="err_pp_division_by_zero", |
| [h]="in call to \'%0\'", | | [j]="division by zero in preprocessor expression", |
| [i]="in call to \'A\'", | | [i]="division by zero in preprocessor expression", |
| [c]=g, | | [h]=k, |
| [e]="in call to \'(.*?)\'", | | [c]="division by zero in preprocessor expression", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{"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();"}},
| | [d]={{Y,721,"/// 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::slash:\n if (RHS.Val != 0) {\n // ...\n } else if (ValueLive) {\n PP.Diag(OpLoc, diag::err_pp_division_by_zero) << LHS.getRange() << RHS.getRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/crash-lambda-weak-attr.cpp"]={"clang/test/SemaCXX/crash-lambda-weak-attr.cpp:6:15: note: in call to \'[]() {"} | | ["clang/test/Preprocessor/ucn-pp-identifier.c"]={"clang/test/Preprocessor/ucn-pp-identifier.c:52:5: error: division by zero in preprocessor expression"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_call_limit_exceeded"]={ | | ["err_pp_double_begin_of_arc_cf_code_audited"]={ |
| [b]="note_constexpr_call_limit_exceeded", | | [b]="err_pp_double_begin_of_arc_cf_code_audited", |
| [h]="constexpr evaluation hit maximum call limit",
| | [j]="already inside \'#pragma clang arc_cf_code_audited\'", |
| [i]="constexpr evaluation hit maximum call limit",
| | [i]="already inside \'#pragma clang arc_cf_code_audited\'", |
| [c]=g,
| | [h]=k, |
| [e]="constexpr evaluation hit maximum call limit",
| | [c]="already inside \'\\#pragma clang arc_cf_code_audited\'", |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"}, | |
| [k]={{o,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"]={
| |
| [b]="note_constexpr_calls_suppressed",
| |
| [h]="(skipping %0 call%s0 in backtrace; use -fconstexpr-backtrace-limit=0 to see all)", | |
| [i]="(skipping A callA in backtrace; use -fconstexpr-backtrace-limit=0 to see all)",
| |
| [c]=g, | |
| [e]="\\(skipping (.*?) call(.*?) in backtrace; use \\-fconstexpr\\-backtrace\\-limit\\=0 to see all\\)",
| |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={Yb,1317359532,Xb,Wb}, |
| [k]={{"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);"}}, | | [d]={{H,1899,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // Complain about attempts to re-enter an audit.\n if (BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_double_begin_of_arc_cf_code_audited);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/AST/Interp/depth-limit.cpp"]={"clang/test/AST/Interp/depth-limit.cpp:9:10: note: (skipping 90 calls in backtrace; use -fconstexpr-backtrace-limit=0 to see all)"} | | [tc]={"clang/test/Sema/pragma-arc-cf-code-audited.c:11:15: error: already inside \'#pragma clang arc_cf_code_audited\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_compare_virtual_mem_ptr"]={ | | ["err_pp_double_begin_of_assume_nonnull"]={ |
| [b]="note_constexpr_compare_virtual_mem_ptr", | | [b]="err_pp_double_begin_of_assume_nonnull", |
| [h]="comparison of pointer to virtual member function %0 has unspecified value", | | [j]="already inside \'#pragma clang assume_nonnull\'", |
| [i]="comparison of pointer to virtual member function A has unspecified value", | | [i]="already inside \'#pragma clang assume_nonnull\'", |
| [c]=g, | | [h]=k, |
| [e]="comparison of pointer to virtual member function (.*?) has unspecified value", | | [c]="already inside \'\\#pragma clang assume_nonnull\'", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=lc, |
| [j]={"7bb0067c06ef",1328060564,"constexpr: add support for comparisons of pointer-to-members.","constexpr: add support for comparisons of pointer-to-members.\n\nllvm-svn: 149463"}, | | [g]={qc,1434738357,sc,uc}, |
| [k]={{o,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;"},{o,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;"}}, | | [d]={{H,1955,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // Complain about attempts to re-enter an audit.\n if (BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_double_begin_of_assume_nonnull);"}}, |
| [l]={ | | [l]={ |
| [cd]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:1113:20: note: comparison of pointer to virtual member function \'g\' has unspecified value","clang/test/SemaCXX/constant-expression-cxx11.cpp:1114:20: note: comparison of pointer to virtual member function \'g\' has unspecified value"} | | ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-2.h:8:15: error: already inside \'#pragma clang assume_nonnull\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_conditional_never_const"]={ | | ["err_pp_double_begin_pragma_unsafe_buffer_usage"]={ |
| [b]="note_constexpr_conditional_never_const", | | [b]="err_pp_double_begin_pragma_unsafe_buffer_usage", |
| [h]="both arms of conditional operator are unable to produce a constant expression", | | [j]="already inside \'#pragma unsafe_buffer_usage\'", |
| [i]="both arms of conditional operator are unable to produce a constant expression", | | [i]="already inside \'#pragma unsafe_buffer_usage\'", |
| [c]=g, | | [h]=k, |
| [e]="both arms of conditional operator are unable to produce a constant expression", | | [c]="already inside \'\\#pragma unsafe_buffer_usage\'", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{o,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);"}}, | | [d]={{H,1266,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n if (PP.enterOrExitSafeBufferOptOutRegion(true, Loc))\n PP.Diag(Loc, diag::err_pp_double_begin_pragma_unsafe_buffer_usage);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp:80:52: note: both arms of conditional operator are unable to produce a constant expression"} | | ["clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp:7:35: error: already inside \'#pragma unsafe_buffer_usage\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_construct_complex_elem"]={ | | ["err_pp_duplicate_name_in_arg_list"]={ |
| [b]={{nil,m,"note_constexpr_construct_complex_elem"}}, | | [b]="err_pp_duplicate_name_in_arg_list", |
| [h]={{nil,m,"construction of individual component of complex number is not yet supported in constant expressions"}}, | | [j]="duplicate macro parameter name %0", |
| [i]={{nil,m,"construction of individual component of complex number is not yet supported in constant expressions"}}, | | [i]="duplicate macro parameter name A", |
| [c]=g, | | [h]=k, |
| [e]="construction of individual component of complex number is not yet supported in constant expressions", | | [c]="duplicate macro parameter name (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"},{o,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);"}}
| | [d]={{z,2714,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n // If this is already used as a parameter, it is used multiple times (e.g.\n // #define X(A,A.\n if (llvm::is_contained(Parameters, II)) { // C99 6.10.3p6\n Diag(Tok, diag::err_pp_duplicate_name_in_arg_list) << II;"}} |
| }, | | }, |
| ["note_constexpr_ctor_missing_init"]={ | | ["err_pp_empty_filename"]={ |
| [b]="note_constexpr_ctor_missing_init", | | [b]="err_pp_empty_filename", |
| [h]="member not initialized by constructor", | | [j]="empty filename", |
| [i]="member not initialized by constructor", | | [i]="empty filename", |
| [c]=g, | | [h]=k, |
| [e]="member not initialized by constructor", | | [c]="empty filename", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=p, |
| [j]={hc,1317436288,dc,ic}, | | [g]={s,1236199783,q,r}, |
| [k]={{r,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);"}}, | | [d]={{z,1798,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n // Diagnose #include \"\" as invalid.\n if (Buffer.size() <= 2) {\n Diag(Loc, diag::err_pp_empty_filename);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:139:7: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:152:12: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:163:14: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:165:5: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:162:11: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:165:5: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:148:3: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:147:7: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:148:3: note: member not initialized by constructor","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp:159:3: note: member not initialized by constructor"} | | ["clang/test/Preprocessor/include-directive2.c"]={"clang/test/Preprocessor/include-directive2.c:17:10: error: empty filename"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_deallocate_null"]={ | | ["err_pp_endif_without_if"]={ |
| [b]={{nil,x,"note_constexpr_deallocate_null"}}, | | [b]="err_pp_endif_without_if", |
| [h]={{nil,x,"\'std::allocator<...>::deallocate\' used to delete a null pointer"}}, | | [j]="#endif without #if", |
| [i]={{nil,x,"\'std::allocator<...>::deallocate\' used to delete a null pointer"}}, | | [i]="#endif without #if", |
| [c]=g, | | [h]=k, |
| [e]="\'std\\:\\:allocator\\<\\.\\.\\.\\>\\:\\:deallocate\' used to delete a null pointer", | | [c]="\\#endif without \\#if", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,a}}, | | [e]=p, |
| [j]={"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."}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"}}, | | [d]={{z,3383,"/// HandleEndifDirective - Implements the \\#endif directive.\n///\nvoid Preprocessor::HandleEndifDirective(Token &EndifToken) {\n // ...\n if (CurPPLexer->popConditionalLevel(CondInfo)) {\n // ...\n Diag(EndifToken, diag::err_pp_endif_without_if);"}}, |
| [l]={ | | [l]={ |
| [uc]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: \'std::allocator<...>::deallocate\' used to delete a null pointer"} | | ["clang/test/Parser/diag-crash.c"]={"clang/test/Parser/diag-crash.c:6:2: error: #endif without #if"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_delete_base_nonvirt_dtor"]={ | | ["err_pp_eof_in_arc_cf_code_audited"]={ |
| [b]={{nil,m,"note_constexpr_delete_base_nonvirt_dtor"}}, | | [b]="err_pp_eof_in_arc_cf_code_audited", |
| [h]={{nil,m,"delete of object with dynamic type %1 through pointer to base class type %0 with non-virtual destructor"}}, | | [j]="\'#pragma clang arc_cf_code_audited\' was not ended within this file", |
| [i]={{nil,m,"delete of object with dynamic type B through pointer to base class type A with non-virtual destructor"}}, | | [i]="\'#pragma clang arc_cf_code_audited\' was not ended within this file", |
| [c]=g, | | [h]=k, |
| [e]="delete of object with dynamic type (.*?) through pointer to base class type (.*?) with non\\-virtual destructor", | | [c]="\'\\#pragma clang arc_cf_code_audited\' was not ended within this file", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={Yb,1317359532,Xb,Wb}, |
| [k]={{o,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;"}}, | | [d]={{Hb,418,"/// 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 // Complain about reaching a true EOF within arc_cf_code_audited.\n // We don\'t want to complain about reaching the end of a macro\n // instantiation or a _Pragma.\n if (PragmaARCCFCodeAuditedInfo.second.isValid() && !isEndOfMacro && !(CurLexer && CurLexer->Is_PragmaLexer)) {\n Diag(PragmaARCCFCodeAuditedInfo.second, diag::err_pp_eof_in_arc_cf_code_audited);"}}, |
| [l]={ | | [l]={ |
| [ub]={"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"} | | [tc]={"clang/test/Sema/Inputs/pragma-arc-cf-code-audited.h:16:15: error: \'#pragma clang arc_cf_code_audited\' was not ended within this file","clang/test/Sema/pragma-arc-cf-code-audited.c:18:15: error: \'#pragma clang arc_cf_code_audited\' was not ended within this file"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_delete_not_heap_alloc"]={ | | ["err_pp_eof_in_assume_nonnull"]={ |
| [b]={{nil,m,"note_constexpr_delete_not_heap_alloc"}}, | | [b]="err_pp_eof_in_assume_nonnull", |
| [h]={{nil,m,"delete of pointer \'%0\' that does not point to a heap-allocated object"}}, | | [j]="\'#pragma clang assume_nonnull\' was not ended within this file", |
| [i]={{nil,m,"delete of pointer \'A\' that does not point to a heap-allocated object"}}, | | [i]="\'#pragma clang assume_nonnull\' was not ended within this file", |
| [c]=g, | | [h]=k, |
| [e]="delete of pointer \'(.*?)\' that does not point to a heap\\-allocated object", | | [c]="\'\\#pragma clang assume_nonnull\' was not ended within this file", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=lc, |
| [j]={ob,1569547607,jb,lb}, | | [g]={qc,1434738357,sc,uc}, |
| [k]={{o,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();"}}, | | [d]={{Hb,435,"/// 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 // Complain about reaching a true EOF within assume_nonnull.\n // We don\'t want to complain about reaching the end of a macro\n // instantiation or a _Pragma.\n if (PragmaAssumeNonNullLoc.isValid() && !isEndOfMacro && !(CurLexer && CurLexer->Is_PragmaLexer)) {\n // If we\'re at the end of generating a preamble, we should record the\n // unterminated \\#pragma clang assume_nonnull so we can restore it later\n // when the preamble is loaded into the main file.\n if (isRecordingPreamble() && isInPrimaryFile())\n // ...\n else\n Diag(PragmaAssumeNonNullLoc, diag::err_pp_eof_in_assume_nonnull);"}}, |
| [l]={ | | [l]={ |
| [uc]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:20:7: note: delete of pointer \'&no_deallocate_nonalloc\' that does not point to a heap-allocated object"} | | ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-2.h:11:15: error: \'#pragma clang assume_nonnull\' was not ended within this file"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_delete_subobject"]={ | | ["err_pp_error_opening_file"]={ |
| [b]={{nil,m,"note_constexpr_delete_subobject"}}, | | [b]="err_pp_error_opening_file", |
| [h]={{nil,m,"delete of pointer%select{ to subobject|}1 \'%0\' %select{|that does not point to complete object}1"}}, | | [j]="error opening file \'%0\': %1", |
| [i]={{nil,m,{"delete of pointer",{" to subobject",a}," \'A\' ",{a,"that does not point to complete object"}}}}, | | [i]="error opening file \'A\': B", |
| [c]=g, | | [h]=mc, |
| [e]="delete of pointer(?: to subobject|) \'(.*?)\' (?:|that does not point to complete object)", | | [c]="error opening file \'(.*?)\'\\: (.*?)", |
| | [f]=a, |
| | [e]=p, |
| | [g]={"710bb871478f",1259554724,"Fix PR5633 by making the preprocessor handle the case where we can","Fix PR5633 by making the preprocessor handle the case where we can\nstat a file but where mmaping it fails. In this case, we emit an\nerror like:\nt.c:1:10: fatal error: error opening file \'../../foo.h\'\n\ninstead of \"cannot find file\".\n\nllvm-svn: 90110"}, |
| | [d]={{Hb,84,"/// EnterSourceFile - Add a source file to the top of the include stack and\n/// start lexing tokens from it instead of the current buffer.\nbool Preprocessor::EnterSourceFile(FileID FID, ConstSearchDirIterator CurDir, SourceLocation Loc, bool IsFirstIncludeOfFile) {\n // ...\n if (!InputFile) {\n // ...\n Diag(Loc, diag::err_pp_error_opening_file) << std::string(SourceMgr.getBufferName(FileStart)) << \"\";"}} |
| | }, |
| | ["err_pp_expected_after"]={ |
| | [b]="err_pp_expected_after", |
| | [j]="missing %1 after %0", |
| | [i]="missing B after A", |
| | [h]=k, |
| | [c]="missing (.*?) after (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={"751d635a2adc",1388368769,"Cleanup: Switch the preprocessor to err_pp_expected_after","Cleanup: Switch the preprocessor to err_pp_expected_after\n\nThis is approaching consistency but the PP and Parse categories they still have\nslightly different wording:\n\ndef err_pp_expected_after : Error<\"missing %1 after %0\">;\ndef err_expected_after : Error<\"expected %1 after %0\">;\n\nllvm-svn: 198189"}, |
| [k]={{o,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();"}}, | | [d]={{z,3021,"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(Tok, diag::err_pp_expected_after) << LastTok.getKind() << tok::r_paren;"},{Y,153,"/// 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 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_after) << \"\'defined\'\" << tok::r_paren;"},{ab,1209,"/// 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 \'(\'.\n if (Tok.isNot(tok::l_paren)) {\n // ...\n PP.Diag(LParenLoc, diag::err_pp_expected_after) << II << tok::l_paren;"},{ab,1240,"/// 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 PP.Diag(PP.getLocForEndOfToken(FilenameLoc), diag::err_pp_expected_after) << II << tok::r_paren;"},{ab,1292,"/// 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 if (Tok.isNot(tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pp_expected_after) << II << tok::l_paren;"},{ab,1378,"/// 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 if (auto Diag = PP.Diag(Tok.getLocation(), diag::err_pp_expected_after)) {"},{ab,1859,"#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 (Tok.isNot(tok::l_paren)) {\n // ...\n Diag(getLocForEndOfToken(Loc), diag::err_pp_expected_after) << II << tok::l_paren;"},{ab,1892,"#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 Diag(getLocForEndOfToken(Tok.getLocation()), diag::err_pp_expected_after) << Tok.getKind() << tok::r_paren;"}}, |
| [l]={ | | [l]={ |
| [ub]={"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]\' "} | | ["clang/test/Preprocessor/has_attribute_errors.cpp"]={"clang/test/Preprocessor/has_attribute_errors.cpp:13:30: error: missing \')\' after <numeric_constant>"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_depth_limit_exceeded"]={ | | ["err_pp_expected_comma_in_arg_list"]={ |
| [b]="note_constexpr_depth_limit_exceeded", | | [b]="err_pp_expected_comma_in_arg_list", |
| [h]="constexpr evaluation exceeded maximum depth of %0 calls", | | [j]="expected comma in macro parameter list", |
| [i]="constexpr evaluation exceeded maximum depth of A calls", | | [i]="expected comma in macro parameter list", |
| [c]=g, | | [h]=k, |
| [e]="constexpr evaluation exceeded maximum depth of (.*?) calls", | | [c]="expected comma in macro parameter list", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={Uc,1323758398,Zc,Yc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"},{M,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;"}}, | | [d]={{z,2726,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n default: // #define X(A B\n Diag(Tok, diag::err_pp_expected_comma_in_arg_list);"}} |
| | }, |
| | ["err_pp_expected_eol"]={ |
| | [b]="err_pp_expected_eol", |
| | [j]="expected end of line in preprocessor expression", |
| | [i]="expected end of line in preprocessor expression", |
| | [h]=k, |
| | [c]="expected end of line in preprocessor expression", |
| | [f]=a, |
| | [e]=p, |
| | [g]={s,1236199783,q,r}, |
| | [d]={{Y,940,"/// EvaluateDirectiveExpression - Evaluate an integer constant expression that\n/// may occur after a #if or #elif directive. If the expression is equivalent\n/// to \"!defined(X)\" return X in IfNDefMacro.\nPreprocessor::DirectiveEvalResult Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro) {\n // ...\n // If we aren\'t at the tok::eod token, something bad happened, like an extra\n // \')\' token.\n if (Tok.isNot(tok::eod)) {\n Diag(Tok, diag::err_pp_expected_eol);"}}, |
| [l]={ | | [l]={ |
| ["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/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:175:22: error: expected end of line in preprocessor expression"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_destroy_complex_elem"]={ | | ["err_pp_expected_ident_in_arg_list"]={ |
| [b]={{nil,m,"note_constexpr_destroy_complex_elem"}}, | | [b]="err_pp_expected_ident_in_arg_list", |
| [h]={{nil,m,"destruction of individual component of complex number is not yet supported in constant expressions"}}, | | [j]="expected identifier in macro parameter list", |
| [i]={{nil,m,"destruction of individual component of complex number is not yet supported in constant expressions"}}, | | [i]="expected identifier in macro parameter list", |
| [c]=g, | | [h]=k, |
| [e]="destruction of individual component of complex number is not yet supported in constant expressions", | | [c]="expected identifier in macro parameter list", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,6671,"struct DestroyObjectHandler {\n // ...\n bool found(APSInt &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"},{o,6675,"struct DestroyObjectHandler {\n // ...\n bool found(APFloat &Value, QualType SubobjType) {\n Info.FFDiag(E, diag::note_constexpr_destroy_complex_elem);"}} | | [d]={{z,2674,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n case tok::r_paren:\n // ...\n Diag(Tok, diag::err_pp_expected_ident_in_arg_list);"}} |
| }, | | }, |
| ["note_constexpr_destroy_out_of_lifetime"]={ | | ["err_pp_expected_module_name"]={ |
| [b]={{nil,m,"note_constexpr_destroy_out_of_lifetime"}}, | | [b]="err_pp_expected_module_name", |
| [h]={{nil,m,"destroying object \'%0\' whose lifetime has already ended"}}, | | [j]={{nil,n,"expected %select{identifier after \'.\' in |}0module name"}}, |
| [i]={{nil,m,"destroying object \'A\' whose lifetime has already ended"}}, | | [i]={{nil,n,{"expected ",{"identifier after \'.\' in ",a},"module name"}}}, |
| [c]=g, | | [h]=k, |
| [e]="destroying object \'(.*?)\' whose lifetime has already ended", | | [c]="expected (?:identifier after \'\\.\' in |)module name", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]={{nil,n,p}}, |
| [j]={ob,1569547607,jb,lb}, | | [g]={Ib,1493857794,Jb,yb}, |
| [k]={{o,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));"}}, | | [d]={{H,786,"// Lex a component of a module name: either an identifier or a string literal;\n// for components that can be expressed both ways, the two forms are equivalent.\nstatic bool LexModuleNameComponent(Preprocessor &PP, Token &Tok, std::pair<IdentifierInfo *, SourceLocation> &ModuleNameComponent, bool First) {\n // ...\n if (Tok.is(tok::string_literal) && !Tok.hasUDSuffix()) {\n // ...\n } else if (!Tok.isAnnotation() && Tok.getIdentifierInfo()) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pp_expected_module_name) << First;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/AST/Interp/cxx20.cpp"]={"clang/test/AST/Interp/cxx20.cpp:442:11: note: destroying object \'I\' whose lifetime has already ended"} | | ["clang/test/Preprocessor/pragma_module.c"]={"clang/test/Preprocessor/pragma_module.c:13:100: error: expected identifier after \'.\' in module name"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_double_delete"]={ | | ["err_pp_expected_rparen"]={ |
| [b]={{nil,m,"note_constexpr_double_delete"}}, | | [b]="err_pp_expected_rparen", |
| [h]={{nil,m,"delete of pointer that has already been deleted"}}, | | [j]="expected \')\' in preprocessor expression", |
| [i]={{nil,m,"delete of pointer that has already been deleted"}}, | | [i]="expected \')\' in preprocessor expression", |
| [c]=g, | | [h]=k, |
| [e]="delete of pointer that has already been deleted", | | [c]="expected \'\\)\' in preprocessor expression", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"},{o,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);"}}, | | [d]={{Y,457,"/// 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 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_rparen) << Result.getRange();"}} |
| | }, |
| | ["err_pp_expected_value_in_expr"]={ |
| | [b]="err_pp_expected_value_in_expr", |
| | [j]="expected value in expression", |
| | [i]="expected value in expression", |
| | [h]=k, |
| | [c]="expected value in expression", |
| | [f]=a, |
| | [e]=p, |
| | [g]={s,1236199783,q,r}, |
| | [d]={{Y,291,"/// 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::eod:\n case tok::r_paren:\n // ...\n PP.Diag(PeekTok, diag::err_pp_expected_value_in_expr);"}}, |
| [l]={ | | [l]={ |
| [ub]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:917:5: note: delete of pointer that has already been deleted"} | | ["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:19:8: error: expected value in expression"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_double_destroy"]={ | | ["err_pp_expects_filename"]={ |
| [b]={{nil,m,"note_constexpr_double_destroy"}}, | | [b]="err_pp_expects_filename", |
| [h]={{nil,m,"destruction of object that is already being destroyed"}}, | | [j]="expected \"FILENAME\" or <FILENAME>", |
| [i]={{nil,m,"destruction of object that is already being destroyed"}}, | | [i]="expected \"FILENAME\" or <FILENAME>", |
| [c]=g, | | [h]=k, |
| [e]="destruction of object that is already being destroyed", | | [c]="expected \"FILENAME\" or \\<FILENAME\\>", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"}},
| | [d]={{z,1778,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n if (Buffer[0] == \'<\') {\n if (Buffer.back() != \'>\') {\n Diag(Loc, diag::err_pp_expects_filename);"},{z,1785,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n if (Buffer[0] == \'<\') {\n // ...\n } else if (Buffer[0] == \'\"\') {\n if (Buffer.back() != \'\"\') {\n Diag(Loc, diag::err_pp_expects_filename);"},{z,1791,"/// GetIncludeFilenameSpelling - Turn the specified lexer token into a fully\n/// checked and spelled filename, e.g. as an operand of \\#include. This returns\n/// true if the input filename was in <>\'s or false if it were in \"\"\'s. The\n/// caller is expected to provide a buffer that is large enough to hold the\n/// spelling of the filename, but is also expected to handle the case when\n/// this method decides to use a different buffer.\nbool Preprocessor::GetIncludeFilenameSpelling(SourceLocation Loc, StringRef &Buffer) {\n // ...\n if (Buffer[0] == \'<\') {\n // ...\n } else if (Buffer[0] == \'\"\') {\n // ...\n } else {\n Diag(Loc, diag::err_pp_expects_filename);"},{z,1971,"/// HandleIncludeDirective - The \"\\#include\" tokens have just been read, read\n/// the file to be included from the lexer, then include it! This is a common\n/// routine with functionality shared between \\#include, \\#include_next and\n/// \\#import. LookupFrom is set when this is a \\#include_next directive, it\n/// specifies the file to start searching from.\nvoid Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, Token &IncludeTok, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n if (FilenameTok.isNot(tok::header_name)) {\n Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename);"},{ab,1222,"/// 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 if (Tok.isNot(tok::header_name)) {\n PP.Diag(Tok.getLocation(), diag::err_pp_expects_filename);"},{H,524,"/// HandlePragmaDependency - Handle \\#pragma GCC dependency \"foo\" blah.\nvoid Preprocessor::HandlePragmaDependency(Token &DependencyTok) {\n // ...\n // If the next token wasn\'t a header-name, diagnose the error.\n if (FilenameTok.isNot(tok::header_name)) {\n Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename);"}}, |
| [l]={ | | [l]={ |
| [ub]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:921:24: note: destruction of object that is already being destroyed"} | | ["clang/test/Preprocessor/_Pragma-dependency.c"]={"clang/test/Preprocessor/_Pragma-dependency.c:7:24: error: expected \"FILENAME\" or <FILENAME>"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_dtor_subobject"]={ | | ["err_pp_expr_bad_token_binop"]={ |
| [b]={{nil,m,"note_constexpr_dtor_subobject"}}, | | [b]="err_pp_expr_bad_token_binop", |
| [h]={{nil,m,"%select{data member %1|base class %2}0 declared here"}}, | | [j]="token is not a valid binary operator in a preprocessor subexpression", |
| [i]={{nil,m,{{"data member B","base class C"}," declared here"}}}, | | [i]="token is not a valid binary operator in a preprocessor subexpression", |
| [c]=g, | | [h]=k, |
| [e]="(?:data member (.*?)|base class (.*?)) declared here", | | [c]="token is not a valid binary operator in a preprocessor subexpression", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=p, |
| [j]={ad,1567434909,Vc,Xc}, | | [g]={s,1236199783,q,r}, |
| [k]={{r,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;"}}, | | [d]={{Y,581,"static void diagnoseUnexpectedOperator(Preprocessor &PP, PPValue &LHS, Token &Tok) {\n if (Tok.is(tok::l_paren) && LHS.getIdentifier())\n // ...\n else\n PP.Diag(Tok.getLocation(), diag::err_pp_expr_bad_token_binop) << LHS.getRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:61:14: note: base class \'A\' declared here","clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:65:7: note: data member \'a\' declared here"} | | ["clang/test/Preprocessor/disabled-cond-diags2.c"]={"clang/test/Preprocessor/disabled-cond-diags2.c:11:7: error: token is not a valid binary operator in a preprocessor subexpression"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_dynamic_alloc"]={ | | ["err_pp_expr_bad_token_lparen"]={ |
| [b]={{nil,m,"note_constexpr_dynamic_alloc"}}, | | [b]="err_pp_expr_bad_token_lparen", |
| [h]={{nil,m,"%select{pointer|reference}0 to %select{|subobject of }1heap-allocated object is not a constant expression"}}, | | [j]="function-like macro %0 is not defined", |
| [i]={{nil,m,{{Md,Hb}," to ",{a,"subobject of "},"heap-allocated object is not a constant expression"}}}, | | [i]="function-like macro A is not defined", |
| [c]=g, | | [h]=k, |
| [e]="(?:pointer|reference) to (?:|subobject of )heap\\-allocated object is not a constant expression", | | [c]="function\\-like macro (.*?) is not defined", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={"4d247e7012ae",1460765229,"Improve diagnostic for the case when a non-defined function-like macro is used","Improve diagnostic for the case when a non-defined function-like macro is used\nin a preprocessor constant expression.\n\nllvm-svn: 266495"}, |
| [k]={{o,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();"}}, | | [d]={{Y,578,"static void diagnoseUnexpectedOperator(Preprocessor &PP, PPValue &LHS, Token &Tok) {\n if (Tok.is(tok::l_paren) && LHS.getIdentifier())\n PP.Diag(LHS.getRange().getBegin(), diag::err_pp_expr_bad_token_lparen) << LHS.getIdentifier();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp"]={"clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:59:17: note: pointer to heap-allocated object is not a constant expression"} | | ["clang/test/Preprocessor/has_attribute.c"]={"clang/test/Preprocessor/has_attribute.c:57:5: error: function-like macro \'__has_cpp_attribute\' is not defined"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_dynamic_alloc_here"]={ | | ["err_pp_expr_bad_token_start_expr"]={ |
| [b]={{nil,m,"note_constexpr_dynamic_alloc_here"}}, | | [b]="err_pp_expr_bad_token_start_expr", |
| [h]={{nil,m,"heap allocation performed here"}}, | | [j]="invalid token at start of a preprocessor expression", |
| [i]={{nil,m,"heap allocation performed here"}}, | | [i]="invalid token at start of a preprocessor expression", |
| [c]=g, | | [h]=k, |
| [e]="heap allocation performed here", | | [c]="invalid token at start of a preprocessor expression", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"}}, | | [d]={{Y,286,"/// 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 default:\n // ...\n PP.Diag(PeekTok, diag::err_pp_expr_bad_token_start_expr);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp"]={"clang/test/CXX/basic/basic.def.odr/p2-typeid.cpp:53:32: note: heap allocation performed here"} | | ["clang/test/Preprocessor/has_include.c"]={"clang/test/Preprocessor/has_include.c:140:19: error: invalid token at start of a preprocessor expression"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_dynamic_cast_to_reference_failed"]={ | | ["err_pp_file_not_found"]={ |
| [b]={{nil,p,"note_constexpr_dynamic_cast_to_reference_failed"}}, | | [b]="err_pp_file_not_found", |
| [h]={{nil,p,"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"}}, | | [j]="\'%0\' file not found", |
| [i]={{nil,p,{"reference dynamic_cast failed: ",{"static type B of operand is a non-public base class of dynamic type C","dynamic type C of operand does not have a base class of type D","D is an ambiguous base class of dynamic type C of operand","D is a non-public base class of dynamic type C of operand"}}}}, | | [i]="\'A\' file not found", |
| [c]=g, | | [h]=mc, |
| [e]="reference dynamic_cast failed\\: (?:static type (.*?) of operand is a non\\-public base class of dynamic type (.*?)|dynamic type (.*?) of operand does not have a base class of type (.*?)|(.*?) is an ambiguous base class of dynamic type (.*?) of operand|(.*?) is a non\\-public base class of dynamic type (.*?) of operand)", | | [c]="\'(.*?)\' file not found", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"}},
| | [d]={{z,2091,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n Diag(FilenameTok, diag::err_pp_file_not_found) << OriginalFilename << FilenameRange;"},{H,548,"/// HandlePragmaDependency - Handle \\#pragma GCC dependency \"foo\" blah.\nvoid Preprocessor::HandlePragmaDependency(Token &DependencyTok) {\n // ...\n if (!File) {\n if (!SuppressIncludeNotFoundError)\n Diag(FilenameTok, diag::err_pp_file_not_found) << Filename;"}}, |
| [l]={ | | [l]={ |
| [ub]={"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\'"} | | ["clang/test/SemaCXX/template-specialization-fatal.cpp"]={"clang/test/SemaCXX/template-specialization-fatal.cpp:5:10: fatal error: \'not_found.h\' file not found"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_dynamic_rounding"]={ | | ["err_pp_file_not_found_angled_include_not_fatal"]={ |
| [b]={{nil,s,"note_constexpr_dynamic_rounding"}}, | | [b]={{nil,u,"err_pp_file_not_found_angled_include_not_fatal"}}, |
| [h]={{nil,s,"cannot evaluate this expression if rounding mode is dynamic"}}, | | [j]={{nil,x,"\'%0\' file not found with <angled> %select{include|import}1; use \"quotes\" instead"},{u,u,"\'%0\' file not found with <angled> include; use \"quotes\" instead"}}, |
| [i]={{nil,s,"cannot evaluate this expression if rounding mode is dynamic"}}, | | [i]={{nil,x,{"\'A\' file not found with <angled> ",{"include","import"},"; use \"quotes\" instead"}},{u,u,"\'A\' file not found with <angled> include; use \"quotes\" instead"}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot evaluate this expression if rounding mode is dynamic", | | [c]="\'(.*?)\' file not found with \\<angled\\> (?:include|import); use \"quotes\" instead", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,a}}, | | [e]={{nil,u,p}}, |
| [j]={"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"}, | | [g]={"2ce63b424632",1536873008,"Diagnose likely typos in #include directives.","Diagnose likely typos in #include directives.\n\nSummary:\nWhen someone writes\n\n #include \"<some_file>\"\n\nor\n\n #include \" some_file \"\n\nthe compiler returns \"file not fuond...\" with fonts and quotes that may\nmake it hard to see there are excess quotes or surprising bytes in the\nfilename. Assuming that files are usually logically named and start and\nend with an alphanumeric character, we can check for the file\'s\nexistence by stripping the non-alphanumeric leading or trailing\ncharacters. If the file is found, emit a non-fatal error with a\nFixItHint.\n\nPatch by Christy Lee!\n\nReviewers: aaron.ballman, erikjv, rsmith\n\nReviewed By: rsmith\n\nSubscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51333\n\nllvm-svn: 342177"}, |
| [k]={{o,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);"},{M,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);"}} | | [d]={{z,2044,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n // If the file could not be located and it was included via angle\n // brackets, we can attempt a lookup as though it were a quoted path to\n // provide the user with a possible fixit.\n if (isAngled) {\n // ...\n if (File) {\n Diag(FilenameTok, diag::err_pp_file_not_found_angled_include_not_fatal) << Filename << IsImportDecl << FixItHint::CreateReplacement(FilenameRange, \"\\\"\" + Filename.str() + \"\\\"\");"}}, |
| | [l]={ |
| | ["clang/test/FixIt/fixit-include.c"]={"clang/test/FixIt/fixit-include.c:9:10: error: \'fixit-include.h\' file not found with <angled> include; use \"quotes\" instead"} |
| | } |
| }, | | }, |
| ["note_constexpr_float_arithmetic"]={ | | ["err_pp_file_not_found_typo_not_fatal"]={ |
| [b]="note_constexpr_float_arithmetic", | | [b]={{nil,u,"err_pp_file_not_found_typo_not_fatal"}}, |
| [h]="floating point arithmetic produces %select{an infinity|a NaN}0", | | [j]={{nil,u,"\'%0\' file not found, did you mean \'%1\'?"}}, |
| [i]={{nil,nil,{"floating point arithmetic produces ",{"an infinity","a NaN"}}}}, | | [i]={{nil,u,"\'A\' file not found, did you mean \'B\'?"}}, |
| [c]=g, | | [h]=k, |
| [e]="floating point arithmetic produces (?:an infinity|a NaN)", | | [c]="\'(.*?)\' file not found, did you mean \'(.*?)\'\\?", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,u,p}}, |
| [j]={"c8042323e1b2",1328075592,"constexpr: overflow checking for integral and floating-point arithmetic.","constexpr: overflow checking for integral and floating-point arithmetic.\n\nllvm-svn: 149473"}, | | [g]={"2ce63b424632",1536873008,"Diagnose likely typos in #include directives.","Diagnose likely typos in #include directives.\n\nSummary:\nWhen someone writes\n\n #include \"<some_file>\"\n\nor\n\n #include \" some_file \"\n\nthe compiler returns \"file not fuond...\" with fonts and quotes that may\nmake it hard to see there are excess quotes or surprising bytes in the\nfilename. Assuming that files are usually logically named and start and\nend with an alphanumeric character, we can check for the file\'s\nexistence by stripping the non-alphanumeric leading or trailing\ncharacters. If the file is found, emit a non-fatal error with a\nFixItHint.\n\nPatch by Christy Lee!\n\nReviewers: aaron.ballman, erikjv, rsmith\n\nReviewed By: rsmith\n\nSubscribers: lebedev.ri, xbolva00, sammccall, modocache, erikjv, aaron.ballman, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D51333\n\nllvm-svn: 342177"}, |
| [k]={{o,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();"}}, | | [d]={{z,2079,"OptionalFileEntryRef Preprocessor::LookupHeaderIncludeOrImport(ConstSearchDirIterator *CurDir, StringRef &Filename, SourceLocation FilenameLoc, CharSourceRange FilenameRange, const Token &FilenameTok, bool &IsFrameworkFound, bool IsImportDecl, bool &IsMapped, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile, StringRef &LookupFilename, SmallVectorImpl<char> &RelativePath, SmallVectorImpl<char> &SearchPath, ModuleMap::KnownHeader &SuggestedModule, bool isAngled) {\n // ...\n if (LangOpts.SpellChecking) {\n // ...\n if (File) {\n // ...\n Diag(FilenameTok, diag::err_pp_file_not_found_typo_not_fatal) << OriginalFilename << TypoCorrectionName << Hint;"}}, |
| [l]={ | | [l]={ |
| [pb]={"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"} | | ["clang/test/Preprocessor/include-likely-typo.c"]={"clang/test/Preprocessor/include-likely-typo.c:4:10: error: \'<empty_file_to_include.h>\' file not found, did you mean \'empty_file_to_include.h\'?"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_float_arithmetic_strict"]={ | | ["err_pp_identifier_arg_not_identifier"]={ |
| [b]={{nil,s,"note_constexpr_float_arithmetic_strict"}}, | | [b]="err_pp_identifier_arg_not_identifier", |
| [h]={{nil,s,"compile time floating point arithmetic suppressed in strict evaluation modes"}},
| | [j]="cannot convert %0 token to an identifier", |
| [i]={{nil,s,"compile time floating point arithmetic suppressed in strict evaluation modes"}},
| | [i]="cannot convert A token to an identifier", |
| [c]=g,
| | [h]=k, |
| [e]="compile time floating point arithmetic suppressed in strict evaluation modes",
| | [c]="cannot convert (.*?) token to an identifier", |
| [f]=a,
| |
| [d]={{nil,s,a}},
| |
| [j]={"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"}, | |
| [k]={{o,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);"},{o,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);"},{M,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"]={
| |
| [b]={{nil,t,"note_constexpr_function_param_value_unknown"}},
| |
| [h]={{nil,t,"function parameter %0 with unknown value cannot be used in a constant expression"}},
| |
| [i]={{nil,t,"function parameter A with unknown value cannot be used in a constant expression"}}, | |
| [c]=g, | |
| [e]="function parameter (.*?) with unknown value cannot be used in a constant expression", | |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,a}}, | | [e]=p, |
| [j]={"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."}, | | [g]={"ae385084c517",1394841968,"Implement the MS extension __identifier properly: take a token and strip it of","Implement the MS extension __identifier properly: take a token and strip it of\nits keywordliness.\n\nllvm-svn: 203987"}, |
| [k]={{o,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;"}}, | | [d]={{ab,1881,"#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 (!Tok.isAnnotation() && Tok.getIdentifierInfo())\n // ...\n else if (Tok.is(tok::string_literal) && !Tok.hasUDSuffix()) {\n // ...\n } else {\n Diag(Tok.getLocation(), diag::err_pp_identifier_arg_not_identifier) << Tok.getKind();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/warn-vla.cpp"]={"clang/test/SemaCXX/warn-vla.cpp:4:9: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:7:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:10:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:14:9: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:18:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:22:25: note: function parameter \'n\' with unknown value cannot be used in a constant expression","clang/test/SemaCXX/warn-vla.cpp:25:23: note: function parameter \'n\' with unknown value cannot be used in a constant expression"} | | ["clang/test/Parser/MicrosoftExtensions.cpp"]={"clang/test/Parser/MicrosoftExtensions.cpp:281:16: error: cannot convert \'(\' token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:283:16: error: cannot convert \')\' token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:285:16: error: cannot convert <numeric_constant> token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:286:16: error: cannot convert \'+\' token to an identifier","clang/test/Parser/MicrosoftExtensions.cpp:287:16: error: cannot convert \';\' token to an identifier"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_heap_alloc_limit_exceeded"]={ | | ["err_pp_illegal_floating_literal"]={ |
| [b]={{nil,m,"note_constexpr_heap_alloc_limit_exceeded"}}, | | [b]="err_pp_illegal_floating_literal", |
| [h]={{nil,m,"constexpr evaluation hit maximum heap allocation limit"}}, | | [j]="floating point literal in preprocessor expression", |
| [i]={{nil,m,"constexpr evaluation hit maximum heap allocation limit"}}, | | [i]="floating point literal in preprocessor expression", |
| [c]=g, | | [h]=k, |
| [e]="constexpr evaluation hit maximum heap allocation limit", | | [c]="floating point literal in preprocessor expression", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"}} | | [d]={{Y,308,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n if (Literal.isFloatingLiteral() || Literal.isImaginary) {\n PP.Diag(PeekTok, diag::err_pp_illegal_floating_literal);"}} |
| }, | | }, |
| ["note_constexpr_inherited_ctor_call_here"]={ | | ["err_pp_import_directive_ms"]={ |
| [b]="note_constexpr_inherited_ctor_call_here", | | [b]="err_pp_import_directive_ms", |
| [h]="in implicit initialization for inherited constructor of %0", | | [j]="#import of type library is an unsupported Microsoft feature", |
| [i]="in implicit initialization for inherited constructor of A", | | [i]="#import of type library is an unsupported Microsoft feature", |
| [c]=g, | | [h]=k, |
| [e]="in implicit initialization for inherited constructor of (.*?)", | | [c]="\\#import of type library is an unsupported Microsoft feature", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={"0467f55d6283",1332040237,"Turns #import in MS Mode into an error.","Turns #import in MS Mode into an error.\n\nllvm-svn: 153009"}, |
| [k]={{"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();"}} | | [d]={{z,2609,"/// HandleMicrosoftImportDirective - Implements \\#import for Microsoft Mode\nvoid Preprocessor::HandleMicrosoftImportDirective(Token &Tok) {\n // ...\n Diag(Tok, diag::err_pp_import_directive_ms);"}}, |
| | [l]={ |
| | ["clang/test/Preprocessor/microsoft-import.c"]={"clang/test/Preprocessor/microsoft-import.c:3:2: error: #import of type library is an unsupported Microsoft feature","clang/test/Preprocessor/microsoft-import.c:6:2: error: #import of type library is an unsupported Microsoft feature","clang/test/Preprocessor/microsoft-import.c:8:2: error: #import of type library is an unsupported Microsoft feature"} |
| | } |
| }, | | }, |
| ["note_constexpr_invalid_alignment"]={ | | ["err_pp_include_in_arc_cf_code_audited"]={ |
| [b]={{nil,m,"note_constexpr_invalid_alignment"}}, | | [b]="err_pp_include_in_arc_cf_code_audited", |
| [h]={{nil,m,"requested alignment %0 is not a positive power of two"}}, | | [j]={{nil,x,"cannot %select{#include files|import headers}0 inside \'#pragma clang arc_cf_code_audited\'"},{u,nil,"cannot #include files inside \'#pragma clang arc_cf_code_audited\'"}}, |
| [i]={{nil,m,"requested alignment A is not a positive power of two"}}, | | [i]={{nil,x,{"cannot ",{"#include files","import headers"}," inside \'#pragma clang arc_cf_code_audited\'"}},{u,nil,"cannot #include files inside \'#pragma clang arc_cf_code_audited\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="requested alignment (.*?) is not a positive power of two", | | [c]="cannot (?:\\#include files|import headers) inside \'\\#pragma clang arc_cf_code_audited\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={Yb,1317359532,Xb,Wb}, |
| [k]={{o,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;"}},
| | [d]={{z,2145,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Complain about attempts to #include files in an audit pragma.\n if (PragmaARCCFCodeAuditedInfo.second.isValid()) {\n Diag(StartLoc, diag::err_pp_include_in_arc_cf_code_audited) << IsImportDecl;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-align-cxx.cpp"]={"clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment -1 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment -2 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment -3 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:121:36: note: requested alignment 17 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:112:34: note: requested alignment 18 is not a positive power of two","clang/test/SemaCXX/builtin-align-cxx.cpp:105:36: note: requested alignment 19 is not a positive power of two"} | | [tc]={"clang/test/Sema/pragma-arc-cf-code-audited.c:13:1: error: cannot #include files inside \'#pragma clang arc_cf_code_audited\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_invalid_cast"]={ | | ["err_pp_include_in_assume_nonnull"]={ |
| [b]="note_constexpr_invalid_cast", | | [b]="err_pp_include_in_assume_nonnull", |
| [h]={{nil,q,"%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"},{w,m,"%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"},{p,p,"%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of a reinterpret_cast|cast from %1}0 is not allowed in a constant expression%select{| in C++ standards before C++2a||}0"},{v,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"}}, | | [j]={{nil,x,"cannot %select{#include files|import headers}0 inside \'#pragma clang assume_nonnull\'"},{u,nil,"cannot #include files inside \'#pragma clang assume_nonnull\'"}}, |
| [i]={{nil,q,{{"reinterpret_cast","dynamic_cast",{{"this conversion","cast that performs the conversions of a reinterpret_cast"}},"cast from B"},Db,{a," in C++ standards before C++20",a,a}}},{w,m,{{"reinterpret_cast","dynamic_cast","cast that performs the conversions of a reinterpret_cast","cast from B"},Db,{a," in C++ standards before C++20",a,a}}},{p,p,{{"reinterpret_cast","dynamic_cast","cast that performs the conversions of a reinterpret_cast","cast from B"},Db,{a," in C++ standards before C++2a",a,a}}},{v,nil,{{"reinterpret_cast","dynamic_cast","cast that performs the conversions of a reinterpret_cast","cast from B"},Db}}}, | | [i]={{nil,x,{"cannot ",{"#include files","import headers"}," inside \'#pragma clang assume_nonnull\'"}},{u,nil,"cannot #include files inside \'#pragma clang assume_nonnull\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:reinterpret_cast|dynamic_cast|(?:this conversion|cast that performs the conversions of a reinterpret_cast)|cast from (.*?)) is not allowed in a constant expression(?:| in C\\+\\+ standards before C\\+\\+20||)", | | [c]="cannot (?:\\#include files|import headers) inside \'\\#pragma clang assume_nonnull\'", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=lc, |
| [j]={"6d6ecc34f841",1323693976,"Implement C++11 constant expression cast restrictions.","Implement C++11 constant expression cast restrictions.\n\nllvm-svn: 146371"}, | | [g]={qc,1434738357,sc,uc}, |
| [k]={{o,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;"},{o,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;"},{o,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;"},{o,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();"},{o,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;"},{o,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;"},{o,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;"}}, | | [d]={{z,2154,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Complain about attempts to #include files in an assume-nonnull pragma.\n if (PragmaAssumeNonNullLoc.isValid()) {\n Diag(StartLoc, diag::err_pp_include_in_assume_nonnull) << IsImportDecl;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/cast.c"]={"clang/test/Sema/cast.c:3:11: note: this conversion is not allowed in a constant expression"} | | ["clang/test/SemaObjCXX/nullability-pragmas.mm"]={"clang/test/SemaObjCXX/Inputs/nullability-pragmas-2.h:5:1: error: cannot #include files inside \'#pragma clang assume_nonnull\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_invalid_downcast"]={ | | ["err_pp_include_too_deep"]={ |
| [b]="note_constexpr_invalid_downcast", | | [b]="err_pp_include_too_deep", |
| [h]="cannot cast object of dynamic type %0 to type %1", | | [j]="#include nested too deeply", |
| [i]="cannot cast object of dynamic type A to type B", | | [i]="#include nested too deeply", |
| [c]=g, | | [h]=k, |
| [e]="cannot cast object of dynamic type (.*?) to type (.*?)", | | [c]="\\#include nested too deeply", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"},{o,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;"}}, | | [d]={{z,2525,"#endif\n // ...\n // Check that we don\'t have infinite #include recursion.\n if (IncludeMacroStack.size() == MaxAllowedIncludeStackDepth - 1) {\n Diag(FilenameTok, diag::err_pp_include_too_deep);"}} |
| [l]={
| |
| [cd]={"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"]={ | | ["err_pp_including_mainfile_in_preamble"]={ |
| [b]="note_constexpr_invalid_function", | | [b]={{nil,x,"err_pp_including_mainfile_in_preamble"}}, |
| [h]="%select{non-constexpr|undefined}0 %select{function|constructor}1 %2 cannot be used in a constant expression", | | [j]={{nil,x,"main file cannot be included recursively when building a preamble"}}, |
| [i]={{nil,nil,{{"non-constexpr","undefined"},rb,{Qc,E}," C cannot be used in a constant expression"}}}, | | [i]={{nil,x,"main file cannot be included recursively when building a preamble"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:non\\-constexpr|undefined) (?:function|constructor) (.*?) cannot be used in a constant expression", | | [c]="main file cannot be included recursively when building a preamble", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,x,p}}, |
| [j]={Uc,1323758398,Zc,Yc},
| | [g]={"3c28a2dc6bdc",1557483935,"[Preamble] Stop circular inclusion of main file when building preamble","[Preamble] Stop circular inclusion of main file when building preamble\n\nIf a header file was processed for the second time, we could end up with a\nwrong conditional stack and skipped ranges:\n\nIn the particular example, if the header guard is evaluated the second time and\nit is decided to skip the conditional block, the corresponding \"#endif\" is\nnever seen since the preamble does not include it and we end up in the\nTok.is(tok::eof) case with a wrong conditional stack.\n\nDetect the circular inclusion, emit a diagnostic and stop processing the\ninclusion.\n\nllvm-svn: 360418"}, |
| [k]={{o,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;"},{o,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;"},{o,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();"},{o,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();"},{o,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();"},{o,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();"},{M,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;"}}, | | [d]={{z,2371,"/// Handle either a #include-like directive or an import declaration that names\n/// a header file.\n///\n/// \\param HashLoc The location of the \'#\' token for an include, or\n/// SourceLocation() for an import declaration.\n/// \\param IncludeTok The include / include_next / import token.\n/// \\param FilenameTok The header-name token.\n/// \\param EndLoc The location at which any imported macros become visible.\n/// \\param LookupFrom For #include_next, the starting directory for the\n/// directory lookup.\n/// \\param LookupFromFile For #include_next, the starting file for the directory\n/// lookup.\nPreprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(SourceLocation HashLoc, Token &IncludeTok, Token &FilenameTok, SourceLocation EndLoc, ConstSearchDirIterator LookupFrom, const FileEntry *LookupFromFile) {\n // ...\n // Check for circular inclusion of the main file.\n // We can\'t generate a consistent preamble with regard to the conditional\n // stack if the main file is included again as due to the preamble bounds\n // some directives (e.g. #endif of a header guard) will never be seen.\n // Since this will lead to confusing errors, avoid the inclusion.\n if (Action == Enter && File && PreambleConditionalStack.isRecording() && SourceMgr.isMainFile(File->getFileEntry())) {\n Diag(FilenameTok.getLocation(), diag::err_pp_including_mainfile_in_preamble);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_invalid_inhctor"]={ | | ["err_pp_invalid_directive"]={ |
| [b]="note_constexpr_invalid_inhctor", | | [b]="err_pp_invalid_directive", |
| [h]="constructor inherited from base class %0 cannot be used in a constant expression; derived class cannot be implicitly initialized", | | [j]={{nil,C,"invalid preprocessing directive%select{|, did you mean \'#%1\'?}0"},{F,nil,"invalid preprocessing directive"}}, |
| [i]="constructor inherited from base class A cannot be used in a constant expression; derived class cannot be implicitly initialized", | | [i]={{nil,C,{"invalid preprocessing directive",{a,", did you mean \'#B\'?"}}},{F,nil,"invalid preprocessing directive"}}, |
| [c]=g, | | [h]=k, |
| [e]="constructor inherited from base class (.*?) cannot be used in a constant expression; derived class cannot be implicitly initialized", | | [c]="invalid preprocessing directive(?:|, did you mean \'\\#(.*?)\'\\?)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"},{M,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();"}}, | | [d]={{z,1334,"/// HandleDirective - This callback is invoked when the lexer sees a # token\n/// at the start of a line. This consumes the directive, modifies the\n/// lexer/preprocessor state, and advances the lexer(s) so that the next token\n/// read is the correct one.\nvoid Preprocessor::HandleDirective(Token &Result) {\n // ...\n Diag(Result, diag::err_pp_invalid_directive) << 0;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Preprocessor/disabled-cond-diags2.c"]={"clang/test/Preprocessor/disabled-cond-diags2.c:14:2: error: invalid preprocessing directive"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_invalid_template_arg"]={ | | ["err_pp_invalid_poison"]={ |
| [b]={{nil,s,"note_constexpr_invalid_template_arg"}}, | | [b]="err_pp_invalid_poison", |
| [h]={{nil,s,"%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"}}, | | [j]="can only poison identifier tokens", |
| [i]={{nil,s,{{Md,Hb}," to ",{a,"subobject of "},{"type_info object","string literal","temporary object","predefined \'D\' variable"}," is not allowed in a template argument"}}}, | | [i]="can only poison identifier tokens", |
| [c]=g, | | [h]=k, |
| [e]="(?:pointer|reference) to (?:|subobject of )(?:type_info object|string literal|temporary object|predefined \'(.*?)\' variable) is not allowed in a template argument", | | [c]="can only poison identifier tokens", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,a}}, | | [e]=p, |
| [j]={"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."}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"},{xb,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) {"}} | | [d]={{H,461,"/// HandlePragmaPoison - Handle \\#pragma GCC poison. PoisonTok is the \'poison\'.\nvoid Preprocessor::HandlePragmaPoison() {\n // ...\n while (true) {\n // ...\n // Can only poison identifiers.\n if (Tok.isNot(tok::raw_identifier)) {\n Diag(Tok, diag::err_pp_invalid_poison);"}} |
| }, | | }, |
| ["note_constexpr_invalid_void_star_cast"]={ | | ["err_pp_invalid_tok_in_arg_list"]={ |
| [b]="note_constexpr_invalid_void_star_cast", | | [b]="err_pp_invalid_tok_in_arg_list", |
| [h]="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", | | [j]="invalid token in macro parameter list", |
| [i]={{nil,nil,{"cast from A is not allowed in a constant expression ",{"in C++ standards before C++2c","because the pointed object type C is not similar to the target type D"}}}}, | | [i]="invalid token in macro parameter list", |
| [c]=g, | | [h]=k, |
| [e]="cast from (.*?) is not allowed in a constant expression (?:in C\\+\\+ standards before C\\+\\+2c|because the pointed object type (.*?) is not similar to the target type (.*?))", | | [c]="invalid token in macro parameter list", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={rc,1662843785,ec,vc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"}}, | | [d]={{z,2707,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n if (!II) {\n // ...\n Diag(Tok, diag::err_pp_invalid_tok_in_arg_list);"}} |
| [l]={
| |
| ["clang/test/CXX/expr/expr.const/p5-26.cpp"]={"clang/test/CXX/expr/expr.const/p5-26.cpp:12:11: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c","clang/test/CXX/expr/expr.const/p5-26.cpp:33:27: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c","clang/test/CXX/expr/expr.const/p5-26.cpp:36:27: note: cast from \'void *\' is not allowed in a constant expression in C++ standards before C++2c"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_large_shift"]={ | | ["err_pp_invalid_udl"]={ |
| [b]="note_constexpr_large_shift", | | [b]="err_pp_invalid_udl", |
| [h]="shift count %0 >= width of type %1 (%2 bit%s2)", | | [j]="%select{character|integer}0 literal with user-defined suffix cannot be used in preprocessor constant expression", |
| [i]="shift count A >= width of type B (C bitC)", | | [i]={{nil,nil,{{"character","integer"}," literal with user-defined suffix cannot be used in preprocessor constant expression"}}}, |
| [c]=g, | | [h]=k, |
| [e]="shift count (.*?) \\>\\= width of type (.*?) \\((.*?) bit(.*?)\\)", | | [c]="(?:character|integer) literal with user\\-defined suffix cannot be used in preprocessor constant expression", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={"39570d00201c",1331196332,"Add support for cooked forms of user-defined-integer-literal and","Add support for cooked forms of user-defined-integer-literal and\nuser-defined-floating-literal. Support for raw forms of these literals\nto follow.\n\nllvm-svn: 152302"}, |
| [k]={{o,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();"},{o,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();"},{o,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;"}}, | | [d]={{Y,315,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::numeric_constant: {\n // ...\n // Complain about, and drop, any ud-suffix.\n if (Literal.hasUDSuffix())\n PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*integer*/ 1;"},{Y,380,"/// EvaluateValue - Evaluate the token PeekTok (and any others needed) and\n/// return the computed value in Result. Return true if there was an error\n/// parsing. This function also returns information about the form of the\n/// expression in DT. See above for information on what DT means.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation.\nstatic bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) {\n // ...\n case tok::char_constant: // \'x\'\n case tok::wide_char_constant: // L\'x\'\n case tok::utf8_char_constant: // u8\'x\'\n case tok::utf16_char_constant: // u\'x\'\n case tok::utf32_char_constant: { // U\'x\'\n // Complain about, and drop, any ud-suffix.\n if (PeekTok.hasUDSuffix())\n PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*character*/ 0;"}}, |
| [l]={ | | [l]={ |
| [pb]={"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)"} | | ["clang/test/Parser/cxx11-user-defined-literals.cpp"]={"clang/test/Parser/cxx11-user-defined-literals.cpp:30:5: error: character literal with user-defined suffix cannot be used in preprocessor constant expression","clang/test/Parser/cxx11-user-defined-literals.cpp:30:13: error: character literal with user-defined suffix cannot be used in preprocessor constant expression","clang/test/Parser/cxx11-user-defined-literals.cpp:36:5: error: integer literal with user-defined suffix cannot be used in preprocessor constant expression"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_lifetime_ended"]={ | | ["err_pp_line_digit_sequence"]={ |
| [b]="note_constexpr_lifetime_ended", | | [b]="err_pp_line_digit_sequence", |
| [h]={{nil,m,"%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"},{p,p,"%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"},{v,nil,"%select{read of|assignment to|increment of|decrement of}0 %select{temporary|variable}1 whose lifetime has ended"}}, | | [j]="%select{#line|GNU line marker}0 directive requires a simple digit sequence", |
| [i]={{nil,m,{{F,F,O,P,Q,kb,mb,eb,zc,Gb},rb,{id,"variable"}," whose ",{"storage duration","lifetime"}," has ended"}},{p,p,{{F,O,P,Q,kb,mb,eb},rb,{id,"variable"}," whose lifetime has ended"}},{v,nil,{{F,O,P,Q},rb,{id,"variable"}," whose lifetime has ended"}}}, | | [i]={{nil,nil,{{"#line","GNU line marker"}," directive requires a simple digit sequence"}}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:read of|read of|assignment to|increment of|decrement of|member call on|dynamic_cast of|typeid applied to|construction of|destruction of) (?:temporary|variable) whose (?:storage duration|lifetime) has ended", | | [c]="(?:\\#line|GNU line marker) directive requires a simple digit sequence", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={"d66f172ab1b6",1240079715,"more fun with line markers: the digit string is required to be interpreted","more fun with line markers: the digit string is required to be interpreted\nas decimal, even if it starts with 0. Also, since things like 0x1 are\ncompletely illegal, don\'t even bother using numericliteralparser for them.\n\nllvm-svn: 69454"}, |
| [k]={{o,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 *>();"},{M,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;"}}, | | [d]={{z,1375,"/// GetLineValue - Convert a numeric token into an unsigned value, emitting\n/// Diagnostic DiagID if it is invalid, and returning the value in Val.\nstatic bool GetLineValue(Token &DigitTok, unsigned &Val, unsigned DiagID, Preprocessor &PP, bool IsGNULineDirective = false) {\n // ...\n for (unsigned i = 0; i != ActualLength; ++i) {\n // ...\n if (!isDigit(DigitTokBegin[i])) {\n PP.Diag(PP.AdvanceToTokenCharacter(DigitTok.getLocation(), i), diag::err_pp_line_digit_sequence) << IsGNULineDirective;"}}, |
| [l]={ | | [l]={ |
| [ub]={"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"} | | [ec]={"foo:49:5: error: GNU line marker directive requires a simple digit sequence","foo.c:4:8: error: #line directive requires a simple digit sequence","foo.c:5:9: error: #line directive requires a simple digit sequence"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_literal_comparison"]={ | | ["err_pp_line_invalid_filename"]={ |
| [b]={{nil,q,"note_constexpr_literal_comparison"}}, | | [b]="err_pp_line_invalid_filename", |
| [h]={{nil,q,"comparison of addresses of literals has unspecified value"}}, | | [j]="invalid filename for #line directive", |
| [i]={{nil,q,"comparison of addresses of literals has unspecified value"}}, | | [i]="invalid filename for #line directive", |
| [c]=g, | | [h]=k, |
| [e]="comparison of addresses of literals has unspecified value", | | [c]="invalid filename for \\#line directive", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a}}, | | [e]=p, |
| [j]={rc,1662843785,ec,vc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"}}, | | [d]={{z,1436,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n // ...\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod))\n // ...\n else if (StrTok.isNot(tok::string_literal)) {\n Diag(StrTok, diag::err_pp_line_invalid_filename);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtins.cpp"]={"clang/test/SemaCXX/builtins.cpp:50:43: note: comparison of addresses of literals has unspecified value"} | | [ec]={"clang/test/Preprocessor/line-directive.c:42:10: error: invalid filename for #line directive"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_lshift_discards"]={ | | ["err_pp_line_requires_integer"]={ |
| [b]="note_constexpr_lshift_discards", | | [b]="err_pp_line_requires_integer", |
| [h]="signed left shift discards bits", | | [j]="#line directive requires a positive integer argument", |
| [i]="signed left shift discards bits", | | [i]="#line directive requires a positive integer argument", |
| [c]=g, | | [h]=k, |
| [e]="signed left shift discards bits", | | [c]="\\#line directive requires a positive integer argument", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"}}, | | [d]={{z,1411,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n // ...\n if (GetLineValue(DigitTok, LineNo, diag::err_pp_line_requires_integer, *this))"}}, |
| [l]={ | | [l]={ |
| [pb]={"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"} | | [ec]={"clang/test/Preprocessor/line-directive.c:14:7: error: #line directive requires a positive integer argument"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_lshift_of_negative"]={ | | ["err_pp_linemarker_invalid_filename"]={ |
| [b]="note_constexpr_lshift_of_negative", | | [b]="err_pp_linemarker_invalid_filename", |
| [h]="left shift of negative value %0", | | [j]="invalid filename for line marker directive", |
| [i]="left shift of negative value A", | | [i]="invalid filename for line marker directive", |
| [c]=g, | | [h]=k, |
| [e]="left shift of negative value (.*?)", | | [c]="invalid filename for line marker directive", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"}},
| | [d]={{z,1452,"/// Handle a \\#line directive: C99 6.10.4.\n///\n/// The two acceptable forms are:\n/// \\verbatim\n/// # line digit-sequence\n/// # line digit-sequence \"s-char-sequence\"\n/// \\endverbatim\nvoid Preprocessor::HandleLineDirective() {\n // ...\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod))\n // ...\n else if (StrTok.isNot(tok::string_literal)) {\n // ...\n } else if (StrTok.hasUDSuffix()) {\n // ...\n } else {\n // ...\n if (Literal.Pascal) {\n Diag(StrTok, diag::err_pp_linemarker_invalid_filename);"},{z,1587,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // ...\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod)) {\n // ...\n } else if (StrTok.isNot(tok::string_literal)) {\n Diag(StrTok, diag::err_pp_linemarker_invalid_filename);"},{z,1603,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // ...\n // If the StrTok is \"eod\", then it wasn\'t present. Otherwise, it must be a\n // string followed by eod.\n if (StrTok.is(tok::eod)) {\n // ...\n } else if (StrTok.isNot(tok::string_literal)) {\n // ...\n } else if (StrTok.hasUDSuffix()) {\n // ...\n } else {\n // ...\n if (Literal.Pascal) {\n Diag(StrTok, diag::err_pp_linemarker_invalid_filename);"}}, |
| [l]={ | | [l]={ |
| [pb]={"clang/test/CXX/expr/expr.const/p2-0x.cpp:162:44: note: left shift of negative value -3"} | | [ec]={"foo:44:6: error: invalid filename for line marker directive","foo:45:6: error: invalid filename for line marker directive"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_ltor_incomplete_type"]={ | | ["err_pp_linemarker_invalid_flag"]={ |
| [b]={{nil,v,"note_constexpr_ltor_incomplete_type"}}, | | [b]="err_pp_linemarker_invalid_flag", |
| [h]={{nil,v,"read of incomplete type %0 is not allowed in a constant expression"}}, | | [j]="invalid flag line marker directive", |
| [i]={{nil,v,"read of incomplete type A is not allowed in a constant expression"}}, | | [i]="invalid flag line marker directive", |
| [c]=g, | | [h]=k, |
| [e]="read of incomplete type (.*?) is not allowed in a constant expression", | | [c]="invalid flag line marker directive", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"}},
| | [d]={{z,1488,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{z,1496,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (FlagVal == 1) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{z,1522,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (FlagVal == 1) {\n // ...\n } else if (FlagVal == 2) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{z,1528,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n // We must have 3 if there are still flags.\n if (FlagVal != 3) {\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_flag);"},{z,1537,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (GetLineValue(FlagTok, FlagVal, diag::err_pp_linemarker_invalid_flag, PP))"},{z,1542,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n // We must have 4 if there is yet another flag.\n if (FlagVal != 4) {\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_flag);"},{z,1553,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_flag);"}}, |
| [l]={ | | [l]={ |
| [gc]={"SemaCXX/constexpr-string.cpp:406:17: note: read of incomplete type \'struct Incomplete\' is not allowed in a constant expression"} | | [ec]={"foo:46:14: error: invalid flag line marker directive","foo:47:12: error: invalid flag line marker directive","foo:48:14: error: invalid flag line marker directive"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_ltor_non_const_int"]={ | | ["err_pp_linemarker_invalid_pop"]={ |
| [b]="note_constexpr_ltor_non_const_int", | | [b]="err_pp_linemarker_invalid_pop", |
| [h]="read of non-const variable %0 is not allowed in a constant expression", | | [j]="invalid line marker flag \'2\': cannot pop empty include stack", |
| [i]="read of non-const variable A is not allowed in a constant expression", | | [i]="invalid line marker flag \'2\': cannot pop empty include stack", |
| [c]=g, | | [h]=k, |
| [e]="read of non\\-const variable (.*?) is not allowed in a constant expression", | | [c]="invalid line marker flag \'2\'\\: cannot pop empty include stack", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"}}, | | [d]={{z,1515,"/// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line\n/// marker directive.\nstatic bool ReadLineMarkerFlags(bool &IsFileEntry, bool &IsFileExit, SrcMgr::CharacteristicKind &FileKind, Preprocessor &PP) {\n // ...\n if (FlagVal == 1) {\n // ...\n } else if (FlagVal == 2) {\n // ...\n if (IncLoc.isInvalid() || SM.getDecomposedExpansionLoc(IncLoc).first != CurFileID) {\n PP.Diag(FlagTok, diag::err_pp_linemarker_invalid_pop);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:43:14: note: read of non-const variable \'value\' is not allowed in a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:60:25: note: read of non-const variable \'value\' is not allowed in a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:118:16: note: read of non-const variable \'M\' is not allowed in a constant expression"} | | ["clang/test/Preprocessor/line-directive-system-headers.c"]={"foo:44:12: error: invalid line marker flag \'2\': cannot pop empty include stack","foo:44:12: error: invalid line marker flag \'2\': cannot pop empty include stack"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_ltor_non_constexpr"]={ | | ["err_pp_linemarker_requires_integer"]={ |
| [b]="note_constexpr_ltor_non_constexpr", | | [b]="err_pp_linemarker_requires_integer", |
| [h]="read of non-constexpr variable %0 is not allowed in a constant expression", | | [j]="line marker directive requires a positive integer argument", |
| [i]="read of non-constexpr variable A is not allowed in a constant expression", | | [i]="line marker directive requires a positive integer argument", |
| [c]=g, | | [h]=k, |
| [e]="read of non\\-constexpr variable (.*?) is not allowed in a constant expression", | | [c]="line marker directive requires a positive integer argument", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"},{o,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;"},{o,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;"},{M,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;"}}, | | [d]={{z,1569,"/// HandleDigitDirective - Handle a GNU line marker directive, whose syntax is\n/// one of the following forms:\n///\n/// # 42\n/// # 42 \"file\" (\'1\' | \'2\')?\n/// # 42 \"file\" (\'1\' | \'2\')? \'3\' \'4\'?\n///\nvoid Preprocessor::HandleDigitDirective(Token &DigitTok) {\n // ...\n if (GetLineValue(DigitTok, LineNo, diag::err_pp_linemarker_requires_integer, *this, true))"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_ltor_non_integral"]={ | | ["err_pp_macro_not_identifier"]={ |
| [b]={{nil,t,"note_constexpr_ltor_non_integral"}}, | | [b]="err_pp_macro_not_identifier", |
| [h]={{nil,t,"read of variable %0 of non-integral, non-enumeration type %1 is not allowed in a constant expression"}}, | | [j]="macro name must be an identifier", |
| [i]={{nil,t,"read of variable A of non-integral, non-enumeration type B is not allowed in a constant expression"}}, | | [i]="macro name must be an identifier", |
| [c]=g, | | [h]=k, |
| [e]="read of variable (.*?) of non\\-integral, non\\-enumeration type (.*?) is not allowed in a constant expression", | | [c]="macro name must be an identifier", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,a}}, | | [e]=p, |
| [j]={"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."}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"},{o,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;"},{o,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;"},{o,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();"}}, | | [d]={{z,329,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (!II)\n return Diag(MacroNameTok, diag::err_pp_macro_not_identifier);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/constant-expression.cpp"]={"clang/test/SemaCXX/constant-expression.cpp:103:5: note: read of variable \'p\' of non-integral, non-enumeration type \'const int &\' is not allowed in a constant expression"} | | ["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:9:8: error: macro name must be an identifier","clang/test/Preprocessor/ifdef-recover.c:31:10: error: macro name must be an identifier"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_mem_pointer_weak_comparison"]={ | | ["err_pp_malformed_ident"]={ |
| [b]={{nil,q,"note_constexpr_mem_pointer_weak_comparison"}}, | | [b]="err_pp_malformed_ident", |
| [h]={{nil,q,"comparison against pointer to weak member %q0 can only be performed at runtime"}}, | | [j]="invalid #ident directive", |
| [i]={{nil,q,"comparison against pointer to weak member A can only be performed at runtime"}}, | | [i]="invalid #ident directive", |
| [c]=g, | | [h]=k, |
| [e]="comparison against pointer to weak member (.*?) can only be performed at runtime", | | [c]="invalid \\#ident directive", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a}}, | | [e]=p, |
| [j]={rc,1662843785,ec,vc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"},{o,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();"}}, | | [d]={{z,1674,"/// HandleIdentSCCSDirective - Handle a #ident/#sccs directive.\n///\nvoid Preprocessor::HandleIdentSCCSDirective(Token &Tok) {\n // ...\n // If the token kind isn\'t a string, it\'s a malformed directive.\n if (StrTok.isNot(tok::string_literal) && StrTok.isNot(tok::wide_string_literal)) {\n Diag(StrTok, diag::err_pp_malformed_ident);"}} |
| [l]={
| |
| ["clang/test/SemaCXX/attr-weak.cpp"]={"clang/test/SemaCXX/attr-weak.cpp:49:71: note: comparison against pointer to weak member \'WithWeakMember::weak_method\' can only be performed at runtime","clang/test/SemaCXX/attr-weak.cpp:56:87: note: comparison against pointer to weak member \'WithWeakMember::virtual_weak_method\' can only be performed at runtime"}
| |
| }
| |
| }, | | }, |
| ["note_constexpr_memchr_unsupported"]={ | | ["err_pp_missing_lparen_in_vaopt_use"]={ |
| [b]={{nil,t,"note_constexpr_memchr_unsupported"}}, | | [b]={{nil,B,"err_pp_missing_lparen_in_vaopt_use"}}, |
| [h]={{nil,t,"constant evaluation of %0 on array of type %1 is not supported; only arrays of narrow character types can be searched"}}, | | [j]={{nil,B,"missing \'(\' following __VA_OPT__"}}, |
| [i]={{nil,t,"constant evaluation of A on array of type B is not supported; only arrays of narrow character types can be searched"}}, | | [i]={{nil,B,"missing \'(\' following __VA_OPT__"}}, |
| [c]=g, | | [h]=k, |
| [e]="constant evaluation of (.*?) on array of type (.*?) is not supported; only arrays of narrow character types can be searched", | | [c]="missing \'\\(\' following __VA_OPT__", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,a}}, | | [e]={{nil,B,p}}, |
| [j]={"474177c05381",1579695612,"[AST] Improve overflow diagnostics for fixed-point constant evaluation.","[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"}, | | [g]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)","[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an extension to the preprocessor:\n\n__VA_OPT__(contents) --> which expands into its contents if variadic arguments are supplied to the parent macro, or behaves as an empty token if none.\n\n - Currently this feature is only enabled for C++2a (this could be enabled, with some careful tweaks, for other dialects with the appropriate extension or compatibility warnings)\n\n - The patch was reviewed here: https://reviews.llvm.org/D35782 and asides from the above (and moving some of the definition and expansion recognition logic into the corresponding state machines), I believe I incorporated all of Richard\'s suggestions.\n\nA few technicalities (most of which were clarified through private correspondence between rsmith, hubert and thomas) are worth mentioning. Given:\n\n #define F(a,...) a #__VA_OPT__(a ## a) a ## __VA_OPT__(__VA_ARGS__)\n\n - The call F(,) Does not supply any tokens for the variadic arguments and hence VA_OPT behaves as a placeholder.\n - When expanding VA_OPT (for e.g. F(,1) token pasting occurs eagerly within its contents if the contents need to be stringified.\n - A hash or a hashhash prior to VA_OPT does not inhibit expansion of arguments if they are the first token within VA_OPT.\n - When a variadic argument is supplied, argument substitution occurs within the contents as does stringification - and these resulting tokens are inserted back into the macro expansions token stream just prior to the entire stream being rescanned and concatenated.\n\nSee wg21.link/P0306 for further details on the feature.\n\n\nAcknowledgment: This patch would have been poorer if not for Richard Smith\'s usual thoughtful analysis and feedback.\nllvm-svn: 315840"}, |
| [k]={{o,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;"}}, | | [d]={{z,2916,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) {\n // ...\n if (VAOCtx.isVAOptToken(Tok)) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(Tok, diag::err_pp_missing_lparen_in_vaopt_use);"}}, |
| [l]={ | | [l]={ |
| [gc]={"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"} | | ["clang/test/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:6:29: error: missing \'(\' following __VA_OPT__"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_memcmp_unsupported"]={ | | ["err_pp_missing_macro_name"]={ |
| [b]={{nil,t,"note_constexpr_memcmp_unsupported"}}, | | [b]="err_pp_missing_macro_name", |
| [h]={{nil,t,"constant evaluation of %0 between arrays of types %1 and %2 is not supported; only arrays of narrow character types can be compared"}}, | | [j]="macro name missing", |
| [i]={{nil,t,"constant evaluation of A between arrays of types B and C is not supported; only arrays of narrow character types can be compared"}}, | | [i]="macro name missing", |
| [c]=g, | | [h]=k, |
| [e]="constant evaluation of (.*?) between arrays of types (.*?) and (.*?) is not supported; only arrays of narrow character types can be compared", | | [c]="macro name missing", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,a}}, | | [e]=p, |
| [j]={"474177c05381",1579695612,"[AST] Improve overflow diagnostics for fixed-point constant evaluation.","[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"}}, | | [d]={{z,325,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // Missing macro name?\n if (MacroNameTok.is(tok::eod))\n return Diag(MacroNameTok, diag::err_pp_missing_macro_name);"}}, |
| [l]={ | | [l]={ |
| [gc]={"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"} | | ["clang/test/Preprocessor/ifdef-recover.c"]={"clang/test/Preprocessor/ifdef-recover.c:5:7: error: macro name missing","clang/test/Preprocessor/ifdef-recover.c:13:12: error: macro name missing","clang/test/Preprocessor/ifdef-recover.c:25:9: error: macro name missing"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_memcpy_incomplete_type"]={ | | ["err_pp_missing_rparen_in_macro_def"]={ |
| [b]={{nil,v,"note_constexpr_memcpy_incomplete_type"}}, | | [b]="err_pp_missing_rparen_in_macro_def", |
| [h]={{nil,v,"cannot constant evaluate \'%select{memcpy|memmove}0\' between objects of incomplete type %1"}}, | | [j]="missing \')\' in macro parameter list", |
| [i]={{nil,v,{"cannot constant evaluate \'",{Ed,"memmove"},"\' between objects of incomplete type B"}}}, | | [i]="missing \')\' in macro parameter list", |
| [c]=g, | | [h]=k, |
| [e]="cannot constant evaluate \'(?:memcpy|memmove)\' between objects of incomplete type (.*?)", | | [c]="missing \'\\)\' in macro parameter list", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"}},
| | [d]={{z,2690,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n case tok::ellipsis: // #define X(... -> C99 varargs\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);"},{z,2699,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n case tok::eod: // #define X(\n Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);"},{z,2740,"/// ReadMacroParameterList - The ( starting a parameter list of a macro\n/// definition has just been read. Lex the rest of the parameters and the\n/// closing ), updating MI with what we learn. Return true if an error occurs\n/// parsing the param list.\nbool Preprocessor::ReadMacroParameterList(MacroInfo *MI, Token &Tok) {\n // ...\n while (true) {\n // ...\n default:\n // ...\n case tok::ellipsis: // #define X(A... -> GCC extension\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(Tok, diag::err_pp_missing_rparen_in_macro_def);"}} |
| [l]={
| |
| [gc]={"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"]={ | | ["err_pp_module_begin_no_module_map"]={ |
| [b]={{nil,v,"note_constexpr_memcpy_nontrivial"}}, | | [b]={{nil,n,"err_pp_module_begin_no_module_map"}}, |
| [h]={{nil,v,"cannot constant evaluate \'%select{memcpy|memmove}0\' between objects of non-trivially-copyable type %1"}}, | | [j]={{nil,n,"no module map available for module %0"}}, |
| [i]={{nil,v,{"cannot constant evaluate \'",{Ed,"memmove"},"\' between objects of non-trivially-copyable type B"}}}, | | [i]={{nil,n,"no module map available for module A"}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot constant evaluate \'(?:memcpy|memmove)\' between objects of non\\-trivially\\-copyable type (.*?)", | | [c]="no module map available for module (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]={{nil,n,p}}, |
| [j]={"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"}, | | [g]={Ib,1493857794,Jb,yb}, |
| [k]={{o,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;"}},
| | [d]={{H,1758,"/// Handle the clang \\#pragma module begin extension. The syntax is:\n/// \\code\n/// #pragma clang module begin some.module.name\n/// ...\n/// #pragma clang module end\n/// \\endcode\nstruct PragmaModuleBeginHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (!M) {\n PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_no_module_map) << Current;"}} |
| [l]={
| |
| [gc]={"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"]={ | | ["err_pp_module_begin_no_submodule"]={ |
| [b]={{nil,v,"note_constexpr_memcpy_null"}}, | | [b]={{nil,n,"err_pp_module_begin_no_submodule"}}, |
| [h]={{nil,v,"%select{source|destination}2 of \'%select{%select{memcpy|wmemcpy}1|%select{memmove|wmemmove}1}0\' is %3"}}, | | [j]={{nil,n,"submodule %0.%1 not declared in module map"}}, |
| [i]={{nil,v,{{k,"destination"}," of \'",{{{Ed,"wmemcpy"}},{{"memmove","wmemmove"}}},"\' is D"}}}, | | [i]={{nil,n,"submodule A.B not declared in module map"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:source|destination) of \'(?:(?:memcpy|wmemcpy)|(?:memmove|wmemmove))\' is (.*?)", | | [c]="submodule (.*?)\\.(.*?) not declared in module map", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]={{nil,n,p}}, |
| [j]={"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"}, | | [g]={Ib,1493857794,Jb,yb}, |
| [k]={{o,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());"}}, | | [d]={{H,1764,"/// Handle the clang \\#pragma module begin extension. The syntax is:\n/// \\code\n/// #pragma clang module begin some.module.name\n/// ...\n/// #pragma clang module end\n/// \\endcode\nstruct PragmaModuleBeginHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n for (unsigned I = 1; I != ModuleName.size(); ++I) {\n // ...\n if (!NewM) {\n PP.Diag(ModuleName[I].second, diag::err_pp_module_begin_no_submodule) << M->getFullModuleName() << ModuleName[I].first;"}} |
| [l]={
| |
| [gc]={"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"]={ | | ["err_pp_module_begin_without_module_end"]={ |
| [b]={{nil,v,"note_constexpr_memcpy_overlap"}}, | | [b]={{nil,n,"err_pp_module_begin_without_module_end"}}, |
| [h]={{nil,v,"\'%select{memcpy|wmemcpy}0\' between overlapping memory regions"}}, | | [j]={{nil,n,"no matching \'#pragma clang module end\' for this \'#pragma clang module begin\'"}}, |
| [i]={{nil,v,{"\'",{Ed,"wmemcpy"},"\' between overlapping memory regions"}}}, | | [i]={{nil,n,"no matching \'#pragma clang module end\' for this \'#pragma clang module begin\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="\'(?:memcpy|wmemcpy)\' between overlapping memory regions", | | [c]="no matching \'\\#pragma clang module end\' for this \'\\#pragma clang module begin\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]={{nil,n,p}}, |
| [j]={"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"}, | | [g]={Ib,1493857794,Jb,yb}, |
| [k]={{o,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;"},{o,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;"}}, | | [d]={{Hb,353,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if ((LeavingSubmodule || IncludeMacroStack.empty()) && !BuildingSubmoduleStack.empty() && BuildingSubmoduleStack.back().IsPragma) {\n Diag(BuildingSubmoduleStack.back().ImportLoc, diag::err_pp_module_begin_without_module_end);"}}, |
| [l]={ | | [l]={ |
| [gc]={"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"} | | ["clang/test/Preprocessor/pragma_module.c"]={"clang/test/Preprocessor/pragma_module.c:52:22: error: no matching \'#pragma clang module end\' for this \'#pragma clang module begin\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_memcpy_type_pun"]={ | | ["err_pp_module_begin_wrong_module"]={ |
| [b]={{nil,v,"note_constexpr_memcpy_type_pun"}}, | | [b]={{nil,n,"err_pp_module_begin_wrong_module"}}, |
| [h]={{nil,v,"cannot constant evaluate \'%select{memcpy|memmove}0\' from object of type %1 to object of type %2"}}, | | [j]={{nil,n,"must specify \'-fmodule-name=%0\' to enter %select{|submodule of }1this module%select{ (current module is %3)|}2"}}, |
| [i]={{nil,v,{"cannot constant evaluate \'",{Ed,"memmove"},"\' from object of type B to object of type C"}}}, | | [i]={{nil,n,{"must specify \'-fmodule-name=A\' to enter ",{a,"submodule of "},"this module",{" (current module is D)",a}}}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot constant evaluate \'(?:memcpy|memmove)\' from object of type (.*?) to object of type (.*?)", | | [c]="must specify \'\\-fmodule\\-name\\=(.*?)\' to enter (?:|submodule of )this module(?: \\(current module is (.*?)\\)|)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]={{nil,n,p}}, |
| [j]={"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"}, | | [g]={Ib,1493857794,Jb,yb}, |
| [k]={{o,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;"}},
| | [d]={{H,1746,"/// Handle the clang \\#pragma module begin extension. The syntax is:\n/// \\code\n/// #pragma clang module begin some.module.name\n/// ...\n/// #pragma clang module end\n/// \\endcode\nstruct PragmaModuleBeginHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (ModuleName.front().first->getName() != Current) {\n PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_wrong_module) << ModuleName.front().first << (ModuleName.size() > 1) << Current.empty() << Current;"}} |
| [l]={
| |
| [gc]={"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"]={ | | ["err_pp_module_build_missing_end"]={ |
| [b]={{nil,v,"note_constexpr_memcpy_unsupported"}}, | | [b]={{nil,n,"err_pp_module_build_missing_end"}}, |
| [h]={{nil,v,"\'%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"}}, | | [j]={{nil,n,"no matching \'#pragma clang module endbuild\' for this \'#pragma clang module build\'"}}, |
| [i]={{nil,v,{"\'",{{{Ed,"wmemcpy"}},{{"memmove","wmemmove"}}},"\' not supported: ",{"size to copy (E) is not a multiple of size of element type D (F)","source is not a contiguous array of at least E elements of type D","destination is not a contiguous array of at least E elements of type D"}}}}, | | [i]={{nil,n,"no matching \'#pragma clang module endbuild\' for this \'#pragma clang module build\'"}}, |
| [c]=g, | | [h]=k, |
| [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 (.*?))", | | [c]="no matching \'\\#pragma clang module endbuild\' for this \'\\#pragma clang module build\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,a}}, | | [e]={{nil,n,p}}, |
| [j]={"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"}, | | [g]={"5d2ed489870c",1497036152,"Add #pragma clang module build/endbuild pragmas for performing a module build","Add #pragma clang module build/endbuild pragmas for performing a module build\nas part of a compilation.\n\nThis is intended for two purposes:\n\n1) Writing self-contained test cases for modules: we can now write a single\nsource file test that builds some number of module files on the side and\nimports them.\n\n2) Debugging / test case reduction. A single-source testcase is much more\namenable to reduction, compared to a VFS tarball or .pcm files.\n\nllvm-svn: 305101"}, |
| [k]={{o,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;"},{o,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);"}}, | | [d]={{H,841,"void Preprocessor::HandlePragmaModuleBuild(Token &Tok) {\n // ...\n while (true) {\n // ...\n if (Tok.is(tok::eof)) {\n Diag(Loc, diag::err_pp_module_build_missing_end);"}}, |
| [l]={ | | [l]={ |
| [gc]={"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\'"} | | ["clang/test/Modules/preprocess-build.cpp"]={"clang/test/Modules/preprocess-build.cpp:35:22: error: no matching \'#pragma clang module endbuild\' for this \'#pragma clang module build\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_memory_leak"]={ | | ["err_pp_module_end_without_module_begin"]={ |
| [b]={{nil,m,"note_constexpr_memory_leak"}}, | | [b]={{nil,n,"err_pp_module_end_without_module_begin"}}, |
| [h]={{nil,m,"allocation performed here was not deallocated%plural{0:|: (along with %0 other memory leak%s0)}0"}}, | | [j]={{nil,n,"no matching \'#pragma clang module begin\' for this \'#pragma clang module end\'"}}, |
| [i]={{nil,m,{"allocation performed here was not deallocated",{a," (along with A other memory leakA)"}}}}, | | [i]={{nil,n,"no matching \'#pragma clang module begin\' for this \'#pragma clang module end\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="allocation performed here was not deallocated(?:| \\(along with (.*?) other memory leak(.*?)\\))", | | [c]="no matching \'\\#pragma clang module begin\' for this \'\\#pragma clang module end\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]={{nil,n,p}}, |
| [j]={ob,1569547607,jb,lb}, | | [g]={Ib,1493857794,Jb,yb}, |
| [k]={{o,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);"}}, | | [d]={{H,1802,"/// Handle the clang \\#pragma module end extension.\nstruct PragmaModuleEndHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (M)\n // ...\n else\n PP.Diag(Loc, diag::err_pp_module_end_without_module_begin);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/static-assert-cxx26.cpp"]={"clang/test/SemaCXX/static-assert-cxx26.cpp:121:16: note: allocation performed here was not deallocated"} | | ["clang/test/Modules/preprocess-unavailable.cpp"]={"clang/test/Modules/preprocess-unavailable.cpp:12:22: error: no matching \'#pragma clang module begin\' for this \'#pragma clang module end\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_modify_const_type"]={ | | ["err_pp_nested_paren"]={ |
| [b]="note_constexpr_modify_const_type", | | [b]="err_pp_nested_paren", |
| [h]="modification of object of const-qualified type %0 is not allowed in a constant expression", | | [j]="nested parentheses not permitted in %0", |
| [i]="modification of object of const-qualified type A is not allowed in a constant expression", | | [i]="nested parentheses not permitted in A", |
| [c]=g, | | [h]=k, |
| [e]="modification of object of const\\-qualified type (.*?) is not allowed in a constant expression", | | [c]="nested parentheses not permitted in (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={"50b6ceff1f06",1459845407,"Consolidate and improve the handling of built-in feature-like macros","Consolidate and improve the handling of built-in feature-like macros\n\nSummary:\nThe parsing logic has been separated out from the macro implementation logic, leading to a number of improvements:\n\n* Gracefully handle unexpected/invalid tokens, too few, too many and nested parameters\n* Provide consistent behaviour between all built-in feature-like macros\n* Simplify the implementation of macro logic\n* Fix __is_identifier to correctly return \'0\' for non-identifiers\n\nReviewers: doug.gregor, rsmith\n\nSubscribers: rsmith, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D17149\n\nllvm-svn: 265381"}, |
| [k]={{o,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;"},{o,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;"},{o,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;"},{M,219,"bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_modify_const_type) << Ty;"}},
| | [d]={{ab,1337,"/// Process single-argument builtin feature-like macros that return\n/// integer values.\nstatic void EvaluateFeatureLikeBuiltinMacro(llvm::raw_svector_ostream &OS, Token &Tok, IdentifierInfo *II, Preprocessor &PP, bool ExpandArgs, llvm::function_ref<int(Token &Tok, bool &HasLexedNextTok)> Op) {\n // ...\n already_lexed:\n // ...\n case tok::l_paren:\n // ...\n if (!SuppressDiagnostic) {\n PP.Diag(Tok.getLocation(), diag::err_pp_nested_paren) << II;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Preprocessor/feature_tests.c"]={"clang/test/Preprocessor/feature_tests.c:122:21: error: nested parentheses not permitted in \'__is_identifier\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_modify_global"]={ | | ["err_pp_operator_used_as_macro_name"]={ |
| [b]="note_constexpr_modify_global", | | [b]="err_pp_operator_used_as_macro_name", |
| [h]="a constant expression cannot modify an object that is visible outside that expression", | | [j]="C++ operator %0 (aka %1) used as a macro name", |
| [i]="a constant expression cannot modify an object that is visible outside that expression", | | [i]="C++ operator A (aka B) used as a macro name", |
| [c]=g, | | [h]=k, |
| [e]="a constant expression cannot modify an object that is visible outside that expression", | | [c]="C\\+\\+ operator (.*?) \\(aka (.*?)\\) used as a macro name", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={Dc,1366986990,Bc,xc}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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);"},{o,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);"},{o,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);"},{o,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);"},{M,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);"}}, | | [d]={{z,336,"bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {\n // ...\n if (II->isCPlusPlusOperatorKeyword()) {\n // ...\n Diag(MacroNameTok, getLangOpts().MicrosoftExt ? diag::ext_pp_operator_used_as_macro_name : diag::err_pp_operator_used_as_macro_name) << II << MacroNameTok.getKind();"}}, |
| [l]={ | | [l]={ |
| [pb]={"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"} | | ["clang/test/Preprocessor/cxx_oper_keyword.cpp"]={"clang/test/Preprocessor/cxx_oper_keyword.cpp:16:9: error: C++ operator \'and\' (aka \'&&\') used as a macro name","clang/test/Preprocessor/cxx_oper_keyword.cpp:21:13: error: C++ operator \'xor\' (aka \'^\') used as a macro name","clang/test/Preprocessor/cxx_oper_keyword.cpp:29:8: error: C++ operator \'and\' (aka \'&&\') used as a macro name"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_negative_shift"]={ | | ["err_pp_pragma_hdrstop_not_seen"]={ |
| [b]="note_constexpr_negative_shift", | | [b]={{nil,u,"err_pp_pragma_hdrstop_not_seen"}}, |
| [h]="negative shift count %0", | | [j]={{nil,u,"#pragma hdrstop not seen while attempting to use precompiled header"}}, |
| [i]="negative shift count A", | | [i]={{nil,u,"#pragma hdrstop not seen while attempting to use precompiled header"}}, |
| [c]=g, | | [h]=mc, |
| [e]="negative shift count (.*?)", | | [c]="\\#pragma hdrstop not seen while attempting to use precompiled header", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,u,p}}, |
| [j]={"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"}, | | [g]={"58df1affedc0",1536685844,"[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop","[clang-cl, PCH] Support for /Yc and /Yu without filename and #pragma hdrstop\n\nWith clang-cl, when the user specifies /Yc or /Yu without a filename\nthe compiler uses a #pragma hdrstop in the main source file to\ndetermine the end of the PCH. If a header is specified with /Yc or\n/Yu #pragma hdrstop has no effect.\n\nThe optional #pragma hdrstop filename argument is not yet supported.\n\nDifferential Revision: https://reviews.llvm.org/D51391\n\nllvm-svn: 341963"}, |
| [k]={{o,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;"},{o,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;"},{o,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;"}}, | | [d]={{"clang/lib/Lex/Preprocessor.cpp",675,"/// Skip tokens until after the #include of the through header or\n/// until after a #pragma hdrstop is seen. Tokens in the predefines file\n/// and the main file may be skipped. If the end of the predefines file\n/// is reached, skipping continues into the main file. If the end of the\n/// main file is reached, it\'s a fatal error.\nvoid Preprocessor::SkipTokensWhileUsingPCH() {\n // ...\n if (ReachedMainFileEOF) {\n if (UsingPCHThroughHeader)\n // ...\n else if (!PPOpts->PCHWithHdrStopCreate)\n Diag(SourceLocation(), diag::err_pp_pragma_hdrstop_not_seen);"}} |
| [l]={
| |
| [pb]={"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"]={ | | ["err_pp_pragma_unsafe_buffer_usage_syntax"]={ |
| [b]={{nil,m,"note_constexpr_new"}}, | | [b]="err_pp_pragma_unsafe_buffer_usage_syntax", |
| [h]={{nil,m,"dynamic memory allocation is not permitted in constant expressions until C++20"}}, | | [j]="Expected \'begin\' or \'end\'", |
| [i]={{nil,m,"dynamic memory allocation is not permitted in constant expressions until C++20"}}, | | [i]="Expected \'begin\' or \'end\'", |
| [c]=g, | | [h]=k, |
| [e]="dynamic memory allocation is not permitted in constant expressions until C\\+\\+20", | | [c]="Expected \'begin\' or \'end\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{o,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);"},{o,9563,"bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) {\n if (!Info.getLangOpts().CPlusPlus20)\n Info.CCEDiag(E, diag::note_constexpr_new);"},{o,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);"}}, | | [d]={{H,1257,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok, diag::err_pp_pragma_unsafe_buffer_usage_syntax);"},{H,1271,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n // ...\n } else if (II->isStr(\"end\")) {\n // ...\n } else\n PP.Diag(Tok, diag::err_pp_pragma_unsafe_buffer_usage_syntax);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/builtin-object-size-cxx14.cpp"]={"clang/test/SemaCXX/builtin-object-size-cxx14.cpp:119:13: note: dynamic memory allocation is not permitted in constant expressions until C++20"} | | ["clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp:21:35: error: Expected \'begin\' or \'end\'","clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp:22:35: error: Expected \'begin\' or \'end\'"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_new_delete_mismatch"]={ | | ["err_pp_remainder_by_zero"]={ |
| [b]={{nil,m,"note_constexpr_new_delete_mismatch"}}, | | [b]="err_pp_remainder_by_zero", |
| [h]={{nil,m,"%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"}}, | | [j]="remainder by zero in preprocessor expression", |
| [i]={{nil,m,{{"\'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 C","non-array object of type C","object allocated with \'new\'"}}}}}}, | | [i]="remainder by zero in preprocessor expression", |
| [c]=g, | | [h]=k, |
| [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\'))", | | [c]="remainder by zero in preprocessor expression", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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;"}}, | | [d]={{Y,709,"/// EvaluateDirectiveSubExpr - Evaluate the subexpression whose first token is\n/// PeekTok, and whose precedence is PeekPrec. This returns the result in LHS.\n///\n/// If ValueLive is false, then this value is being evaluated in a context where\n/// the result is not used. As such, avoid diagnostics that relate to\n/// evaluation, such as division by zero warnings.\nstatic bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, bool &IncludedUndefinedIds, Preprocessor &PP) {\n // ...\n while (true) {\n // ...\n case tok::percent:\n if (RHS.Val != 0)\n // ...\n else if (ValueLive) {\n PP.Diag(OpLoc, diag::err_pp_remainder_by_zero) << LHS.getRange() << RHS.getRange();"}} |
| [l]={
| |
| [uc]={"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"]={ | | ["err_pp_stringize_not_parameter"]={ |
| [b]={{nil,m,"note_constexpr_new_negative"}}, | | [b]="err_pp_stringize_not_parameter", |
| [h]={{nil,m,"cannot allocate array; evaluated array bound %0 is negative"}}, | | [j]="\'%select{#|#@}0\' is not followed by a macro parameter", |
| [i]={{nil,m,"cannot allocate array; evaluated array bound A is negative"}}, | | [i]={{nil,nil,{"\'",{"#","#@"},"\' is not followed by a macro parameter"}}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot allocate array; evaluated array bound (.*?) is negative", | | [c]="\'(?:\\#|\\#@)\' is not followed by a macro parameter", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]=p, |
| [j]={ob,1569547607,jb,lb}, | | [g]={s,1236199783,q,r}, |
| [k]={{o,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();"}}, | | [d]={{z,2999,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n // Check for a valid macro arg identifier or __VA_OPT__.\n if (!VAOCtx.isVAOptToken(Tok) && (Tok.getIdentifierInfo() == nullptr || MI->getParameterNum(Tok.getIdentifierInfo()) == -1)) {\n // If this is assembler-with-cpp mode, we accept random gibberish after\n // the \'#\' because \'#\' is often a comment character. However, change\n // the kind of the token to tok::unknown so that the preprocessor isn\'t\n // confused.\n if (getLangOpts().AsmPreprocessor && Tok.isNot(tok::eod)) {\n // ...\n } else {\n Diag(Tok, diag::err_pp_stringize_not_parameter) << LastTok.is(tok::hashat);"}}, |
| [l]={ | | [l]={ |
| [ub]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:888:22: note: cannot allocate array; evaluated array bound -1 is negative"} | | ["clang/test/Preprocessor/stringize_skipped.c"]={"clang/test/Preprocessor/stringize_skipped.c:5:20: error: \'#\' is not followed by a macro parameter"} |
| } | | } |
| }, | | }, |
| ["note_constexpr_new_non_replaceable"]={ | | ["err_pp_through_header_not_found"]={ |
| [b]={{nil,m,"note_constexpr_new_non_replaceable"}}, | | [b]={{nil,K,"err_pp_through_header_not_found"}}, |
| [h]={{nil,m,"call to %select{placement|class-specific}0 %1"}}, | | [j]={{nil,K,"\'%0\' required for precompiled header not found"}}, |
| [i]={{nil,m,{"call to ",{"placement","class-specific"}," B"}}}, | | [i]={{nil,K,"\'A\' required for precompiled header not found"}}, |
| [c]=g, | | [h]=mc, |
| [e]="call to (?:placement|class\\-specific) (.*?)", | | [c]="\'(.*?)\' required for precompiled header not found", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,a}}, | | [e]={{nil,K,p}}, |
| [j]={ob,1569547607,jb,lb}, | | [g]={"76675de15cfc",1530811333,"[clang-cl, PCH] Implement support for MS-style PCH through headers","[clang-cl, PCH] Implement support for MS-style PCH through headers\n\nImplement support for MS-style PCH through headers.\n\nThis enables support for /Yc and /Yu where the through header is either\non the command line or included in the source. It replaces the current\nsupport the requires the header also be specified with /FI.\n\nThis change adds a -cc1 option -pch-through-header that is used to either\nstart or stop compilation during PCH create or use.\n\nWhen creating a PCH, the compilation ends after compilation of the through\nheader.\n\nWhen using a PCH, tokens are skipped until after the through header is seen.\n\nPatch By: mikerice\nDifferential Revision: https://reviews.llvm.org/D46652\n\nllvm-svn: 336379"}, |
| [k]={{o,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;"},{o,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;"},{o,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;"}},
| | [d]={{"clang/lib/Lex/Preprocessor.cpp",587,"/// EnterMainSourceFile - Enter the specified FileID as the main source file,\n/// which implicitly adds the builtin defines etc.\nvoid Preprocessor::EnterMainSourceFile() {\n // ...\n if (!PPOpts->PCHThroughHeader.empty()) {\n // ...\n if (!File) {\n Diag(SourceLocation(), diag::err_pp_through_header_not_found) << PPOpts->PCHThroughHeader;"}} |
| [l]={
| |
| [uc]={"clang/test/SemaCXX/cxx2a-constexpr-dynalloc.cpp:95:3: note: call to placement \'operator new\'"}
| |
| }
| |
| },
| |
| ["note_constexpr_new_not_complete_object_type"]={
| |
| [b]={{nil,m,"note_constexpr_new_not_complete_object_type"}},
| |
| [h]={{nil,m,"cannot allocate memory of %select{incomplete|function}0 type %1"}},
| |
| [i]={{nil,m,{"cannot allocate memory of ",{"incomplete",Qc}," type B"}}},
| |
| [c]=g,
| |
| [e]="cannot allocate memory of (?:incomplete|function) type (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| [uc]={"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"]={
| |
| [b]={{nil,m,"note_constexpr_new_placement"}},
| |
| [h]={{nil,m,"this placement new expression is not yet supported in constant expressions"}},
| |
| [i]={{nil,m,"this placement new expression is not yet supported in constant expressions"}},
| |
| [c]=g,
| |
| [e]="this placement new expression is not yet supported in constant expressions",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={ob,1569547607,jb,lb},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [ub]={"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"]={
| |
| [b]={{nil,m,"note_constexpr_new_too_large"}},
| |
| [h]={{nil,m,"cannot allocate array; evaluated array bound %0 is too large"}},
| |
| [i]={{nil,m,"cannot allocate array; evaluated array bound A is too large"}},
| |
| [c]=g,
| |
| [e]="cannot allocate array; evaluated array bound (.*?) is too large",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={ob,1569547607,jb,lb},
| |
| [k]={{o,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);"},{o,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();"}},
| |
| [l]={
| |
| [ub]={"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"]={
| |
| [b]={{nil,m,"note_constexpr_new_too_small"}},
| |
| [h]={{nil,m,"cannot allocate array; evaluated array bound %0 is too small to hold %1 explicitly initialized elements"}},
| |
| [i]={{nil,m,"cannot allocate array; evaluated array bound A is too small to hold B explicitly initialized elements"}},
| |
| [c]=g,
| |
| [e]="cannot allocate array; evaluated array bound (.*?) is too small to hold (.*?) explicitly initialized elements",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={ob,1569547607,jb,lb},
| |
| [k]={{o,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();"}},
| |
| [l]={
| |
| [ub]={"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"]={
| |
| [b]={{nil,m,"note_constexpr_new_untyped"}},
| |
| [h]={{nil,m,"cannot allocate untyped memory in a constant expression; use \'std::allocator<T>::allocate\' to allocate memory of type \'T\'"}},
| |
| [i]={{nil,m,"cannot allocate untyped memory in a constant expression; use \'std::allocator<T>::allocate\' to allocate memory of type \'T\'"}},
| |
| [c]=g,
| |
| [e]="cannot allocate untyped memory in a constant expression; use \'std\\:\\:allocator\\<T\\>\\:\\:allocate\' to allocate memory of type \'T\'",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [uc]={"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"]={
| |
| [b]="note_constexpr_no_return",
| |
| [h]="control reached end of constexpr function",
| |
| [i]="control reached end of constexpr function",
| |
| [c]=g,
| |
| [e]="control reached end of constexpr function",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constant-expression-cxx14.cpp"]={"clang/test/SemaCXX/constant-expression-cxx14.cpp:70:1: note: control reached end of constexpr function","clang/test/SemaCXX/constant-expression-cxx14.cpp:70:1: note: control reached end of constexpr function"}
| |
| }
| |
| },
| |
| ["note_constexpr_non_global"]={
| |
| [b]="note_constexpr_non_global",
| |
| [h]="%select{pointer|reference}0 to %select{|subobject of }1%select{temporary|%3}2 is not a constant expression",
| |
| [i]={{nil,nil,{{Md,Hb}," to ",{a,"subobject of "},{id,"D"}," is not a constant expression"}}},
| |
| [c]=g,
| |
| [e]="(?:pointer|reference) to (?:|subobject of )(?:temporary|(.*?)) is not a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Uc,1323758398,Zc,Yc},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/cxx2a-consteval.cpp"]={"clang/test/SemaCXX/cxx2a-consteval.cpp:302:11: note: reference to temporary is not a constant expression","clang/test/SemaCXX/cxx2a-consteval.cpp:304:11: note: reference to temporary is not a constant expression","clang/test/SemaCXX/cxx2a-consteval.cpp:360:11: note: reference to temporary is not a constant expression","clang/test/SemaCXX/cxx2a-consteval.cpp:362:11: note: reference to temporary is not a constant expression","clang/test/SemaCXX/cxx2a-consteval.cpp:412:7: note: pointer to temporary is not a constant expression","clang/test/SemaCXX/cxx2a-consteval.cpp:428:7: note: pointer to temporary is not a constant expression"}
| |
| }
| |
| },
| |
| ["note_constexpr_nonliteral"]={
| |
| [b]="note_constexpr_nonliteral",
| |
| [h]="non-literal type %0 cannot be used in a constant expression",
| |
| [i]="non-literal type A cannot be used in a constant expression",
| |
| [c]=g,
| |
| [e]="non\\-literal type (.*?) cannot be used in a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Uc,1323758398,Zc,Yc},
| |
| [k]={{o,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();"},{o,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();"},{o,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();"},{o,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();"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constexpr-value-init.cpp"]={"clang/test/SemaCXX/constexpr-value-init.cpp:38:19: note: non-literal type \'Z<V>\' cannot be used in a constant expression"}
| |
| }
| |
| },
| |
| ["note_constexpr_not_static"]={
| |
| [b]={{nil,s,"note_constexpr_not_static"}},
| |
| [h]={{nil,s,"address of non-static constexpr variable %0 may differ on each invocation of the enclosing function; add \'static\' to give it a constant address"}},
| |
| [i]={{nil,s,"address of non-static constexpr variable A may differ on each invocation of the enclosing function; add \'static\' to give it a constant address"}},
| |
| [c]=g,
| |
| [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,
| |
| [d]={{nil,s,a}},
| |
| [j]={"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."},
| |
| [k]={{o,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 \");"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/builtins.cpp"]={"clang/test/SemaCXX/builtins.cpp:128:17: note: address of non-static constexpr variable \'i\' may differ on each invocation of the enclosing function; add \'static\' to give it a constant address"}
| |
| }
| |
| },
| |
| ["note_constexpr_null_callee"]={
| |
| [b]="note_constexpr_null_callee",
| |
| [h]="\'%0\' evaluates to a null function pointer",
| |
| [i]="\'A\' evaluates to a null function pointer",
| |
| [c]=g,
| |
| [e]="\'(.*?)\' evaluates to a null function pointer",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={rc,1662843785,ec,vc},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [cd]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:282:54: note: \'F\' evaluates to a null function pointer"}
| |
| }
| |
| },
| |
| ["note_constexpr_null_subobject"]={
| |
| [b]="note_constexpr_null_subobject",
| |
| [h]={{nil,p,"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"},{v,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"}},
| |
| [i]={{nil,p,{"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"}},{v,nil,{"cannot ",{"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"}," null pointer"}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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; });"},{M,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;"},{M,182,"bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_null_subobject) << CSK;"}},
| |
| [l]={
| |
| ["clang/test/AST/Interp/arrays.cpp"]={"clang/test/AST/Interp/arrays.cpp:73:24: note: cannot perform pointer arithmetic on null pointer"}
| |
| }
| |
| },
| |
| ["note_constexpr_operator_new_bad_size"]={
| |
| [b]={{nil,m,"note_constexpr_operator_new_bad_size"}},
| |
| [h]={{nil,m,"allocated size %0 is not a multiple of size %1 of element type %2"}},
| |
| [i]={{nil,m,"allocated size A is not a multiple of size B of element type C"}},
| |
| [c]=g,
| |
| [e]="allocated size (.*?) is not a multiple of size (.*?) of element type (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| [uc]={"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"]={
| |
| [b]="note_constexpr_overflow",
| |
| [h]="value %0 is outside the range of representable values of type %1",
| |
| [i]="value A is outside the range of representable values of type B",
| |
| [c]=g,
| |
| [e]="value (.*?) is outside the range of representable values of type (.*?)",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Uc,1323758398,Zc,Yc},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constant-expression-cxx1z.cpp"]={"clang/test/SemaCXX/constant-expression-cxx1z.cpp:6:36: note: value 6442450941 is outside the range of representable values of type \'int\'"}
| |
| }
| |
| },
| |
| ["note_constexpr_past_end"]={
| |
| [b]="note_constexpr_past_end",
| |
| [h]="dereferenced pointer past the end of %select{|subobject of }0%select{temporary|%2}1 is not a constant expression",
| |
| [i]={{nil,nil,{"dereferenced pointer past the end of ",{a,"subobject of "},{id,"C"}," is not a constant expression"}}},
| |
| [c]=g,
| |
| [e]="dereferenced pointer past the end of (?:|subobject of )(?:temporary|(.*?)) is not a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Uc,1323758398,Zc,Yc},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp"]={"clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:30:20: note: dereferenced pointer past the end of \'n\' is not a constant expression","clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:31:20: note: dereferenced pointer past the end of \'n\' is not a constant expression","clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:36:20: note: dereferenced pointer past the end of subobject of \'s\' is not a constant expression","clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp:37:20: note: dereferenced pointer past the end of subobject of \'s\' is not a constant expression"}
| |
| }
| |
| },
| |
| ["note_constexpr_past_end_subobject"]={
| |
| [b]="note_constexpr_past_end_subobject",
| |
| [h]={{nil,p,"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"},{v,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"}},
| |
| [i]={{nil,p,{"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"}},{v,nil,{"cannot ",{"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"}," pointer past the end of object"}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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;"},{M,200,"bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) {\n // ...\n S.FFDiag(Loc, diag::note_constexpr_past_end_subobject) << CSK;"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]={{nil,m,"note_constexpr_placement_new_wrong_type"}},
| |
| [h]={{nil,m,"placement new would change type of storage from %0 to %1"}},
| |
| [i]={{nil,m,"placement new would change type of storage from A to B"}},
| |
| [c]=g,
| |
| [e]="placement new would change type of storage from (.*?) to (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| [uc]={"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"]={
| |
| [b]="note_constexpr_pointer_comparison_base_classes",
| |
| [h]="comparison of addresses of subobjects of different base classes has unspecified value",
| |
| [i]="comparison of addresses of subobjects of different base classes has unspecified value",
| |
| [c]=g,
| |
| [e]="comparison of addresses of subobjects of different base classes has unspecified value",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]="note_constexpr_pointer_comparison_base_field",
| |
| [h]="comparison of address of base class subobject %0 of class %1 to field %2 has unspecified value",
| |
| [i]="comparison of address of base class subobject A of class B to field C has unspecified value",
| |
| [c]=g,
| |
| [e]="comparison of address of base class subobject (.*?) of class (.*?) to field (.*?) has unspecified value",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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;"},{o,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;"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]="note_constexpr_pointer_comparison_differing_access",
| |
| [h]="comparison of address of fields %0 and %2 of %4 with differing access specifiers (%1 vs %3) has unspecified value",
| |
| [i]="comparison of address of fields A and C of E with differing access specifiers (B vs D) has unspecified value",
| |
| [c]=g,
| |
| [e]="comparison of address of fields (.*?) and (.*?) of (.*?) with differing access specifiers \\((.*?) vs (.*?)\\) has unspecified value",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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();"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]={{nil,q,"note_constexpr_pointer_comparison_past_end"}},
| |
| [h]={{nil,q,"comparison against pointer \'%0\' that points past the end of a complete object has unspecified value"}},
| |
| [i]={{nil,q,"comparison against pointer \'A\' that points past the end of a complete object has unspecified value"}},
| |
| [c]=g,
| |
| [e]="comparison against pointer \'(.*?)\' that points past the end of a complete object has unspecified value",
| |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={rc,1662843785,ec,vc},
| |
| [k]={{o,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);"},{o,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);"}},
| |
| [l]={
| |
| ["clang/test/Sema/const-eval.c"]={"clang/test/Sema/const-eval.c:140:24: note: comparison against pointer \'&PR24622\' that points past the end of a complete object has unspecified value"}
| |
| }
| |
| },
| |
| ["note_constexpr_pointer_comparison_unspecified"]={
| |
| [b]={{nil,m,"note_constexpr_pointer_comparison_unspecified"}},
| |
| [h]={{nil,q,"comparison between \'%0\' and \'%1\' has unspecified value"},{w,m,"comparison has unspecified value"}},
| |
| [i]={{nil,q,"comparison between \'A\' and \'B\' has unspecified value"},{w,m,"comparison has unspecified value"}},
| |
| [c]=g,
| |
| [e]="comparison between \'(.*?)\' and \'(.*?)\' has unspecified value",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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."},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| ["clang/test/AST/Interp/functions.cpp"]={"clang/test/AST/Interp/functions.cpp:185:27: note: comparison between \'&f\' and \'&g\' has unspecified value","clang/test/AST/Interp/functions.cpp:192:27: note: comparison between \'&f\' and \'nullptr\' has unspecified value"}
| |
| }
| |
| },
| |
| ["note_constexpr_pointer_comparison_zero_sized"]={
| |
| [b]={{nil,q,"note_constexpr_pointer_comparison_zero_sized"}},
| |
| [h]={{nil,q,"comparison of pointers \'%0\' and \'%1\' to unrelated zero-sized objects"}},
| |
| [i]={{nil,q,"comparison of pointers \'A\' and \'B\' to unrelated zero-sized objects"}},
| |
| [c]=g,
| |
| [e]="comparison of pointers \'(.*?)\' and \'(.*?)\' to unrelated zero\\-sized objects",
| |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={rc,1662843785,ec,vc},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [cd]={"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"]={
| |
| [b]={{nil,q,"note_constexpr_pointer_constant_comparison"}},
| |
| [h]={{nil,q,"comparison of numeric address \'%0\' with pointer \'%1\' can only be performed at runtime"}},
| |
| [i]={{nil,q,"comparison of numeric address \'A\' with pointer \'B\' can only be performed at runtime"}},
| |
| [c]=g,
| |
| [e]="comparison of numeric address \'(.*?)\' with pointer \'(.*?)\' can only be performed at runtime",
| |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={rc,1662843785,ec,vc},
| |
| [k]={{o,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"]={
| |
| [b]="note_constexpr_pointer_subtraction_not_same_array",
| |
| [h]="subtracted pointers are not elements of the same array",
| |
| [i]="subtracted pointers are not elements of the same array",
| |
| [c]=g,
| |
| [e]="subtracted pointers are not elements of the same array",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]="note_constexpr_pointer_subtraction_zero_size",
| |
| [h]="subtraction of pointers to type %0 of zero size",
| |
| [i]="subtraction of pointers to type A of zero size",
| |
| [c]=g,
| |
| [e]="subtraction of pointers to type (.*?) of zero size",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| [cd]={"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"]={
| |
| [b]={{nil,q,"note_constexpr_pointer_weak_comparison"}},
| |
| [h]={{nil,q,"comparison against address of weak declaration \'%0\' can only be performed at runtime"}},
| |
| [i]={{nil,q,"comparison against address of weak declaration \'A\' can only be performed at runtime"}},
| |
| [c]=g,
| |
| [e]="comparison against address of weak declaration \'(.*?)\' can only be performed at runtime",
| |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={rc,1662843785,ec,vc},
| |
| [k]={{o,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));"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/attr-weak.cpp"]={"clang/test/SemaCXX/attr-weak.cpp:47:59: note: comparison against address of weak declaration \'&weak_function\' can only be performed at runtime"}
| |
| }
| |
| },
| |
| ["note_constexpr_polymorphic_unknown_dynamic_type"]={
| |
| [b]={{nil,p,"note_constexpr_polymorphic_unknown_dynamic_type"}},
| |
| [h]={{nil,m,"%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"},{p,p,"%select{||||virtual function called on|dynamic_cast applied to|typeid applied to}0 object \'%1\' whose dynamic type is not constant"}},
| |
| [i]={{nil,m,{{a,a,a,a,a,"virtual function called on","dynamic_cast applied to",eb,zc,Gb}," object \'B\' whose dynamic type is not constant"}},{p,p,{{a,a,a,a,"virtual function called on","dynamic_cast applied to",eb}," object \'B\' whose dynamic type is not constant"}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]={{nil,p,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [ub]={"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"]={
| |
| [b]={{nil,m,"note_constexpr_pseudo_destructor"}},
| |
| [h]={{nil,m,"pseudo-destructor call is not permitted in constant expressions until C++20"}},
| |
| [i]={{nil,m,"pseudo-destructor call is not permitted in constant expressions until C++20"}},
| |
| [c]=g,
| |
| [e]="pseudo\\-destructor call is not permitted in constant expressions until C\\+\\+20",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]={{nil,p,"note_constexpr_pure_virtual_call"}},
| |
| [h]={{nil,p,"pure virtual function %q0 called"}},
| |
| [i]={{nil,p,"pure virtual function A called"}},
| |
| [c]=g,
| |
| [e]="pure virtual function (.*?) called",
| |
| [f]=a,
| |
| [d]={{nil,p,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"},{M,378,"bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) {\n // ...\n S.FFDiag(E, diag::note_constexpr_pure_virtual_call, 1) << MD;"}},
| |
| [l]={
| |
| [ub]={"clang/test/SemaCXX/constant-expression-cxx2a.cpp:229:30: note: pure virtual function \'Virtual::Abstract::f\' called"}
| |
| }
| |
| },
| |
| ["note_constexpr_static_local"]={
| |
| [b]={{nil,w,"note_constexpr_static_local"}},
| |
| [h]={{nil,w,"control flows through the definition of a %select{static|thread_local}0 variable"}},
| |
| [i]={{nil,w,{"control flows through the definition of a ",{"static","thread_local"}," variable"}}},
| |
| [c]=g,
| |
| [e]="control flows through the definition of a (?:static|thread_local) variable",
| |
| [f]=a,
| |
| [d]={{nil,w,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constant-expression-cxx2b.cpp"]={"clang/test/SemaCXX/constant-expression-cxx2b.cpp:14:20: note: control flows through the definition of a static variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:19:26: note: control flows through the definition of a thread_local variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:25:28: note: control flows through the definition of a thread_local variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:31:23: note: control flows through the definition of a thread_local variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:37:20: note: control flows through the definition of a static variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:42:26: note: control flows through the definition of a thread_local variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:67:20: note: control flows through the definition of a static variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:78:26: note: control flows through the definition of a thread_local variable","clang/test/SemaCXX/constant-expression-cxx2b.cpp:190:22: note: control flows through the definition of a static variable"}
| |
| }
| |
| },
| |
| ["note_constexpr_step_limit_exceeded"]={
| |
| [b]="note_constexpr_step_limit_exceeded",
| |
| [h]="constexpr evaluation hit maximum step limit; possible infinite loop?",
| |
| [i]="constexpr evaluation hit maximum step limit; possible infinite loop?",
| |
| [c]=g,
| |
| [e]="constexpr evaluation hit maximum step limit; possible infinite loop\\?",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constexpr-steps.cpp"]={"clang/test/SemaCXX/constexpr-steps.cpp:13:3: note: constexpr evaluation hit maximum step limit; possible infinite loop?"}
| |
| }
| |
| },
| |
| ["note_constexpr_stmt_expr_unsupported"]={
| |
| [b]="note_constexpr_stmt_expr_unsupported",
| |
| [h]="this use of statement expressions is not supported in a constant expression",
| |
| [i]="this use of statement expressions is not supported in a constant expression",
| |
| [c]=g,
| |
| [e]="this use of statement expressions is not supported in a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"},{o,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);"},{o,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constant-expression-cxx14.cpp"]={"clang/test/SemaCXX/constant-expression-cxx14.cpp:835:9: note: this use of statement expressions is not supported in a constant expression","clang/test/SemaCXX/constant-expression-cxx14.cpp:850:8: note: this use of statement expressions is not supported in a constant expression"}
| |
| }
| |
| },
| |
| ["note_constexpr_subobject_declared_here"]={
| |
| [b]={{nil,p,"note_constexpr_subobject_declared_here"}},
| |
| [h]={{nil,p,"subobject declared here"}},
| |
| [i]={{nil,p,"subobject declared here"}},
| |
| [c]=g,
| |
| [e]="subobject declared here",
| |
| [f]=a,
| |
| [d]={{nil,p,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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);"},{M,389,"static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) {\n // ...\n S.Note(SubObjDecl->getLocation(), diag::note_constexpr_subobject_declared_here);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constexpr_temporary_here"]={
| |
| [b]="note_constexpr_temporary_here",
| |
| [h]="temporary created here",
| |
| [i]="temporary created here",
| |
| [c]=g,
| |
| [e]="temporary created here",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Uc,1323758398,Zc,Yc},
| |
| [k]={{o,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);"},{o,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);"},{M,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);"},{M,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);"}},
| |
| [l]={
| |
| ["clang/test/CXX/expr/expr.const/p6-2a.cpp"]={"clang/test/CXX/expr/expr.const/p6-2a.cpp:43:26: note: temporary created here"}
| |
| }
| |
| },
| |
| ["note_constexpr_this"]={
| |
| [b]="note_constexpr_this",
| |
| [h]="%select{|implicit }0use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function",
| |
| [i]={{nil,nil,{{a,"implicit "},"use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function"}}},
| |
| [c]=g,
| |
| [e]="(?:|implicit )use of \'this\' pointer is only allowed within the evaluation of a call to a \'constexpr\' member function",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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();"},{M,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constexpr_typeid_polymorphic"]={
| |
| [b]="note_constexpr_typeid_polymorphic",
| |
| [h]={{nil,m,"typeid applied to expression of polymorphic type %0 is not allowed in a constant expression in C++ standards before C++20"},{p,p,"typeid applied to expression of polymorphic type %0 is not allowed in a constant expression in C++ standards before C++2a"},{v,nil,"typeid applied to expression of polymorphic type %0 is not allowed in a constant expression"}},
| |
| [i]={{nil,m,"typeid applied to expression of polymorphic type A is not allowed in a constant expression in C++ standards before C++20"},{p,p,"typeid applied to expression of polymorphic type A is not allowed in a constant expression in C++ standards before C++2a"},{v,nil,"typeid applied to expression of polymorphic type A is not allowed in a constant expression"}},
| |
| [c]=g,
| |
| [e]="typeid applied to expression of polymorphic type (.*?) is not allowed in a constant expression in C\\+\\+ standards before C\\+\\+20",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"6e52514c5deb",1324988308,"constexpr: support for evaluation and codegen of typeid constants.","constexpr: support for evaluation and codegen of typeid constants.\n\nllvm-svn: 147290"},
| |
| [k]={{o,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();"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]="note_constexpr_uninitialized",
| |
| [h]="subobject %select{of type |}0%1 is not initialized",
| |
| [i]={{nil,nil,{"subobject ",{"of type ",a},"B is not initialized"}},{q,nil,{{a,"sub"},"object of type B is not initialized"}}},
| |
| [c]=g,
| |
| [e]="subobject (?:of type |)(.*?) is not initialized",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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;"},{o,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;"},{M,386,"static void DiagnoseUninitializedSubobject(InterpState &S, const SourceInfo &SI, const FieldDecl *SubObjDecl) {\n // ...\n S.FFDiag(SI, diag::note_constexpr_uninitialized) << /*(name)*/ 1 << SubObjDecl;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constexpr_uninitialized_base"]={
| |
| [b]="note_constexpr_uninitialized_base",
| |
| [h]="constructor of base class %0 is not called",
| |
| [i]="constructor of base class A is not called",
| |
| [c]=g,
| |
| [e]="constructor of base class (.*?) is not called",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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());"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constexpr-subobj-initialization.cpp"]={"clang/test/SemaCXX/constexpr-subobj-initialization.cpp:8:14: note: constructor of base class \'DelBase\' is not called","clang/test/SemaCXX/constexpr-subobj-initialization.cpp:8:14: note: constructor of base class \'DelBase\' is not called","clang/test/SemaCXX/constexpr-subobj-initialization.cpp:18:12: note: constructor of base class \'Base\' is not called","clang/test/SemaCXX/constexpr-subobj-initialization.cpp:24:12: note: constructor of base class \'Base\' is not called"}
| |
| }
| |
| },
| |
| ["note_constexpr_union_member_change_during_init"]={
| |
| [b]={{nil,t,"note_constexpr_union_member_change_during_init"}},
| |
| [h]={{nil,t,"assignment would change active union member during the initialization of a different member of the same union"}},
| |
| [i]={{nil,t,"assignment would change active union member during the initialization of a different member of the same union"}},
| |
| [c]=g,
| |
| [e]="assignment would change active union member during the initialization of a different member of the same union",
| |
| [f]=a,
| |
| [d]={{nil,t,a}},
| |
| [j]={"474177c05381",1579695612,"[AST] Improve overflow diagnostics for fixed-point constant evaluation.","[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [ub]={"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"]={
| |
| [b]={{nil,z,"note_constexpr_unsized_array_indexed"}},
| |
| [h]={{nil,z,"indexing of array without known bound is not allowed in a constant expression"}},
| |
| [i]={{nil,z,"indexing of array without known bound is not allowed in a constant expression"}},
| |
| [c]=g,
| |
| [e]="indexing of array without known bound is not allowed in a constant expression",
| |
| [f]=a,
| |
| [d]={{nil,z,a}},
| |
| [j]={"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"},
| |
| [k]={{o,1424,"void SubobjectDesignator::diagnoseUnsizedArrayPointerArithmetic(EvalInfo &Info, const Expr *E) {\n Info.CCEDiag(E, diag::note_constexpr_unsized_array_indexed);"},{M,143,"bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.FFDiag(E, diag::note_constexpr_unsized_array_indexed);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constexpr_unsupported_destruction"]={
| |
| [b]={{nil,m,"note_constexpr_unsupported_destruction"}},
| |
| [h]={{nil,m,"non-trivial destruction of type %0 in a constant expression is not supported"}},
| |
| [i]={{nil,m,"non-trivial destruction of type A in a constant expression is not supported"}},
| |
| [c]=g,
| |
| [e]="non\\-trivial destruction of type (.*?) in a constant expression is not supported",
| |
| [f]=a,
| |
| [d]={{nil,m,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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"]={
| |
| [b]={{nil,w,"note_constexpr_unsupported_flexible_array"}},
| |
| [h]={{nil,w,"flexible array initialization is not yet supported"}},
| |
| [i]={{nil,w,"flexible array initialization is not yet supported"}},
| |
| [c]=g,
| |
| [e]="flexible array initialization is not yet supported",
| |
| [f]=a,
| |
| [d]={{nil,w,a}},
| |
| [j]={Pc,1643408541,Nc,Lc},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [cd]={"clang/test/SemaCXX/constant-expression-cxx11.cpp:2419:23: note: flexible array initialization is not yet supported"}
| |
| }
| |
| },
| |
| ["note_constexpr_unsupported_layout"]={
| |
| [b]={{nil,t,"note_constexpr_unsupported_layout"}},
| |
| [h]={{nil,t,"type %0 has unexpected layout"}},
| |
| [i]={{nil,t,"type A has unexpected layout"}},
| |
| [c]=g,
| |
| [e]="type (.*?) has unexpected layout",
| |
| [f]=a,
| |
| [d]={{nil,t,a}},
| |
| [j]={"474177c05381",1579695612,"[AST] Improve overflow diagnostics for fixed-point constant evaluation.","[AST] Improve overflow diagnostics for fixed-point constant evaluation.\n\nSummary:\nDiagnostics for overflow were not being produced for fixed-point\nevaluation. This patch refactors a bit of the evaluator and adds\na proper diagnostic for these cases.\n\nReviewers: rjmccall, leonardchan, bjope\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D73188"},
| |
| [k]={{o,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();"},{o,10239,"bool RecordExprEvaluator::VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E) {\n // ...\n auto InvalidType = [&] {\n Info.FFDiag(E, diag::note_constexpr_unsupported_layout) << E->getType();"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp:377:22: note: type \'const std::initializer_list<weird>\' has unexpected layout"}
| |
| }
| |
| },
| |
| ["note_constexpr_unsupported_temporary_nontrivial_dtor"]={
| |
| [b]={{nil,s,"note_constexpr_unsupported_temporary_nontrivial_dtor"}},
| |
| [h]={{nil,s,"non-trivial destruction of lifetime-extended temporary with type %0 used in the result of a constant expression is not yet supported"}},
| |
| [i]={{nil,s,"non-trivial destruction of lifetime-extended temporary with type A used in the result of a constant expression is not yet supported"}},
| |
| [c]=g,
| |
| [e]="non\\-trivial destruction of lifetime\\-extended temporary with type (.*?) used in the result of a constant expression is not yet supported",
| |
| [f]=a,
| |
| [d]={{nil,s,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| [ub]={"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"]={
| |
| [b]={{nil,z,"note_constexpr_unsupported_unsized_array"}},
| |
| [h]={{nil,z,"array-to-pointer decay of array member without known bound is not supported"}},
| |
| [i]={{nil,z,"array-to-pointer decay of array member without known bound is not supported"}},
| |
| [c]=g,
| |
| [e]="array\\-to\\-pointer decay of array member without known bound is not supported",
| |
| [f]=a,
| |
| [d]={{nil,z,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constexpr-array-unknown-bound.cpp"]={"clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:15:21: note: array-to-pointer decay of array member without known bound is not supported","clang/test/SemaCXX/constexpr-array-unknown-bound.cpp:16:21: note: array-to-pointer decay of array member without known bound is not supported"}
| |
| }
| |
| },
| |
| ["note_constexpr_use_uninit_reference"]={
| |
| [b]="note_constexpr_use_uninit_reference",
| |
| [h]="use of reference outside its lifetime is not allowed in a constant expression",
| |
| [i]="use of reference outside its lifetime is not allowed in a constant expression",
| |
| [c]=g,
| |
| [e]="use of reference outside its lifetime is not allowed in a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [cd]={"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"]={
| |
| [b]="note_constexpr_var_init_non_constant",
| |
| [h]="initializer of %0 is not a constant expression",
| |
| [i]="initializer of A is not a constant expression",
| |
| [c]=g,
| |
| [e]="initializer of (.*?) is not a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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;"},{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:104:15: note: initializer of \'value\' is not a constant expression","clang/test/SemaCXX/c99-variable-length-array.cpp:104:15: note: initializer of \'value\' is not a constant expression"}
| |
| }
| |
| },
| |
| ["note_constexpr_var_init_unknown"]={
| |
| [b]={{nil,t,"note_constexpr_var_init_unknown"}},
| |
| [h]={{nil,t,"initializer of %0 is unknown"}},
| |
| [i]={{nil,t,"initializer of A is unknown"}},
| |
| [c]=g,
| |
| [e]="initializer of (.*?) is unknown",
| |
| [f]=a,
| |
| [d]={{nil,t,a}},
| |
| [j]={"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."},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/c99-variable-length-array.cpp"]={"clang/test/SemaCXX/c99-variable-length-array.cpp:156:13: note: initializer of \'sz\' is unknown"}
| |
| }
| |
| },
| |
| ["note_constexpr_var_init_weak"]={
| |
| [b]={{nil,t,"note_constexpr_var_init_weak"}},
| |
| [h]={{nil,t,"initializer of weak variable %0 is not considered constant because it may be different at runtime"}},
| |
| [i]={{nil,t,"initializer of weak variable A is not considered constant because it may be different at runtime"}},
| |
| [c]=g,
| |
| [e]="initializer of weak variable (.*?) is not considered constant because it may be different at runtime",
| |
| [f]=a,
| |
| [d]={{nil,t,a}},
| |
| [j]={"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."},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/weak-init.cpp"]={"clang/test/SemaCXX/weak-init.cpp:5:15: note: initializer of weak variable \'W1\' is not considered constant because it may be different at runtime","clang/test/SemaCXX/weak-init.cpp:14:20: note: initializer of weak variable \'W3\' is not considered constant because it may be different at runtime"}
| |
| }
| |
| },
| |
| ["note_constexpr_virtual_base"]={
| |
| [b]="note_constexpr_virtual_base",
| |
| [h]="cannot construct object of type %0 with virtual base class in a constant expression",
| |
| [i]="cannot construct object of type A with virtual base class in a constant expression",
| |
| [c]=g,
| |
| [e]="cannot construct object of type (.*?) with virtual base class in a constant expression",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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;"},{o,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;"},{o,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;"}},
| |
| [l]={
| |
| [zd]={"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"]={
| |
| [b]="note_constexpr_virtual_base_here",
| |
| [h]="virtual base class declared here",
| |
| [i]="virtual base class declared here",
| |
| [c]=g,
| |
| [e]="virtual base class declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={hc,1317436288,dc,ic},
| |
| [k]={{r,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();"},{Y,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constexpr_virtual_call"]={
| |
| [b]="note_constexpr_virtual_call",
| |
| [h]={{nil,m,"cannot evaluate call to virtual function in a constant expression in C++ standards before C++20"},{p,p,"cannot evaluate call to virtual function in a constant expression in C++ standards before C++2a"},{v,nil,"cannot evaluate virtual function call in a constant expression"}},
| |
| [i]={{nil,m,"cannot evaluate call to virtual function in a constant expression in C++ standards before C++20"},{p,p,"cannot evaluate call to virtual function in a constant expression in C++ standards before C++2a"},{v,nil,"cannot evaluate virtual function call in a constant expression"}},
| |
| [c]=g,
| |
| [e]="cannot evaluate call to virtual function in a constant expression in C\\+\\+ standards before C\\+\\+20",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"},{M,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constexpr_void_comparison"]={
| |
| [b]="note_constexpr_void_comparison",
| |
| [h]="comparison between unequal pointers to void has unspecified result",
| |
| [i]="comparison between unequal pointers to void has unspecified result",
| |
| [c]=g,
| |
| [e]="comparison between unequal pointers to void has unspecified result",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{o,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);"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]={{nil,p,"note_constexpr_volatile_here"}},
| |
| [h]={{nil,p,"volatile %select{temporary created|object declared|member declared}0 here"}},
| |
| [i]={{nil,p,{"volatile ",{"temporary created","object declared","member declared"},Wb}}},
| |
| [c]=g,
| |
| [e]="volatile (?:temporary created|object declared|member declared) here",
| |
| [f]=a,
| |
| [d]={{nil,p,a}},
| |
| [j]={"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"},
| |
| [k]={{o,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;"}},
| |
| [l]={
| |
| [pb]={"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"]={
| |
| [b]={{nil,m,"note_constinit_missing_here"}},
| |
| [h]={{nil,m,"add the %select{\'require_constant_initialization\' attribute|\'constinit\' specifier}0 to the initializing declaration here"}},
| |
| [i]={{nil,m,{"add the ",{"\'require_constant_initialization\' attribute","\'constinit\' specifier"}," to the initializing declaration here"}}},
| |
| [c]=g,
| |
| [e]="add the (?:\'require_constant_initialization\' attribute|\'constinit\' specifier) to the initializing declaration here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ad,1567434909,Vc,Xc},
| |
| [k]={{C,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constinit_specified_here"]={
| |
| [b]={{nil,m,"note_constinit_specified_here"}},
| |
| [h]={{nil,m,"variable declared constinit here"}},
| |
| [i]={{nil,m,"variable declared constinit here"}},
| |
| [c]=g,
| |
| [e]="variable declared constinit here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ad,1567434909,Vc,Xc},
| |
| [k]={{C,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constraint_normalization_here"]={
| |
| [b]={{nil,m,"note_constraint_normalization_here"}},
| |
| [h]={{nil,m,"while calculating associated constraint of template \'%0\' here"}},
| |
| [i]={{nil,m,"while calculating associated constraint of template \'A\' here"}},
| |
| [c]=g,
| |
| [e]="while calculating associated constraint of template \'(.*?)\' here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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"},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_constraint_references_error"]={
| |
| [b]={{nil,q,"note_constraint_references_error"}},
| |
| [h]={{nil,q,"constraint depends on a previously diagnosed expression"}},
| |
| [i]={{nil,q,"constraint depends on a previously diagnosed expression"}},
| |
| [c]=g,
| |
| [e]="constraint depends on a previously diagnosed expression",
| |
| [f]=a,
| |
| [d]={{nil,q,n}},
| |
| [j]={Vb,1625925174,Jb,Kb},
| |
| [k]={{vb,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"]={
| |
| [b]={{nil,m,"note_constraint_substitution_here"}},
| |
| [h]={{nil,m,"while substituting template arguments into constraint expression here"}},
| |
| [i]={{nil,m,"while substituting template arguments into constraint expression here"}},
| |
| [c]=g,
| |
| [e]="while substituting template arguments into constraint expression here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ad,1567434909,Vc,Xc},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_conv_function_declared_at"]={
| |
| [b]="note_conv_function_declared_at",
| |
| [h]="type conversion function declared here",
| |
| [i]="type conversion function declared here",
| |
| [c]=g,
| |
| [e]="type conversion function declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{"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);"}},
| |
| [l]={
| |
| ["clang/test/SemaObjCXX/objc-container-subscripting.mm"]={"clang/test/SemaObjCXX/objc-container-subscripting.mm:130:4: note: type conversion function declared here","clang/test/SemaObjCXX/objc-container-subscripting.mm:131:4: note: type conversion function declared here"}
| |
| }
| |
| },
| |
| ["note_convert_inline_to_static"]={
| |
| [b]="note_convert_inline_to_static",
| |
| [h]="use \'static\' to give inline function %0 internal linkage",
| |
| [i]="use \'static\' to give inline function A internal linkage",
| |
| [c]=g,
| |
| [e]="use \'static\' to give inline function (.*?) internal linkage",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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 \");"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_coroutine_function_declare_noexcept"]={
| |
| [b]={{nil,t,"note_coroutine_function_declare_noexcept"}},
| |
| [h]={{nil,t,"must be declared with \'noexcept\'"}},
| |
| [i]={{nil,t,"must be declared with \'noexcept\'"}},
| |
| [c]=g,
| |
| [e]="must be declared with \'noexcept\'",
| |
| [f]=a,
| |
| [d]={{nil,t,sd}},
| |
| [j]={Pb,1582847864,Ob,Nb},
| |
| [k]={{ib,684,"bool Sema::checkFinalSuspendNoThrow(const Stmt *FinalSuspend) {\n // ...\n for (const auto *D : SortedDecls) {\n Diag(D->getEndLoc(), diag::note_coroutine_function_declare_noexcept);"}},
| |
| [l]={
| |
| ["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\'"}
| |
| }
| |
| },
| |
| ["note_coroutine_promise_call_implicitly_required"]={
| |
| [b]={{nil,y,"note_coroutine_promise_call_implicitly_required"}},
| |
| [h]={{nil,y,"call to %0 implicitly required by coroutine function here"}},
| |
| [i]={{nil,y,"call to A implicitly required by coroutine function here"}},
| |
| [c]=g,
| |
| [e]="call to (.*?) implicitly required by coroutine function here",
| |
| [f]=a,
| |
| [d]={{nil,y,sd}},
| |
| [j]={"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"},
| |
| [k]={{ib,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();"},{ib,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();"},{ib,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_coroutine_promise_implicit_await_transform_required_here"]={
| |
| [b]={{nil,y,"note_coroutine_promise_implicit_await_transform_required_here"}},
| |
| [h]={{nil,y,"call to \'await_transform\' implicitly required by \'co_await\' here"}},
| |
| [i]={{nil,y,"call to \'await_transform\' implicitly required by \'co_await\' here"}},
| |
| [c]=g,
| |
| [e]="call to \'await_transform\' implicitly required by \'co_await\' here",
| |
| [f]=a,
| |
| [d]={{nil,y,sd}},
| |
| [j]={"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"},
| |
| [k]={{ib,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_coroutine_promise_suspend_implicitly_required"]={
| |
| [b]={{nil,y,"note_coroutine_promise_suspend_implicitly_required"}},
| |
| [h]={{nil,y,"call to \'%select{initial_suspend|final_suspend}0\' implicitly required by the %select{initial suspend point|final suspend point}0"}},
| |
| [i]={{nil,y,{"call to \'",{"initial_suspend","final_suspend"},"\' implicitly required by the ",{"initial suspend point","final suspend point"}}}},
| |
| [c]=g,
| |
| [e]="call to \'(?:initial_suspend|final_suspend)\' implicitly required by the (?:initial suspend point|final suspend point)",
| |
| [f]=a,
| |
| [d]={{nil,y,sd}},
| |
| [j]={"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"},
| |
| [k]={{ib,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_covariant_thunk"]={
| |
| [b]="note_covariant_thunk",
| |
| [h]="covariant thunk required by %0",
| |
| [i]="covariant thunk required by A",
| |
| [c]=g,
| |
| [e]="covariant thunk required by (.*?)",
| |
| [f]=a,
| |
| [d]="VTable ABI Issue",
| |
| [j]={"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"},
| |
| [k]={{"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"]={
| |
| [b]="note_cuda_conflicting_device_function_declared_here",
| |
| [h]="conflicting __device__ function declared here",
| |
| [i]="conflicting __device__ function declared here",
| |
| [c]=g,
| |
| [e]="conflicting __device__ function declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{"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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCUDA/host-device-constexpr.cu"]={"clang/test/SemaCUDA/host-device-constexpr.cu:42:16: note: conflicting __device__ function declared here"}
| |
| }
| |
| },
| |
| ["note_cuda_const_var_unpromoted"]={
| |
| [b]={{nil,x,"note_cuda_const_var_unpromoted"}},
| |
| [h]={{nil,x,"const variable cannot be emitted on device side due to dynamic initialization"}},
| |
| [i]={{nil,x,"const variable cannot be emitted on device side due to dynamic initialization"}},
| |
| [c]=g,
| |
| [e]="const variable cannot be emitted on device side due to dynamic initialization",
| |
| [f]=a,
| |
| [d]={{nil,x,n}},
| |
| [j]={yd,1615397021,Id,Kd},
| |
| [k]={{A,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_cuda_device_builtin_surftex_cls_should_have_match_arg"]={
| |
| [b]={{nil,t,"note_cuda_device_builtin_surftex_cls_should_have_match_arg"}},
| |
| [h]={{nil,t,"the %select{1st|2nd|3rd}1 template parameter of %0 needs to be %select{a type|an integer or enum value}2"}},
| |
| [i]={{nil,t,{"the ",{"1st","2nd","3rd"}," template parameter of A needs to be ",{"a type","an integer or enum value"}}}},
| |
| [c]=g,
| |
| [e]="the (?:1st|2nd|3rd) template parameter of (.*?) needs to be (?:a type|an integer or enum value)",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={wd,1576908663,td,rd},
| |
| [k]={{r,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;"},{r,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;"},{r,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;"},{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCUDA/bad-attributes.cu"]={"clang/test/SemaCUDA/bad-attributes.cu:90:53: note: the 1st template parameter of \'s3_cls_template\' needs to be a type","clang/test/SemaCUDA/bad-attributes.cu:90:53: note: the 2nd template parameter of \'s3_cls_template\' needs to be an integer or enum value","clang/test/SemaCUDA/bad-attributes.cu:94:53: note: the 1st template parameter of \'t3_cls_template\' needs to be a type","clang/test/SemaCUDA/bad-attributes.cu:94:53: note: the 3rd template parameter of \'t3_cls_template\' needs to be an integer or enum value"}
| |
| }
| |
| },
| |
| ["note_cuda_device_builtin_surftex_cls_should_have_n_args"]={
| |
| [b]={{nil,t,"note_cuda_device_builtin_surftex_cls_should_have_n_args"}},
| |
| [h]={{nil,t,"%0 needs to have exactly %1 template parameters"}},
| |
| [i]={{nil,t,"A needs to have exactly B template parameters"}},
| |
| [c]=g,
| |
| [e]="(.*?) needs to have exactly (.*?) template parameters",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={wd,1576908663,td,rd},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCUDA/bad-attributes.cu"]={"clang/test/SemaCUDA/bad-attributes.cu:83:53: note: \'s2_cls_template\' needs to have exactly 2 template parameters","clang/test/SemaCUDA/bad-attributes.cu:86:53: note: \'t2_cls_template\' needs to have exactly 3 template parameters"}
| |
| }
| |
| },
| |
| ["note_cuda_device_builtin_surftex_should_be_template_class"]={
| |
| [b]={{nil,t,"note_cuda_device_builtin_surftex_should_be_template_class"}},
| |
| [h]={{nil,t,"%0 needs to be instantiated from a class template with proper template arguments"}},
| |
| [i]={{nil,t,"A needs to be instantiated from a class template with proper template arguments"}},
| |
| [c]=g,
| |
| [e]="(.*?) needs to be instantiated from a class template with proper template arguments",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={wd,1576908663,td,rd},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCUDA/bad-attributes.cu"]={"clang/test/SemaCUDA/bad-attributes.cu:77:53: note: \'s1_ref\' needs to be instantiated from a class template with proper template arguments","clang/test/SemaCUDA/bad-attributes.cu:79:53: note: \'t1_ref\' needs to be instantiated from a class template with proper template arguments"}
| |
| }
| |
| },
| |
| ["note_cuda_host_var"]={
| |
| [b]={{nil,x,"note_cuda_host_var"}},
| |
| [h]={{nil,x,"host variable declared here"}},
| |
| [i]={{nil,x,"host variable declared here"}},
| |
| [c]=g,
| |
| [e]="host variable declared here",
| |
| [f]=a,
| |
| [d]={{nil,x,n}},
| |
| [j]={yd,1615397021,Id,Kd},
| |
| [k]={{A,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCUDA/static-device-var.cu"]={"clang/test/SemaCUDA/static-device-var.cu:34:12: note: host variable declared here"}
| |
| }
| |
| },
| |
| ["note_cuda_ovl_candidate_target_mismatch"]={
| |
| [b]="note_cuda_ovl_candidate_target_mismatch",
| |
| [h]="candidate template ignored: target attributes do not match",
| |
| [i]="candidate template ignored: target attributes do not match",
| |
| [c]=g,
| |
| [e]="candidate template ignored\\: target attributes do not match",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{xb,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_cxx20_compat_utf8_string_remove_u8"]={
| |
| [b]={{nil,t,"note_cxx20_compat_utf8_string_remove_u8"}},
| |
| [h]={{nil,t,"remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8"}},
| |
| [i]={{nil,t,"remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF-8"}},
| |
| [c]=g,
| |
| [e]="remove \'u8\' prefix to avoid a change of behavior; Clang encodes unprefixed narrow string literals as UTF\\-8",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={"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"},
| |
| [k]={{A,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_decl_hiding_tag_type"]={
| |
| [b]="note_decl_hiding_tag_type",
| |
| [h]="%1 %0 is hidden by a non-type declaration of %0 here",
| |
| [i]="B A is hidden by a non-type declaration of A here",
| |
| [c]=g,
| |
| [e]="(.*?) (.*?) is hidden by a non\\-type declaration of (.*?) here",
| |
| [f]=a,
| |
| [d]=Ab,
| |
| [j]={"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"},
| |
| [k]={{"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;"},{C,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_decl_unguarded_availability_silence"]={
| |
| [b]={{nil,z,"note_decl_unguarded_availability_silence"}},
| |
| [h]={{nil,z,"annotate %select{%1|anonymous %1}0 with an availability attribute to silence this warning"}},
| |
| [i]={{nil,z,{"annotate ",{"B","anonymous B"}," with an availability attribute to silence this warning"}}},
| |
| [c]=g,
| |
| [e]="annotate (?:(.*?)|anonymous (.*?)) with an availability attribute to silence this warning",
| |
| [f]=a,
| |
| [d]={{nil,z,n}},
| |
| [j]={"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"},
| |
| [k]={{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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_declaration_not_a_prototype"]={
| |
| [b]="note_declaration_not_a_prototype",
| |
| [h]={{nil,p,"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"},{v,nil,"this declaration is not a prototype; add \'void\' to make it a prototype for a zero-parameter function"}},
| |
| [i]={{nil,p,{"this declaration is not a prototype; add ",{"\'void\'","parameter declarations"}," to make it ",{"a prototype for a zero-parameter function","one"}}},{v,nil,"this declaration is not a prototype; add \'void\' to make it a prototype for a zero-parameter function"}},
| |
| [c]=g,
| |
| [e]="this declaration is not a prototype; add (?:\'void\'|parameter declarations) to make it (?:a prototype for a zero\\-parameter function|one)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{C,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{});"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_declare_parameter_strong"]={
| |
| [b]="note_declare_parameter_strong",
| |
| [h]="declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools",
| |
| [i]="declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools",
| |
| [c]=g,
| |
| [e]="declare the parameter __strong or capture a __block __strong variable to keep values alive across autorelease pools",
| |
| [f]=a,
| |
| [d]="ARC Semantic Issue",
| |
| [j]={"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"},
| |
| [k]={{A,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_declared_at"]={
| |
| [b]="note_declared_at",
| |
| [h]="declared here",
| |
| [i]="declared here",
| |
| [c]=g,
| |
| [e]="declared here",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Hc,1236199783,Fc,Ec},
| |
| [k]={
| |
| [1]={o,2123,"static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {\n // ...\n if (VD)\n Info.Note(VD->getLocation(), diag::note_declared_at);"},
| |
| [2]={o,2198,"/// 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 // ...\n Info.Note(FD->getLocation(), diag::note_declared_at);"},
| |
| [3]={o,2337,"/// 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 // ...\n Info.Note(FD->getLocation(), diag::note_declared_at);"},
| |
| [4]={o,3543,"/// 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 // ...\n Info.Note(Field->getLocation(), diag::note_declared_at);"},
| |
| [5]={o,3806,"/// 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 // ...\n Info.Note(Field->getLocation(), diag::note_declared_at);"},
| |
| [6]={o,4130,"/// 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 // ...\n Info.Note(VD->getLocation(), diag::note_declared_at);"},
| |
| [7]={o,4150,"/// 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 // ...\n Info.Note(VD->getLocation(), diag::note_declared_at);"},
| |
| [8]={o,4161,"/// 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 // ...\n Info.Note(VD->getLocation(), diag::note_declared_at);"},
| |
| [9]={o,4319,"/// 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 if (CLETy->isArrayType() && !Type->isArrayType()) {\n if (!CLETy.isConstant(Info.Ctx)) {\n // ...\n Info.Note(CLE->getExprLoc(), diag::note_declared_at);"},
| |
| [10]={o,5559,"/// 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.Note(CD->getLocation(), diag::note_declared_at);"},
| |
| [11]={o,5624,"/// 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 Info.Note(DiagDecl->getLocation(), diag::note_declared_at);"},
| |
| [12]={o,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]={o,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]={M,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]={M,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]={M,232,"bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {\n // ...\n S.Note(Field->getLocation(), diag::note_declared_at);"},
| |
| [17]={M,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]={M,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();"},
| |
| [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]={"clang/lib/Sema/SemaCXXScopeSpec.cpp",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]={"clang/lib/Sema/SemaCXXScopeSpec.cpp",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]={C,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]={r,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]={r,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);"},
| |
| [26]={r,1453,"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 // ...\n if (FD->isAnonymousStructOrUnion()) {\n // ...\n S.Diag(FD->getLocation(), diag::note_declared_at);"},
| |
| [27]={r,5052,"static bool BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) {\n // ...\n if (!Field->getParent()->isUnion()) {\n if (FieldBaseElementType->isReferenceType()) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_declared_at);"},
| |
| [28]={r,5062,"static bool BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, ImplicitInitializerKind ImplicitInitKind, FieldDecl *Field, IndirectFieldDecl *Indirect, CXXCtorInitializer *&CXXMemberInit) {\n // ...\n if (!Field->getParent()->isUnion()) {\n // ...\n if (FieldBaseElementType.isConstQualified()) {\n // ...\n SemaRef.Diag(Field->getLocation(), diag::note_declared_at);"},
| |
| [29]={r,8839,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // ...\n if (IsMethod) {\n } else if (isa<CXXRecordDecl>(FD->getLexicalDeclContext())) {\n // ...\n } else {\n // ...\n if (llvm::none_of(RD->friends(), [&](const FriendDecl *F) { return FD->getCanonicalDecl() == F->getFriendDecl()->getCanonicalDecl(); })) {\n // ...\n Diag(RD->getCanonicalDecl()->getLocation(), diag::note_declared_at);"},
| |
| [30]={r,9927,"/// 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 // ...\n S.Diag(Selected->getLocation(), diag::note_declared_at);"},
| |
| [31]={r,14861,"void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *CopyAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n // Check for members of reference type; we can\'t copy those.\n if (Field->getType()->isReferenceType()) {\n // ...\n Diag(Field->getLocation(), diag::note_declared_at);"},
| |
| [32]={r,14871,"void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *CopyAssignOperator) {\n // ...\n // Assign non-static members.\n for (auto *Field : ClassDecl->fields()) {\n // ...\n if (!BaseType->getAs<RecordType>() && BaseType.isConstQualified()) {\n // ...\n Diag(Field->getLocation(), diag::note_declared_at);"},
| |
| [33]={r,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]={r,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]={A,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]={A,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]={A,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]={A,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]={A,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]={A,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={B,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]={qb,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]={qb,1745,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n // ...\n Diag(GetterMethod->getLocation(), diag::note_declared_at);"},
| |
| [60]={qb,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]={Z,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]={xb,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]={X,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);"},
| |
| [65]={G,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);"}
| |
| },
| |
| [l]={
| |
| ["clang/test/SemaHLSL/cb_error.hlsl"]={"clang/test/SemaHLSL/cb_error.hlsl:4:9: note: declared here"}
| |
| }
| |
| },
| |
| ["note_declared_coroutine_here"]={
| |
| [b]="note_declared_coroutine_here",
| |
| [h]="function is a coroutine due to use of \'%select{co_await|co_yield|co_return}0\' here",
| |
| [i]={{nil,y,"function is a coroutine due to use of \'A\' here"},{nil,nil,{"function is a coroutine due to use of \'",{"co_await","co_yield","co_return"},"\' here"}}},
| |
| [c]=g,
| |
| [e]="function is a coroutine due to use of \'(.*?)\' here",
| |
| [f]=a,
| |
| [d]=sd,
| |
| [j]={"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"},
| |
| [k]={{ib,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;"},{ib,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();"},{ib,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();"},{ib,1272,"bool CoroutineStmtBuilder::makeReturnOnAllocFailure() {\n // ...\n if (ReturnStmt.isInvalid()) {\n // ...\n S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn.getFirstCoroutineStmtKeyword();"},{ib,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();"},{ib,1928,"static void noteMemberDeclaredHere(Sema &S, Expr *E, FunctionScopeInfo &Fn) {\n // ...\n S.Diag(Fn.FirstCoroutineStmtLoc, diag::note_declared_coroutine_here) << Fn.getFirstCoroutineStmtKeyword();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_declared_nonnull"]={
| |
| [b]="note_declared_nonnull",
| |
| [h]="declared %select{\'returns_nonnull\'|\'nonnull\'}0 here",
| |
| [i]={{nil,nil,{"declared ",{"\'returns_nonnull\'","\'nonnull\'"},Wb}}},
| |
| [c]=g,
| |
| [e]="declared (?:\'returns_nonnull\'|\'nonnull\') here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{V,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;"}},
| |
| [l]={
| |
| ["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",Bd,Bd,Bd,Bd,Bd,Bd}
| |
| }
| |
| },
| |
| ["note_declared_required_constant_init_here"]={
| |
| [b]="note_declared_required_constant_init_here",
| |
| [h]="required by \'require_constant_initializer\' attribute here",
| |
| [i]="required by \'require_constant_initializer\' attribute here",
| |
| [c]=g,
| |
| [e]="required by (?:\'require_constant_initialization\' attribute|\'constinit\' specifier) here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{C,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_deduced_non_type_template_arg_type_mismatch"]={
| |
| [b]="note_deduced_non_type_template_arg_type_mismatch",
| |
| [h]="deduced non-type template argument does not have the same type as the corresponding template parameter%diff{ ($ vs $)|}0,1",
| |
| [i]={{nil,nil,{"deduced non-type template argument does not have the same type as the corresponding template parameter",{" (A vs B)",a}}}},
| |
| [c]=g,
| |
| [e]="deduced non\\-type template argument does not have the same type as the corresponding template parameter(?: \\((.*?) vs (.*?)\\)|)",
| |
| [f]=a,
| |
| [d]=a,
| |
| [l]={
| |
| ["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 &\')"}
| |
| }
| |
| },
| |
| ["note_deduced_template_arg_substitution_here"]={
| |
| [b]="note_deduced_template_arg_substitution_here",
| |
| [h]="during template argument deduction for %select{class|variable}0 template %select{partial specialization |}1%2 %3",
| |
| [i]={{nil,nil,{"during template argument deduction for ",{wb,"variable"}," template ",{"partial specialization ",a},"C D"}}},
| |
| [c]=g,
| |
| [e]="during template argument deduction for (?:class|variable) template (?:partial specialization |)(.*?) (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["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]"}
| |
| }
| |
| },
| |
| ["note_deduction_guide_access"]={
| |
| [b]={{nil,u,"note_deduction_guide_access"}},
| |
| [h]={{nil,u,"deduction guide declared %0 by intervening access specifier"}},
| |
| [i]={{nil,u,"deduction guide declared A by intervening access specifier"}},
| |
| [c]=g,
| |
| [e]="deduction guide declared (.*?) by intervening access specifier",
| |
| [f]=a,
| |
| [d]={{nil,u,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp"]={"clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:365:3: note: deduction guide declared protected by intervening access specifier","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:369:3: note: deduction guide declared private by intervening access specifier","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:372:3: note: deduction guide declared public by intervening access specifier","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:372:3: note: deduction guide declared public by intervening access specifier"}
| |
| }
| |
| },
| |
| ["note_deduction_guide_template_access"]={
| |
| [b]={{nil,u,"note_deduction_guide_template_access"}},
| |
| [h]={{nil,u,"member template declared %0 here"}},
| |
| [i]={{nil,u,"member template declared A here"}},
| |
| [c]=g,
| |
| [e]="member template declared (.*?) here",
| |
| [f]=a,
| |
| [d]={{nil,u,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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();"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp"]={"clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:363:5: note: member template declared public here","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:366:5: note: member template declared protected here","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:366:5: note: member template declared protected here","clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp:370:5: note: member template declared private here"}
| |
| }
| |
| },
| |
| ["note_default_arg_instantiation_here"]={
| |
| [b]="note_default_arg_instantiation_here",
| |
| [h]="in instantiation of default argument for \'%0\' required here",
| |
| [i]="in instantiation of default argument for \'A\' required here",
| |
| [c]=g,
| |
| [e]="in instantiation of default argument for \'(.*?)\' required here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_default_argument_declared_here"]={
| |
| [b]="note_default_argument_declared_here",
| |
| [h]="default argument declared here",
| |
| [i]="default argument declared here",
| |
| [c]=g,
| |
| [e]="default argument declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_default_function_arg_instantiation_here"]={
| |
| [b]="note_default_function_arg_instantiation_here",
| |
| [h]="in instantiation of default function argument expression for \'%0\' required here",
| |
| [i]="in instantiation of default function argument expression for \'A\' required here",
| |
| [c]=g,
| |
| [e]="in instantiation of default function argument expression for \'(.*?)\' required here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"657bad441eda",1252127659,"Use a separate diagnostic for default function argument expressions.","Use a separate diagnostic for default function argument expressions.\n\nllvm-svn: 81062"},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_default_member_initializer_not_yet_parsed"]={
| |
| [b]={{nil,s,"note_default_member_initializer_not_yet_parsed"}},
| |
| [h]={{nil,s,"default member initializer declared here"}},
| |
| [i]={{nil,s,"default member initializer declared here"}},
| |
| [c]=g,
| |
| [e]="default member initializer declared here",
| |
| [f]=a,
| |
| [d]={{nil,s,n}},
| |
| [j]={Pb,1582847864,Ob,Nb},
| |
| [k]={{A,6457,"ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) {\n // ...\n Diag(Field->getEndLoc(), diag::note_default_member_initializer_not_yet_parsed);"},{W,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_ambiguous"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_ambiguous"}},
| |
| [h]={{nil,m,"defaulted %0 is implicitly deleted because implied %select{|\'==\' |\'<\' }1comparison %select{|for member %3 |for base class %3 }2is ambiguous"}},
| |
| [i]={{nil,m,{"defaulted A is implicitly deleted because implied ",{a,"\'==\' ","\'<\' "},"comparison ",{a,"for member D ","for base class D "},"is ambiguous"}}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because implied (?:|\'\\=\\=\' |\'\\<\' )comparison (?:|for member (.*?) |for base class (.*?) )is ambiguous",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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);"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.spaceship/p1.cpp"]={"clang/test/CXX/class/class.compare/class.spaceship/p1.cpp:87:37: note: defaulted \'operator<=>\' is implicitly deleted because implied comparison for base class \'F\' is ambiguous","clang/test/CXX/class/class.compare/class.spaceship/p1.cpp:120:7: note: defaulted \'operator<=>\' is implicitly deleted because implied comparison for member \'arr\' is ambiguous"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_calls_deleted"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_calls_deleted"}},
| |
| [h]={{nil,m,"defaulted %0 is implicitly deleted because it would invoke a deleted comparison function%select{| for member %2| for base class %2}1"}},
| |
| [i]={{nil,m,{"defaulted A is implicitly deleted because it would invoke a deleted comparison function",{a," for member C"," for base class C"}}}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because it would invoke a deleted comparison function(?:| for member (.*?)| for base class (.*?))",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.rel/p2.cpp"]={"clang/test/CXX/class/class.compare/class.rel/p2.cpp:25:17: note: defaulted \'operator<\' is implicitly deleted because it would invoke a deleted comparison function","clang/test/CXX/class/class.compare/class.rel/p2.cpp:26:17: note: defaulted \'operator<=\' is implicitly deleted because it would invoke a deleted comparison function","clang/test/CXX/class/class.compare/class.rel/p2.cpp:27:17: note: defaulted \'operator>\' is implicitly deleted because it would invoke a deleted comparison function","clang/test/CXX/class/class.compare/class.rel/p2.cpp:28:17: note: defaulted \'operator>=\' is implicitly deleted because it would invoke a deleted comparison function","clang/test/CXX/class/class.compare/class.rel/p2.cpp:56:17: note: defaulted \'operator!=\' is implicitly deleted because it would invoke a deleted comparison function"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_cannot_deduce"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_cannot_deduce"}},
| |
| [h]={{nil,m,"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"}},
| |
| [i]={{nil,m,{"return type of defaulted \'operator<=>\' cannot be deduced because return type C of three-way comparison for ",{a,"member",Ub}," B is not a standard comparison category type"}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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();"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.spaceship/p2.cpp"]={"clang/test/CXX/class/class.compare/class.spaceship/p2.cpp:44:7: note: return type of defaulted \'operator<=>\' cannot be deduced because return type \'A\' of three-way comparison for member \'a\' is not a standard comparison category type"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_cannot_deduce_callee"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_cannot_deduce_callee"}},
| |
| [h]={{nil,m,"selected \'operator<=>\' for %select{|member|base class}0 %1 declared here"}},
| |
| [i]={{nil,m,{"selected \'operator<=>\' for ",{a,"member",Ub}," B declared here"}}},
| |
| [c]=g,
| |
| [e]="selected \'operator\\<\\=\\>\' for (?:|member|base class) (.*?) declared here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.spaceship/p2.cpp"]={"clang/test/CXX/class/class.compare/class.spaceship/p2.cpp:41:7: note: selected \'operator<=>\' for member \'a\' declared here","clang/test/CXX/class/class.compare/class.spaceship/p2.cpp:119:10: note: selected \'operator<=>\' for base class \'c\' declared here"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_cannot_deduce_undeduced_auto"]={
| |
| [b]="note_defaulted_comparison_cannot_deduce_undeduced_auto",
| |
| [h]={{nil,m,"%select{|member|base class}0 %1 declared here"}},
| |
| [i]={{nil,m,{{a,"member",Ub}," B declared here"}}},
| |
| [c]=g,
| |
| [e]="(?:|member|base class) (.*?) declared here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_inaccessible"}},
| |
| [h]={{nil,m,"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"}},
| |
| [i]={{nil,m,{"defaulted A is implicitly deleted because it would invoke a ",{"private","protected"}," E",{" member of G"," member of G to compare member C"," to compare base class C"}}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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()))"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.rel/p2.cpp"]={"clang/test/CXX/class/class.compare/class.rel/p2.cpp:81:17: note: defaulted \'operator<\' is implicitly deleted because it would invoke a private \'operator<=>\' member of \'Access::A\'"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_no_viable_function"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_no_viable_function"}},
| |
| [h]={{nil,U,"defaulted %0 is implicitly deleted because there is no viable %select{three-way comparison function|\'operator==\'}1 for %select{|member |base class }2%3"},{x,x,"defaulted %0 is implicitly deleted because there is no viable three-way comparison function for%select{| member| base class}1 %2"},{s,m,"defaulted %0 is implicitly deleted because there is no viable comparison function%select{| for member %2| for base class %2}1"}},
| |
| [i]={{nil,U,{"defaulted A is implicitly deleted because there is no viable ",{"three-way comparison function","\'operator==\'"}," for ",{a,"member ","base class "},"D"}},{x,x,{"defaulted A is implicitly deleted because there is no viable three-way comparison function for",{a," member"," base class"}," C"}},{s,m,{"defaulted A is implicitly deleted because there is no viable comparison function",{a," for member C"," for base class C"}}}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because there is no viable (?:three\\-way comparison function|\'operator\\=\\=\') for (?:|member |base class )(.*?)",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.compare.default/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:46:8: note: defaulted \'operator<\' is implicitly deleted because there is no viable three-way comparison function for \'A3\'"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_no_viable_function_synthesized"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_no_viable_function_synthesized"}},
| |
| [h]={{nil,m,"three-way comparison cannot be synthesized because there is no viable function for %select{\'==\'|\'<\'}0 comparison"}},
| |
| [i]={{nil,m,{"three-way comparison cannot be synthesized because there is no viable function for ",{"\'==\'","\'<\'"}," comparison"}}},
| |
| [c]=g,
| |
| [e]="three\\-way comparison cannot be synthesized because there is no viable function for (?:\'\\=\\=\'|\'\\<\') comparison",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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);"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.spaceship/p1.cpp"]={"clang/test/CXX/class/class.compare/class.spaceship/p1.cpp:87:37: note: three-way comparison cannot be synthesized because there is no viable function for \'<\' comparison","clang/test/CXX/class/class.compare/class.spaceship/p1.cpp:87:37: note: three-way comparison cannot be synthesized because there is no viable function for \'==\' comparison","clang/test/CXX/class/class.compare/class.spaceship/p1.cpp:120:7: note: three-way comparison cannot be synthesized because there is no viable function for \'<\' comparison","clang/test/CXX/class/class.compare/class.spaceship/p1.cpp:120:7: note: three-way comparison cannot be synthesized because there is no viable function for \'==\' comparison"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_not_constexpr"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_not_constexpr"}},
| |
| [h]={{nil,m,"non-constexpr comparison function would be used to compare %select{|member %1|base class %1}0"}},
| |
| [i]={{nil,m,{"non-constexpr comparison function would be used to compare ",{a,"member B","base class B"}}}},
| |
| [c]=g,
| |
| [e]="non\\-constexpr comparison function would be used to compare (?:|member (.*?)|base class (.*?))",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.compare.default/p4.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:86:5: note: non-constexpr comparison function would be used to compare member \'h\'","clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:151:7: note: non-constexpr comparison function would be used to compare member \'value\'"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_not_constexpr_here"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_not_constexpr_here"}},
| |
| [h]={{nil,m,"non-constexpr comparison function declared here"}},
| |
| [i]={{nil,m,"non-constexpr comparison function declared here"}},
| |
| [c]=g,
| |
| [e]="non\\-constexpr comparison function declared here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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);"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.compare.default/p4.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:81:8: note: non-constexpr comparison function declared here","clang/test/CXX/class/class.compare/class.compare.default/p4.cpp:157:17: note: non-constexpr comparison function declared here"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_not_rewritten_callee"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_not_rewritten_callee"}},
| |
| [h]={{nil,m,"defaulted %0 is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison"}},
| |
| [i]={{nil,m,"defaulted A is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison"}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because this non\\-rewritten comparison function would be the best match for the comparison",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.rel/p2.cpp"]={"clang/test/CXX/class/class.compare/class.rel/p2.cpp:37:17: note: defaulted \'operator<\' is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison","clang/test/CXX/class/class.compare/class.rel/p2.cpp:62:17: note: defaulted \'operator!=\' is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison","clang/test/CXX/class/class.compare/class.rel/p2.cpp:72:10: note: defaulted \'operator!=\' is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison","clang/test/CXX/class/class.compare/class.rel/p2.cpp:71:17: note: defaulted \'operator!=\' is implicitly deleted because this non-rewritten comparison function would be the best match for the comparison"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_not_rewritten_conversion"]={
| |
| [b]={{nil,U,"note_defaulted_comparison_not_rewritten_conversion"}},
| |
| [h]={{nil,U,"defaulted %0 is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison"}},
| |
| [i]={{nil,U,"defaulted A is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison"}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison",
| |
| [f]=a,
| |
| [d]={{nil,U,n}},
| |
| [j]={yd,1615397021,Id,Kd},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.compare.secondary/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.secondary/p2.cpp:31:3: note: defaulted \'operator!=\' is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison","clang/test/CXX/class/class.compare/class.compare.secondary/p2.cpp:53:3: note: defaulted \'operator<\' is implicitly deleted because a builtin comparison function using this conversion would be the best match for the comparison"}
| |
| }
| |
| },
| |
| ["note_defaulted_comparison_reference_member"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_reference_member"}},
| |
| [h]={{nil,m,"defaulted %0 is implicitly deleted because class %1 has a reference member"}},
| |
| [i]={{nil,m,"defaulted A is implicitly deleted because class B has a reference member"}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because class (.*?) has a reference member",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["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",Fd,"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",Fd,Fd,Fd,Fd,Fd,"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"]={
| |
| [b]={{nil,m,"note_defaulted_comparison_union"}},
| |
| [h]={{nil,m,"defaulted %0 is implicitly deleted because %2 is a %select{union-like class|union}1 with variant members"}},
| |
| [i]={{nil,m,{"defaulted A is implicitly deleted because C is a ",{"union-like class","union"}," with variant members"}}},
| |
| [c]=g,
| |
| [e]="defaulted (.*?) is implicitly deleted because (.*?) is a (?:union\\-like class|union) with variant members",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={nc,1573070592,jc,cc},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class/class.compare/class.compare.default/p2.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:79:8: note: defaulted \'operator==\' is implicitly deleted because \'C1\' is a union with variant members","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:80:8: note: defaulted \'operator<=>\' is implicitly deleted because \'C1\' is a union with variant members","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:101:8: note: defaulted \'operator==\' is implicitly deleted because \'D1\' is a union-like class with variant members","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:102:8: note: defaulted \'operator<=>\' is implicitly deleted because \'D1\' is a union-like class with variant members","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:147:15: note: defaulted \'operator==\' is implicitly deleted because \'F\' is a union-like class with variant members","clang/test/CXX/class/class.compare/class.compare.default/p2.cpp:149:15: note: defaulted \'operator<=>\' is implicitly deleted because \'F\' is a union-like class with variant members"}
| |
| }
| |
| },
| |
| ["note_defined_here"]={
| |
| [b]="note_defined_here",
| |
| [h]="%0 defined here",
| |
| [i]="A defined here",
| |
| [c]=g,
| |
| [e]="(.*?) defined here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{"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;"},{ib,1700,"bool CoroutineStmtBuilder::makeOnException() {\n // ...\n if (!lookupMember(S, \"unhandled_exception\", PromiseRecordDecl, Loc)) {\n // ...\n S.Diag(PromiseRecordDecl->getLocation(), diag::note_defined_here) << PromiseRecordDecl;"},{C,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();"},{gb,4645,"bool Sema::checkMSInheritanceAttrOnDefinition(CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel ExplicitModel) {\n // ...\n Diag(RD->getDefinition()->getLocation(), diag::note_defined_here) << RD;"},{r,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;"},{db,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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();"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"},{Z,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/parameterized_classes.m"]={"clang/test/SemaObjC/parameterized_classes.m:18:12: note: \'NSObject\' defined here"}
| |
| }
| |
| },
| |
| ["note_delete_conversion"]={
| |
| [b]="note_delete_conversion",
| |
| [h]="conversion to pointer type %0",
| |
| [i]="conversion to pointer type A",
| |
| [c]=g,
| |
| [e]="conversion to pointer type (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{hb,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; }"},{hb,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; }"}},
| |
| [l]={
| |
| ["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 *\'"}
| |
| }
| |
| },
| |
| ["note_delete_non_virtual"]={
| |
| [b]="note_delete_non_virtual",
| |
| [h]="qualify call to silence this warning",
| |
| [i]="qualify call to silence this warning",
| |
| [c]=g,
| |
| [e]="qualify call to silence this warning",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{hb,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"]={
| |
| [b]="note_deleted_assign_field",
| |
| [h]="%select{copy|move}0 assignment operator of %1 is implicitly deleted because field %2 is of %select{reference|const-qualified}4 type %3",
| |
| [i]={{nil,nil,{{fc,"move"}," assignment operator of B is implicitly deleted because field C is of ",{Hb,"const-qualified"}," type D"}}},
| |
| [c]=g,
| |
| [e]="(?:copy|move) assignment operator of (.*?) is implicitly deleted because field (.*?) is of (?:reference|const\\-qualified) type (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/special/class.copy/p23-cxx11.cpp"]={"clang/test/CXX/special/class.copy/p23-cxx11.cpp:78:13: note: copy assignment operator of \'B1\' is implicitly deleted because field \'a\' is of const-qualified type \'const int\'","clang/test/CXX/special/class.copy/p23-cxx11.cpp:78:13: note: move assignment operator of \'B1\' is implicitly deleted because field \'a\' is of const-qualified type \'const int\'","clang/test/CXX/special/class.copy/p23-cxx11.cpp:81:21: note: copy assignment operator of \'B2\' is implicitly deleted because field \'a\' is of const-qualified type \'const void *const[3][9][2]\'","clang/test/CXX/special/class.copy/p23-cxx11.cpp:81:21: note: move assignment operator of \'B2\' is implicitly deleted because field \'a\' is of const-qualified type \'const void *const[3][9][2]\'","clang/test/CXX/special/class.copy/p23-cxx11.cpp:95:8: note: copy assignment operator of \'C1\' is implicitly deleted because field \'a\' is of reference type \'int &\'","clang/test/CXX/special/class.copy/p23-cxx11.cpp:95:8: note: move assignment operator of \'C1\' is implicitly deleted because field \'a\' is of reference type \'int &\'"}
| |
| }
| |
| },
| |
| ["note_deleted_copy_ctor_rvalue_reference"]={
| |
| [b]="note_deleted_copy_ctor_rvalue_reference",
| |
| [h]="copy constructor of %0 is implicitly deleted because field %1 is of rvalue reference type %2",
| |
| [i]="copy constructor of A is implicitly deleted because field B is of rvalue reference type C",
| |
| [c]=g,
| |
| [e]="copy constructor of (.*?) is implicitly deleted because field (.*?) is of rvalue reference type (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/special/class.copy/p11.0x.copy.cpp"]={"clang/test/CXX/special/class.copy/p11.0x.copy.cpp:126:10: note: copy constructor of \'RValue\' is implicitly deleted because field \'ri\' is of rvalue reference type \'int &&\'","clang/test/CXX/special/class.copy/p11.0x.copy.cpp:134:10: note: copy constructor of \'RValueTmp\' is implicitly deleted because field \'ri\' is of rvalue reference type \'int &&\'"}
| |
| }
| |
| },
| |
| ["note_deleted_copy_user_declared_move"]={
| |
| [b]="note_deleted_copy_user_declared_move",
| |
| [h]="copy %select{constructor|assignment operator}0 is implicitly deleted because %1 has a user-declared move %select{constructor|assignment operator}2",
| |
| [i]={{nil,nil,{"copy ",{E,"assignment operator"}," is implicitly deleted because B has a user-declared move ",{E,"assignment operator"}}}},
| |
| [c]=g,
| |
| [e]="copy (?:constructor|assignment operator) is implicitly deleted because (.*?) has a user\\-declared move (?:constructor|assignment operator)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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();"}},
| |
| [l]={
| |
| ["clang/test/SemaObjCXX/block-variable-move.mm"]={"clang/test/SemaObjCXX/block-variable-move.mm:17:3: note: copy constructor is implicitly deleted because \'MoveOnly\' has a user-declared move constructor","clang/test/SemaObjCXX/block-variable-move.mm:17:3: note: copy constructor is implicitly deleted because \'MoveOnly\' has a user-declared move constructor"}
| |
| }
| |
| },
| |
| ["note_deleted_default_ctor_all_const"]={
| |
| [b]="note_deleted_default_ctor_all_const",
| |
| [h]="%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",
| |
| [i]={{nil,nil,{{"default constructor of","constructor inherited by"}," B is implicitly deleted because all ",{"data members","data members of an anonymous union member"}," are const-qualified"}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/cxx0x-deleted-default-ctor.cpp"]={"clang/test/SemaCXX/cxx0x-deleted-default-ctor.cpp:14:7: note: default constructor of \'bad_union2\' is implicitly deleted because all data members are const-qualified","clang/test/SemaCXX/cxx0x-deleted-default-ctor.cpp:26:3: note: default constructor of \'bad_anon2\' is implicitly deleted because all data members of an anonymous union member are const-qualified"}
| |
| }
| |
| },
| |
| ["note_deleted_default_ctor_uninit_field"]={
| |
| [b]="note_deleted_default_ctor_uninit_field",
| |
| [h]="%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",
| |
| [i]={{nil,nil,{{"default constructor of","constructor inherited by"}," B is implicitly deleted because field C of ",{Hb,"const-qualified"}," type D would not be initialized"}}},
| |
| [c]=g,
| |
| [e]="(?:default constructor of|constructor inherited by) (.*?) is implicitly deleted because field (.*?) of (?:reference|const\\-qualified) type (.*?) would not be initialized",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/value-initialization.cpp"]={"clang/test/SemaCXX/value-initialization.cpp:4:16: note: default constructor of \'A\' is implicitly deleted because field \'i\' of const-qualified type \'const int\' would not be initialized"}
| |
| }
| |
| },
| |
| ["note_deleted_dtor_no_operator_delete"]={
| |
| [b]="note_deleted_dtor_no_operator_delete",
| |
| [h]="virtual destructor requires an unambiguous, accessible \'operator delete\'",
| |
| [i]="virtual destructor requires an unambiguous, accessible \'operator delete\'",
| |
| [c]=g,
| |
| [e]="virtual destructor requires an unambiguous, accessible \'operator delete\'",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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);"}},
| |
| [l]={
| |
| ["clang/test/CXX/special/class.dtor/p5-0x.cpp"]={"clang/test/CXX/special/class.dtor/p5-0x.cpp:93:8: note: virtual destructor requires an unambiguous, accessible \'operator delete\'","clang/test/CXX/special/class.dtor/p5-0x.cpp:93:8: note: virtual destructor requires an unambiguous, accessible \'operator delete\'","clang/test/CXX/special/class.dtor/p5-0x.cpp:97:8: note: virtual destructor requires an unambiguous, accessible \'operator delete\'","clang/test/CXX/special/class.dtor/p5-0x.cpp:102:8: note: virtual destructor requires an unambiguous, accessible \'operator delete\'"}
| |
| }
| |
| },
| |
| ["note_deleted_special_member_class_subobject"]={
| |
| [b]="note_deleted_special_member_class_subobject",
| |
| [h]={{nil,p,"%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"},{v,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"}},
| |
| [i]={{nil,p,{{"default constructor of","copy constructor of","move constructor of","copy assignment operator of","move assignment operator of","destructor of","constructor inherited by"}," B is implicitly deleted because ",{"base class D",{{a,a,a,a,"variant "},"field D"}},rb,{{"has ",{sc,"a deleted","multiple","an inaccessible","a non-trivial"},rb,{{{wc,kc,lc,oc,pc,D,{{Cc,"corresponding",Cc,Cc,Cc}," constructor"}}},D},{a,a,"s",a,a}},"is an ObjC pointer"}}},{v,nil,{{"default constructor of","copy constructor of","move constructor of","copy assignment operator of","move assignment operator of","destructor of","constructor inherited by"}," B is implicitly deleted because ",{"base class D",{{a,a,a,a,"variant "},"field D"}}," has ",{sc,"a deleted","multiple","an inaccessible","a non-trivial"},rb,{{{wc,kc,lc,oc,pc,D,{{Cc,"corresponding",Cc,Cc,Cc}," constructor"}}},D},{a,a,"s",a,a}}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]=n,
| |
| [j]={nd,1333140808,ed,md},
| |
| [k]={{r,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;"},{r,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;"},{r,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;"},{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/class.derived/class.abstract/p16.cpp"]={"clang/test/CXX/class.derived/class.abstract/p16.cpp:34:12: note: destructor of \'E\' is implicitly deleted because base class \'D\' has an inaccessible destructor","clang/test/CXX/class.derived/class.abstract/p16.cpp:34:12: note: copy assignment operator of \'E\' is implicitly deleted because base class \'D\' has an inaccessible copy assignment operator","clang/test/CXX/class.derived/class.abstract/p16.cpp:40:12: note: destructor of \'G\' is implicitly deleted because base class \'D\' has an inaccessible destructor","clang/test/CXX/class.derived/class.abstract/p16.cpp:40:12: note: move assignment operator of \'G\' is implicitly deleted because base class \'D\' has an inaccessible move assignment operator","clang/test/CXX/class.derived/class.abstract/p16.cpp:45:12: note: move assignment operator of \'H\' is implicitly deleted because base class \'D\' has an inaccessible move assignment operator","clang/test/CXX/class.derived/class.abstract/p16.cpp:45:12: note: move assignment operator of \'H\' is implicitly deleted because base class \'D\' has an inaccessible move assignment operator"}
| |
| }
| |
| },
| |
| ["note_deleted_type_mismatch"]={
| |
| [b]={{nil,v,"note_deleted_type_mismatch"}},
| |
| [h]={{nil,v,"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"}},
| |
| [i]={{nil,v,{"function is implicitly deleted because its declared type does not match the type of an implicit ",{wc,kc,lc,oc,pc,D}}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]={{nil,v,n}},
| |
| [j]={"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"},
| |
| [k]={{r,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp"]={"clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp:30:3: note: function is implicitly deleted because its declared type does not match the type of an implicit default constructor","clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp:31:3: note: function is implicitly deleted because its declared type does not match the type of an implicit copy constructor","clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp:32:6: note: function is implicitly deleted because its declared type does not match the type of an implicit copy assignment operator","clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp:72:3: note: function is implicitly deleted because its declared type does not match the type of an implicit copy constructor","clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p1.cpp:73:6: note: function is implicitly deleted because its declared type does not match the type of an implicit copy assignment operator"}
| |
| }
| |
| },
| |
| ["note_dependent_function_template_spec_discard_reason"]={
| |
| [b]={{nil,u,"note_dependent_function_template_spec_discard_reason"}},
| |
| [h]={{nil,u,"candidate ignored: %select{not a function template|not a member of the enclosing namespace; did you mean to explicitly qualify the specialization?}0"}},
| |
| [i]={{nil,u,{"candidate ignored: ",{"not a function template","not a member of the enclosing namespace; did you mean to explicitly qualify the specialization?"}}}},
| |
| [c]=g,
| |
| [e]="candidate ignored\\: (?:not a function template|not a member of the enclosing namespace; did you mean to explicitly qualify the specialization\\?)",
| |
| [f]=a,
| |
| [d]={{nil,u,n}},
| |
| [j]={"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"},
| |
| [k]={{G,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_dependent_member_use"]={
| |
| [b]={{nil,s,"note_dependent_member_use"}},
| |
| [h]={{nil,s,"must qualify identifier to find this declaration in dependent base class"}},
| |
| [i]={{nil,s,"must qualify identifier to find this declaration in dependent base class"}},
| |
| [c]=g,
| |
| [e]="must qualify identifier to find this declaration in dependent base class",
| |
| [f]=a,
| |
| [d]={{nil,s,n}},
| |
| [j]={Mb,1590001902,Sb,Rb},
| |
| [k]={{A,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_dependent_non_type_default_arg_in_partial_spec"]={
| |
| [b]="note_dependent_non_type_default_arg_in_partial_spec",
| |
| [h]="template parameter is used in default argument declared here",
| |
| [i]="template parameter is used in default argument declared here",
| |
| [c]=g,
| |
| [e]="template parameter is used in default argument declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{G,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"]={
| |
| [b]={{nil,u,"note_deprecated_this_capture"}},
| |
| [h]={{nil,u,"add an explicit capture of \'this\' to capture \'*this\' by reference"}},
| |
| [i]={{nil,u,"add an explicit capture of \'this\' to capture \'*this\' by reference"}},
| |
| [c]=g,
| |
| [e]="add an explicit capture of \'this\' to capture \'\\*this\' by reference",
| |
| [f]=a,
| |
| [d]={{nil,u,"Lambda Issue"}},
| |
| [j]={"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"},
| |
| [k]={{"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\");"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/lambda-implicit-this-capture.cpp"]={"clang/test/SemaCXX/lambda-implicit-this-capture.cpp:10:13: note: add an explicit capture of \'this\' to capture \'*this\' by reference"}
| |
| }
| |
| },
| |
| ["note_designated_init_mixed"]={
| |
| [b]={{nil,m,"note_designated_init_mixed"}},
| |
| [h]={{nil,m,"first non-designated initializer is here"}},
| |
| [i]={{nil,m,"first non-designated initializer is here"}},
| |
| [c]=g,
| |
| [e]="first non\\-designated initializer is here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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"},
| |
| [k]={{A,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();"},{A,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_destructor_nontype_here"]={
| |
| [b]={{nil,t,"note_destructor_nontype_here"}},
| |
| [h]={{nil,t,"non-type declaration found by destructor name lookup"}},
| |
| [i]={{nil,t,"non-type declaration found by destructor name lookup"}},
| |
| [c]=g,
| |
| [e]="non\\-type declaration found by destructor name lookup",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={"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"},
| |
| [k]={{hb,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);"},{hb,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/GH59446.cpp"]={"clang/test/SemaCXX/GH59446.cpp:5:34: note: non-type declaration found by destructor name lookup"}
| |
| }
| |
| },
| |
| ["note_destructor_type_here"]={
| |
| [b]="note_destructor_type_here",
| |
| [h]={{nil,t,"type %0 found by destructor name lookup"},{m,nil,"type %0 is declared here"}},
| |
| [i]={{nil,t,"type A found by destructor name lookup"},{m,nil,"type A is declared here"}},
| |
| [c]=g,
| |
| [e]="type (.*?) found by destructor name lookup",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{hb,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);"},{hb,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);"},{hb,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:5:13: note: type \'Bar\' (aka \'Foo\') found by destructor name lookup"}
| |
| }
| |
| },
| |
| ["note_direct_member_here"]={
| |
| [b]={{nil,s,"note_direct_member_here"}},
| |
| [h]={{nil,s,"direct member declared here"}},
| |
| [i]={{nil,s,"direct member declared here"}},
| |
| [c]=g,
| |
| [e]="direct member declared here",
| |
| [f]=a,
| |
| [d]={{nil,s,n}},
| |
| [j]={Mb,1590001902,Sb,Rb},
| |
| [k]={{db,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_direct_method_declared_at"]={
| |
| [b]={{nil,m,"note_direct_method_declared_at"}},
| |
| [h]={{nil,m,"direct method %0 declared here"}},
| |
| [i]={{nil,m,"direct method A declared here"}},
| |
| [c]=g,
| |
| [e]="direct method (.*?) declared here",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={"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>"},
| |
| [k]={{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/method-direct-arc.m"]={"clang/test/SemaObjC/method-direct-arc.m:8:1: note: direct method \'directMethod\' declared here"}
| |
| }
| |
| },
| |
| ["note_doc_block_command_previous"]={
| |
| [b]="note_doc_block_command_previous",
| |
| [h]="previous command \'%select{\\|@}0%1\' here",
| |
| [i]={{nil,nil,{"previous command \'",{"\\","@"},"B\' here"}}},
| |
| [c]=g,
| |
| [e]="previous command \'(?:\\\\|@)(.*?)\' here",
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_doc_block_command_previous_alias"]={
| |
| [b]="note_doc_block_command_previous_alias",
| |
| [h]="previous command \'%select{\\|@}0%1\' (an alias of \'\\%2\') here",
| |
| [i]={{nil,nil,{"previous command \'",{"\\","@"},"B\' (an alias of \'\\C\') here"}}},
| |
| [c]=g,
| |
| [e]="previous command \'(?:\\\\|@)(.*?)\' \\(an alias of \'\\\\(.*?)\'\\) here",
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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;"}},
| |
| [l]={
| |
| ["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:170:6: note: previous command \'\\short\' (an alias of \'\\brief\') here"}
| |
| }
| |
| },
| |
| ["note_doc_html_end_tag"]={
| |
| [b]="note_doc_html_end_tag",
| |
| [h]="end tag",
| |
| [i]="end tag",
| |
| [c]=g,
| |
| [e]="end tag",
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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"]={
| |
| [b]="note_doc_html_tag_started_here",
| |
| [h]="HTML tag started here",
| |
| [i]="HTML tag started here",
| |
| [c]=g,
| |
| [e]="HTML tag started here",
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{"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();"}},
| |
| [l]={
| |
| ["clang/test/Sema/warn-documentation.cpp"]={"clang/test/Sema/warn-documentation.cpp:50:13: note: HTML tag started here"}
| |
| }
| |
| },
| |
| ["note_doc_param_name_suggestion"]={
| |
| [b]="note_doc_param_name_suggestion",
| |
| [h]="did you mean \'%0\'?",
| |
| [i]="did you mean \'A\'?",
| |
| [c]=g,
| |
| [e]="did you mean \'(.*?)\'\\?",
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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());"}},
| |
| [l]={
| |
| ["clang/test/Sema/warn-documentation-crlf.c"]={"clang/test/Sema/warn-documentation-crlf.c:10:11: note: did you mean \'qwerty\'?"}
| |
| }
| |
| },
| |
| ["note_doc_param_previous"]={
| |
| [b]="note_doc_param_previous",
| |
| [h]=Jd,
| |
| [i]=Jd,
| |
| [c]=g,
| |
| [e]=Jd,
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_doc_tparam_name_suggestion"]={
| |
| [b]="note_doc_tparam_name_suggestion",
| |
| [h]="did you mean \'%0\'?",
| |
| [i]="did you mean \'A\'?",
| |
| [c]=g,
| |
| [e]="did you mean \'(.*?)\'\\?",
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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"]={
| |
| [b]="note_doc_tparam_previous",
| |
| [h]=Jd,
| |
| [i]=Jd,
| |
| [c]=g,
| |
| [e]=Jd,
| |
| [f]=a,
| |
| [d]=tc,
| |
| [j]={"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"},
| |
| [k]={{Ac,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"]={
| |
| [b]="note_drv_address_sanitizer_debug_runtime",
| |
| [h]="AddressSanitizer doesn\'t support linking with debug runtime libraries yet",
| |
| [i]="AddressSanitizer doesn\'t support linking with debug runtime libraries yet",
| |
| [c]=g,
| |
| [e]="AddressSanitizer doesn\'t support linking with debug runtime libraries yet",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{"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"]={
| |
| [b]="note_drv_available_multilibs",
| |
| [h]="available multilibs are:%0",
| |
| [i]="available multilibs are:A",
| |
| [c]=g,
| |
| [e]="available multilibs are\\:(.*?)",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{"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"]={
| |
| [b]="note_drv_command_failed_diag_msg",
| |
| [h]="diagnostic msg: %0",
| |
| [i]="diagnostic msg: A",
| |
| [c]=g,
| |
| [e]="diagnostic msg\\: (.*?)",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{bb,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;"},{bb,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;"},{bb,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********************\";"},{bb,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) - \""},{bb,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) - \""},{bb,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 \""},{bb,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).\";"},{bb,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).\";"},{bb,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).\";"},{bb,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;"},{bb,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;"},{bb,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();"},{bb,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;"},{bb,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();"},{bb,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\";"},{bb,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();"},{bb,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)\";"},{bb,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"]={
| |
| [b]={{nil,z,"note_drv_config_file_searched_in"}},
| |
| [h]={{nil,z,"was searched for in the directory: %0"}},
| |
| [i]={{nil,z,"was searched for in the directory: A"}},
| |
| [c]=g,
| |
| [e]="was searched for in the directory\\: (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,z,a}},
| |
| [j]={"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"},
| |
| [k]={{bb,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"]={
| |
| [b]="note_drv_t_option_is_global",
| |
| [h]={{nil,U,"the last \'/TC\' or \'/TP\' option takes precedence over earlier instances"},{x,nil,"The last /TC or /TP option takes precedence over earlier instances"}},
| |
| [i]={{nil,U,"the last \'/TC\' or \'/TP\' option takes precedence over earlier instances"},{x,nil,"The last /TC or /TP option takes precedence over earlier instances"}},
| |
| [c]=g,
| |
| [e]="the last \'\\/TC\' or \'\\/TP\' option takes precedence over earlier instances",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{bb,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"]={
| |
| [b]={{nil,y,"note_drv_use_standard"}},
| |
| [h]={{nil,y,"use \'%0\'%select{| or \'%3\'|, \'%3\', or \'%4\'|, \'%3\', \'%4\', or \'%5\'}2 for \'%1\' standard"}},
| |
| [i]={{nil,y,{"use \'A\'",{a," or \'D\'",", \'D\', or \'E\'",", \'D\', \'E\', or \'F\'"}," for \'B\' standard"}}},
| |
| [c]=g,
| |
| [e]="use \'(.*?)\'(?:| or \'(.*?)\'|, \'(.*?)\', or \'(.*?)\'|, \'(.*?)\', \'(.*?)\', or \'(.*?)\') for \'(.*?)\' standard",
| |
| [f]=a,
| |
| [d]={{nil,y,a}},
| |
| [j]={"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"},
| |
| [k]={{"clang/lib/Frontend/CompilerInvocation.cpp",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"]={
| |
| [b]={{nil,z,"note_drv_verify_prefix_spelling"}},
| |
| [h]={{nil,z,"-verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores"}},
| |
| [i]={{nil,z,"-verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores"}},
| |
| [c]=g,
| |
| [e]="\\-verify prefixes must start with a letter and contain only alphanumeric characters, hyphens, and underscores",
| |
| [f]=a,
| |
| [d]={{nil,z,a}},
| |
| [j]={"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"},
| |
| [k]={{"clang/lib/Frontend/CompilerInvocation.cpp",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"]={
| |
| [b]="note_due_to_dllexported_class",
| |
| [h]={{nil,u,"due to %0 being dllexported%select{|; try compiling in C++11 mode}1"},{z,nil,"due to \'%0\' being dllexported%select{|; try compiling in C++11 mode}1"}},
| |
| [i]={{nil,u,{"due to A being dllexported",{a,"; try compiling in C++11 mode"}}},{z,nil,{"due to \'A\' being dllexported",{a,"; try compiling in C++11 mode"}}}},
| |
| [c]=g,
| |
| [e]="due to (.*?) being dllexported(?:|; try compiling in C\\+\\+11 mode)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/default-arg-closures.cpp"]={"clang/test/SemaCXX/default-arg-closures.cpp:13:12: note: due to \'ExportDefaultCtorClosure\' being dllexported"}
| |
| }
| |
| },
| |
| ["note_duplicate_asm_operand_name"]={
| |
| [b]={{nil,p,"note_duplicate_asm_operand_name"}},
| |
| [h]={{nil,p,"asm operand name \"%0\" first referenced here"}},
| |
| [i]={{nil,p,"asm operand name \"A\" first referenced here"}},
| |
| [c]=g,
| |
| [e]="asm operand name \"(.*?)\" first referenced here",
| |
| [f]=a,
| |
| [d]={{nil,p,"Inline Assembly Issue"}},
| |
| [j]={"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"},
| |
| [k]={{Cd,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_duplicate_case_prev"]={
| |
| [b]="note_duplicate_case_prev",
| |
| [h]="previous case defined here",
| |
| [i]="previous case defined here",
| |
| [c]=g,
| |
| [e]="previous case defined here",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Hc,1236199783,Fc,Ec},
| |
| [k]={{X,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);"},{X,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);"},{X,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_duplicate_element"]={
| |
| [b]="note_duplicate_element",
| |
| [h]="element %0 also has value %1",
| |
| [i]="element A also has value B",
| |
| [c]=g,
| |
| [e]="element (.*?) also has value (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{C,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_empty_body_on_separate_line"]={
| |
| [b]="note_empty_body_on_separate_line",
| |
| [h]="put the semicolon on a separate line to silence this warning",
| |
| [i]="put the semicolon on a separate line to silence this warning",
| |
| [c]=g,
| |
| [e]="put the semicolon on a separate line to silence this warning",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{V,17891,"void Sema::DiagnoseEmptyStmtBody(SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID) {\n // ...\n Diag(NBody->getSemiLoc(), diag::note_empty_body_on_separate_line);"},{V,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_empty_parens_default_ctor"]={
| |
| [b]="note_empty_parens_default_ctor",
| |
| [h]="remove parentheses to declare a variable",
| |
| [i]="remove parentheses to declare a variable",
| |
| [c]=g,
| |
| [e]="remove parentheses to declare a variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{Y,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_empty_parens_function_call"]={
| |
| [b]="note_empty_parens_function_call",
| |
| [h]="change this \',\' to a \';\' to call %0",
| |
| [i]="change this \',\' to a \';\' to call A",
| |
| [c]=g,
| |
| [e]="change this \',\' to a \';\' to call (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{Y,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();"}},
| |
| [l]={
| |
| ["clang/test/Parser/cxx-stmt.cpp"]={"clang/test/Parser/cxx-stmt.cpp:63:8: note: change this \',\' to a \';\' to call \'f6\'"}
| |
| }
| |
| },
| |
| ["note_empty_parens_zero_initialize"]={
| |
| [b]="note_empty_parens_zero_initialize",
| |
| [h]="replace parentheses with an initializer to declare a variable",
| |
| [i]="replace parentheses with an initializer to declare a variable",
| |
| [c]=g,
| |
| [e]="replace parentheses with an initializer to declare a variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{Y,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_empty_using_if_exists_here"]={
| |
| [b]={{nil,x,"note_empty_using_if_exists_here"}},
| |
| [h]={{nil,x,"using declaration annotated with \'using_if_exists\' here"}},
| |
| [i]={{nil,x,"using declaration annotated with \'using_if_exists\' here"}},
| |
| [c]=g,
| |
| [e]="using declaration annotated with \'using_if_exists\' here",
| |
| [f]=a,
| |
| [d]={{nil,x,n}},
| |
| [j]={yd,1615397021,Id,Kd},
| |
| [k]={{A,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_enforce_read_only_placement"]={
| |
| [b]={{nil,q,"note_enforce_read_only_placement"}},
| |
| [h]={{nil,q,"type was declared read-only here"}},
| |
| [i]={{nil,q,"type was declared read-only here"}},
| |
| [c]=g,
| |
| [e]="type was declared read\\-only here",
| |
| [f]=a,
| |
| [d]={{nil,q,n}},
| |
| [j]={Vb,1625925174,Jb,Kb},
| |
| [k]={{C,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);"}},
| |
| [l]={
| |
| ["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:17:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:17:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:17:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:17:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:17:23: note: type was declared read-only here","clang/test/Sema/attr-read-only-placement.cpp:40:23: note: type was declared read-only here"}
| |
| }
| |
| },
| |
| ["note_enters_block_captures_cxx_obj"]={
| |
| [b]="note_enters_block_captures_cxx_obj",
| |
| [h]="jump enters lifetime of block which captures a destructible C++ object",
| |
| [i]="jump enters lifetime of block which captures a destructible C++ object",
| |
| [c]=g,
| |
| [e]="jump enters lifetime of block which captures a destructible C\\+\\+ object",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={od,1310407494,qd,Nd},
| |
| [k]={{N,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/goto.cpp"]={"clang/test/SemaCXX/goto.cpp:121:15: note: jump enters lifetime of block which captures a destructible C++ object"}
| |
| }
| |
| },
| |
| ["note_enters_block_captures_non_trivial_c_struct"]={
| |
| [b]={{nil,u,"note_enters_block_captures_non_trivial_c_struct"}},
| |
| [h]={{nil,u,"jump enters lifetime of block which captures a C struct that is non-trivial to destroy"}},
| |
| [i]={{nil,u,"jump enters lifetime of block which captures a C struct that is non-trivial to destroy"}},
| |
| [c]=g,
| |
| [e]="jump enters lifetime of block which captures a C struct that is non\\-trivial to destroy",
| |
| [f]=a,
| |
| [d]={{nil,u,n}},
| |
| [j]={"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"},
| |
| [k]={{N,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/strong-in-c-struct.m"]={"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"]={
| |
| [b]="note_enters_block_captures_strong",
| |
| [h]="jump enters lifetime of block which strongly captures a variable",
| |
| [i]="jump enters lifetime of block which strongly captures a variable",
| |
| [c]=g,
| |
| [e]="jump enters lifetime of block which strongly captures a variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={od,1310407494,qd,Nd},
| |
| [k]={{N,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_enters_block_captures_weak"]={
| |
| [b]="note_enters_block_captures_weak",
| |
| [h]="jump enters lifetime of block which weakly captures a variable",
| |
| [i]="jump enters lifetime of block which weakly captures a variable",
| |
| [c]=g,
| |
| [e]="jump enters lifetime of block which weakly captures a variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={od,1310407494,qd,Nd},
| |
| [k]={{N,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"]={
| |
| [b]={{nil,t,"note_enters_compound_literal_scope"}},
| |
| [h]={{nil,t,"jump enters lifetime of a compound literal that is non-trivial to destruct"}},
| |
| [i]={{nil,t,"jump enters lifetime of a compound literal that is non-trivial to destruct"}},
| |
| [c]=g,
| |
| [e]="jump enters lifetime of a compound literal that is non\\-trivial to destruct",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={wd,1576908663,td,rd},
| |
| [k]={{N,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/strong-in-c-struct.m"]={"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"]={
| |
| [b]="note_enters_statement_expression",
| |
| [h]="jump enters a statement expression",
| |
| [i]="jump enters a statement expression",
| |
| [c]=g,
| |
| [e]="jump enters a statement expression",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{N,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,"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_entity_declared_at"]={
| |
| [b]="note_entity_declared_at",
| |
| [h]="%0 declared here",
| |
| [i]="A declared here",
| |
| [c]=g,
| |
| [e]="(.*?) declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{V,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();"},{"clang/lib/Sema/SemaCXXScopeSpec.cpp",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;"},{"clang/lib/Sema/SemaCXXScopeSpec.cpp",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;"},{C,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;"},{gb,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();"},{r,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();"},{r,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();"},{db,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();"},{A,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;"},{A,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;"},{A,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;"},{A,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;"},{A,19155,"void diagnoseUncapturableValueReferenceOrBinding(Sema &S, SourceLocation loc, ValueDecl *var) {\n // ...\n S.Diag(var->getLocation(), diag::note_entity_declared_at) << var;"},{A,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;"},{A,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;"},{A,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();"},{B,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;"},{G,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;"},{G,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"]={
| |
| [b]="note_enum_specialized_here",
| |
| [h]="enum %0 was explicitly specialized here",
| |
| [i]="enum A was explicitly specialized here",
| |
| [c]=g,
| |
| [e]="enum (.*?) was explicitly specialized here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_equality_comparison_silence"]={
| |
| [b]="note_equality_comparison_silence",
| |
| [h]="remove extraneous parentheses around the comparison to silence this warning",
| |
| [i]="remove extraneous parentheses around the comparison to silence this warning",
| |
| [c]=g,
| |
| [e]="remove extraneous parentheses around the comparison to silence this warning",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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());"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_equality_comparison_to_assign"]={
| |
| [b]="note_equality_comparison_to_assign",
| |
| [h]="use \'=\' to turn this equality comparison into an assignment",
| |
| [i]="use \'=\' to turn this equality comparison into an assignment",
| |
| [c]=g,
| |
| [e]="use \'\\=\' to turn this equality comparison into an assignment",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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, \"=\");"},{X,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, \"=\");"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_equivalent_internal_linkage_decl"]={
| |
| [b]="note_equivalent_internal_linkage_decl",
| |
| [h]="declared here%select{ in module \'%1\'|}0",
| |
| [i]={{nil,nil,{"declared here",{" in module \'B\'",a}}}},
| |
| [c]=g,
| |
| [e]="declared here(?: in module \'(.*?)\'|)",
| |
| [f]=a,
| |
| [d]=Ld,
| |
| [j]={"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"},
| |
| [k]={{xb,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() : \"\");"},{xb,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() : \"\");"}},
| |
| [l]={
| |
| ["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\'"}
| |
| }
| |
| },
| |
| ["note_evaluate_comparison_first"]={
| |
| [b]="note_evaluate_comparison_first",
| |
| [h]="place parentheses around comparison expression to evaluate it first",
| |
| [i]="place parentheses around comparison expression to evaluate it first",
| |
| [c]=g,
| |
| [e]="place parentheses around comparison expression to evaluate it first",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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()));"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_evaluating_exception_spec_here"]={
| |
| [b]={{nil,v,"note_evaluating_exception_spec_here"}},
| |
| [h]={{nil,v,"in evaluation of exception specification for %q0 needed here"}},
| |
| [i]={{nil,v,"in evaluation of exception specification for A needed here"}},
| |
| [c]=g,
| |
| [e]="in evaluation of exception specification for (.*?) needed here",
| |
| [f]=a,
| |
| [d]={{nil,v,n}},
| |
| [j]={"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"},
| |
| [k]={{W,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_exception_spec_deprecated"]={
| |
| [b]="note_exception_spec_deprecated",
| |
| [h]="use \'%0\' instead",
| |
| [i]="use \'A\' instead",
| |
| [c]=g,
| |
| [e]="use \'(.*?)\' instead",
| |
| [f]=a,
| |
| [d]={{nil,v,Ab},{"7.1",nil,n}},
| |
| [j]={"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"},
| |
| [k]={{"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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/ms-exception-spec.cpp"]={"clang/test/SemaCXX/ms-exception-spec.cpp:11:10: note: use \'noexcept(false)\' instead","clang/test/SemaCXX/ms-exception-spec.cpp:19:11: note: use \'noexcept(false)\' instead"}
| |
| }
| |
| },
| |
| ["note_exits___block"]={
| |
| [b]="note_exits___block",
| |
| [h]="jump exits scope of __block variable",
| |
| [i]="jump exits scope of __block variable",
| |
| [c]=g,
| |
| [e]="jump exits scope of __block variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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);"}},
| |
| [l]={
| |
| ["clang/test/Sema/attr-musttail.m"]={"clang/test/Sema/attr-musttail.m:12:15: note: jump exits scope of __block variable"}
| |
| }
| |
| },
| |
| ["note_exits_block_captures_cxx_obj"]={
| |
| [b]="note_exits_block_captures_cxx_obj",
| |
| [h]="jump exits lifetime of block which captures a destructible C++ object",
| |
| [i]="jump exits lifetime of block which captures a destructible C++ object",
| |
| [c]=g,
| |
| [e]="jump exits lifetime of block which captures a destructible C\\+\\+ object",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={od,1310407494,qd,Nd},
| |
| [k]={{N,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"]={
| |
| [b]={{nil,u,"note_exits_block_captures_non_trivial_c_struct"}},
| |
| [h]={{nil,u,"jump exits lifetime of block which captures a C struct that is non-trivial to destroy"}},
| |
| [i]={{nil,u,"jump exits lifetime of block which captures a C struct that is non-trivial to destroy"}},
| |
| [c]=g,
| |
| [e]="jump exits lifetime of block which captures a C struct that is non\\-trivial to destroy",
| |
| [f]=a,
| |
| [d]={{nil,u,n}},
| |
| [j]={"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"},
| |
| [k]={{N,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/strong-in-c-struct.m"]={"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"]={
| |
| [b]="note_exits_block_captures_strong",
| |
| [h]="jump exits lifetime of block which strongly captures a variable",
| |
| [i]="jump exits lifetime of block which strongly captures a variable",
| |
| [c]=g,
| |
| [e]="jump exits lifetime of block which strongly captures a variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={od,1310407494,qd,Nd},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_block_captures_weak",
| |
| [h]="jump exits lifetime of block which weakly captures a variable",
| |
| [i]="jump exits lifetime of block which weakly captures a variable",
| |
| [c]=g,
| |
| [e]="jump exits lifetime of block which weakly captures a variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={od,1310407494,qd,Nd},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_cleanup",
| |
| [h]="jump exits scope of variable with __attribute__((cleanup))",
| |
| [i]="jump exits scope of variable with __attribute__((cleanup))",
| |
| [c]=g,
| |
| [e]="jump exits scope of variable with __attribute__\\(\\(cleanup\\)\\)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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"]={
| |
| [b]={{nil,t,"note_exits_compound_literal_scope"}},
| |
| [h]={{nil,t,"jump exits lifetime of a compound literal that is non-trivial to destruct"}},
| |
| [i]={{nil,t,"jump exits lifetime of a compound literal that is non-trivial to destruct"}},
| |
| [c]=g,
| |
| [e]="jump exits lifetime of a compound literal that is non\\-trivial to destruct",
| |
| [f]=a,
| |
| [d]={{nil,t,n}},
| |
| [j]={wd,1576908663,td,rd},
| |
| [k]={{N,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/strong-in-c-struct.m"]={"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"]={
| |
| [b]="note_exits_cxx_catch",
| |
| [h]="jump exits catch block",
| |
| [i]="jump exits catch block",
| |
| [c]=g,
| |
| [e]="jump exits catch block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_cxx_try",
| |
| [h]="jump exits try block",
| |
| [i]="jump exits try block",
| |
| [c]=g,
| |
| [e]="jump exits try block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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()));"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:224:3: note: jump exits try block"}
| |
| }
| |
| },
| |
| ["note_exits_dtor"]={
| |
| [b]="note_exits_dtor",
| |
| [h]="jump exits scope of variable with non-trivial destructor",
| |
| [i]="jump exits scope of variable with non-trivial destructor",
| |
| [c]=g,
| |
| [e]="jump exits scope of variable with non\\-trivial destructor",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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);"},{N,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;"}},
| |
| [l]={
| |
| ["clang/test/SemaObjC/strong-in-c-struct.m"]={"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"]={
| |
| [b]="note_exits_objc_autoreleasepool",
| |
| [h]="jump exits autoreleasepool block",
| |
| [i]="jump exits autoreleasepool block",
| |
| [c]=g,
| |
| [e]="jump exits autoreleasepool block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={gd,1308178962,dd,jd},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_objc_catch",
| |
| [h]="jump exits @catch block",
| |
| [i]="jump exits @catch block",
| |
| [c]=g,
| |
| [e]="jump exits @catch block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_objc_finally",
| |
| [h]="jump exits @finally block",
| |
| [i]="jump exits @finally block",
| |
| [c]=g,
| |
| [e]="jump exits @finally block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_objc_strong",
| |
| [h]="jump exits scope of __strong variable",
| |
| [i]="jump exits scope of __strong variable",
| |
| [c]=g,
| |
| [e]="jump exits scope of __strong variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_objc_synchronized",
| |
| [h]="jump exits @synchronized block",
| |
| [i]="jump exits @synchronized block",
| |
| [c]=g,
| |
| [e]="jump exits @synchronized block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_objc_try",
| |
| [h]="jump exits @try block",
| |
| [i]="jump exits @try block",
| |
| [c]=g,
| |
| [e]="jump exits @try block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Xb,1273625893,Tb,Lb},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_objc_weak",
| |
| [h]="jump exits scope of __weak variable",
| |
| [i]="jump exits scope of __weak variable",
| |
| [c]=g,
| |
| [e]="jump exits scope of __weak variable",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"039f2bbd02ce",1445450798,"Some minor ARC diagnostic improvements.","Some minor ARC diagnostic improvements.\n\nllvm-svn: 250917"},
| |
| [k]={{N,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"]={
| |
| [b]="note_exits_seh_except",
| |
| [h]="jump exits __except block",
| |
| [i]="jump exits __except block",
| |
| [c]=g,
| |
| [e]="jump exits __except block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{N,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()));"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:613:5: note: jump exits __except block"}
| |
| }
| |
| },
| |
| ["note_exits_seh_finally"]={
| |
| [b]="note_exits_seh_finally",
| |
| [h]="jump exits __finally block",
| |
| [i]="jump exits __finally block",
| |
| [c]=g,
| |
| [e]="jump exits __finally block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{N,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()));"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/scope-check.cpp"]={"clang/test/SemaCXX/scope-check.cpp:624:5: note: jump exits __finally block"}
| |
| }
| |
| },
| |
| ["note_exits_seh_try"]={
| |
| [b]="note_exits_seh_try",
| |
| [h]="jump exits __try block",
| |
| [i]="jump exits __try block",
| |
| [c]=g,
| |
| [e]="jump exits __try block",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{N,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()));"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_exits_temporary_dtor"]={
| |
| [b]="note_exits_temporary_dtor",
| |
| [h]="jump exits scope of lifetime-extended temporary with non-trivial destructor",
| |
| [i]="jump exits scope of lifetime-extended temporary with non-trivial destructor",
| |
| [c]=g,
| |
| [e]="jump exits scope of lifetime\\-extended temporary with non\\-trivial destructor",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{N,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()));"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_explicit_ctor_deduction_guide_here"]={
| |
| [b]={{nil,y,"note_explicit_ctor_deduction_guide_here"}},
| |
| [h]={{nil,y,"explicit %select{constructor|deduction guide}0 declared here"}},
| |
| [i]={{nil,y,{"explicit ",{E,"deduction guide"}," declared here"}}},
| |
| [c]=g,
| |
| [e]="explicit (?:constructor|deduction guide) declared here",
| |
| [f]=a,
| |
| [d]={{nil,y,n}},
| |
| [j]={"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"},
| |
| [k]={{ab,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;"},{ab,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_explicit_instantiation_candidate"]={
| |
| [b]="note_explicit_instantiation_candidate",
| |
| [h]="explicit instantiation candidate function %q0 template here %1",
| |
| [i]="explicit instantiation candidate function A template here B",
| |
| [c]=g,
| |
| [e]="explicit instantiation candidate function (.*?) template here (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{G,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));"}},
| |
| [l]={
| |
| ["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]"}
| |
| }
| |
| },
| |
| ["note_explicit_instantiation_definition_here"]={
| |
| [b]="note_explicit_instantiation_definition_here",
| |
| [h]="explicit instantiation definition is here",
| |
| [i]="explicit instantiation definition is here",
| |
| [c]=g,
| |
| [e]="explicit instantiation definition is here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{G,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_explicit_instantiation_here"]={
| |
| [b]="note_explicit_instantiation_here",
| |
| [h]="explicit instantiation refers here",
| |
| [i]="explicit instantiation refers here",
| |
| [c]=g,
| |
| [e]="explicit instantiation refers here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{G,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;"},{G,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;"},{G,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;"},{G,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);"},{G,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);"},{G,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);"},{G,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);"},{G,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());"},{G,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_explicit_template_arg_substitution_here"]={
| |
| [b]="note_explicit_template_arg_substitution_here",
| |
| [h]="while substituting explicitly-specified template arguments into function template %0 %1",
| |
| [i]="while substituting explicitly-specified template arguments into function template A B",
| |
| [c]=g,
| |
| [e]="while substituting explicitly\\-specified template arguments into function template (.*?) (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{W,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;"}},
| |
| [l]={
| |
| ["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\' "}
| |
| }
| |
| },
| |
| ["note_explicit_template_spec_does_not_need_header"]={
| |
| [b]="note_explicit_template_spec_does_not_need_header",
| |
| [h]="\'template<>\' header not required for explicitly-specialized class %0 declared here",
| |
| [i]="\'template<>\' header not required for explicitly-specialized class A declared here",
| |
| [c]=g,
| |
| [e]="\'template\\<\\>\' header not required for explicitly\\-specialized class (.*?) declared here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{G,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_export"]={
| |
| [b]={{nil,p,"note_export"}},
| |
| [h]={{nil,p,"export block begins here"}},
| |
| [i]={{nil,p,"export block begins here"}},
| |
| [c]=g,
| |
| [e]="export block begins here",
| |
| [f]=a,
| |
| [d]={{nil,p,Ld}},
| |
| [j]={"e181de7f4fe9",1555973411,"[c++2a] Implement semantic restrictions for \'export\' declarations.","[c++2a] Implement semantic restrictions for \'export\' declarations.\n\nllvm-svn: 358932"},
| |
| [k]={{Qb,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);"},{Qb,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);"},{Qb,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);"},{Qb,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);"}},
| |
| [l]={
| |
| ["clang/test/Modules/export-in-another-export.cppm"]={"clang/test/Modules/export-in-another-export.cppm:3:1: note: export block begins here"}
| |
| }
| |
| },
| |
| ["note_expr_divide_by_zero"]={
| |
| [b]="note_expr_divide_by_zero",
| |
| [h]="division by zero",
| |
| [i]="division by zero",
| |
| [c]=g,
| |
| [e]="division by zero",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={Hc,1236199783,Fc,Ec},
| |
| [k]={{o,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);"},{o,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);"},{o,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);"},{o,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);"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/constexpr-printing.cpp"]={"clang/test/SemaCXX/constexpr-printing.cpp:97:54: note: division by zero","clang/test/SemaCXX/constexpr-printing.cpp:97:54: note: division by zero"}
| |
| }
| |
| },
| |
| ["note_expr_evaluates_to"]={
| |
| [b]={{nil,q,"note_expr_evaluates_to"}},
| |
| [h]={{nil,q,"expression evaluates to \'%0 %1 %2\'"}},
| |
| [i]={{nil,q,"expression evaluates to \'A B C\'"}},
| |
| [c]=g,
| |
| [e]="expression evaluates to \'(.*?) (.*?) (.*?)\'",
| |
| [f]=a,
| |
| [d]={{nil,q,n}},
| |
| [j]={Vb,1625925174,Jb,Kb},
| |
| [k]={{r,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();"}},
| |
| [l]={
| |
| ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:101:32: note: expression evaluates to \'12 == 13\'"}
| |
| }
| |
| },
| |
| ["note_expr_requirement_constraints_not_satisfied"]={
| |
| [b]={{nil,m,"note_expr_requirement_constraints_not_satisfied"}},
| |
| [h]={{nil,m,"%select{and|because}0 type constraint \'%1\' was not satisfied:"}},
| |
| [i]={{nil,m,{{yb,zb}," type constraint \'B\' was not satisfied:"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) type constraint \'(.*?)\' was not satisfied\\:",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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;"}},
| |
| [l]={
| |
| ["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:"}
| |
| }
| |
| },
| |
| ["note_expr_requirement_constraints_not_satisfied_simple"]={
| |
| [b]={{nil,m,"note_expr_requirement_constraints_not_satisfied_simple"}},
| |
| [h]={{nil,m,"%select{and|because}0 %1 does not satisfy %2:"}},
| |
| [i]={{nil,m,{{yb,zb}," B does not satisfy C:"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) (.*?) does not satisfy (.*?)\\:",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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"]={
| |
| [b]="note_expr_requirement_expr_substitution_error",
| |
| [h]={{nil,m,"%select{and|because}0 \'%1\' would be invalid: %2"}},
| |
| [i]={{nil,m,{{yb,zb}," \'B\' would be invalid: C"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) \'(.*?)\' would be invalid\\: (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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;"}},
| |
| [l]={
| |
| ["clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp: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"}
| |
| }
| |
| },
| |
| ["note_expr_requirement_expr_unknown_substitution_error"]={
| |
| [b]="note_expr_requirement_expr_unknown_substitution_error",
| |
| [h]={{nil,m,"%select{and|because}0 \'%1\' would be invalid"}},
| |
| [i]={{nil,m,{{yb,zb}," \'B\' would be invalid"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) \'(.*?)\' would be invalid",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_expr_requirement_noexcept_not_met"]={
| |
| [b]={{nil,m,"note_expr_requirement_noexcept_not_met"}},
| |
| [h]={{nil,m,"%select{and|because}0 \'%1\' may throw an exception"}},
| |
| [i]={{nil,m,{{yb,zb}," \'B\' may throw an exception"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) \'(.*?)\' may throw an exception",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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();"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_expr_requirement_type_requirement_substitution_error"]={
| |
| [b]="note_expr_requirement_type_requirement_substitution_error",
| |
| [h]={{nil,m,"%select{and|because}0 \'%1\' would be invalid: %2"}},
| |
| [i]={{nil,m,{{yb,zb}," \'B\' would be invalid: C"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) \'(.*?)\' would be invalid\\: (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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"]={
| |
| [b]="note_expr_requirement_type_requirement_unknown_substitution_error",
| |
| [h]={{nil,m,"%select{and|because}0 \'%1\' would be invalid"}},
| |
| [i]={{nil,m,{{yb,zb}," \'B\' would be invalid"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) \'(.*?)\' would be invalid",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc},
| |
| [k]={{vb,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"]={
| |
| [b]="note_extern_c_begins_here",
| |
| [h]="extern \"C\" language linkage specification begins here",
| |
| [i]="extern \"C\" language linkage specification begins here",
| |
| [c]=g,
| |
| [e]="extern \"C\" language linkage specification begins here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{r,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);"},{Qb,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);"},{G,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);"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_extern_c_global_conflict"]={
| |
| [b]="note_extern_c_global_conflict",
| |
| [h]="declared %select{in global scope|with C language linkage}0 here",
| |
| [i]={{nil,nil,{"declared ",{"in global scope","with C language linkage"},Wb}}},
| |
| [c]=g,
| |
| [e]="declared (?:in global scope|with C language linkage) here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{C,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;"}},
| |
| [l]={
| |
| ["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"}
| |
| }
| |
| },
| |
| ["note_extra_comma_message_arg"]={
| |
| [b]="note_extra_comma_message_arg",
| |
| [h]="comma separating Objective-C messaging arguments",
| |
| [i]="comma separating Objective-C messaging arguments",
| |
| [c]=g,
| |
| [e]="comma separating Objective\\-C messaging arguments",
| |
| [f]=a,
| |
| [d]=Ab,
| |
| [j]={"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"},
| |
| [k]={{Wc,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"]={
| |
| [b]="note_fallthrough_insert_semi_fixit",
| |
| [h]="did you forget \';\'?",
| |
| [i]="did you forget \';\'?",
| |
| [c]=g,
| |
| [e]="did you forget \';\'\\?",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{"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, \";\");"}},
| |
| [l]={
| |
| ["clang/test/SemaCXX/switch-implicit-fallthrough.cpp"]={"clang/test/SemaCXX/switch-implicit-fallthrough.cpp:338:27: note: did you forget \';\'?"}
| |
| }
| |
| },
| |
| ["note_fe_backend_invalid_loc"]={
| |
| [b]="note_fe_backend_invalid_loc",
| |
| [h]="could not determine the original source location for %0:%1:%2",
| |
| [i]="could not determine the original source location for A:B:C",
| |
| [c]=g,
| |
| [e]="could not determine the original source location for (.*?)\\:(.*?)\\:(.*?)",
| |
| [f]=a,
| |
| [d]="Backend Issue",
| |
| [j]={"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"},
| |
| [k]={{"clang/lib/CodeGen/CodeGenAction.cpp",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;"},{"clang/lib/CodeGen/CodeGenAction.cpp",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;"},{"clang/lib/CodeGen/CodeGenAction.cpp",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;"},{"clang/lib/CodeGen/CodeGenAction.cpp",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"]={
| |
| [b]={{nil,q,"note_fe_backend_resource_limit"}},
| |
| [h]={{nil,q,"%0 (%1) exceeds limit (%2) in \'%3\'"}},
| |
| [i]={{nil,q,"A (B) exceeds limit (C) in \'D\'"}},
| |
| [c]=g,
| |
| [e]="(.*?) \\((.*?)\\) exceeds limit \\((.*?)\\) in \'(.*?)\'",
| |
| [f]=a,
| |
| [d]={{nil,q,"Backend Issue"}},
| |
| [j]={"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"]={
| |
| [b]="note_fe_inline_asm_here",
| |
| [h]="instantiated into assembly here",
| |
| [i]="instantiated into assembly here",
| |
| [c]=g,
| |
| [e]="instantiated into assembly here",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{"clang/lib/CodeGen/CodeGenAction.cpp",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);"}},
| |
| [l]={
| |
| ["clang/test/CodeGen/X86/x86-64-inline-asm.c"]={"<inline asm>:1:23: note: instantiated into assembly here"}
| |
| }
| |
| },
| |
| ["note_fe_linking_module"]={
| |
| [b]={{nil,U,"note_fe_linking_module"}},
| |
| [h]={{nil,U,"linking module \'%0\': %1"}},
| |
| [i]={{nil,U,"linking module \'A\': B"}},
| |
| [c]=g,
| |
| [e]="linking module \'(.*?)\'\\: (.*?)",
| |
| [f]=a,
| |
| [d]={{nil,U,a}},
| |
| [j]={"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"]={
| |
| [b]="note_field_designator_found",
| |
| [h]="field designator refers here",
| |
| [i]="field designator refers here",
| |
| [c]=g,
| |
| [e]="field designator refers here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Hc,1236199783,Fc,Ec},
| |
| [k]={{ab,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"]={
| |
| [b]={{nil,q,"note_file_misc_sloc_usage"}},
| |
| [h]={{nil,q,"%0 additional files entered using a total of %1B of space"}},
| |
| [i]={{nil,q,"A additional files entered using a total of BB of space"}},
| |
| [c]=g,
| |
| [e]="(.*?) additional files entered using a total of (.*?)B of space",
| |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={"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."},
| |
| [k]={{"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"]={
| |
| [b]={{nil,q,"note_file_sloc_usage"}},
| |
| [h]={{nil,q,"file entered %0 time%s0 using %1B of space%plural{0:|: plus %2B for macro expansions}2"}},
| |
| [i]={{nil,q,{"file entered A timeA using BB of space",{a," plus CB for macro expansions"}}}},
| |
| [c]=g,
| |
| [e]="file entered (.*?) time(.*?) using (.*?)B of space(?:| plus (.*?)B for macro expansions)",
| |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={"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."},
| |
| [k]={{"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);"}},
| |
| [l]={
| |
| ["clang/test/Misc/sloc-usage.cpp"]={"<built-in>:1:1: note: file entered 2 times using 14260B of space","clang/test/Misc/sloc-usage.cpp:1:1: note: file entered 1 time using 598B of space plus 51B for macro expansions","./clang/test/Misc/Inputs/include.h:1:1: note: file entered 3 times using 591B of space"}
| |
| }
| |
| }, | | }, |
| ["note_final_dtor_non_final_class_silence"]={ | | ["err_pp_through_header_not_seen"]={ |
| [b]={{nil,m,"note_final_dtor_non_final_class_silence"}}, | | [b]={{nil,K,"err_pp_through_header_not_seen"}}, |
| [h]={{nil,m,"mark %0 as \'%select{final|sealed}1\' to silence this warning"}}, | | [j]={{nil,K,"#include of \'%0\' not seen while attempting to %select{create|use}1 precompiled header"}}, |
| [i]={{nil,m,{"mark A as \'",{"final","sealed"},"\' to silence this warning"}}}, | | [i]={{nil,K,{"#include of \'A\' not seen while attempting to ",{"create","use"}," precompiled header"}}}, |
| [c]=g, | | [h]=mc, |
| [e]="mark (.*?) as \'(?:final|sealed)\' to silence this warning", | | [c]="\\#include of \'(.*?)\' not seen while attempting to (?:create|use) precompiled header", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]={{nil,K,p}}, |
| [j]={"94f3f3e7f46a",1567276544,"[NFC] Fix for rL370594","[NFC] Fix for rL370594\n\nllvm-svn: 370595"}, | | [g]={"76675de15cfc",1530811333,"[clang-cl, PCH] Implement support for MS-style PCH through headers","[clang-cl, PCH] Implement support for MS-style PCH through headers\n\nImplement support for MS-style PCH through headers.\n\nThis enables support for /Yc and /Yu where the through header is either\non the command line or included in the source. It replaces the current\nsupport the requires the header also be specified with /FI.\n\nThis change adds a -cc1 option -pch-through-header that is used to either\nstart or stop compilation during PCH create or use.\n\nWhen creating a PCH, the compilation ends after compilation of the through\nheader.\n\nWhen using a PCH, tokens are skipped until after the through header is seen.\n\nPatch By: mikerice\nDifferential Revision: https://reviews.llvm.org/D46652\n\nllvm-svn: 336379"}, |
| [k]={{r,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();"}},
| | [d]={{Hb,566,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (creatingPCHWithThroughHeader() && !LeavingPCHThroughHeader) {\n // ...\n Diag(CurLexer->getFileLoc(), diag::err_pp_through_header_not_seen) << PPOpts->PCHThroughHeader << 0;"},{"clang/lib/Lex/Preprocessor.cpp",672,"/// Skip tokens until after the #include of the through header or\n/// until after a #pragma hdrstop is seen. Tokens in the predefines file\n/// and the main file may be skipped. If the end of the predefines file\n/// is reached, skipping continues into the main file. If the end of the\n/// main file is reached, it\'s a fatal error.\nvoid Preprocessor::SkipTokensWhileUsingPCH() {\n // ...\n if (ReachedMainFileEOF) {\n if (UsingPCHThroughHeader)\n Diag(SourceLocation(), diag::err_pp_through_header_not_seen) << PPOpts->PCHThroughHeader << 1;"}} |
| [l]={
| |
| ["clang/test/CodeGenCXX/devirtualize-dtor-final.cpp"]={"clang/test/CodeGenCXX/devirtualize-dtor-final.cpp:6:10: note: mark \'Test1::C\' as \'final\' to silence this warning","clang/test/CodeGenCXX/devirtualize-dtor-final.cpp:7:10: note: mark \'Test1::D\' as \'final\' to silence this warning"}
| |
| }
| |
| }, | | }, |
| ["note_final_overrider"]={ | | ["err_pp_unclosed_pragma_unsafe_buffer_usage"]={ |
| [b]="note_final_overrider", | | [b]="err_pp_unclosed_pragma_unsafe_buffer_usage", |
| [h]="final overrider of %q0 in %1", | | [j]="\'#pragma unsafe_buffer_usage\' was not ended", |
| [i]="final overrider of A in B", | | [i]="\'#pragma unsafe_buffer_usage\' was not ended", |
| [c]=g, | | [h]=k, |
| [e]="final overrider of (.*?) in (.*?)", | | [c]="\'\\#pragma unsafe_buffer_usage\' was not ended", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=p, |
| [j]={"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"}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{C,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();"}}, | | [d]={{Hb,344,"/// HandleEndOfFile - This callback is invoked when the lexer hits the end of\n/// the current file. This either returns the EOF token or pops a level off\n/// the include stack and keeps going.\nbool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {\n // ...\n if (IncludeMacroStack.empty() && isPPInSafeBufferOptOutRegion(UnclosedSafeBufferOptOutLoc)) {\n // ...\n Diag(UnclosedSafeBufferOptOutLoc, diag::err_pp_unclosed_pragma_unsafe_buffer_usage);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp:33:35: error: \'#pragma unsafe_buffer_usage\' was not ended"} |
| } | | } |
| }, | | }, |
| ["note_first_module_difference"]={ | | ["err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage"]={ |
| [b]={{nil,y,"note_first_module_difference"}}, | | [b]="err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage", |
| [h]={{nil,y,"in first definition, possible difference is here"}},
| | [j]="not currently inside \'#pragma unsafe_buffer_usage\'", |
| [i]={{nil,y,"in first definition, possible difference is here"}},
| | [i]="not currently inside \'#pragma unsafe_buffer_usage\'", |
| [c]=g,
| | [h]=k, |
| [e]="in first definition, possible difference is here",
| | [c]="not currently inside \'\\#pragma unsafe_buffer_usage\'", |
| [f]=a,
| |
| [d]={{nil,q,a},{w,y,nb}},
| |
| [j]={"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"}, | |
| [k]={{cb,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"]={
| |
| [b]="note_fixit_applied",
| |
| [h]="FIX-IT applied suggested code changes", | |
| [i]="FIX-IT applied suggested code changes",
| |
| [c]=g, | |
| [e]="FIX\\-IT applied suggested code changes",
| |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{"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);"}}, | | [d]={{H,1269,"struct PragmaUnsafeBufferUsageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) override {\n // ...\n if (II->isStr(\"begin\")) {\n // ...\n } else if (II->isStr(\"end\")) {\n if (PP.enterOrExitSafeBufferOptOutRegion(false, Loc))\n PP.Diag(Loc, diag::err_pp_unmatched_end_begin_pragma_unsafe_buffer_usage);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/objc-bool-constant-conversion-fixit.m"]={"clang/test/Sema/objc-bool-constant-conversion-fixit.m:8:8: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:11:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:14:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:17:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:17:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:20:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:23:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:26:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:31:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:34:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:37:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:37:5: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:46:8: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:49:3: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:54:8: note: FIX-IT applied suggested code changes","clang/test/Sema/objc-bool-constant-conversion-fixit.m:57:8: note: FIX-IT applied suggested code changes"} | | ["clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp"]={"clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-misuse.cpp:13:35: error: not currently inside \'#pragma unsafe_buffer_usage\'"} |
| } | | } |
| }, | | }, |
| ["note_fixit_failed"]={ | | ["err_pp_unmatched_end_of_arc_cf_code_audited"]={ |
| [b]="note_fixit_failed", | | [b]="err_pp_unmatched_end_of_arc_cf_code_audited", |
| [h]="FIX-IT unable to apply suggested code changes", | | [j]="not currently inside \'#pragma clang arc_cf_code_audited\'", |
| [i]="FIX-IT unable to apply suggested code changes",
| | [i]="not currently inside \'#pragma clang arc_cf_code_audited\'", |
| [c]=g,
| | [h]=k, |
| [e]="FIX\\-IT unable to apply suggested code changes",
| | [c]="not currently inside \'\\#pragma clang arc_cf_code_audited\'", |
| [f]=a, | |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{"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"]={
| |
| [b]="note_fixit_in_macro",
| |
| [h]="FIX-IT unable to apply suggested code changes in a macro", | |
| [i]="FIX-IT unable to apply suggested code changes in a macro",
| |
| [c]=g, | |
| [e]="FIX\\-IT unable to apply suggested code changes in a macro",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{"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"]={
| |
| [b]="note_fixit_unfixed_error",
| |
| [h]="FIX-IT detected an error it cannot fix",
| |
| [i]="FIX-IT detected an error it cannot fix",
| |
| [c]=g,
| |
| [e]="FIX\\-IT detected an error it cannot fix",
| |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=p, |
| [j]={"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"}, | | [g]={Yb,1317359532,Xb,Wb}, |
| [k]={{"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);"}} | | [d]={{H,1906,"/// PragmaARCCFCodeAuditedHandler -\n/// \\#pragma clang arc_cf_code_audited begin/end\nstruct PragmaARCCFCodeAuditedHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // ...\n } else {\n // Complain about attempts to leave an audit that doesn\'t exist.\n if (!BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_unmatched_end_of_arc_cf_code_audited);"}}, |
| },
| |
| ["note_flexible_array_member"]={
| |
| [b]="note_flexible_array_member",
| |
| [h]="initialized flexible array member %0 is here",
| |
| [i]="initialized flexible array member A is here",
| |
| [c]=g,
| |
| [e]="initialized flexible array member (.*?) is here",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Hc,1236199783,Fc,Ec},
| |
| [k]={{ab,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;"},{ab,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;"},{ab,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;"},{ab,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;"}},
| |
| [l]={ | | [l]={ |
| ["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",Gc,Gc,Gc,Gc,Gc,Gc,Gc,Gc,"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"} | | [tc]={"clang/test/Sema/pragma-arc-cf-code-audited.c:8:15: error: not currently inside \'#pragma clang arc_cf_code_audited\'"} |
| } | | } |
| }, | | }, |
| ["note_for_range_begin_end"]={ | | ["err_pp_unmatched_end_of_assume_nonnull"]={ |
| [b]="note_for_range_begin_end", | | [b]="err_pp_unmatched_end_of_assume_nonnull", |
| [h]="selected \'%select{begin|end}0\' %select{function|template }1%2 with iterator type %3", | | [j]="not currently inside \'#pragma clang assume_nonnull\'", |
| [i]={{nil,nil,{"selected \'",{"begin","end"},"\' ",{Qc,"template "},"C with iterator type D"}}}, | | [i]="not currently inside \'#pragma clang assume_nonnull\'", |
| [c]=g, | | [h]=k, |
| [e]="selected \'(?:begin|end)\' (?:function|template )(.*?) with iterator type (.*?)", | | [c]="not currently inside \'\\#pragma clang assume_nonnull\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=lc, |
| [j]={"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"}, | | [g]={qc,1434738357,sc,uc}, |
| [k]={{X,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\""}}, | | [d]={{H,1964,"/// PragmaAssumeNonNullHandler -\n/// \\#pragma clang assume_nonnull begin/end\nstruct PragmaAssumeNonNullHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &NameTok) override {\n // ...\n if (IsBegin) {\n // ...\n } else {\n // Complain about attempts to leave an audit that doesn\'t exist.\n if (!BeginLoc.isValid()) {\n PP.Diag(Loc, diag::err_pp_unmatched_end_of_assume_nonnull);"}} |
| [l]={
| |
| ["clang/test/SemaCXX/for-range-dereference.cpp"]={"clang/test/SemaCXX/for-range-dereference.cpp:4:9: note: selected \'begin\' function with iterator type \'Data *\'"}
| |
| }
| |
| }, | | }, |
| ["note_for_range_invalid_iterator"]={ | | ["err_pp_unterminated_conditional"]={ |
| [b]="note_for_range_invalid_iterator", | | [b]="err_pp_unterminated_conditional", |
| [h]="in implicit call to \'operator%select{!=|*|++}0\' for iterator of type %1", | | [j]="unterminated conditional directive", |
| [i]={{nil,nil,{"in implicit call to \'operator",{"!=","*","++"},"\' for iterator of type B"}}}, | | [i]="unterminated conditional directive", |
| [c]=g, | | [h]=k, |
| [e]="in implicit call to \'operator(?:\\!\\=|\\*|\\+\\+)\' for iterator of type (.*?)", | | [c]="unterminated conditional directive", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{X,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();"},{X,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();"},{X,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();"}}, | | [d]={{"clang/lib/Lex/Lexer.cpp",3037,"/// LexEndOfFile - CurPtr points to the end of this file. Handle this\n/// condition, reporting diagnostics and handling other edge cases as required.\n/// This returns true if Result contains a token, false if PP.Lex should be\n/// called again.\nbool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {\n // ...\n // If we are in a #if directive, emit an error.\n while (!ConditionalStack.empty()) {\n if (PP->getCodeCompletionFileLoc() != FileLoc)\n PP->Diag(ConditionalStack.back().IfLoc, diag::err_pp_unterminated_conditional);"}}, |
| [l]={ | | [l]={ |
| ["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/Lexer/eof-number.c"]={"clang/test/Lexer/eof-number.c:9:2: error: unterminated conditional directive"} |
| } | | } |
| }, | | }, |
| ["note_for_range_member_begin_end_ignored"]={ | | ["err_pp_used_poisoned_id"]={ |
| [b]={{nil,v,"note_for_range_member_begin_end_ignored"}}, | | [b]="err_pp_used_poisoned_id", |
| [h]={{nil,v,"member is not a candidate because range type %0 has no \'%select{end|begin}1\' member"}}, | | [j]="attempt to use a poisoned identifier", |
| [i]={{nil,v,{"member is not a candidate because range type A has no \'",{"end","begin"},"\' member"}}}, | | [i]="attempt to use a poisoned identifier", |
| [c]=g, | | [h]=k, |
| [e]="member is not a candidate because range type (.*?) has no \'(?:end|begin)\' member", | | [c]="attempt to use a poisoned identifier", |
| [f]=a, | | [f]=a, |
| [d]={{nil,v,n}}, | | [e]=p, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{X,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;"}}, | | [d]={{"clang/lib/Lex/Preprocessor.cpp",768,"void Preprocessor::HandlePoisonedIdentifier(Token &Identifier) {\n // ...\n if (it == PoisonReasons.end())\n Diag(Identifier, diag::err_pp_used_poisoned_id);"}}, |
| [l]={ | | [l]={ |
| ["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/Preprocessor/pragma_poison.c"]={"clang/test/Preprocessor/pragma_poison.c:4:1: error: attempt to use a poisoned identifier","clang/test/Preprocessor/pragma_poison.c:9:3: error: attempt to use a poisoned identifier"} |
| } | | } |
| }, | | }, |
| ["note_force_empty_selector_name"]={ | | ["err_pp_vaopt_nested_use"]={ |
| [b]="note_force_empty_selector_name", | | [b]={{nil,B,"err_pp_vaopt_nested_use"}}, |
| [h]="or insert whitespace before \':\' to use %0 as parameter name and have an empty entry in the selector", | | [j]={{nil,B,"__VA_OPT__ cannot be nested within its own replacement tokens"}}, |
| [i]="or insert whitespace before \':\' to use A as parameter name and have an empty entry in the selector", | | [i]={{nil,B,"__VA_OPT__ cannot be nested within its own replacement tokens"}}, |
| [c]=g, | | [h]=k, |
| [e]="or insert whitespace before \'\\:\' to use (.*?) as parameter name and have an empty entry in the selector", | | [c]="__VA_OPT__ cannot be nested within its own replacement tokens", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]={{nil,B,p}}, |
| [j]={"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"}, | | [g]={"1826842865f1",1508030786,"[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)","[c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion)\n\nThis patch implements an extension to the preprocessor:\n\n__VA_OPT__(contents) --> which expands into its contents if variadic arguments are supplied to the parent macro, or behaves as an empty token if none.\n\n - Currently this feature is only enabled for C++2a (this could be enabled, with some careful tweaks, for other dialects with the appropriate extension or compatibility warnings)\n\n - The patch was reviewed here: https://reviews.llvm.org/D35782 and asides from the above (and moving some of the definition and expansion recognition logic into the corresponding state machines), I believe I incorporated all of Richard\'s suggestions.\n\nA few technicalities (most of which were clarified through private correspondence between rsmith, hubert and thomas) are worth mentioning. Given:\n\n #define F(a,...) a #__VA_OPT__(a ## a) a ## __VA_OPT__(__VA_ARGS__)\n\n - The call F(,) Does not supply any tokens for the variadic arguments and hence VA_OPT behaves as a placeholder.\n - When expanding VA_OPT (for e.g. F(,1) token pasting occurs eagerly within its contents if the contents need to be stringified.\n - A hash or a hashhash prior to VA_OPT does not inhibit expansion of arguments if they are the first token within VA_OPT.\n - When a variadic argument is supplied, argument substitution occurs within the contents as does stringification - and these resulting tokens are inserted back into the macro expansions token stream just prior to the entire stream being rescanned and concatenated.\n\nSee wg21.link/P0306 for further details on the feature.\n\n\nAcknowledgment: This patch would have been poorer if not for Richard Smith\'s usual thoughtful analysis and feedback.\nllvm-svn: 315840"}, |
| [k]={{Wc,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;"}},
| | [d]={{z,2910,"MacroInfo *Preprocessor::ReadOptionalMacroParameterListAndBody(const Token &MacroNameTok, const bool ImmediatelyAfterHeaderGuard) {\n // ...\n // Read the rest of the macro body.\n if (MI->isObjectLike()) {\n // ...\n } else {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) {\n // ...\n if (VAOCtx.isVAOptToken(Tok)) {\n // If we\'re already within a VAOPT, emit an error.\n if (VAOCtx.isInVAOpt()) {\n Diag(Tok, diag::err_pp_vaopt_nested_use);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Preprocessor/macro_vaopt_check.cpp"]={"clang/test/Preprocessor/macro_vaopt_check.cpp:25:28: error: __VA_OPT__ cannot be nested within its own replacement tokens"} |
| } | | } |
| }, | | }, |
| ["note_format_fix_specifier"]={ | | ["err_pp_visibility_non_macro"]={ |
| [b]="note_format_fix_specifier", | | [b]="err_pp_visibility_non_macro", |
| [h]="did you mean to use \'%0\'?", | | [j]="no macro named %0", |
| [i]="did you mean to use \'A\'?", | | [i]="no macro named A", |
| [c]=g, | | [h]=k, |
| [e]="did you mean to use \'(.*?)\'\\?", | | [c]="no macro named (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=p, |
| [j]={"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"}, | | [g]={"ebf004990163",1318865549,"For modules, all macros that aren\'t include guards are implicitly","For modules, all macros that aren\'t include guards are implicitly\npublic. Add a __private_macro__ directive to hide a macro, similar to\nthe __module_private__ declaration specifier.\n\nllvm-svn: 142188"}, |
| [k]={{V,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());"},{V,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());"},{V,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());"}}, | | [d]={{z,1715,"/// Handle a #public directive.\nvoid Preprocessor::HandleMacroPublicDirective(Token &Tok) {\n // ...\n // If the macro is not defined, this is an error.\n if (!MD) {\n Diag(MacroNameTok, diag::err_pp_visibility_non_macro) << II;"},{z,1742,"/// Handle a #private directive.\nvoid Preprocessor::HandleMacroPrivateDirective() {\n // ...\n // If the macro is not defined, this is an error.\n if (!MD) {\n Diag(MacroNameTok, diag::err_pp_visibility_non_macro) << II;"},{H,2026,"/// This handles parsing pragmas that take a macro name and optional message\nstatic IdentifierInfo *HandleMacroAnnotationPragma(Preprocessor &PP, Token &Tok, const char *Pragma, std::string &MessageString) {\n // ...\n if (!II->hasMacroDefinition()) {\n PP.Diag(Tok, diag::err_pp_visibility_non_macro) << II;"},{H,2114,"/// \"\\#pragma clang final(...)\"\n///\n/// The syntax is\n/// \\code\n/// #pragma clang final(MACRO_NAME)\n/// \\endcode\nstruct PragmaFinalHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (!II->hasMacroDefinition()) {\n PP.Diag(Tok, diag::err_pp_visibility_non_macro) << II;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Lexer/deprecate-macro.c"]={"clang/test/Lexer/deprecate-macro.c:10:26: error: no macro named \'foo\'","clang/test/Lexer/deprecate-macro.c:52:26: error: no macro named \'main\'"} |
| } | | } |
| }, | | }, |
| ["note_format_security_fixit"]={ | | ["err_ppc_builtin_requires_abi"]={ |
| [b]="note_format_security_fixit", | | [b]={{nil,F,"err_ppc_builtin_requires_abi"}}, |
| [h]="treat the string as an argument to avoid this", | | [j]={{nil,F,"this builtin requires ABI -mabi=%0"}}, |
| [i]="treat the string as an argument to avoid this", | | [i]={{nil,F,"this builtin requires ABI -mabi=A"}}, |
| [c]=g, | | [h]=k, |
| [e]="treat the string as an argument to avoid this", | | [c]="this builtin requires ABI \\-mabi\\=(.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,F,m}}, |
| [j]={"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"}, | | [g]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, |
| [k]={{V,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\\\", \");"},{V,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, \"@\\\"%@\\\", \");"}}, | | [d]={{I,4281,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_pack_longdouble:\n if (&TI.getLongDoubleFormat() != &llvm::APFloat::PPCDoubleDouble())\n return Diag(TheCall->getBeginLoc(), diag::err_ppc_builtin_requires_abi) << \"ibmlongdouble\";"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_format_string_defined"]={ | | ["err_ppc_invalid_test_data_class_type"]={ |
| [b]="note_format_string_defined", | | [b]={{nil,F,"err_ppc_invalid_test_data_class_type"}}, |
| [h]="format string is defined here", | | [j]={{nil,mb,"expected a \'float\', \'double\' or \'__float128\' for the first argument"},{C,F,"expected a \'float\' or \'double\' for the first argument"}}, |
| [i]="format string is defined here", | | [i]={{nil,mb,"expected a \'float\', \'double\' or \'__float128\' for the first argument"},{C,F,"expected a \'float\' or \'double\' for the first argument"}}, |
| [c]=g, | | [h]=k, |
| [e]="format string is defined here", | | [c]="expected a \'float\', \'double\' or \'__float128\' for the first argument", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,F,m}}, |
| [j]={"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"}, | | [g]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, |
| [k]={{V,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);"}},
| | [d]={{I,4361,"bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case PPC::BI__builtin_ppc_test_data_class: {\n // ...\n if (ArgType != QualType(Context.FloatTy) && ArgType != QualType(Context.DoubleTy) && ArgType != QualType(Context.Float128Ty))\n return Diag(TheCall->getBeginLoc(), diag::err_ppc_invalid_test_data_class_type);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-error.c"]={"clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-error.c:47:10: error: expected a \'float\', \'double\' or \'__float128\' for the first argument"} |
| } | | } |
| }, | | }, |
| ["note_forward_class"]={ | | ["err_ppc_invalid_use_mma_type"]={ |
| [b]="note_forward_class", | | [b]={{nil,A,"err_ppc_invalid_use_mma_type"}}, |
| [h]="forward declaration of class here", | | [j]={{nil,A,"invalid use of PPC MMA type"}}, |
| [i]="forward declaration of class here", | | [i]={{nil,A,"invalid use of PPC MMA type"}}, |
| [c]=g, | | [h]=k, |
| [e]="forward declaration of class here", | | [c]="invalid use of PPC MMA type", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,m}}, |
| [j]={"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"}, | | [g]={Tb,1590001902,Ub,Vb}, |
| [k]={{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);"},{B,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);"},{Y,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);"}}, | | [d]={{I,4410,"#include \"clang/Basic/PPCTypes.def\"\n ) {\n Diag(TypeLoc, diag::err_ppc_invalid_use_mma_type);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/exprs.m"]={"clang/test/SemaObjC/exprs.m:36:8: note: forward declaration of class here"} | | ["clang/test/Sema/ppc-pair-mma-types.c"]={"clang/test/Sema/ppc-pair-mma-types.c:17:31: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:22:37: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:27:28: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:33:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:35:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:38:12: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:40:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:44:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:45:21: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:48:6: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:55:17: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:112:31: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:117:37: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:122:28: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:128:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:130:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:133:12: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:135:3: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:139:15: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:140:21: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:143:6: error: invalid use of PPC MMA type","clang/test/Sema/ppc-pair-mma-types.c:149:17: error: invalid use of PPC MMA type"} |
| } | | } |
| }, | | }, |
| ["note_forward_class_conversion"]={ | | ["err_pragma_alloc_text_c_linkage"]={ |
| [b]={{nil,s,"note_forward_class_conversion"}}, | | [b]={{nil,C,"err_pragma_alloc_text_c_linkage"}}, |
| [h]={{nil,s,"%0 is not defined, but forward declared here; conversion would be valid if it was derived from %1"}}, | | [j]={{nil,C,"\'#pragma alloc_text\' is applicable only to functions with C linkage"}}, |
| [i]={{nil,s,"A is not defined, but forward declared here; conversion would be valid if it was derived from B"}}, | | [i]={{nil,C,"\'#pragma alloc_text\' is applicable only to functions with C linkage"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not defined, but forward declared here; conversion would be valid if it was derived from (.*?)", | | [c]="\'\\#pragma alloc_text\' is applicable only to functions with C linkage", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]={{nil,C,m}}, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={"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"}, |
| [k]={{ab,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);"}},
| | [d]={{J,816,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (getLangOpts().CPlusPlus && !FD->isInExternCContext()) {\n Diag(Loc, diag::err_pragma_alloc_text_c_linkage);"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:10:23: error: \'#pragma alloc_text\' is applicable only to functions with C linkage","clang/test/Sema/pragma-ms-alloc-text.cpp:35:23: error: \'#pragma alloc_text\' is applicable only to functions with C linkage","clang/test/Sema/pragma-ms-alloc-text.cpp:55:23: error: \'#pragma alloc_text\' is applicable only to functions with C linkage"} |
| } | | } |
| }, | | }, |
| ["note_forward_declaration"]={ | | ["err_pragma_alloc_text_not_function"]={ |
| [b]="note_forward_declaration", | | [b]={{nil,C,"err_pragma_alloc_text_not_function"}}, |
| [h]="forward declaration of %0", | | [j]={{nil,C,"\'#pragma alloc_text\' is applicable only to functions"}}, |
| [i]="forward declaration of A", | | [i]={{nil,C,"\'#pragma alloc_text\' is applicable only to functions"}}, |
| [c]=g, | | [h]=k, |
| [e]="forward declaration of (.*?)", | | [c]="\'\\#pragma alloc_text\' is applicable only to functions", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,C,m}}, |
| [j]={Hc,1236199783,Fc,Ec}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{G,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;"},{Y,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);"},{Y,9531,"QualType Sema::BuiltinEnumUnderlyingType(QualType BaseType, SourceLocation Loc) {\n // ...\n if (BaseType->isIncompleteType(&FwdDecl)) {\n // ...\n Diag(FwdDecl->getLocation(), diag::note_forward_declaration) << FwdDecl;"}}, | | [d]={{J,811,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n // ...\n for (auto &Function : Functions) {\n // ...\n if (!FD) {\n Diag(Loc, diag::err_pragma_alloc_text_not_function);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/PR6618.cpp"]={"clang/test/SemaCXX/PR6618.cpp:2:7: note: forward declaration of \'bar\'"} | | ["clang/test/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:59:23: error: \'#pragma alloc_text\' is applicable only to functions"} |
| } | | } |
| }, | | }, |
| ["note_forward_template_decl"]={ | | ["err_pragma_attr_attr_no_push"]={ |
| [b]="note_forward_template_decl", | | [b]={{nil,u,"err_pragma_attr_attr_no_push"}}, |
| [h]="forward declaration of template entity is here", | | [j]={{nil,u,"\'#pragma clang attribute\' attribute with no matching \'#pragma clang attribute push\'"}}, |
| [i]="forward declaration of template entity is here", | | [i]={{nil,u,"\'#pragma clang attribute\' attribute with no matching \'#pragma clang attribute push\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="forward declaration of template entity is here", | | [c]="\'\\#pragma clang attribute\' attribute with no matching \'\\#pragma clang attribute push\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,u,m}}, |
| [j]={"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"},
| | [g]={"a7cc6b360fe9",1540780161,"Support for groups of attributes in #pragma clang attribute","Support for groups of attributes in #pragma clang attribute\n\nThis commit enables pushing an empty #pragma clang attribute push, then adding\nmultiple attributes to it, then popping them all with #pragma clang attribute\npop, just like #pragma clang diagnostic. We still support the current way of\nadding these, #pragma clang attribute push(__attribute__((...))), by treating it\nlike a combined push/attribute. This is needed to create macros like:\n\nDO_SOMETHING_BEGIN(attr1, attr2, attr3)\n// ...\nDO_SOMETHING_END\n\nrdar://45496947\n\nDifferential revision: https://reviews.llvm.org/D53621\n\nllvm-svn: 345486"}, |
| [k]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",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);"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",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);"}}, | | [d]={{J,1066,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n if (PragmaAttributeStack.empty()) {\n Diag(PragmaLoc, diag::err_pragma_attr_attr_no_push);"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:62:15: error: \'#pragma clang attribute\' attribute with no matching \'#pragma clang attribute push\'"} |
| } | | } |
| }, | | }, |
| ["note_found_mutex_near_match"]={ | | ["err_pragma_attribute_duplicate_subject"]={ |
| [b]="note_found_mutex_near_match", | | [b]={{nil,n,"err_pragma_attribute_duplicate_subject"}}, |
| [h]="found near match \'%0\'", | | [j]={{nil,n,"duplicate attribute subject matcher \'%0\'"}}, |
| [i]="found near match \'A\'", | | [i]={{nil,n,"duplicate attribute subject matcher \'A\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="found near match \'(.*?)\'", | | [c]="duplicate attribute subject matcher \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{Zb,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);"}}, | | [d]={{v,1624,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (isAbstractAttrMatcherRule(PrimaryRule)) {\n // ...\n } else if (Parens.consumeOpen()) {\n if (!SubjectMatchRules.insert(std::make_pair(PrimaryRule, SourceRange(RuleLoc, RuleLoc))).second)\n Diag(RuleLoc, diag::err_pragma_attribute_duplicate_subject) << Name << FixItHint::CreateRemoval(SourceRange(RuleLoc, Tok.is(tok::comma) ? Tok.getLocation() : RuleLoc));"},{v,1679,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (!SubjectMatchRules.insert(std::make_pair(SubRule, SourceRange(RuleLoc, RuleEndLoc))).second) {\n Diag(RuleLoc, diag::err_pragma_attribute_duplicate_subject) << attr::getSubjectMatchRuleSpelling(SubRule) << FixItHint::CreateRemoval(SourceRange(RuleLoc, Tok.is(tok::comma) ? Tok.getLocation() : RuleEndLoc));"}}, |
| [l]={ | | [l]={ |
| ["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\'"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:93:91: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:94:91: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:94:101: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:95:97: error: duplicate attribute subject matcher \'function\'","clang/test/Parser/pragma-attribute.cpp:96:87: error: duplicate attribute subject matcher \'enum\'","clang/test/Parser/pragma-attribute.cpp:98:102: error: duplicate attribute subject matcher \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:99:112: error: duplicate attribute subject matcher \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:99:133: error: duplicate attribute subject matcher \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:100:113: error: duplicate attribute subject matcher \'variable(unless(is_parameter))\'","clang/test/Parser/pragma-attribute.cpp:101:113: error: duplicate attribute subject matcher \'variable(unless(is_parameter))\'","clang/test/Parser/pragma-attribute.cpp:101:151: error: duplicate attribute subject matcher \'variable(unless(is_parameter))\'"} |
| } | | } |
| }, | | }, |
| ["note_from_diagnose_if"]={ | | ["err_pragma_attribute_expected_attribute"]={ |
| [b]="note_from_diagnose_if", | | [b]={{nil,n,"err_pragma_attribute_expected_attribute"}}, |
| [h]="from \'diagnose_if\' attribute on %0:", | | [j]={{nil,n,"expected an attribute after \'(\'"}}, |
| [i]="from \'diagnose_if\' attribute on A:", | | [i]={{nil,n,"expected an attribute after \'(\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="from \'diagnose_if\' attribute on (.*?)\\:", | | [c]="expected an attribute after \'\\(\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{xb,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();"},{xb,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();"}},
| | [d]={{v,3931,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Parse the actual attribute.\n if ((Info->Action == PragmaAttributeInfo::Push && Tok.isNot(tok::eod)) || Info->Action == PragmaAttributeInfo::Attribute) {\n // ...\n if (AttributeTokens.empty()) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_attribute);"}}, |
| [l]={ | | [l]={ |
| ["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[]\':"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:109:85: error: expected an attribute after \'(\'","clang/test/Parser/pragma-attribute.cpp:111:31: error: expected an attribute after \'(\'"} |
| } | | } |
| }, | | }, |
| ["note_function_style_cast_add_parentheses"]={ | | ["err_pragma_attribute_expected_attribute_name"]={ |
| [b]={{nil,z,"note_function_style_cast_add_parentheses"}}, | | [b]={{nil,n,"err_pragma_attribute_expected_attribute_name"}}, |
| [h]={{nil,z,"add enclosing parentheses to perform a function-style cast"}}, | | [j]={{nil,n,"expected identifier that represents an attribute name"}}, |
| [i]={{nil,z,"add enclosing parentheses to perform a function-style cast"}}, | | [i]={{nil,n,"expected identifier that represents an attribute name"}}, |
| [c]=g, | | [h]=k, |
| [e]="add enclosing parentheses to perform a function\\-style cast", | | [c]="expected identifier that represents an attribute name", |
| [f]=a, | | [f]=a, |
| [d]={{nil,z,n}}, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{Y,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()), \")\");"}}, | | [d]={{v,1847,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n // Parse the comma-separated list of attributes.\n do {\n if (Tok.isNot(tok::identifier)) {\n Diag(Tok, diag::err_pragma_attribute_expected_attribute_name);"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:121:46: error: expected identifier that represents an attribute name","clang/test/Parser/pragma-attribute.cpp:171:45: error: expected identifier that represents an attribute name","clang/test/Parser/pragma-attribute.cpp:217:65: error: expected identifier that represents an attribute name"} |
| } | | } |
| }, | | }, |
| ["note_function_suggestion"]={ | | ["err_pragma_attribute_expected_attribute_syntax"]={ |
| [b]="note_function_suggestion", | | [b]={{nil,n,"err_pragma_attribute_expected_attribute_syntax"}}, |
| [h]="did you mean %0?", | | [j]={{nil,n,"expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax"}}, |
| [i]="did you mean A?", | | [i]={{nil,n,"expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax"}}, |
| [c]=g, | | [h]=k, |
| [e]="did you mean (.*?)\\?", | | [c]="expected an attribute that is specified using the GNU, C\\+\\+11 or \'__declspec\' syntax", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{C,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),"}} | | [d]={{v,1872,"void Parser::HandlePragmaAttribute() {\n // ...\n if ((Tok.is(tok::l_square) && NextToken().is(tok::l_square)) || Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw___attribute)) {\n // ...\n } else if (Tok.is(tok::kw___declspec)) {\n // ...\n } else {\n Diag(Tok, diag::err_pragma_attribute_expected_attribute_syntax);"}}, |
| },
| |
| ["note_function_template_deduction_instantiation_here"]={
| |
| [b]="note_function_template_deduction_instantiation_here",
| |
| [h]="while substituting deduced template arguments into function template %0 %1",
| |
| [i]="while substituting deduced template arguments into function template A B",
| |
| [c]=g,
| |
| [e]="while substituting deduced template arguments into function template (.*?) (.*?)",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{W,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;"}},
| |
| [l]={ | | [l]={ |
| ["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]"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:176:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax","clang/test/Parser/pragma-attribute.cpp:177:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax","clang/test/Parser/pragma-attribute.cpp:178:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax","clang/test/Parser/pragma-attribute.cpp:180:31: error: expected an attribute that is specified using the GNU, C++11 or \'__declspec\' syntax"} |
| } | | } |
| }, | | }, |
| ["note_function_template_spec_here"]={ | | ["err_pragma_attribute_expected_period"]={ |
| [b]="note_function_template_spec_here", | | [b]={{nil,u,"err_pragma_attribute_expected_period"}}, |
| [h]="in instantiation of function template specialization %q0 requested here", | | [j]={{nil,u,"expected \'.\' after pragma attribute namespace %0"}}, |
| [i]="in instantiation of function template specialization A requested here", | | [i]={{nil,u,"expected \'.\' after pragma attribute namespace A"}}, |
| [c]=g, | | [h]=k, |
| [e]="in instantiation of function template specialization (.*?) requested here", | | [c]="expected \'\\.\' after pragma attribute namespace (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,u,y}}, |
| [j]={"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"}, | | [g]={"0876cae0d749",1545345124,"Add support for namespaces on #pragma clang attribute","Add support for namespaces on #pragma clang attribute\n\nNamespaces are introduced by adding an \"identifier.\" before a\npush/pop directive. Pop directives with namespaces can only pop a\nattribute group that was pushed with the same namespace. Push and pop\ndirectives that don\'t opt into namespaces have the same semantics.\n\nThis is necessary to prevent a pitfall of using multiple #pragma\nclang attribute directives spread out in a large file, particularly\nwhen macros are involved. It isn\'t easy to see which pop corripsonds\nto which push, so its easy to inadvertently pop the wrong group.\n\nDifferential revision: https://reviews.llvm.org/D55628\n\nllvm-svn: 349845"}, |
| [k]={{W,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;"}}, | | [d]={{v,3866,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Parse the optional namespace followed by a period.\n if (Tok.is(tok::identifier)) {\n // ...\n if (!II->isStr(\"push\") && !II->isStr(\"pop\")) {\n // ...\n if (!Tok.is(tok::period)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_period) << II;"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:105:110: error: expected \'.\' after pragma attribute namespace \'pushpop\'"} |
| } | | } |
| }, | | }, |
| ["note_function_template_spec_matched"]={ | | ["err_pragma_attribute_expected_push_pop_paren"]={ |
| [b]="note_function_template_spec_matched", | | [b]={{nil,u,"err_pragma_attribute_expected_push_pop_paren"}}, |
| [h]="function template %q0 matches specialization %1", | | [j]={{nil,u,"expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'"}}, |
| [i]="function template A matches specialization B", | | [i]={{nil,u,"expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="function template (.*?) matches specialization (.*?)", | | [c]="expected \'push\', \'pop\', or \'\\(\' after \'\\#pragma clang attribute\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,u,y}}, |
| [j]={"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"}, | | [g]={"a7cc6b360fe9",1540780161,"Support for groups of attributes in #pragma clang attribute","Support for groups of attributes in #pragma clang attribute\n\nThis commit enables pushing an empty #pragma clang attribute push, then adding\nmultiple attributes to it, then popping them all with #pragma clang attribute\npop, just like #pragma clang diagnostic. We still support the current way of\nadding these, #pragma clang attribute push(__attribute__((...))), by treating it\nlike a combined push/attribute. This is needed to create macros like:\n\nDO_SOMETHING_BEGIN(attr1, attr2, attr3)\n// ...\nDO_SOMETHING_END\n\nrdar://45496947\n\nDifferential revision: https://reviews.llvm.org/D53621\n\nllvm-svn: 345486"}, |
| [k]={{G,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));"}}, | | [d]={{v,3876,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (!Tok.isOneOf(tok::identifier, tok::l_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_expected_push_pop_paren);"}}, |
| [l]={ | | [l]={ |
| ["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]"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:103:109: error: expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'","clang/test/Parser/pragma-attribute.cpp:104:25: error: expected \'push\', \'pop\', or \'(\' after \'#pragma clang attribute\'"} |
| } | | } |
| }, | | }, |
| ["note_function_to_function_call"]={ | | ["err_pragma_attribute_expected_subject_identifier"]={ |
| [b]="note_function_to_function_call", | | [b]={{nil,n,"err_pragma_attribute_expected_subject_identifier"}}, |
| [h]="suffix with parentheses to turn this into a function call", | | [j]={{nil,n,"expected an identifier that corresponds to an attribute subject rule"}}, |
| [i]="suffix with parentheses to turn this into a function call", | | [i]={{nil,n,"expected an identifier that corresponds to an attribute subject rule"}}, |
| [c]=g, | | [h]=k, |
| [e]="suffix with parentheses to turn this into a function call", | | [c]="expected an identifier that corresponds to an attribute subject rule", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{V,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()), \"()\");"}}, | | [d]={{v,1602,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (Name.empty()) {\n Diag(Tok, diag::err_pragma_attribute_expected_subject_identifier);"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:44:76: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:47:90: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:50:76: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:52:81: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:53:80: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:54:91: error: expected an identifier that corresponds to an attribute subject rule","clang/test/Parser/pragma-attribute.cpp:208:71: error: expected an identifier that corresponds to an attribute subject rule"} |
| } | | } |
| }, | | }, |
| ["note_function_warning_silence"]={ | | ["err_pragma_attribute_expected_subject_sub_identifier"]={ |
| [b]="note_function_warning_silence", | | [b]={{nil,n,"err_pragma_attribute_expected_subject_sub_identifier"}}, |
| [h]="prefix with the address-of operator to silence this warning", | | [j]={{nil,n,"expected an identifier that corresponds to an attribute subject matcher sub-rule; \'%0\' matcher %select{does not support sub-rules|supports the following sub-rules: %2|}1"}}, |
| [i]="prefix with the address-of operator to silence this warning", | | [i]={{nil,n,{"expected an identifier that corresponds to an attribute subject matcher sub-rule; \'A\' matcher ",{"does not support sub-rules","supports the following sub-rules: C",a}}}}, |
| [c]=g, | | [h]=k, |
| [e]="prefix with the address\\-of operator to silence this warning", | | [c]="expected an identifier that corresponds to an attribute subject matcher sub\\-rule; \'(.*?)\' matcher (?:does not support sub\\-rules|supports the following sub\\-rules\\: (.*?)|)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{V,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(), \"&\");"}}, | | [d]={{v,1565,"static void diagnoseExpectedAttributeSubjectSubRule(Parser &PRef, attr::SubjectMatchRule PrimaryRule, StringRef PrimaryRuleName, SourceLocation SubRuleLoc) {\n auto Diagnostic = PRef.Diag(SubRuleLoc, diag::err_pragma_attribute_expected_subject_sub_identifier) << PrimaryRuleName;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/condition.cpp"]={"clang/test/SemaCXX/condition.cpp:53:7: note: prefix with the address-of operator to silence this warning"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:66:89: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:73:99: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:74:101: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'namespace\' matcher does not support sub-rules","clang/test/Parser/pragma-attribute.cpp:87:99: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:88:96: error: expected an identifier that corresponds to an attribute subject matcher sub-rule; \'enum\' matcher does not support sub-rules"} |
| } | | } |
| }, | | }, |
| ["note_getter_unavailable"]={ | | ["err_pragma_attribute_extra_tokens_after_attribute"]={ |
| [b]="note_getter_unavailable", | | [b]={{nil,n,"err_pragma_attribute_extra_tokens_after_attribute"}}, |
| [h]="or because setter is declared here, but no getter method %0 is found",
| | [j]={{nil,n,"extra tokens after attribute in a \'#pragma clang attribute push\'"}}, |
| [i]="or because setter is declared here, but no getter method A is found",
| | [i]={{nil,n,"extra tokens after attribute in a \'#pragma clang attribute push\'"}}, |
| [c]=g,
| | [h]=k, |
| [e]="or because setter is declared here, but no getter method (.*?) is found",
| | [c]="extra tokens after attribute in a \'\\#pragma clang attribute push\'", |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{B,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"]={
| |
| [b]={{nil,p,"note_global_module_introducer_missing"}},
| |
| [h]={{nil,p,"add \'module;\' to the start of the file to introduce a global module fragment"}}, | |
| [i]={{nil,p,"add \'module;\' to the start of the file to introduce a global module fragment"}}, | |
| [c]=g, | |
| [e]="add \'module;\' to the start of the file to introduce a global module fragment", | |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,Ld}}, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{Qb,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\");"}}, | | [d]={{v,1957,"void Parser::HandlePragmaAttribute() {\n // ...\n // Tokens following an ill-formed attribute will remain in the token stream\n // and must be removed.\n if (Tok.isNot(tok::eof)) {\n Diag(Tok, diag::err_pragma_attribute_extra_tokens_after_attribute);"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:124:76: error: extra tokens after attribute in a \'#pragma clang attribute push\'"} |
| } | | } |
| }, | | }, |
| ["note_goto_ms_asm_label"]={ | | ["err_pragma_attribute_invalid_argument"]={ |
| [b]="note_goto_ms_asm_label", | | [b]={{nil,n,"err_pragma_attribute_invalid_argument"}}, |
| [h]="inline assembly label %0 declared here", | | [j]={{nil,n,"unexpected argument \'%0\' to \'#pragma clang attribute\'; expected \'push\' or \'pop\'"}}, |
| [i]="inline assembly label A declared here", | | [i]={{nil,n,"unexpected argument \'A\' to \'#pragma clang attribute\'; expected \'push\' or \'pop\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="inline assembly label (.*?) declared here", | | [c]="unexpected argument \'(.*?)\' to \'\\#pragma clang attribute\'; expected \'push\' or \'pop\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{N,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();"}},
| | [d]={{v,3897,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Determine what action this pragma clang attribute represents.\n if (Tok.is(tok::l_paren)) {\n // ...\n } else {\n // ...\n if (II->isStr(\"push\"))\n // ...\n else if (II->isStr(\"pop\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_invalid_argument) << PP.getSpelling(Tok);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_guarded_by_declared_here"]={ | | ["err_pragma_attribute_invalid_matchers"]={ |
| [b]="note_guarded_by_declared_here", | | [b]={{nil,n,"err_pragma_attribute_invalid_matchers"}}, |
| [h]={{nil,x,"guarded_by declared here"},{s,nil,"Guarded_by declared here."}}, | | [j]={{nil,n,"attribute %0 can\'t be applied to %1"}}, |
| [i]={{nil,x,"guarded_by declared here"},{s,nil,"Guarded_by declared here."}}, | | [i]={{nil,n,"attribute A can\'t be applied to B"}}, |
| [c]=g, | | [h]=k, |
| [e]="guarded_by declared here", | | [c]="attribute (.*?) can\'t be applied to (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,m}}, |
| [j]={"eb0ea5f40a48",1408052415,"Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpf...","Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.\n\nllvm-svn: 215677"}, | | [g]={R,1492508507,T,S}, |
| [k]={{Zb,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());"},{Zb,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));"}}, | | [d]={{J,1048,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n if (!Rules.empty()) {\n auto Diagnostic = Diag(PragmaLoc, diag::err_pragma_attribute_invalid_matchers) << Attribute;"}}, |
| [l]={ | | [l]={ |
| ["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"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:126:15: error: attribute \'objc_bridge_related\' can\'t be applied to \'function\'","clang/test/Parser/pragma-attribute.cpp:185:15: error: attribute \'uninitialized\' can\'t be applied to \'function\'","clang/test/Parser/pragma-attribute.cpp:187:15: error: attribute \'uninitialized\' can\'t be applied to \'variable\'","clang/test/Parser/pragma-attribute.cpp:189:15: error: attribute \'uninitialized\' can\'t be applied to \'variable(is_thread_local)\'","clang/test/Parser/pragma-attribute.cpp:191:15: error: attribute \'uninitialized\' can\'t be applied to \'variable(is_global)\'","clang/test/Parser/pragma-attribute.cpp:193:15: error: attribute \'uninitialized\' can\'t be applied to \'variable(is_parameter)\', and \'variable(unless(is_parameter))\'"} |
| } | | } |
| }, | | }, |
| ["note_header_guard"]={ | | ["err_pragma_attribute_invalid_subject_set_specifier"]={ |
| [b]="note_header_guard", | | [b]={{nil,n,"err_pragma_attribute_invalid_subject_set_specifier"}}, |
| [h]="%0 is defined here; did you mean %1?", | | [j]={{nil,n,"expected attribute subject set specifier \'apply_to\'"}}, |
| [i]="A is defined here; did you mean B?", | | [i]={{nil,n,"expected attribute subject set specifier \'apply_to\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is defined here; did you mean (.*?)\\?", | | [c]="expected attribute subject set specifier \'apply_to\'", |
| [f]=a, | | [f]=a, |
| [d]=Eb, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{"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());"}}, | | [d]={{v,1922,"void Parser::HandlePragmaAttribute() {\n // ...\n if (Tok.isNot(tok::identifier)) {\n createExpectedAttributeSubjectRulesTokenDiagnostic(diag::err_pragma_attribute_invalid_subject_set_specifier, Attrs, MissingAttributeSubjectRulesRecoveryPoint::ApplyTo, *this);"},{v,1930,"void Parser::HandlePragmaAttribute() {\n // ...\n if (!II->isStr(\"apply_to\")) {\n createExpectedAttributeSubjectRulesTokenDiagnostic(diag::err_pragma_attribute_invalid_subject_set_specifier, Attrs, MissingAttributeSubjectRulesRecoveryPoint::ApplyTo, *this);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Lexer/header.cpp"]={"clang/test/Lexer/Inputs/bad-header-guard.h:2:9: note: \'bad_guard\' is defined here; did you mean \'bad_header_guard\'?","clang/test/Lexer/Inputs/bad-header-guard-defined.h:2:9: note: \'goo\' is defined here; did you mean \'foo\'?","clang/test/Lexer/Inputs/multiple.h:2:9: note: \'multi\' is defined here; did you mean \'multiple\'?"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:27:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:28:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:29:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:30:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:31:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:32:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:33:64: error: expected attribute subject set specifier \'apply_to\'","clang/test/Parser/pragma-attribute.cpp:34:64: error: expected attribute subject set specifier \'apply_to\'"} |
| } | | } |
| }, | | }, |
| ["note_hidden_overloaded_virtual_declared_here"]={ | | ["err_pragma_attribute_matcher_negated_subrule_contradicts_subrule"]={ |
| [b]="note_hidden_overloaded_virtual_declared_here", | | [b]={{nil,n,"err_pragma_attribute_matcher_negated_subrule_contradicts_subrule"}}, |
| [h]={{nil,v,"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"}}, | | [j]={{nil,n,"negated attribute subject matcher sub-rule \'%0\' contradicts sub-rule \'%1\'"}}, |
| [i]={{nil,v,{"hidden overloaded virtual function A declared here",{a,{": different classes",{" (C vs D)",a}},": different number of parameters (C vs D)",{": type mismatch at C parameter",{" (D vs E)",a}},{": different return type",{" (C vs D)",a}},": different qualifiers (C vs D)",": different exception specifications"}}},{"7.1",nil,{"hidden overloaded virtual function A declared here",{a,{": different classes",{" (C vs D)",a}},": different number of parameters (C vs D)",{": type mismatch at C parameter",{" (D vs E)",a}},{": different return type",{" (C vs D)",a}},{": different qualifiers (",{"none","const","restrict","const and restrict",Dd,"const and volatile","volatile and restrict","const, volatile, and restrict"}," vs ",{"none","const","restrict","const and restrict",Dd,"const and volatile","volatile and restrict","const, volatile, and restrict"},")"},": different exception specifications"}}}}, | | [i]={{nil,n,"negated attribute subject matcher sub-rule \'A\' contradicts sub-rule \'B\'"}}, |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="negated attribute subject matcher sub\\-rule \'(.*?)\' contradicts sub\\-rule \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,m}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{r,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;"}},
| | [d]={{J,1036,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n // Figure out which subject matching rules are valid.\n if (StrictSubjectMatchRuleSet.empty()) {\n // ...\n for (const auto &Rule : Rules) {\n // ...\n if (It != RulesToFirstSpecifiedNegatedSubRule.end() && It->second != Rule) {\n // ...\n Diag(It->second.second.getBegin(), diag::err_pragma_attribute_matcher_negated_subrule_contradicts_subrule) << attr::getSubjectMatchRuleSpelling(attr::SubjectMatchRule(It->second.first)) << attr::getSubjectMatchRuleSpelling(MatchRule) << Rule.second << FixItHint::CreateRemoval(replacementRangeForListElement(*this, It->second.second));"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/warn-overloaded-virtual.cpp"]={"clang/test/SemaCXX/warn-overloaded-virtual.cpp:4:16: note: hidden overloaded virtual function \'B1::foo\' declared here: type mismatch at 1st parameter (\'int\' vs \'float\')","clang/test/SemaCXX/warn-overloaded-virtual.cpp:5:16: note: hidden overloaded virtual function \'B1::foo\' declared here: different number of parameters (0 vs 1)","clang/test/SemaCXX/warn-overloaded-virtual.cpp:13:8: note: hidden overloaded virtual function \'S2::foo\' declared here: different number of parameters (0 vs 1)","clang/test/SemaCXX/warn-overloaded-virtual.cpp:17:16: note: hidden overloaded virtual function \'B2::foo\' declared here: type mismatch at 1st parameter (\'void *\' vs \'int\')","clang/test/SemaCXX/warn-overloaded-virtual.cpp:126:17: note: hidden overloaded virtual function \'(anonymous namespace)::A::foo\' declared here: type mismatch at 1st parameter (\'bool\' vs \'int\')","clang/test/SemaCXX/warn-overloaded-virtual.cpp:128:17: note: hidden overloaded virtual function \'(anonymous namespace)::A::foo\' declared here: different number of parameters (2 vs 1)","clang/test/SemaCXX/warn-overloaded-virtual.cpp:130:17: note: hidden overloaded virtual function \'(anonymous namespace)::A::foo\' declared here: type mismatch at 1st parameter (\'int *\' vs \'int\')","clang/test/SemaCXX/warn-overloaded-virtual.cpp:132:17: note: hidden overloaded virtual function \'(anonymous namespace)::A::foo\' declared here: different qualifiers (\'volatile\' vs \'const\')"} | | ["clang/test/Sema/pragma-attribute-strict-subjects.c"]={"clang/test/Sema/pragma-attribute-strict-subjects.c:25:130: error: negated attribute subject matcher sub-rule \'variable(unless(is_parameter))\' contradicts sub-rule \'variable(is_parameter)\'","clang/test/Sema/pragma-attribute-strict-subjects.c:30:106: error: negated attribute subject matcher sub-rule \'variable(unless(is_parameter))\' contradicts sub-rule \'variable(is_global)\'"} |
| } | | } |
| }, | | }, |
| ["note_hidden_tag"]={ | | ["err_pragma_attribute_matcher_subrule_contradicts_rule"]={ |
| [b]="note_hidden_tag", | | [b]={{nil,n,"err_pragma_attribute_matcher_subrule_contradicts_rule"}}, |
| [h]="type declaration hidden", | | [j]={{nil,n,"redundant attribute subject matcher sub-rule \'%0\'; \'%1\' already matches those declarations"}}, |
| [i]="type declaration hidden", | | [i]={{nil,n,"redundant attribute subject matcher sub-rule \'A\'; \'B\' already matches those declarations"}}, |
| [c]=g, | | [h]=k, |
| [e]="type declaration hidden", | | [c]="redundant attribute subject matcher sub\\-rule \'(.*?)\'; \'(.*?)\' already matches those declarations", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,m}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{bd,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);"}}, | | [d]={{J,953,"void Sema::ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules) {\n // ...\n // Figure out which subject matching rules are valid.\n if (StrictSubjectMatchRuleSet.empty()) {\n // ...\n for (const auto &Rule : Rules) {\n // ...\n if (It != Rules.end()) {\n // ...\n Diag(Rule.second.getBegin(), diag::err_pragma_attribute_matcher_subrule_contradicts_rule) << attr::getSubjectMatchRuleSpelling(MatchRule) << attr::getSubjectMatchRuleSpelling(*ParentRule) << It->second << FixItHint::CreateRemoval(replacementRangeForListElement(*this, Rule.second));"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-attribute-strict-subjects.c"]={"clang/test/Sema/pragma-attribute-strict-subjects.c:9:153: error: redundant attribute subject matcher sub-rule \'variable(is_global)\'; \'variable\' already matches those declarations","clang/test/Sema/pragma-attribute-strict-subjects.c:9:108: error: redundant attribute subject matcher sub-rule \'variable(is_parameter)\'; \'variable\' already matches those declarations","clang/test/Sema/pragma-attribute-strict-subjects.c:15:99: error: redundant attribute subject matcher sub-rule \'function(is_member)\'; \'function\' already matches those declarations","clang/test/Sema/pragma-attribute-strict-subjects.c:20:109: error: redundant attribute subject matcher sub-rule \'variable(unless(is_parameter))\'; \'variable\' already matches those declarations"} |
| } | | } |
| }, | | }, |
| ["note_hiding_object"]={ | | ["err_pragma_attribute_namespace_on_attribute"]={ |
| [b]="note_hiding_object", | | [b]={{nil,u,"err_pragma_attribute_namespace_on_attribute"}}, |
| [h]="declaration hides type", | | [j]={{nil,u,"namespace can only apply to \'push\' or \'pop\' directives"}}, |
| [i]="declaration hides type", | | [i]={{nil,u,"namespace can only apply to \'push\' or \'pop\' directives"}}, |
| [c]=g, | | [h]=k, |
| [e]="declaration hides type", | | [c]="namespace can only apply to \'push\' or \'pop\' directives", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,u,y}}, |
| [j]={"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"}, | | [g]={"0876cae0d749",1545345124,"Add support for namespaces on #pragma clang attribute","Add support for namespaces on #pragma clang attribute\n\nNamespaces are introduced by adding an \"identifier.\" before a\npush/pop directive. Pop directives with namespaces can only pop a\nattribute group that was pushed with the same namespace. Push and pop\ndirectives that don\'t opt into namespaces have the same semantics.\n\nThis is necessary to prevent a pitfall of using multiple #pragma\nclang attribute directives spread out in a large file, particularly\nwhen macros are involved. It isn\'t easy to see which pop corripsonds\nto which push, so its easy to inadvertently pop the wrong group.\n\nDifferential revision: https://reviews.llvm.org/D55628\n\nllvm-svn: 349845"}, |
| [k]={{bd,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);"}}, | | [d]={{v,3884,"/// Handle the #pragma clang attribute directive.\n///\n/// The syntax is:\n/// \\code\n/// #pragma clang attribute push (attribute, subject-set)\n/// #pragma clang attribute push\n/// #pragma clang attribute (attribute, subject-set)\n/// #pragma clang attribute pop\n/// \\endcode\n///\n/// There are also \'namespace\' variants of push and pop directives. The bare\n/// \'#pragma clang attribute (attribute, subject-set)\' version doesn\'t require a\n/// namespace, since it always applies attributes to the most recently pushed\n/// group, regardless of namespace.\n/// \\code\n/// #pragma clang attribute namespace.push (attribute, subject-set)\n/// #pragma clang attribute namespace.push\n/// #pragma clang attribute namespace.pop\n/// \\endcode\n///\n/// The subject-set clause defines the set of declarations which receive the\n/// attribute. Its exact syntax is described in the LanguageExtensions document\n/// in Clang\'s documentation.\n///\n/// This directive instructs the compiler to begin/finish applying the specified\n/// attribute to the set of attribute-specific declarations in the active range\n/// of the pragma.\nvoid PragmaAttributeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n // Determine what action this pragma clang attribute represents.\n if (Tok.is(tok::l_paren)) {\n if (Info->Namespace) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_attribute_namespace_on_attribute);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/pragma-attribute-namespace.c"]={"clang/test/Sema/pragma-attribute-namespace.c:25:31: error: namespace can only apply to \'push\' or \'pop\' directives"} |
| } | | } |
| }, | | }, |
| ["note_ice_conversion_here"]={ | | ["err_pragma_attribute_no_pop_eof"]={ |
| [b]="note_ice_conversion_here", | | [b]={{nil,n,"err_pragma_attribute_no_pop_eof"}}, |
| [h]="conversion to %select{integral|enumeration}0 type %1 declared here", | | [j]={{nil,n,"unterminated \'#pragma clang attribute push\' at end of file"}}, |
| [i]={{nil,nil,{"conversion to ",{"integral","enumeration"}," type B declared here"}}}, | | [i]={{nil,n,"unterminated \'#pragma clang attribute push\' at end of file"}}, |
| [c]=g, | | [h]=k, |
| [e]="conversion to (?:integral|enumeration) type (.*?) declared here", | | [c]="unterminated \'\\#pragma clang attribute push\' at end of file", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,m}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{A,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; }"},{A,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; }"}}, | | [d]={{J,1149,"void Sema::DiagnoseUnterminatedPragmaAttribute() {\n // ...\n Diag(PragmaAttributeStack.back().Loc, diag::err_pragma_attribute_no_pop_eof);"}}, |
| [l]={ | | [l]={ |
| ["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:29:22: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:33:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:34:13: note: conversion to integral type \'long\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:29:22: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:33:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:34:13: note: conversion to integral type \'long\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:29:22: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:33:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:34:13: note: conversion to integral type \'long\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:29:22: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:33:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:34:13: note: conversion to integral type \'long\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:29:22: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:33:13: note: conversion to integral type \'int\' declared here","clang/test/CXX/expr/expr.const/p5-0x.cpp:34:13: note: conversion to integral type \'long\' declared here"} | | ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:68:15: error: unterminated \'#pragma clang attribute push\' at end of file"} |
| } | | } |
| }, | | }, |
| ["note_illegal_field_declared_here"]={ | | ["err_pragma_attribute_stack_mismatch"]={ |
| [b]="note_illegal_field_declared_here", | | [b]={{nil,n,"err_pragma_attribute_stack_mismatch"}}, |
| [h]="field of illegal %select{type|pointer type}0 %1 declared here", | | [j]={{nil,u,"\'#pragma clang attribute %select{%1.|}0pop\' with no matching \'#pragma clang attribute %select{%1.|}0push\'"},{"7.1",n,"\'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'"}}, |
| [i]={{nil,nil,{"field of illegal ",{"type","pointer type"}," B declared here"}}}, | | [i]={{nil,u,{"\'#pragma clang attribute ",{"B.",a},"pop\' with no matching \'#pragma clang attribute ",{"B.",a},"push\'"}},{"7.1",n,"\'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="field of illegal (?:type|pointer type) (.*?) declared here", | | [c]="\'\\#pragma clang attribute (?:(.*?)\\.|)pop\' with no matching \'\\#pragma clang attribute (?:(.*?)\\.|)push\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,m}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{C,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();"}}, | | [d]={{J,1081,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n if (PragmaAttributeStack.empty()) {\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 1;"},{J,1095,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n if (Namespace)\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 0 << Namespace->getName();"},{J,1131,"void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace) {\n // ...\n if (Namespace)\n // ...\n else\n Diag(PragmaLoc, diag::err_pragma_attribute_stack_mismatch) << 1;"}}, |
| [l]={ | | [l]={ |
| ["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:21:12: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:21:12: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here",Kc,Kc,Kc,Kc,"clang/test/SemaSYCL/zero-length-arrays.cpp:36:7: note: field of illegal type \'int[0]\' declared here","clang/test/SemaSYCL/zero-length-arrays.cpp:21:12: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here","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","clang/test/SemaSYCL/zero-length-arrays.cpp:21:12: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here",Kc,Kc,Kc,Kc,"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:21:12: note: field of illegal pointer type \'ZEROARR *\' (aka \'float (*)[0]\') declared here"} | | ["clang/test/Sema/pragma-attribute.c"]={"clang/test/Sema/pragma-attribute.c:3:15: error: \'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'","clang/test/Sema/pragma-attribute.c:47:15: error: \'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'","clang/test/Sema/pragma-attribute.c:60:15: error: \'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'","clang/test/Sema/pragma-attribute.c:66:15: error: \'#pragma clang attribute pop\' with no matching \'#pragma clang attribute push\'"} |
| } | | } |
| }, | | }, |
| ["note_immediate_function_reason"]={ | | ["err_pragma_attribute_unknown_subject_rule"]={ |
| [b]="note_immediate_function_reason", | | [b]={{nil,n,"err_pragma_attribute_unknown_subject_rule"}}, |
| [h]="%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", | | [j]={{nil,n,"unknown attribute subject rule \'%0\'"}}, |
| [i]={{nil,nil,{"A is an immediate ",{Qc,E}," because ",{"its body",{"the",{a," default"}," initializer of I"}},rb,{{"evaluates the address of ",{"an immediate","a consteval"}," function B"},{"contains a call to ",{"an immediate","a consteval"},rb,{Qc,E}," B and that call is not a constant expression"}}}}}, | | [i]={{nil,n,"unknown attribute subject rule \'A\'"}}, |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="unknown attribute subject rule \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={Vb,1625925174,Jb,Kb}, | | [g]={R,1492508507,T,S}, |
| [k]={{r,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;"}}, | | [d]={{v,1609,"bool Parser::ParsePragmaAttributeSubjectMatchRuleSet(attr::ParsedSubjectMatchRuleSet &SubjectMatchRules, SourceLocation &AnyLoc, SourceLocation &LastMatchRuleEndLoc) {\n // ...\n do {\n // ...\n if (!Rule.first) {\n Diag(Tok, diag::err_pragma_attribute_unknown_subject_rule) << Name;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/cxx2a-consteval-default-params.cpp"]={"clang/test/SemaCXX/cxx2a-consteval-default-params.cpp:48:8: note: \'InitWithLambda\' is an immediate constructor because the default initializer of \'b\' contains a call to a consteval function \'undefined\' and that call is not a constant expression"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:56:81: error: unknown attribute subject rule \'diag\'","clang/test/Parser/pragma-attribute.cpp:57:81: error: unknown attribute subject rule \'a\'","clang/test/Parser/pragma-attribute.cpp:58:91: error: unknown attribute subject rule \'for\'","clang/test/Parser/pragma-attribute.cpp:59:81: error: unknown attribute subject rule \'function42\'"} |
| } | | } |
| }, | | }, |
| ["note_implementation_declared"]={ | | ["err_pragma_attribute_unknown_subject_sub_rule"]={ |
| [b]="note_implementation_declared", | | [b]={{nil,n,"err_pragma_attribute_unknown_subject_sub_rule"}}, |
| [h]="class implementation is declared here", | | [j]={{nil,n,"%select{invalid use of|unknown}2 attribute subject matcher sub-rule \'%0\'; \'%1\' matcher %select{does not support sub-rules|supports the following sub-rules: %3}2"}}, |
| [i]="class implementation is declared here", | | [i]={{nil,n,{{"invalid use of","unknown"}," attribute subject matcher sub-rule \'A\'; \'B\' matcher ",{"does not support sub-rules","supports the following sub-rules: D"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="class implementation is declared here", | | [c]="(?:invalid use of|unknown) attribute subject matcher sub\\-rule \'(.*?)\'; \'(.*?)\' matcher (?:does not support sub\\-rules|supports the following sub\\-rules\\: (.*?))", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"e16cdb407a3f",1270241585,"diagnose declaring class extension after its implementation","diagnose declaring class extension after its implementation\n(radar 7822210).\n\nllvm-svn: 100226"}, | | [g]={R,1492508507,T,S}, |
| [k]={{db,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);"}}, | | [d]={{v,1578,"static void diagnoseUnknownAttributeSubjectSubRule(Parser &PRef, attr::SubjectMatchRule PrimaryRule, StringRef PrimaryRuleName, StringRef SubRuleName, SourceLocation SubRuleLoc) {\n auto Diagnostic = PRef.Diag(SubRuleLoc, diag::err_pragma_attribute_unknown_subject_sub_rule) << SubRuleName << PrimaryRuleName;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/class-extension-after-implementation.m"]={"clang/test/SemaObjC/class-extension-after-implementation.m:6:17: note: class implementation is declared here"} | | [X]={"clang/test/Parser/pragma-attribute.cpp:67:89: error: unknown attribute subject matcher sub-rule \'is\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:72:99: error: unknown attribute subject matcher sub-rule \'is\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:77:81: error: invalid use of attribute subject matcher sub-rule \'is_parameter\'; \'enum\' matcher does not support sub-rules","clang/test/Parser/pragma-attribute.cpp:78:85: error: invalid use of attribute subject matcher sub-rule \'is_parameter\'; \'enum\' matcher does not support sub-rules","clang/test/Parser/pragma-attribute.cpp:82:99: error: unknown attribute subject matcher sub-rule \'unless(is)\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:90:99: error: unknown attribute subject matcher sub-rule \'unless(is_global)\'; \'variable\' matcher supports the following sub-rules: \'is_thread_local\', \'is_global\', \'is_local\', \'is_parameter\', \'unless(is_parameter)\'","clang/test/Parser/pragma-attribute.cpp:91:86: error: invalid use of attribute subject matcher sub-rule \'unless(is_parameter)\'; \'enum\' matcher does not support sub-rules"} |
| } | | } |
| }, | | }, |
| ["note_implemented_by_class"]={ | | ["err_pragma_attribute_unsupported_attribute"]={ |
| [b]="note_implemented_by_class", | | [b]={{nil,n,"err_pragma_attribute_unsupported_attribute"}}, |
| [h]="when implemented by class %0", | | [j]={{nil,n,"attribute %0 is not supported by \'#pragma clang attribute\'"}}, |
| [i]="when implemented by class A", | | [i]={{nil,n,"attribute A is not supported by \'#pragma clang attribute\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="when implemented by class (.*?)", | | [c]="attribute (.*?) is not supported by \'\\#pragma clang attribute\'", |
| [f]=a, | | [f]=a, |
| [d]="ARC Weak References", | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={R,1492508507,T,S}, |
| [k]={{qb,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();"}}, | | [d]={{v,1903,"void Parser::HandlePragmaAttribute() {\n // ...\n for (const ParsedAttr &Attribute : Attrs) {\n if (!Attribute.isSupportedByPragmaAttribute()) {\n Diag(PragmaLoc, diag::err_pragma_attribute_unsupported_attribute) << Attribute;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-attribute-declspec.cpp"]={"clang/test/Parser/pragma-attribute-declspec.cpp:12:15: error: attribute \'align\' is not supported by \'#pragma clang attribute\'"} |
| } | | } |
| }, | | }, |
| ["note_implicit_delete_this_in_destructor_here"]={ | | ["err_pragma_cannot_end_force_cuda_host_device"]={ |
| [b]={{nil,z,"note_implicit_delete_this_in_destructor_here"}}, | | [b]="err_pragma_cannot_end_force_cuda_host_device", |
| [h]={{nil,z,"while checking implicit \'delete this\' for virtual destructor"}}, | | [j]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", |
| [i]={{nil,z,"while checking implicit \'delete this\' for virtual destructor"}}, | | [i]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", |
| [c]=g, | | [h]=k, |
| [e]="while checking implicit \'delete this\' for virtual destructor", | | [c]="force_cuda_host_device end pragma without matching force_cuda_host_device begin", |
| [f]=a, | | [f]=a, |
| [d]={{nil,z,n}}, | | [e]=y, |
| [j]={"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"}, | | [g]={"67a78a6cc021",1475964958,"[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.","[CUDA] Add #pragma clang force_cuda_host_device_{begin,end} pragmas.\n\nSummary:\nThese cause us to consider all functions in-between to be __host__\n__device__.\n\nYou can nest these pragmas; you just can\'t have more \'end\'s than\n\'begin\'s.\n\nReviewers: rsmith\n\nSubscribers: tra, jhen, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D24975\n\nllvm-svn: 283677"}, |
| [k]={{r,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);"}}, | | [d]={{v,3815,"void PragmaForceCUDAHostDeviceHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Info->isStr(\"begin\"))\n // ...\n else if (!Actions.PopForceCUDAHostDevice())\n PP.Diag(FirstTok.getLocation(), diag::err_pragma_cannot_end_force_cuda_host_device);"}} |
| [l]={
| |
| ["clang/test/SemaCXX/cxx2a-destroying-delete.cpp"]={"clang/test/SemaCXX/cxx2a-destroying-delete.cpp:48:26: note: while checking implicit \'delete this\' for virtual destructor"}
| |
| }
| |
| }, | | }, |
| ["note_implicit_member_target_infer_collision"]={ | | ["err_pragma_clang_section_expected_equal"]={ |
| [b]="note_implicit_member_target_infer_collision", | | [b]={{nil,n,"err_pragma_clang_section_expected_equal"}}, |
| [h]="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", | | [j]={{nil,o,"expected \'=\' following \'#pragma clang section %select{invalid|bss|data|rodata|text|relro}0\'"},{x,n,"expected \'=\' following \'#pragma clang section %select{invalid|bss|data|rodata|text}0\'"}}, |
| [i]={{nil,nil,{"implicit ",{wc,kc,lc,oc,pc,D}," inferred target collision: call to both ",{"__device__","__global__","__host__","__host__ __device__"}," and ",{"__device__","__global__","__host__","__host__ __device__"}," members"}}}, | | [i]={{nil,o,{"expected \'=\' following \'#pragma clang section ",{ob,"bss","data","rodata","text","relro"},"\'"}},{x,n,{"expected \'=\' following \'#pragma clang section ",{ob,"bss","data","rodata","text"},"\'"}}}, |
| [c]=g, | | [h]=k, |
| [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", | | [c]="expected \'\\=\' following \'\\#pragma clang section (?:invalid|bss|data|rodata|text|relro)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={"2a67c9ee39c3",1496657517,"Add support for #pragma clang section","Add support for #pragma clang section\n\nThis patch provides a means to specify section-names for global variables, \nfunctions and static variables, using #pragma directives. \nThis feature is only defined to work sensibly for ELF targets.\nOne can specify section names as:\n#pragma clang section bss=\"myBSS\" data=\"myData\" rodata=\"myRodata\" text=\"myText\"\nOne can \"unspecify\" a section name with empty string e.g.\n#pragma clang section bss=\"\" data=\"\" text=\"\" rodata=\"\"\n\nReviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner\nDifferential Revision: https://reviews.llvm.org/D33412\n\nllvm-svn: 304705"}, |
| [k]={{"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;"}}, | | [d]={{v,2230,"// #pragma clang section bss=\"abc\" data=\"\" rodata=\"def\" text=\"\" relro=\"\"\nvoid PragmaClangSectionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (Tok.isNot(tok::equal)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_clang_section_expected_equal) << SecKind;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCUDA/implicit-member-target-collision.cu"]={"clang/test/SemaCUDA/implicit-member-target-collision.cu:16:8: note: implicit default constructor inferred target collision: call to both __host__ and __device__ members","clang/test/SemaCUDA/implicit-member-target-collision.cu:31:8: note: implicit default constructor inferred target collision: call to both __host__ and __device__ members","clang/test/SemaCUDA/implicit-member-target-collision.cu:49:8: note: implicit default constructor inferred target collision: call to both __host__ and __device__ members"} | | ["clang/test/Sema/pragma-clang-section.c"]={"clang/test/Sema/pragma-clang-section.c:13:27: error: expected \'=\' following \'#pragma clang section bss\'","clang/test/Sema/pragma-clang-section.c:14:28: error: expected \'=\' following \'#pragma clang section data\'","clang/test/Sema/pragma-clang-section.c:15:30: error: expected \'=\' following \'#pragma clang section rodata\'","clang/test/Sema/pragma-clang-section.c:16:28: error: expected \'=\' following \'#pragma clang section text\'","clang/test/Sema/pragma-clang-section.c:17:29: error: expected \'=\' following \'#pragma clang section relro\'"} |
| } | | } |
| }, | | }, |
| ["note_implicit_param_decl"]={ | | ["err_pragma_comment_malformed"]={ |
| [b]="note_implicit_param_decl", | | [b]="err_pragma_comment_malformed", |
| [h]="%0 is an implicit parameter", | | [j]="pragma comment requires parenthesized identifier and optional string", |
| [i]="A is an implicit parameter", | | [i]="pragma comment requires parenthesized identifier and optional string", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is an implicit parameter",
| | [c]="pragma comment requires parenthesized identifier and optional string", |
| [f]=a,
| |
| [d]=n,
| |
| [j]={"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"},
| |
| [k]={{A,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;"},{A,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"]={
| |
| [b]="note_implicit_top_level_module_import_here",
| |
| [h]="submodule of top-level module \'%0\' implicitly imported here",
| |
| [i]="submodule of top-level module \'A\' implicitly imported here",
| |
| [c]=g, | |
| [e]="submodule of top\\-level module \'(.*?)\' implicitly imported here",
| |
| [f]=a, | | [f]=a, |
| [d]=Eb, | | [e]=y, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{"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();"}},
| | [d]={{v,3089,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n PP.Diag(CommentLoc, diag::err_pragma_comment_malformed);"},{v,3096,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(CommentLoc, diag::err_pragma_comment_malformed);"},{v,3137,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_comment_malformed);"},{v,3143,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_comment_malformed);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Modules/shadow.m"]={"clang/test/Modules/shadow.m:13:9: note: submodule of top-level module \'A\' implicitly imported here"} | | ["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:9:31: error: pragma comment requires parenthesized identifier and optional string","clang/test/Preprocessor/pragma_microsoft.c:24:22: error: pragma comment requires parenthesized identifier and optional string"} |
| } | | } |
| }, | | }, |
| ["note_implicitly_deleted"]={ | | ["err_pragma_comment_unknown_kind"]={ |
| [b]="note_implicitly_deleted", | | [b]="err_pragma_comment_unknown_kind", |
| [h]="explicitly defaulted function was implicitly deleted here", | | [j]="unknown kind of pragma comment", |
| [i]="explicitly defaulted function was implicitly deleted here", | | [i]="unknown kind of pragma comment", |
| [c]=g, | | [h]=k, |
| [e]="explicitly defaulted function was implicitly deleted here", | | [c]="unknown kind of pragma comment", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=y, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{A,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);"}},
| | [d]={{v,3111,"/// Handle the microsoft \\#pragma comment extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma comment(linker, \"foo\")\n/// \\endcode\n/// \'linker\' is one of five identifiers: compiler, exestr, lib, linker, user.\n/// \"foo\" is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters etc. See MSDN for more details.\nvoid PragmaCommentHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PCK_Unknown) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_comment_unknown_kind);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/dr1301.cpp"]={"clang/test/SemaCXX/dr1301.cpp:20:3: note: explicitly defaulted function was implicitly deleted here"} | | ["clang/test/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:17:17: error: unknown kind of pragma comment"} |
| } | | } |
| }, | | }, |
| ["note_imported_by_pch_module_not_found"]={ | | ["err_pragma_detect_mismatch_malformed"]={ |
| [b]={{nil,z,"note_imported_by_pch_module_not_found"}}, | | [b]="err_pragma_detect_mismatch_malformed", |
| [h]={{nil,z,"consider adding \'%0\' to the header search path"}},
| | [j]="pragma detect_mismatch is malformed; it requires two comma-separated string literals", |
| [i]={{nil,z,"consider adding \'A\' to the header search path"}},
| | [i]="pragma detect_mismatch is malformed; it requires two comma-separated string literals", |
| [c]=g,
| | [h]=k, |
| [e]="consider adding \'(.*?)\' to the header search path",
| | [c]="pragma detect_mismatch is malformed; it requires two comma\\-separated string literals", |
| [f]=a,
| |
| [d]={{nil,z,nb}},
| |
| [j]={"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"}, | |
| [k]={{ud,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"]={
| |
| [b]="note_in_binding_decl_init",
| |
| [h]="in implicit initialization of binding declaration %0", | |
| [i]="in implicit initialization of binding declaration A",
| |
| [c]=g, | |
| [e]="in implicit initialization of binding declaration (.*?)",
| |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=y, |
| [j]={"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"}, | | [g]={"5d041beb4e86",1370311634,"Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker co...","Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.\n\nllvm-svn: 183178"}, |
| [k]={{W,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);"}}, | | [d]={{v,3047,"/// Handle the Microsoft \\#pragma detect_mismatch extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma detect_mismatch(\"name\", \"value\")\n/// \\endcode\n/// Where \'name\' and \'value\' are quoted strings. The values are embedded in\n/// the object file and passed along to the linker. If the linker detects a\n/// mismatch in the object file\'s values for the given name, a LNK2038 error\n/// is emitted. See MSDN for more details.\nvoid PragmaDetectMismatchHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::comma)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_detect_mismatch_malformed);"},{v,3062,"/// Handle the Microsoft \\#pragma detect_mismatch extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma detect_mismatch(\"name\", \"value\")\n/// \\endcode\n/// Where \'name\' and \'value\' are quoted strings. The values are embedded in\n/// the object file and passed along to the linker. If the linker detects a\n/// mismatch in the object file\'s values for the given name, a LNK2038 error\n/// is emitted. See MSDN for more details.\nvoid PragmaDetectMismatchHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_detect_mismatch_malformed);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Preprocessor/pragma_microsoft.c"]={"clang/test/Preprocessor/pragma_microsoft.c:34:31: error: pragma detect_mismatch is malformed; it requires two comma-separated string literals"} |
| } | | } |
| }, | | }, |
| ["note_in_class_initializer_float_type_cxx11"]={ | | ["err_pragma_expected_clang_section_name"]={ |
| [b]="note_in_class_initializer_float_type_cxx11", | | [b]={{nil,n,"err_pragma_expected_clang_section_name"}}, |
| [h]="add \'constexpr\'", | | [j]={{nil,o,"expected one of [bss|data|rodata|text|relro] section kind in \'#pragma %0\'"},{x,n,"expected one of [bss|data|rodata|text] section kind in \'#pragma %0\'"}}, |
| [i]="add \'constexpr\'", | | [i]={{nil,o,"expected one of [bss|data|rodata|text|relro] section kind in \'#pragma A\'"},{x,n,"expected one of [bss|data|rodata|text] section kind in \'#pragma A\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="add \'constexpr\'", | | [c]="expected one of \\[bss\\|data\\|rodata\\|text\\|relro\\] section kind in \'\\#pragma (.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={"2a67c9ee39c3",1496657517,"Add support for #pragma clang section","Add support for #pragma clang section\n\nThis patch provides a means to specify section-names for global variables, \nfunctions and static variables, using #pragma directives. \nThis feature is only defined to work sensibly for ELF targets.\nOne can specify section names as:\n#pragma clang section bss=\"myBSS\" data=\"myData\" rodata=\"myRodata\" text=\"myText\"\nOne can \"unspecify\" a section name with empty string e.g.\n#pragma clang section bss=\"\" data=\"\" text=\"\" rodata=\"\"\n\nReviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner\nDifferential Revision: https://reviews.llvm.org/D33412\n\nllvm-svn: 304705"}, |
| [k]={{C,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 \");"}}, | | [d]={{v,2207,"// #pragma clang section bss=\"abc\" data=\"\" rodata=\"def\" text=\"\" relro=\"\"\nvoid PragmaClangSectionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n while (Tok.isNot(tok::eod)) {\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_clang_section_name) << \"clang section\";"},{v,2223,"// #pragma clang section bss=\"abc\" data=\"\" rodata=\"def\" text=\"\" relro=\"\"\nvoid PragmaClangSectionHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n while (Tok.isNot(tok::eod)) {\n // ...\n if (SecType->isStr(\"bss\"))\n // ...\n else if (SecType->isStr(\"data\"))\n // ...\n else if (SecType->isStr(\"rodata\"))\n // ...\n else if (SecType->isStr(\"relro\"))\n // ...\n else if (SecType->isStr(\"text\"))\n // ...\n else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_clang_section_name) << \"clang section\";"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/pragma-clang-section.c"]={"clang/test/Sema/pragma-clang-section.c:6:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:7:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:8:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:9:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:11:23: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'","clang/test/Sema/pragma-clang-section.c:18:56: error: expected one of [bss|data|rodata|text|relro] section kind in \'#pragma clang section\'"} |
| } | | } |
| }, | | }, |
| ["note_in_declaration_of_implicit_equality_comparison"]={ | | ["err_pragma_expected_file_scope"]={ |
| [b]={{nil,m,"note_in_declaration_of_implicit_equality_comparison"}}, | | [b]={{nil,C,"err_pragma_expected_file_scope"}}, |
| [h]={{nil,m,"while declaring the corresponding implicit \'operator==\' for this defaulted \'operator<=>\'"}}, | | [j]={{nil,C,"\'#pragma %0\' can only appear at file scope"}}, |
| [i]={{nil,m,"while declaring the corresponding implicit \'operator==\' for this defaulted \'operator<=>\'"}}, | | [i]={{nil,C,"\'#pragma A\' can only appear at file scope"}}, |
| [c]=g, | | [h]=k, |
| [e]="while declaring the corresponding implicit \'operator\\=\\=\' for this defaulted \'operator\\<\\=\\>\'", | | [c]="\'\\#pragma (.*?)\' can only appear at file scope", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]={{nil,C,m}}, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{W,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);"}}, | | [d]={{J,793,"void Sema::ActOnPragmaMSAllocText(SourceLocation PragmaLocation, StringRef Section, const SmallVector<std::tuple<IdentifierInfo *, SourceLocation>> &Functions) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(PragmaLocation, diag::err_pragma_expected_file_scope) << \"alloc_text\";"},{J,1159,"void Sema::ActOnPragmaMSOptimize(SourceLocation Loc, bool IsOn) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(Loc, diag::err_pragma_expected_file_scope) << \"optimize\";"},{J,1260,"void Sema::ActOnPragmaMSFunction(SourceLocation Loc, const llvm::SmallVectorImpl<StringRef> &NoBuiltins) {\n if (!CurContext->getRedeclContext()->isFileContext()) {\n Diag(Loc, diag::err_pragma_expected_file_scope) << \"function\";"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-ms-alloc-text.cpp"]={"clang/test/Sema/pragma-ms-alloc-text.cpp:27:19: error: \'#pragma alloc_text\' can only appear at file scope"} |
| } | | } |
| }, | | }, |
| ["note_in_declaration_of_implicit_special_member"]={ | | ["err_pragma_expected_integer"]={ |
| [b]={{nil,y,"note_in_declaration_of_implicit_special_member"}}, | | [b]={{nil,t,"err_pragma_expected_integer"}}, |
| [h]={{nil,y,"while declaring the implicit %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}1 for %0"}}, | | [j]={{nil,t,"expected an integer argument in \'#pragma %0\'"}}, |
| [i]={{nil,y,{"while declaring the implicit ",{wc,kc,lc,oc,pc,D}," for A"}}}, | | [i]={{nil,t,"expected an integer argument in \'#pragma A\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="while declaring the implicit (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) for (.*?)", | | [c]="expected an integer argument in \'\\#pragma (.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]={{nil,t,y}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{W,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;"}}, | | [d]={{v,3983,"// Handle \'#pragma clang max_tokens 12345\'.\nvoid PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::numeric_constant) || !PP.parseSimpleIntegerLiteral(Tok, MaxTokens)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_integer) << \"clang max_tokens_here\";"},{v,4015,"// Handle \'#pragma clang max_tokens_total 12345\'.\nvoid PragmaMaxTokensTotalHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::numeric_constant) || !PP.parseSimpleIntegerLiteral(Tok, MaxTokens)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_expected_integer) << \"clang max_tokens_total\";"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/max-tokens.cpp"]={"clang/test/Parser/max-tokens.cpp:8:31: error: expected an integer argument in \'#pragma clang max_tokens_here\'","clang/test/Parser/max-tokens.cpp:15:32: error: expected an integer argument in \'#pragma clang max_tokens_total\'"} |
| } | | } |
| }, | | }, |
| ["note_in_for_range"]={ | | ["err_pragma_fc_except_requires_precise"]={ |
| [b]="note_in_for_range", | | [b]={{nil,t,"err_pragma_fc_except_requires_precise"}}, |
| [h]="when looking up \'%select{begin|end}0\' function for range expression of type %1", | | [j]={{nil,t,"\'#pragma float_control(except, on)\' is illegal when precise is disabled"}}, |
| [i]={{nil,nil,{"when looking up \'",{"begin","end"},"\' function for range expression of type B"}}}, | | [i]={{nil,t,"\'#pragma float_control(except, on)\' is illegal when precise is disabled"}}, |
| [c]=g, | | [h]=k, |
| [e]="when looking up \'(?:begin|end)\' function for range expression of type (.*?)", | | [c]="\'\\#pragma float_control\\(except, on\\)\' is illegal when precise is disabled", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,m}}, |
| [j]={"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"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{X,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();"},{X,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();"}}, | | [d]={{J,579,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_Except:\n if (!isPreciseFPEnabled())\n Diag(Loc, diag::err_pragma_fc_except_requires_precise);"}} |
| [l]={
| |
| ["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\'"}
| |
| }
| |
| }, | | }, |
| ["note_in_omitted_aggregate_initializer"]={ | | ["err_pragma_fc_noprecise_requires_noexcept"]={ |
| [b]="note_in_omitted_aggregate_initializer", | | [b]={{nil,t,"err_pragma_fc_noprecise_requires_noexcept"}}, |
| [h]="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", | | [j]={{nil,t,"\'#pragma float_control(precise, off)\' is illegal when except is enabled"}}, |
| [i]={{nil,nil,{"in implicit initialization of ",{"array element B with omitted initializer","field B with omitted initializer","trailing array elements in runtime-sized array new"}}}}, | | [i]={{nil,t,"\'#pragma float_control(precise, off)\' is illegal when except is enabled"}}, |
| [c]=g, | | [h]=k, |
| [e]="in implicit initialization of (?:array element (.*?) with omitted initializer|field (.*?) with omitted initializer|trailing array elements in runtime\\-sized array new)", | | [c]="\'\\#pragma float_control\\(precise, off\\)\' is illegal when except is enabled", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,m}}, |
| [j]={"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"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{ab,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();"},{ab,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();"}}, | | [d]={{J,570,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_NoPrecise:\n if (CurFPFeatures.getExceptionMode() == LangOptions::FPE_Strict)\n Diag(Loc, diag::err_pragma_fc_noprecise_requires_noexcept);"}}, |
| [l]={ | | [l]={ |
| ["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/Parser/fp-floatcontrol-syntax.cpp"]={"clang/test/Parser/fp-floatcontrol-syntax.cpp:62:9: error: \'#pragma float_control(precise, off)\' is illegal when except is enabled","clang/test/Parser/fp-floatcontrol-syntax.cpp:68:9: error: \'#pragma float_control(precise, off)\' is illegal when except is enabled"} |
| } | | } |
| }, | | }, |
| ["note_in_reference_temporary_list_initializer"]={ | | ["err_pragma_fc_noprecise_requires_nofenv"]={ |
| [b]="note_in_reference_temporary_list_initializer", | | [b]={{nil,t,"err_pragma_fc_noprecise_requires_nofenv"}}, |
| [h]="in initialization of temporary of type %0 created to list-initialize this reference", | | [j]={{nil,t,"\'#pragma float_control(precise, off)\' is illegal when fenv_access is enabled"}}, |
| [i]="in initialization of temporary of type A created to list-initialize this reference", | | [i]={{nil,t,"\'#pragma float_control(precise, off)\' is illegal when fenv_access is enabled"}}, |
| [c]=g, | | [h]=k, |
| [e]="in initialization of temporary of type (.*?) created to list\\-initialize this reference", | | [c]="\'\\#pragma float_control\\(precise, off\\)\' is illegal when fenv_access is enabled", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,m}}, |
| [j]={"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"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{ab,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;"}}, | | [d]={{J,572,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n case PFC_NoPrecise:\n if (CurFPFeatures.getExceptionMode() == LangOptions::FPE_Strict)\n // ...\n else if (CurFPFeatures.getAllowFEnvAccess())\n Diag(Loc, diag::err_pragma_fc_noprecise_requires_nofenv);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_include_header_or_declare"]={ | | ["err_pragma_fc_pp_scope"]={ |
| [b]="note_include_header_or_declare", | | [b]={{nil,t,"err_pragma_fc_pp_scope"}}, |
| [h]="include the header <%0> or explicitly provide a declaration for \'%1\'", | | [j]={{nil,F,"\'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification"},{U,t,"\'#pragma float_control push/pop\' can only appear at file scope or namespace scope"}}, |
| [i]="include the header <A> or explicitly provide a declaration for \'B\'", | | [i]={{nil,F,"\'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification"},{U,t,"\'#pragma float_control push/pop\' can only appear at file scope or namespace scope"}}, |
| [c]=g, | | [h]=k, |
| [e]="include the header \\<(.*?)\\> or explicitly provide a declaration for \'(.*?)\'", | | [c]="\'\\#pragma float_control push\\/pop\' can only appear at file or namespace scope or within a language linkage specification", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,m}}, |
| [j]={"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"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{V,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;"},{C,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);"}}, | | [d]={{J,558,"void Sema::ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value) {\n // ...\n if ((Action == PSK_Push_Set || Action == PSK_Push || Action == PSK_Pop) && !CurContext->getRedeclContext()->isFileContext()) {\n // ...\n Diag(Loc, diag::err_pragma_fc_pp_scope);"}}, |
| [l]={ | | [l]={ |
| ["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/Parser/fp-floatcontrol-syntax.cpp"]={"clang/test/Parser/fp-floatcontrol-syntax.cpp:33:9: error: \'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification","clang/test/Parser/fp-floatcontrol-syntax.cpp:34:9: error: \'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification","clang/test/Parser/fp-floatcontrol-syntax.cpp:35:9: error: \'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification","clang/test/Parser/fp-floatcontrol-syntax.cpp:36:9: error: \'#pragma float_control push/pop\' can only appear at file or namespace scope or within a language linkage specification"} |
| } | | } |
| }, | | }, |
| ["note_incompatible_analyzer_plugin_api"]={ | | ["err_pragma_fenv_requires_precise"]={ |
| [b]="note_incompatible_analyzer_plugin_api", | | [b]={{nil,t,"err_pragma_fenv_requires_precise"}}, |
| [h]="current API version is \'%0\', but plugin was compiled with version \'%1\'", | | [j]={{nil,t,"\'#pragma STDC FENV_ACCESS ON\' is illegal when precise is disabled"}}, |
| [i]="current API version is \'A\', but plugin was compiled with version \'B\'", | | [i]={{nil,t,"\'#pragma STDC FENV_ACCESS ON\' is illegal when precise is disabled"}}, |
| [c]=g, | | [h]=k, |
| [e]="current API version is \'(.*?)\', but plugin was compiled with version \'(.*?)\'", | | [c]="\'\\#pragma STDC FENV_ACCESS ON\' is illegal when precise is disabled", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,t,m}}, |
| [j]={"075d73bcced3",1313556963,"[analyzer] Add a warning for an incompatible plugin version.","[analyzer] Add a warning for an incompatible plugin version.\n\nllvm-svn: 137813"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{"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;"}} | | [d]={{J,1360,"void Sema::ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled) {\n // ...\n if (IsEnabled) {\n // Verify Microsoft restriction:\n // You can\'t enable fenv_access unless precise semantics are enabled.\n // Precise semantics can be enabled either by the float_control\n // pragma, or by using the /fp:precise or /fp:strict compiler options\n if (!isPreciseFPEnabled())\n Diag(Loc, diag::err_pragma_fenv_requires_precise);"}} |
| }, | | }, |
| ["note_incomplete_class_and_qualified_id"]={ | | ["err_pragma_file_or_compound_scope"]={ |
| [b]="note_incomplete_class_and_qualified_id", | | [b]={{nil,t,"err_pragma_file_or_compound_scope"}}, |
| [h]="conformance of forward class %0 to protocol %1 can not be confirmed", | | [j]={{nil,t,"\'#pragma %0\' can only appear at file scope or at the start of a compound statement"}}, |
| [i]="conformance of forward class A to protocol B can not be confirmed", | | [i]={{nil,t,"\'#pragma A\' can only appear at file scope or at the start of a compound statement"}}, |
| [c]=g, | | [h]=k, |
| [e]="conformance of forward class (.*?) to protocol (.*?) can not be confirmed", | | [c]="\'\\#pragma (.*?)\' can only appear at file scope or at the start of a compound statement", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,y}}, |
| [j]={"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"}, | | [g]={"4f1e9a17e9d2",1587997559,"Add support for #pragma float_control","Add support for #pragma float_control\n\nReviewers: rjmccall, erichkeane, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D72841"}, |
| [k]={{A,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;"}}, | | [d]={{rc,422,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fp_contract:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"fp_contract\";"},{rc,429,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fp:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"clang fp\";"},{rc,437,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fenv_access:\n case tok::annot_pragma_fenv_access_ms:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << (Kind == tok::annot_pragma_fenv_access ? \"STDC FENV_ACCESS\" : \"fenv_access\");"},{rc,446,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_fenv_round:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"STDC FENV_ROUND\";"},{rc,453,"#include \"clang/Basic/TransformTypeTraits.def\"\n // ...\n case tok::annot_pragma_float_control:\n // ...\n Diag(Tok, diag::err_pragma_file_or_compound_scope) << \"float_control\";"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:6:14: error: \'#pragma fp_contract\' can only appear at file scope or at the start of a compound statement","clang/test/Parser/pragma-fp-contract.c:31:15: error: \'#pragma clang fp\' can only appear at file scope or at the start of a compound statement"} |
| } | | } |
| }, | | }, |
| ["note_indirect_goto_target"]={ | | ["err_pragma_float_control_malformed"]={ |
| [b]="note_indirect_goto_target", | | [b]={{nil,t,"err_pragma_float_control_malformed"}}, |
| [h]={{nil,p,"possible target of %select{indirect|asm}0 goto statement"},{v,nil,"possible target of indirect goto statement"}}, | | [j]={{nil,t,"pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"}}, |
| [i]={{nil,p,{"possible target of ",{"indirect","asm"}," goto statement"}},{v,nil,"possible target of indirect goto statement"}}, | | [i]={{nil,t,"pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="possible target of (?:indirect|asm) goto statement", | | [c]="pragma float_control is malformed; use \'float_control\\(\\{push\\|pop\\}\\)\' or \'float_control\\(\\{precise\\|except\\}, \\{on\\|off\\} \\[,push\\]\\)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,y}}, |
| [j]={Xb,1273625893,Tb,Lb}, | | [g]={"4f1e9a17e9d2",1587997559,"Add support for #pragma float_control","Add support for #pragma float_control\n\nReviewers: rjmccall, erichkeane, sepavloff\n\nDifferential Revision: https://reviews.llvm.org/D72841"}, |
| [k]={{N,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;"},{N,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;"}}, | | [d]={{v,2919,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2934,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2938,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2948,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2953,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (!Tok.isAnyIdentifier()) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2968,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (PushOnOff == \"on\")\n // ...\n else if (PushOnOff == \"off\") {\n // ...\n } else if (PushOnOff == \"push\") {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2975,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (!Tok.isAnyIdentifier()) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2982,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (ExpectedPush == \"push\") {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"},{v,2988,"/// Handle the \\#pragma float_control extension.\n///\n/// The syntax is:\n/// \\code\n/// #pragma float_control(keyword[, setting] [,push])\n/// \\endcode\n/// Where \'keyword\' and \'setting\' are identifiers.\n// \'keyword\' can be: precise, except, push, pop\n// \'setting\' can be: on, off\n/// The optional arguments \'setting\' and \'push\' are supported only\n/// when the keyword is \'precise\' or \'except\'.\nvoid PragmaFloatControlHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Kind == PFC_Unknown) {\n // ...\n } else if (Kind == PFC_Push || Kind == PFC_Pop) {\n // ...\n } else {\n if (Tok.is(tok::r_paren))\n // ...\n else if (Tok.isNot(tok::comma)) {\n // ...\n } else {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_float_control_malformed);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/strong-in-c-struct.m"]={"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"} | | ["clang/test/Parser/fp-floatcontrol-syntax.cpp"]={"clang/test/Parser/fp-floatcontrol-syntax.cpp:37:39: error: pragma float_control is malformed; use \'float_control({push|pop})\' or \'float_control({precise|except}, {on|off} [,push])\'"} |
| } | | } |
| }, | | }, |
| ["note_indirection_through_null"]={ | | ["err_pragma_fp_invalid_argument"]={ |
| [b]="note_indirection_through_null", | | [b]={{nil,n,"err_pragma_fp_invalid_argument"}}, |
| [h]="consider using __builtin_trap() or qualifying pointer with \'volatile\'", | | [j]={{nil,C,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; expected %select{\'fast\' or \'on\' or \'off\'|\'on\' or \'off\'|\'ignore\', \'maytrap\' or \'strict\'|\'source\', \'double\' or \'extended\'}2"},{F,A,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; expected %select{\'fast\' or \'on\' or \'off\'|\'on\' or \'off\'|\'ignore\', \'maytrap\' or \'strict\'}2"},{Gb,t,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; %select{expected \'fast\' or \'on\' or \'off\'|expected \'on\' or \'off\'}2"},{o,n,"unexpected argument \'%0\' to \'#pragma clang fp %1\'; expected \'on\', \'fast\' or \'off\'"}}, |
| [i]="consider using __builtin_trap() or qualifying pointer with \'volatile\'", | | [i]={{nil,C,{"unexpected argument \'A\' to \'#pragma clang fp B\'; expected ",{"\'fast\' or \'on\' or \'off\'","\'on\' or \'off\'","\'ignore\', \'maytrap\' or \'strict\'","\'source\', \'double\' or \'extended\'"}}},{F,A,{"unexpected argument \'A\' to \'#pragma clang fp B\'; expected ",{"\'fast\' or \'on\' or \'off\'","\'on\' or \'off\'","\'ignore\', \'maytrap\' or \'strict\'"}}},{Gb,t,{"unexpected argument \'A\' to \'#pragma clang fp B\'; ",{"expected \'fast\' or \'on\' or \'off\'","expected \'on\' or \'off\'"}}},{o,n,"unexpected argument \'A\' to \'#pragma clang fp B\'; expected \'on\', \'fast\' or \'off\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="consider using __builtin_trap\\(\\) or qualifying pointer with \'volatile\'", | | [c]="unexpected argument \'(.*?)\' to \'\\#pragma clang fp (.*?)\'; expected (?:\'fast\' or \'on\' or \'off\'|\'on\' or \'off\'|\'ignore\', \'maytrap\' or \'strict\'|\'source\', \'double\' or \'extended\')", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={"60d3264d5fbe",1491340716,"Add #pragma clang fp","Add #pragma clang fp\n\nThis adds the new pragma and the first variant, contract(on/off/fast).\n\nThe pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be\nplaced at the beginning of a compound statement or at file scope.\n\nSimilarly to STDC FP_CONTRACT there is no need to use attributes. First an\nannotate token is inserted with the parsed details of the pragma. Then the\nannotate token is parsed in the proper contexts and the Sema is updated with\nthe corresponding FPOptions using the shared ActOn function with STDC\nFP_CONTRACT.\n\nAfter this the FPOptions from the Sema is propagated into the AST expression\nnodes. There is no change here.\n\nI was going to add a \'default\' option besides \'on/off/fast\' similar to STDC\nFP_CONTRACT but then decided against it. I think that we\'d have to make option\nuppercase then to avoid using \'default\' the keyword. Also because of the\nscoped activation of pragma I am not sure there is really a need a for this.\n\nDifferential Revision: https://reviews.llvm.org/D31276\n\nllvm-svn: 299470"}, |
| [k]={{A,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));"}}, | | [d]={{v,3248,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n // Don\'t diagnose if we have an eval_metod pragma with \"double\" kind.\n if (Tok.isNot(tok::identifier) && !isEvalMethodDouble) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << static_cast<int>(*FlagKind);"},{v,3264,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n if (!AnnotValue->ContractValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"},{v,3276,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Reassociate) {\n // ...\n if (!AnnotValue->ReassociateValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"},{v,3289,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Reassociate) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Exceptions) {\n // ...\n if (!AnnotValue->ExceptionsValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"},{v,3302,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (FlagKind == TokFPAnnotValue::Contract) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Reassociate) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::Exceptions) {\n // ...\n } else if (FlagKind == TokFPAnnotValue::EvalMethod) {\n // ...\n if (!AnnotValue->EvalMethodValue) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_argument) << PP.getSpelling(Tok) << OptionInfo->getName() << *FlagKind;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/expressions.c"]={"clang/test/Parser/expressions.c:42:18: note: consider using __builtin_trap() or qualifying pointer with \'volatile\'"} | | ["clang/test/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:38:30: error: unexpected argument \'fast\' to \'#pragma clang fp reassociate\'; expected \'on\' or \'off\'"} |
| } | | } |
| }, | | }, |
| ["note_inequality_comparison_to_or_assign"]={ | | ["err_pragma_fp_invalid_option"]={ |
| [b]="note_inequality_comparison_to_or_assign", | | [b]={{nil,n,"err_pragma_fp_invalid_option"}}, |
| [h]="use \'|=\' to turn this inequality comparison into an or-assignment", | | [j]={{nil,A,"%select{invalid|missing}0 option%select{ %1|}0; expected \'contract\', \'reassociate\' or \'exceptions\'"},{Gb,t,"%select{invalid|missing}0 option%select{ %1|}0; expected \'contract\' or \'reassociate\'"},{o,n,"%select{invalid|missing}0 option%select{ %1|}0; expected contract"}}, |
| [i]="use \'|=\' to turn this inequality comparison into an or-assignment", | | [i]={{nil,A,{{ob,zb},Lb,{vb,a},"; expected \'contract\', \'reassociate\' or \'exceptions\'"}},{Gb,t,{{ob,zb},Lb,{vb,a},"; expected \'contract\' or \'reassociate\'"}},{o,n,{{ob,zb},Lb,{vb,a},"; expected contract"}}}, |
| [c]=g, | | [h]=k, |
| [e]="use \'\\|\\=\' to turn this inequality comparison into an or\\-assignment", | | [c]="(?:invalid|missing) option(?: (.*?)|); expected \'contract\', \'reassociate\' or \'exceptions\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,y}}, |
| [j]={"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"}, | | [g]={"60d3264d5fbe",1491340716,"Add #pragma clang fp","Add #pragma clang fp\n\nThis adds the new pragma and the first variant, contract(on/off/fast).\n\nThe pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be\nplaced at the beginning of a compound statement or at file scope.\n\nSimilarly to STDC FP_CONTRACT there is no need to use attributes. First an\nannotate token is inserted with the parsed details of the pragma. Then the\nannotate token is parsed in the proper contexts and the Sema is updated with\nthe corresponding FPOptions using the shared ActOn function with STDC\nFP_CONTRACT.\n\nAfter this the FPOptions from the Sema is propagated into the AST expression\nnodes. There is no change here.\n\nI was going to add a \'default\' option besides \'on/off/fast\' similar to STDC\nFP_CONTRACT but then decided against it. I think that we\'d have to make option\nuppercase then to avoid using \'default\' the keyword. Also because of the\nscoped activation of pragma I am not sure there is really a need a for this.\n\nDifferential Revision: https://reviews.llvm.org/D31276\n\nllvm-svn: 299470"}, |
| [k]={{X,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, \"|=\");"}}, | | [d]={{v,3213,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_option) << /*MissingOption=*/true << \"\";"},{v,3231,"void PragmaFPHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!FlagKind) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_fp_invalid_option) << /*MissingOption=*/false << OptionInfo;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-fp.cpp"]={"clang/test/Parser/pragma-fp.cpp:5:17: error: missing option; expected \'contract\', \'reassociate\' or \'exceptions\'","clang/test/Parser/pragma-fp.cpp:12:18: error: invalid option \'blah\'; expected \'contract\', \'reassociate\' or \'exceptions\'"} |
| } | | } |
| }, | | }, |
| ["note_init_list_at_beginning_of_macro_argument"]={ | | ["err_pragma_invalid_keyword"]={ |
| [b]="note_init_list_at_beginning_of_macro_argument", | | [b]="err_pragma_invalid_keyword", |
| [h]="cannot use initializer list at the beginning of a macro argument", | | [j]="invalid argument; expected \'enable\'%select{|, \'full\'}0%select{|, \'assume_safety\'}1 or \'disable\'", |
| [i]="cannot use initializer list at the beginning of a macro argument", | | [i]={{nil,nil,{"invalid argument; expected \'enable\'",{a,", \'full\'"},{a,", \'assume_safety\'"}," or \'disable\'"}}}, |
| [c]=g, | | [h]=k, |
| [e]="cannot use initializer list at the beginning of a macro argument", | | [c]="invalid argument; expected \'enable\'(?:|, \'full\')(?:|, \'assume_safety\') or \'disable\'", |
| [f]=a, | | [f]=a, |
| [d]=Eb, | | [e]=y, |
| [j]={"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"}, | | [g]={"cab7ca3e2a64",1406753673,"Add a state variable to the loop hint attribute.","Add a state variable to the loop hint attribute.\n\nThis patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler.\n\nReviewed by Aaron Ballman\n\nllvm-svn: 214333"}, |
| [k]={{mc,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);"}}, | | [d]={{v,1415,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n if (!Valid) {\n if (OptionPipelineDisabled) {\n // ...\n } else {\n Diag(Toks[0].getLocation(), diag::err_pragma_invalid_keyword) << /*FullKeyword=*/(OptionUnroll || OptionUnrollAndJam) << /*AssumeSafetyKeyword=*/AssumeSafetyArg;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-loop-safety.cpp"]={"clang/test/Parser/pragma-loop-safety.cpp:18:109: error: invalid argument; expected \'enable\', \'full\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:19:105: error: invalid argument; expected \'enable\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:21:121: error: invalid argument; expected \'enable\', \'assume_safety\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:22:122: error: invalid argument; expected \'enable\', \'assume_safety\' or \'disable\'","clang/test/Parser/pragma-loop-safety.cpp:23:109: error: invalid argument; expected \'enable\', \'full\' or \'disable\'"} |
| } | | } |
| }, | | }, |
| ["note_init_list_narrowing_silence"]={ | | ["err_pragma_loop_compatibility"]={ |
| [b]="note_init_list_narrowing_silence", | | [b]="err_pragma_loop_compatibility", |
| [h]="insert an explicit cast to silence this issue", | | [j]="%select{incompatible|duplicate}0 directives \'%1\' and \'%2\'", |
| [i]="insert an explicit cast to silence this issue", | | [i]={{nil,nil,{{"incompatible","duplicate"}," directives \'B\' and \'C\'"}}}, |
| [c]=g, | | [h]=k, |
| [e]="insert an explicit cast to silence this issue", | | [c]="(?:incompatible|duplicate) directives \'(.*?)\' and \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"b06b15aa28d0",1402058424,"Adding a new #pragma for the vectorize and interleave optimization hints.","Adding a new #pragma for the vectorize and interleave optimization hints.\n\nPatch thanks to Tyler Nowicki!\n\nllvm-svn: 210330"}, |
| [k]={{ab,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()), \")\");"}}, | | [d]={{"clang/lib/Sema/SemaStmtAttr.cpp",431,"static void CheckForIncompatibleAttributes(Sema &S, const SmallVectorImpl<const Attr *> &Attrs) {\n // ...\n for (const auto *I : Attrs) {\n // ...\n if (PrevAttr)\n // ...\n S.Diag(OptionLoc, diag::err_pragma_loop_compatibility) << /*Duplicate=*/true << PrevAttr->getDiagnosticName(Policy) << LH->getDiagnosticName(Policy);"},{"clang/lib/Sema/SemaStmtAttr.cpp",442,"static void CheckForIncompatibleAttributes(Sema &S, const SmallVectorImpl<const Attr *> &Attrs) {\n // ...\n for (const auto *I : Attrs) {\n // ...\n if (CategoryState.StateAttr && CategoryState.NumericAttr && (Category == Unroll || Category == UnrollAndJam || CategoryState.StateAttr->getState() == LoopHintAttr::Disable)) {\n // ...\n S.Diag(OptionLoc, diag::err_pragma_loop_compatibility) << /*Duplicate=*/false << CategoryState.StateAttr->getDiagnosticName(Policy) << CategoryState.NumericAttr->getDiagnosticName(Policy);"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-pipeline.cpp"]={"clang/test/Sema/pragma-pipeline.cpp:27:15: error: incompatible directives \'pipeline(disable)\' and \'pipeline_initiation_interval(4)\'"} |
| } | | } |
| }, | | }, |
| ["note_init_with_default_member_initializer"]={ | | ["err_pragma_loop_invalid_argument_type"]={ |
| [b]="note_init_with_default_member_initializer", | | [b]="err_pragma_loop_invalid_argument_type", |
| [h]="initializing field %0 with default member initializer", | | [j]="invalid argument of type %0; expected an integer type", |
| [i]="initializing field A with default member initializer", | | [i]="invalid argument of type A; expected an integer type", |
| [c]=g, | | [h]=k, |
| [e]="initializing field (.*?) with default member initializer", | | [c]="invalid argument of type (.*?); expected an integer type", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"c724a83e2054",1413146767,"Allow constant expressions in pragma loop hints.","Allow constant expressions in pragma loop hints.\n\nPreviously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1).\n\nReviewed by Richard Smith\n\nllvm-svn: 219589"}, |
| [k]={{ab,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);"}}, | | [d]={{O,3826,"bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) {\n // ...\n if (!QT->isIntegerType() || QT->isBooleanType() || QT->isCharType()) {\n Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_type) << QT;"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-pipeline.cpp"]={"clang/test/Sema/pragma-pipeline.cpp:12:134: error: invalid argument of type \'double\'; expected an integer type"} |
| } | | } |
| }, | | }, |
| ["note_initializer_out_of_order"]={ | | ["err_pragma_loop_invalid_argument_value"]={ |
| [b]={{nil,x,"note_initializer_out_of_order"}}, | | [b]="err_pragma_loop_invalid_argument_value", |
| [h]={{nil,x,"%select{field|base class}0 %1 will be initialized after %select{field|base}2 %3"}}, | | [j]="%select{invalid value \'%0\'; must be positive|value \'%0\' is too large}1", |
| [i]={{nil,x,{{fd,Ub}," B will be initialized after ",{fd,"base"}," D"}}}, | | [i]={{nil,nil,{{"invalid value \'A\'; must be positive","value \'A\' is too large"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:field|base class) (.*?) will be initialized after (?:field|base) (.*?)", | | [c]="(?:invalid value \'(.*?)\'; must be positive|value \'(.*?)\' is too large)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,n}}, | | [e]=m, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={"c724a83e2054",1413146767,"Allow constant expressions in pragma loop hints.","Allow constant expressions in pragma loop hints.\n\nPreviously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1).\n\nReviewed by Richard Smith\n\nllvm-svn: 219589"}, |
| [k]={{r,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);"}}, | | [d]={{O,3838,"bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) {\n // ...\n if (!ValueIsPositive || ValueAPS.getActiveBits() > 31) {\n Diag(E->getExprLoc(), diag::err_pragma_loop_invalid_argument_value) << toString(ValueAPS, 10) << ValueIsPositive;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp"]={"clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp:10:9: note: field \'s2\' will be initialized after field \'s1\'","clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp:12:9: note: field \'s3\' will be initialized after base \'BB1\'","clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp:13:9: note: base class \'BB1\' will be initialized after base \'BB\'"} | | ["clang/test/Sema/pragma-pipeline.cpp"]={"clang/test/Sema/pragma-pipeline.cpp:13:110: error: invalid value \'0\'; must be positive","clang/test/Sema/pragma-pipeline.cpp:14:111: error: invalid value \'-1\'; must be positive"} |
| } | | } |
| }, | | }, |
| ["note_insert_break_fixit"]={ | | ["err_pragma_loop_invalid_option"]={ |
| [b]="note_insert_break_fixit", | | [b]="err_pragma_loop_invalid_option", |
| [h]="insert \'break;\' to avoid fall-through", | | [j]={{nil,o,"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"},{x,u,"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, or distribute"},{"7.1",nil,"%select{invalid|missing}0 option%select{ %1|}0; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, or distribute"}}, |
| [i]="insert \'break;\' to avoid fall-through", | | [i]={{nil,o,{{ob,zb},Lb,{vb,a},"; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"}},{x,u,{{ob,zb},Lb,{vb,a},"; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, or distribute"}},{"7.1",nil,{{ob,zb},Lb,{vb,a},"; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, or distribute"}}}, |
| [c]=g, | | [h]=k, |
| [e]="insert \'break;\' to avoid fall\\-through", | | [c]="(?:invalid|missing) option(?: (.*?)|); expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=y, |
| [j]={"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"}, | | [g]={"b06b15aa28d0",1402058424,"Adding a new #pragma for the vectorize and interleave optimization hints.","Adding a new #pragma for the vectorize and interleave optimization hints.\n\nPatch thanks to Tyler Nowicki!\n\nllvm-svn: 210330"}, |
| [k]={{Zb,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; \");"}},
| | [d]={{v,3515,"/// Handle the \\#pragma clang loop directive.\n/// #pragma clang \'loop\' loop-hints\n///\n/// loop-hints:\n/// loop-hint loop-hints[opt]\n///\n/// loop-hint:\n/// \'vectorize\' \'(\' loop-hint-keyword \')\'\n/// \'interleave\' \'(\' loop-hint-keyword \')\'\n/// \'unroll\' \'(\' unroll-hint-keyword \')\'\n/// \'vectorize_predicate\' \'(\' loop-hint-keyword \')\'\n/// \'vectorize_width\' \'(\' loop-hint-value \')\'\n/// \'interleave_count\' \'(\' loop-hint-value \')\'\n/// \'unroll_count\' \'(\' loop-hint-value \')\'\n/// \'pipeline\' \'(\' disable \')\'\n/// \'pipeline_initiation_interval\' \'(\' loop-hint-value \')\'\n///\n/// loop-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'assume_safety\'\n///\n/// unroll-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'full\'\n///\n/// loop-hint-value:\n/// constant-expression\n///\n/// Specifying vectorize(enable) or vectorize_width(_value_) instructs llvm to\n/// try vectorizing the instructions of the loop it precedes. Specifying\n/// interleave(enable) or interleave_count(_value_) instructs llvm to try\n/// interleaving multiple iterations of the loop it precedes. The width of the\n/// vector instructions is specified by vectorize_width() and the number of\n/// interleaved loop iterations is specified by interleave_count(). Specifying a\n/// value of 1 effectively disables vectorization/interleaving, even if it is\n/// possible and profitable, and 0 is invalid. The loop vectorizer currently\n/// only works on inner loops.\n///\n/// The unroll and unroll_count directives control the concatenation\n/// unroller. Specifying unroll(enable) instructs llvm to unroll the loop\n/// completely if the trip count is known at compile time and unroll partially\n/// if the trip count is not known. Specifying unroll(full) is similar to\n/// unroll(enable) but will unroll the loop only if the trip count is known at\n/// compile time. Specifying unroll(disable) disables unrolling for the\n/// loop. Specifying unroll_count(_value_) instructs llvm to try to unroll the\n/// loop the number of times indicated by the value.\nvoid PragmaLoopHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_loop_invalid_option) << /*MissingOption=*/true << \"\";"},{v,3537,"/// Handle the \\#pragma clang loop directive.\n/// #pragma clang \'loop\' loop-hints\n///\n/// loop-hints:\n/// loop-hint loop-hints[opt]\n///\n/// loop-hint:\n/// \'vectorize\' \'(\' loop-hint-keyword \')\'\n/// \'interleave\' \'(\' loop-hint-keyword \')\'\n/// \'unroll\' \'(\' unroll-hint-keyword \')\'\n/// \'vectorize_predicate\' \'(\' loop-hint-keyword \')\'\n/// \'vectorize_width\' \'(\' loop-hint-value \')\'\n/// \'interleave_count\' \'(\' loop-hint-value \')\'\n/// \'unroll_count\' \'(\' loop-hint-value \')\'\n/// \'pipeline\' \'(\' disable \')\'\n/// \'pipeline_initiation_interval\' \'(\' loop-hint-value \')\'\n///\n/// loop-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'assume_safety\'\n///\n/// unroll-hint-keyword:\n/// \'enable\'\n/// \'disable\'\n/// \'full\'\n///\n/// loop-hint-value:\n/// constant-expression\n///\n/// Specifying vectorize(enable) or vectorize_width(_value_) instructs llvm to\n/// try vectorizing the instructions of the loop it precedes. Specifying\n/// interleave(enable) or interleave_count(_value_) instructs llvm to try\n/// interleaving multiple iterations of the loop it precedes. The width of the\n/// vector instructions is specified by vectorize_width() and the number of\n/// interleaved loop iterations is specified by interleave_count(). Specifying a\n/// value of 1 effectively disables vectorization/interleaving, even if it is\n/// possible and profitable, and 0 is invalid. The loop vectorizer currently\n/// only works on inner loops.\n///\n/// The unroll and unroll_count directives control the concatenation\n/// unroller. Specifying unroll(enable) instructs llvm to unroll the loop\n/// completely if the trip count is known at compile time and unroll partially\n/// if the trip count is not known. Specifying unroll(full) is similar to\n/// unroll(enable) but will unroll the loop only if the trip count is known at\n/// compile time. Specifying unroll(disable) disables unrolling for the\n/// loop. Specifying unroll_count(_value_) instructs llvm to try to unroll the\n/// loop the number of times indicated by the value.\nvoid PragmaLoopHintHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n while (Tok.is(tok::identifier)) {\n // ...\n if (!OptionValid) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_loop_invalid_option) << /*MissingOption=*/false << OptionInfo;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-unroll-and-jam.cpp"]={"clang/test/Parser/pragma-unroll-and-jam.cpp:70:242: error: invalid option \'unroll_and_jam\'; expected vectorize, vectorize_width, interleave, interleave_count, unroll, unroll_count, pipeline, pipeline_initiation_interval, vectorize_predicate, or distribute"} |
| } | | } |
| }, | | }, |
| ["note_insert_fallthrough_fixit"]={ | | ["err_pragma_loop_invalid_vectorize_option"]={ |
| [b]="note_insert_fallthrough_fixit", | | [b]={{nil,A,"err_pragma_loop_invalid_vectorize_option"}}, |
| [h]="insert \'%0;\' to silence this warning", | | [j]={{nil,A,"vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')"}}, |
| [i]="insert \'A;\' to silence this warning", | | [i]={{nil,A,"vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width(\'fixed\' or \'scalable\')"}}, |
| [c]=g, | | [h]=k, |
| [e]="insert \'(.*?);\' to silence this warning", | | [c]="vectorize_width loop hint malformed; use vectorize_width\\(X, fixed\\) or vectorize_width\\(X, scalable\\) where X is an integer, or vectorize_width\\(\'fixed\' or \'scalable\'\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,y}}, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{Zb,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);"}}, | | [d]={{v,1466,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n } else if (OptionInfo && OptionInfo->getName() == \"vectorize_width\") {\n // ...\n // Look for vectorize_width(fixed|scalable)\n if (IsScalableStr == \"scalable\" || IsScalableStr == \"fixed\") {\n // ...\n } else {\n // ...\n if (Tok.is(tok::comma)) {\n // ...\n if (IsScalableStr != \"scalable\" && IsScalableStr != \"fixed\") {\n Diag(Tok.getLocation(), diag::err_pragma_loop_invalid_vectorize_option);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_inst_declaration_hint"]={ | | ["err_pragma_loop_missing_argument"]={ |
| [b]="note_inst_declaration_hint", | | [b]="err_pragma_loop_missing_argument", |
| [h]="add an explicit instantiation declaration to suppress this warning if %q0 is explicitly instantiated in another translation unit", | | [j]="missing argument; expected %select{an integer value|\'enable\'%select{|, \'full\'}1%select{|, \'assume_safety\'}2 or \'disable\'}0", |
| [i]="add an explicit instantiation declaration to suppress this warning if A is explicitly instantiated in another translation unit", | | [i]={{nil,nil,{"missing argument; expected ",{"an integer value",{"\'enable\'",{a,", \'full\'"},{a,", \'assume_safety\'"}," or \'disable\'"}}}}}, |
| [c]=g, | | [h]=k, |
| [e]="add an explicit instantiation declaration to suppress this warning if (.*?) is explicitly instantiated in another translation unit", | | [c]="missing argument; expected (?:an integer value|\'enable\'(?:|, \'full\')(?:|, \'assume_safety\') or \'disable\')", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=y, |
| [j]={"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"}, | | [g]={"f637790102ea",1403202615,"Fix PR20069: bad loop pragma arguments crash FE","Fix PR20069: bad loop pragma arguments crash FE\n\nThis patch fixes a crash when handling malformed arguments to loop pragmas such\nas: \"#pragma clang loop vectorize(()\". Essentially any argument which is not an\nidentifier or constant resulted in a crash. This patch also changes a couple of\nthe error messages which weren\'t quite correct. New behavior with this patch vs\nold behavior:\n\n#pragma clang loop vectorize(1)\nOLD: error: missing keyword; expected \'enable\' or \'disable\'\nNEW: error: invalid argument; expected \'enable\' or \'disable\'\n\n#pragma clang loop vectorize()\nOLD: error: expected \')\'\nNEW: error: missing argument to loop pragma \'vectorize\'\n\n#pragma clang loop vectorize_width(bad)\nOLD: error: missing value; expected a positive integer value\nNEW: error: invalid argument; expected a positive integer value\n\n#pragma clang loop vectorize(bad)\nOLD: invalid keyword \'bad\'; expected \'enable\' or \'disable\'\nNEW: error: invalid argument; expected \'enable\' or \'disable\'\n\nhttp://reviews.llvm.org/D4197\n\nPatch by Mark Heffernan\n\nllvm-svn: 211292"}, |
| [k]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",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;"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",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;"}},
| | [d]={{v,1391,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Verify loop hint has an argument.\n if (Toks[0].is(tok::eof)) {\n // ...\n Diag(Toks[0].getLocation(), diag::err_pragma_loop_missing_argument) << /*StateArgument=*/StateOption << /*FullKeyword=*/(OptionUnroll || OptionUnrollAndJam) << /*AssumeSafetyKeyword=*/AssumeSafetyArg;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-unroll-and-jam.cpp"]={"clang/test/Parser/pragma-unroll-and-jam.cpp:31:94: error: missing argument; expected an integer value"} |
| } | | } |
| }, | | }, |
| ["note_instantiation_contexts_suppressed"]={ | | ["err_pragma_loop_precedes_nonloop"]={ |
| [b]="note_instantiation_contexts_suppressed", | | [b]="err_pragma_loop_precedes_nonloop", |
| [h]="(skipping %0 context%s0 in backtrace; use -ftemplate-backtrace-limit=0 to see all)", | | [j]="expected a for, while, or do-while loop to follow \'%0\'", |
| [i]="(skipping A contextA in backtrace; use -ftemplate-backtrace-limit=0 to see all)", | | [i]="expected a for, while, or do-while loop to follow \'A\'", |
| [c]=g, | | [h]=k, |
| [e]="\\(skipping (.*?) context(.*?) in backtrace; use \\-ftemplate\\-backtrace\\-limit\\=0 to see all\\)", | | [c]="expected a for, while, or do\\-while loop to follow \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"b06b15aa28d0",1402058424,"Adding a new #pragma for the vectorize and interleave optimization hints.","Adding a new #pragma for the vectorize and interleave optimization hints.\n\nPatch thanks to Tyler Nowicki!\n\nllvm-svn: 210330"}, |
| [k]={{W,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);"}}, | | [d]={{"clang/lib/Sema/SemaStmtAttr.cpp",91,"static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const ParsedAttr &A, SourceRange) {\n // ...\n // This could be handled automatically by adding a Subjects definition in\n // Attr.td, but that would make the diagnostic behavior worse in this case\n // because the user spells this attribute as a pragma.\n if (!isa<DoStmt, ForStmt, CXXForRangeStmt, WhileStmt>(St)) {\n // ...\n S.Diag(St->getBeginLoc(), diag::err_pragma_loop_precedes_nonloop) << Pragma;"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-pipeline.cpp"]={"clang/test/Sema/pragma-pipeline.cpp:22:97: error: expected a for, while, or do-while loop to follow \'#pragma clang loop\'","clang/test/Sema/pragma-pipeline.cpp:24:97: error: expected a for, while, or do-while loop to follow \'#pragma clang loop\'"} |
| } | | } |
| }, | | }, |
| ["note_instantiation_required_here"]={ | | ["err_pragma_message_malformed"]={ |
| [b]="note_instantiation_required_here", | | [b]="err_pragma_message_malformed", |
| [h]="%select{implicit|explicit}0 instantiation first required here", | | [j]="pragma %select{message|warning|error}0 requires parenthesized string", |
| [i]={{nil,nil,{{"implicit","explicit"}," instantiation first required here"}}}, | | [i]={{nil,nil,{"pragma ",{"message","warning","error"}," requires parenthesized string"}}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:implicit|explicit) instantiation first required here", | | [c]="pragma (?:message|warning|error) requires parenthesized string", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=p, |
| [j]={"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"}, | | [g]={"30c924b3e874",1277572299,"Implement support for #pragma message, patch by Michael Spencer!","Implement support for #pragma message, patch by Michael Spencer!\n\nllvm-svn: 106950"}, |
| [k]={{G,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);"},{G,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);"},{G,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);"}}, | | [d]={{H,1653,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n default:\n PP.Diag(MessageLoc, diag::err_pragma_message_malformed) << Kind;"},{H,1664,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (ExpectClosingParen) {\n if (Tok.isNot(tok::r_paren)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;"},{H,1671,"/// PragmaMessageHandler - Handle the microsoft and gcc \\#pragma message\n/// extension. The syntax is:\n/// \\code\n/// #pragma message(string)\n/// \\endcode\n/// OR, in GCC mode:\n/// \\code\n/// #pragma message string\n/// \\endcode\n/// string is a string, which is fully macro expanded, and permits string\n/// concatenation, embedded escape characters, etc... See MSDN for more details.\n/// Also handles \\#pragma GCC warning and \\#pragma GCC error which take the same\n/// form as \\#pragma message.\nstruct PragmaMessageHandler : public PragmaHandler {\n // ...\n void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) override {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;"}}, |
| [l]={ | | [l]={ |
| ["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/Lexer/pragma-message.c"]={"clang/test/Lexer/pragma-message.c:30:9: error: pragma message requires parenthesized string","clang/test/Lexer/pragma-message.c:31:90: error: pragma warning requires parenthesized string"} |
| } | | } |
| }, | | }, |
| ["note_invalid_consteval_initializer"]={ | | ["err_pragma_misplaced_in_decl"]={ |
| [b]={{nil,q,"note_invalid_consteval_initializer"}}, | | [b]={{nil,o,"err_pragma_misplaced_in_decl"}}, |
| [h]="in the default initializer of %0", | | [j]={{nil,o,"this pragma cannot appear in %0 declaration"}}, |
| [i]="in the default initializer of A", | | [i]={{nil,o,"this pragma cannot appear in A declaration"}}, |
| [c]=g, | | [h]=k, |
| [e]="in the default initializer of (.*?)", | | [c]="this pragma cannot appear in (.*?) declaration", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,n}}, | | [e]={{nil,o,y}}, |
| [j]={Vb,1625925174,Jb,Kb}, | | [g]={"037861b23092",1564913331,"[Parser] Emit descriptive diagnostic for misplaced pragma","[Parser] Emit descriptive diagnostic for misplaced pragma\n\nIf a class or struct or union declaration contains a pragma that\nis not valid in this context, compiler issues generic error like\n\"expected member name or \';\' after declaration specifiers\". With this\nchange the error tells that this pragma cannot appear in this declaration.\n\nDifferential Revision: https://reviews.llvm.org/D64932\n\nllvm-svn: 367779"}, |
| [k]={{A,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;"},{A,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;"}}, | | [d]={{Kb,4671,"/// ParseStructUnionBody\n/// struct-contents:\n/// struct-declaration-list\n/// [EXT] empty\n/// [GNU] \"struct-declaration-list\" without terminating \';\'\n/// struct-declaration-list:\n/// struct-declaration\n/// struct-declaration-list struct-declaration\n/// [OBC] \'@\' \'defs\' \'(\' class-name \')\'\n///\nvoid Parser::ParseStructUnionBody(SourceLocation RecordLoc, DeclSpec::TST TagType, RecordDecl *TagDecl) {\n // ...\n // While we still have something to read, read the declarations in the struct.\n while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {\n // ...\n if (tok::isPragmaAnnotation(Tok.getKind())) {\n Diag(Tok.getLocation(), diag::err_pragma_misplaced_in_decl) << DeclSpec::getSpecifierName(TagType, Actions.getASTContext().getPrintingPolicy());"},{kc,3421,"Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS, ParsedAttributes &AccessAttrs, DeclSpec::TST TagType, Decl *TagDecl) {\n // ...\n default:\n if (tok::isPragmaAnnotation(Tok.getKind())) {\n Diag(Tok.getLocation(), diag::err_pragma_misplaced_in_decl) << DeclSpec::getSpecifierName(TagType, Actions.getASTContext().getPrintingPolicy());"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-fp-contract.c"]={"clang/test/Parser/pragma-fp-contract.c:16:14: error: this pragma cannot appear in struct declaration","clang/test/Parser/pragma-fp-contract.c:24:14: error: this pragma cannot appear in union declaration"} |
| } | | } |
| }, | | }, |
| ["note_invalid_consteval_initializer_here"]={ | | ["err_pragma_missing_argument"]={ |
| [b]={{nil,q,"note_invalid_consteval_initializer_here"}}, | | [b]="err_pragma_missing_argument", |
| [h]={{nil,q,"initialized here %0"}}, | | [j]="missing argument to \'#pragma %0\'%select{|; expected %2}1", |
| [i]={{nil,q,"initialized here A"}}, | | [i]={{nil,nil,{"missing argument to \'#pragma A\'",{a,"; expected C"}}}}, |
| [c]=g,
| | [h]=k, |
| [e]="initialized here (.*?)",
| | [c]="missing argument to \'\\#pragma (.*?)\'(?:|; expected (.*?))", |
| [f]=a,
| |
| [d]={{nil,q,n}},
| |
| [j]={Vb,1625925174,Jb,Kb}
| |
| },
| |
| ["note_invalid_subexpr_in_const_expr"]={
| |
| [b]="note_invalid_subexpr_in_const_expr",
| |
| [h]="subexpression not valid in a constant expression", | |
| [i]="subexpression not valid in a constant expression",
| |
| [c]=g, | |
| [e]="subexpression not valid in a constant expression",
| |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=y, |
| [j]={"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"}, | | [g]={"bd26f5ea4d9c",1405966114,"Add support for \'#pragma unroll\'.","Add support for \'#pragma unroll\'.\n\nllvm-svn: 213574"}, |
| [k]={{o,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);"},{o,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);"},{o,2752,"static bool EvalAndBitcastToAPInt(EvalInfo &Info, const Expr *E, llvm::APInt &Res) {\n // ...\n Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{o,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); }"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{o,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);"},{M,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);"},{C,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));"},{C,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) {"},{A,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) {"},{xb,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) {"},{G,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) {"}}, | | [d]={{v,3162,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_missing_argument) << \"clang optimize\" << /*Expected=*/true << \"\'on\' or \'off\'\";"},{v,3974,"// Handle \'#pragma clang max_tokens 12345\'.\nvoid PragmaMaxTokensHereHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_missing_argument) << \"clang max_tokens_here\" << /*Expected=*/true << \"integer\";"},{v,4006,"// Handle \'#pragma clang max_tokens_total 12345\'.\nvoid PragmaMaxTokensTotalHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Tok.is(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_missing_argument) << \"clang max_tokens_total\" << /*Expected=*/true << \"integer\";"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:14:114: error: missing argument to \'#pragma clang optimize\'; expected \'on\' or \'off\'"} |
| } | | } |
| }, | | }, |
| ["note_invalid_ucn_name_candidate"]={ | | ["err_pragma_optimize_extra_argument"]={ |
| [b]={{nil,w,"note_invalid_ucn_name_candidate"}}, | | [b]="err_pragma_optimize_extra_argument", |
| [h]={{nil,w,"did you mean %0 (\'%2\' U+%1)?"}}, | | [j]="unexpected extra argument \'%0\' to \'#pragma clang optimize\'", |
| [i]={{nil,w,"did you mean A (\'C\' U+B)?"}}, | | [i]="unexpected extra argument \'A\' to \'#pragma clang optimize\'", |
| [c]=g, | | [h]=k, |
| [e]="did you mean (.*?) \\(\'(.*?)\' U\\+(.*?)\\)\\?", | | [c]="unexpected extra argument \'(.*?)\' to \'\\#pragma clang optimize\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,w,Eb}}, | | [e]=y, |
| [j]={Vb,1625925174,Jb,Kb}, | | [g]={"13a0a38fe087",1400847205,"Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.","Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.\n\nThis patch implements support for selectively disabling optimizations on a\nrange of function definitions through a pragma. The implementation is that\nall function definitions in the range are decorated with attribute\n\'optnone\'.\n\n #pragma clang optimize off\n // All function definitions in here are decorated with \'optnone\'.\n #pragma clang optimize on\n // Compilation resumes as normal.\n\nllvm-svn: 209510"}, |
| [k]={{"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)"}}, | | [d]={{v,3184,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::eod)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_optimize_extra_argument) << PP.getSpelling(Tok);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/drs/dr26xx.cpp"]={"clang/test/CXX/drs/dr26xx.cpp:89:25: note: did you mean OX (\'🐂\' U+1F402)?","clang/test/CXX/drs/dr26xx.cpp:89:25: note: did you mean ANT (\'🐜\' U+1F41C)?","clang/test/CXX/drs/dr26xx.cpp:89:25: note: did you mean ARC (\'⌒\' U+2312)?","clang/test/CXX/drs/dr26xx.cpp:89:25: note: did you mean AXE (\'🪓\' U+1FA93)?","clang/test/CXX/drs/dr26xx.cpp:89:25: note: did you mean BAT (\'🦇\' U+1F987)?"} | | ["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:8:27: error: unexpected extra argument \'top\' to \'#pragma clang optimize\'"} |
| } | | } |
| }, | | }, |
| ["note_invalid_ucn_name_loose_matching"]={ | | ["err_pragma_optimize_invalid_argument"]={ |
| [b]={{nil,w,"note_invalid_ucn_name_loose_matching"}}, | | [b]="err_pragma_optimize_invalid_argument", |
| [h]={{nil,w,"characters names in Unicode escape sequences are sensitive to case and whitespaces"}}, | | [j]="unexpected argument \'%0\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'", |
| [i]={{nil,w,"characters names in Unicode escape sequences are sensitive to case and whitespaces"}}, | | [i]="unexpected argument \'A\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'", |
| [c]=g, | | [h]=k, |
| [e]="characters names in Unicode escape sequences are sensitive to case and whitespaces", | | [c]="unexpected argument \'(.*?)\' to \'\\#pragma clang optimize\'; expected \'on\' or \'off\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,w,Eb}}, | | [e]=y, |
| [j]={Vb,1625925174,Jb,Kb}, | | [g]={"13a0a38fe087",1400847205,"Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.","Implemented support for \"pragma clang optimize on/off\", based on attribute \'optnone\'.\n\nThis patch implements support for selectively disabling optimizations on a\nrange of function definitions through a pragma. The implementation is that\nall function definitions in the range are decorated with attribute\n\'optnone\'.\n\n #pragma clang optimize off\n // All function definitions in here are decorated with \'optnone\'.\n #pragma clang optimize on\n // Compilation resumes as normal.\n\nllvm-svn: 209510"}, |
| [k]={{"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);"}}, | | [d]={{v,3167,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (Tok.isNot(tok::identifier)) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_optimize_invalid_argument) << PP.getSpelling(Tok);"},{v,3177,"// #pragma clang optimize off\n// #pragma clang optimize on\nvoid PragmaOptimizeHandler::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken) {\n // ...\n if (II->isStr(\"on\")) {\n // ...\n } else if (!II->isStr(\"off\")) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_optimize_invalid_argument) << PP.getSpelling(Tok);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Lexer/unicode.c"]={"clang/test/Lexer/unicode.c:45:16: note: characters names in Unicode escape sequences are sensitive to case and whitespaces"} | | ["clang/test/Parser/pragma-optimize-diagnostics.cpp"]={"clang/test/Parser/pragma-optimize-diagnostics.cpp:11:24: error: unexpected argument \'something_wrong\' to \'#pragma clang optimize\'; expected \'on\' or \'off\'"} |
| } | | } |
| }, | | }, |
| ["note_it_delegates_to"]={ | | ["err_pragma_options_align_mac68k_target_unsupported"]={ |
| [b]="note_it_delegates_to", | | [b]="err_pragma_options_align_mac68k_target_unsupported", |
| [h]="it delegates to", | | [j]="mac68k alignment pragma is not supported on this target", |
| [i]="it delegates to", | | [i]="mac68k alignment pragma is not supported on this target", |
| [c]=g, | | [h]=k, |
| [e]="it delegates to", | | [c]="mac68k alignment pragma is not supported on this target", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"bd60652ace14",1274920516,"Sema: Reject \'#pragma options align=mac68k\' everywhere except i386-apple-darwin.","Sema: Reject \'#pragma options align=mac68k\' everywhere except i386-apple-darwin.\n\nllvm-svn: 104789"}, |
| [k]={{r,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);"}}, | | [d]={{J,246,"void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc) {\n // ...\n case POAK_Mac68k:\n // Check if the target supports this.\n if (!this->Context.getTargetInfo().hasAlignMac68kSupport()) {\n Diag(PragmaLoc, diag::err_pragma_options_align_mac68k_target_unsupported);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/cxx0x-delegating-ctors.cpp"]={"clang/test/SemaCXX/cxx0x-delegating-ctors.cpp:29:6: note: it delegates to"} | | ["clang/test/Sema/pragma-align-mac68k-unsupported.c"]={"clang/test/Sema/pragma-align-mac68k-unsupported.c:4:75: error: mac68k alignment pragma is not supported on this target"} |
| } | | } |
| }, | | }, |
| ["note_ivar_decl"]={ | | ["err_pragma_pack_identifer_not_supported"]={ |
| [b]="note_ivar_decl", | | [b]={{nil,A,"err_pragma_pack_identifer_not_supported"}}, |
| [h]="instance variable is declared here", | | [j]={{nil,A,"specifying an identifier within `#pragma pack` is not supported on this target"}}, |
| [i]="instance variable is declared here", | | [i]={{nil,A,"specifying an identifier within `#pragma pack` is not supported on this target"}}, |
| [c]=g, | | [h]=k, |
| [e]="instance variable is declared here", | | [c]="specifying an identifier within `\\#pragma pack` is not supported on this target", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,m}}, |
| [j]={"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"}, | | [g]={Tb,1590001902,Ub,Vb}, |
| [k]={{A,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);"},{qb,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);"},{qb,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);"},{qb,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);"},{qb,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);"}}, | | [d]={{J,328,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n // XL pragma pack does not support identifier syntax.\n if (IsXLPragma && !SlotLabel.empty()) {\n Diag(PragmaLoc, diag::err_pragma_pack_identifer_not_supported);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:5:6: note: instance variable is declared here"} | | ["clang/test/Sema/aix-pragma-pack-and-align.c"]={"clang/test/Sema/aix-pragma-pack-and-align.c:194:9: error: specifying an identifier within `#pragma pack` is not supported on this target"} |
| } | | } |
| }, | | }, |
| ["note_lambda_capture_initializer"]={ | | ["err_pragma_pack_invalid_alignment"]={ |
| [b]={{nil,s,"note_lambda_capture_initializer"}}, | | [b]={{nil,A,"err_pragma_pack_invalid_alignment"}}, |
| [h]={{nil,s,"%select{implicitly |}2captured%select{| by reference}3%select{%select{ due to use|}2 here| via initialization of lambda capture %0}1"}}, | | [j]={{nil,A,"expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'"}}, |
| [i]={{nil,s,{{"implicitly ",a},"captured",{a," by reference"},{{{" due to use",a},Wb}," via initialization of lambda capture A"}}}}, | | [i]={{nil,A,"expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:implicitly |)captured(?:| by reference)(?:(?: due to use|) here| via initialization of lambda capture (.*?))", | | [c]="expected \\#pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]={{nil,A,m}}, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={Tb,1590001902,Ub,Vb}, |
| [k]={{ab,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);"}}, | | [d]={{J,353,"void Sema::ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *alignment) {\n // ...\n if (Alignment) {\n // ...\n if (IsXLPragma && *Val == 0) {\n // ...\n Diag(PragmaLoc, diag::err_pragma_pack_invalid_alignment);"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/aix-pragma-pack-and-align.c"]={"clang/test/Sema/aix-pragma-pack-and-align.c:147:9: error: expected #pragma pack parameter to be \'1\', \'2\', \'4\', \'8\', or \'16\'"} |
| } | | } |
| }, | | }, |
| ["note_lambda_decl"]={ | | ["err_pragma_pipeline_invalid_keyword"]={ |
| [b]="note_lambda_decl", | | [b]={{nil,u,"err_pragma_pipeline_invalid_keyword"}}, |
| [h]="lambda expression begins here", | | [j]={{nil,u,"invalid argument; expected \'disable\'"}}, |
| [i]="lambda expression begins here", | | [i]={{nil,u,"invalid argument; expected \'disable\'"}}, |
| [c]=g, | | [h]=k, |
| [e]="lambda expression begins here", | | [c]="invalid argument; expected \'disable\'", |
| [f]=a, | | [f]=a, |
| [d]="Lambda Issue", | | [e]={{nil,u,y}}, |
| [j]={"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"}, | | [g]={"9bdf515c744f",1546622400,"Add two new pragmas for controlling software pipelining optimizations.","Add two new pragmas for controlling software pipelining optimizations.\n\nThis patch adds #pragma clang loop pipeline and #pragma clang loop pipeline_initiation_interval for debugging or reducing compile time purposes. It is possible to disable SWP for concrete loops to save compilation time or to find bugs by not doing SWP to certain loops. It is possible to set value of initiation interval to concrete number to save compilation time by not doing extra pipeliner passes or to check created schedule for specific initiation interval.\n\nPatch by Alexey Lapshin.\n\nllvm-svn: 350414"}, |
| [k]={{r,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);"},{r,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);"},{A,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);"},{A,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);"}},
| | [d]={{v,1413,"bool Parser::HandlePragmaLoopHint(LoopHint &Hint) {\n // ...\n // Validate the argument.\n if (StateOption) {\n // ...\n if (!Valid) {\n if (OptionPipelineDisabled) {\n Diag(Toks[0].getLocation(), diag::err_pragma_pipeline_invalid_keyword);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/pragma-pipeline.cpp"]={"clang/test/Parser/pragma-pipeline.cpp:20:91: error: invalid argument; expected \'disable\'","clang/test/Parser/pragma-pipeline.cpp:21:91: error: invalid argument; expected \'disable\'"} |
| } | | } |
| }, | | }, |
| ["note_lambda_default_capture_fixit"]={ | | ["err_pragma_pointers_to_members_unknown_kind"]={ |
| [b]={{nil,x,"note_lambda_default_capture_fixit"}}, | | [b]="err_pragma_pointers_to_members_unknown_kind", |
| [h]={{nil,x,"default capture by %select{value|reference}0"}}, | | [j]="unexpected %0, expected to see one of %select{|\'best_case\', \'full_generality\', }1\'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'", |
| [i]={{nil,x,{"default capture by ",{"value",Hb}}}}, | | [i]={{nil,nil,{"unexpected A, expected to see one of ",{a,"\'best_case\', \'full_generality\', "},"\'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'"}}}, |
| [c]=g, | | [h]=k, |
| [e]="default capture by (?:value|reference)", | | [c]="unexpected (.*?), expected to see one of (?:|\'best_case\', \'full_generality\', )\'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,"Lambda Issue"}}, | | [e]=y, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={"4bb0980d9628",1392061815,"MS ABI: Add support for #pragma pointers_to_members","MS ABI: Add support for #pragma pointers_to_members\n\nIntroduce a notion of a \'current representation method\' for\npointers-to-members.\n\nWhen starting out, this is set to \'best case\' (representation method is\nchosen by examining the class, selecting the smallest representation\nthat would work given the class definition or lack thereof).\n\nThis pragma allows the translation unit to dictate exactly what\nrepresentation to use, similar to how the inheritance model keywords\noperate.\n\nN.B. PCH support is forthcoming.\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D2723\n\nllvm-svn: 201105"}, |
| [k]={{A,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);"},{A,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);"}}, | | [d]={{v,2705,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Arg->isStr(\"best_case\")) {\n // ...\n } else {\n if (Arg->isStr(\"full_generality\")) {\n if (Tok.is(tok::comma)) {\n // ...\n if (!Arg) {\n PP.Diag(Tok.getLocation(), diag::err_pragma_pointers_to_members_unknown_kind) << Tok.getKind() << /*OnlyInheritanceModels*/ 0;"},{v,2734,"/// Handle \'#pragma pointers_to_members\'\n// The grammar for this pragma is as follows:\n//\n// <inheritance model> ::= (\'single\' | \'multiple\' | \'virtual\') \'_inheritance\'\n//\n// #pragma pointers_to_members \'(\' \'best_case\' \')\'\n// #pragma pointers_to_members \'(\' \'full_generality\' [\',\' inheritance-model] \')\'\n// #pragma pointers_to_members \'(\' inheritance-model \')\'\nvoid PragmaMSPointersToMembers::HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer, Token &Tok) {\n // ...\n if (Arg->isStr(\"best_case\")) {\n // ...\n } else {\n // ...\n if (Arg) {\n if (Arg->isStr(\"single_inheritance\")) {\n // ...\n } else if (Arg->isStr(\"multiple_inheritance\")) {\n // ...\n } else if (Arg->isStr(\"virtual_inheritance\")) {\n // ...\n } else {\n PP.Diag(Tok.getLocation(), diag::err_pragma_pointers_to_members_unknown_kind) << Arg << /*HasPointerDeclaration*/ 1;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/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/member-pointer-ms.cpp"]={"clang/test/SemaCXX/member-pointer-ms.cpp:292:35: error: unexpected \'single\', expected to see one of \'best_case\', \'full_generality\', \'single_inheritance\', \'multiple_inheritance\', or \'virtual_inheritance\'"} |
| } | | } |
| }, | | }, |
| ["note_lambda_substitution_here"]={ | | ["err_pragma_pop_visibility_mismatch"]={ |
| [b]="note_lambda_substitution_here", | | [b]="err_pragma_pop_visibility_mismatch", |
| [h]="while substituting into a lambda expression here", | | [j]="#pragma visibility pop with no matching #pragma visibility push", |
| [i]="while substituting into a lambda expression here", | | [i]="#pragma visibility pop with no matching #pragma visibility push", |
| [c]=g, | | [h]=k, |
| [e]="while substituting into a lambda expression here", | | [c]="\\#pragma visibility pop with no matching \\#pragma visibility push", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={Vb,1625925174,Jb,Kb}, | | [g]={"6d65d7b63d1c",1328138699,"Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".","Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559"}, |
| [k]={{W,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);"}}, | | [d]={{J,1370,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n if (!VisContext) {\n Diag(EndLoc, diag::err_pragma_pop_visibility_mismatch);"},{J,1381,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n // ...\n } else if (!StartsWithPragma && !IsNamespaceEnd) {\n Diag(EndLoc, diag::err_pragma_pop_visibility_mismatch);"}}, |
| [l]={ | | [l]={ |
| ["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/pragma-visibility.cpp"]={"clang/test/SemaCXX/pragma-visibility.cpp:4:13: error: #pragma visibility pop with no matching #pragma visibility push","clang/test/SemaCXX/pragma-visibility.cpp:12:13: error: #pragma visibility pop with no matching #pragma visibility push"} |
| } | | } |
| }, | | }, |
| ["note_lambda_this_capture_fixit"]={ | | ["err_pragma_push_pop_macro_malformed"]={ |
| [b]={{nil,x,"note_lambda_this_capture_fixit"}}, | | [b]="err_pragma_push_pop_macro_malformed", |
| [h]={{nil,x,"explicitly capture \'this\'"}}, | | [j]="pragma %0 requires a parenthesized string", |
| [i]={{nil,x,"explicitly capture \'this\'"}}, | | [i]="pragma A requires a parenthesized string", |
| [c]=g, | | [h]=k, |
| [e]="explicitly capture \'this\'", | | [c]="pragma (.*?) requires a parenthesized string", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,"Lambda Issue"}}, | | [e]=p, |
| [j]={Mb,1590001902,Sb,Rb}, | | [g]={"c0a585d63c6c",1282060545,"Implement #pragma push_macro, patch by Francois Pichet!","Implement #pragma push_macro, patch by Francois Pichet!\n\nllvm-svn: 111234"}, |
| [k]={{hb,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\");"}}, | | [d]={{H,580,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::l_paren)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"},{H,588,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::string_literal)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"},{H,604,"/// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.\n/// Return the IdentifierInfo* associated with the macro to push or pop.\nIdentifierInfo *Preprocessor::ParsePragmaPushOrPopMacro(Token &Tok) {\n // ...\n if (Tok.isNot(tok::r_paren)) {\n Diag(PragmaTok.getLocation(), diag::err_pragma_push_pop_macro_malformed) << getSpelling(PragmaTok);"}} |
| [l]={
| |
| ["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\'"}
| |
| }
| |
| }, | | }, |
| ["note_lambda_to_block_conv"]={ | | ["err_pragma_push_visibility_mismatch"]={ |
| [b]="note_lambda_to_block_conv", | | [b]="err_pragma_push_visibility_mismatch", |
| [h]="implicit capture of lambda object due to conversion to block pointer here", | | [j]="#pragma visibility push with no matching #pragma visibility pop", |
| [i]="implicit capture of lambda object due to conversion to block pointer here", | | [i]="#pragma visibility push with no matching #pragma visibility pop", |
| [c]=g, | | [h]=k, |
| [e]="implicit capture of lambda object due to conversion to block pointer here", | | [c]="\\#pragma visibility push with no matching \\#pragma visibility pop", |
| [f]=a, | | [f]=a, |
| [d]="Lambda Issue", | | [e]=m, |
| [j]={"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"}, | | [g]={"6d65d7b63d1c",1328138699,"Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".","Reject mismatched \"#pragma GCC visibility push\" and \"#pragma GCC visibility pop\".\n\nllvm-svn: 149559"}, |
| [k]={{r,15692,"void Sema::DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLocation, CXXConversionDecl *Conv) {\n // ...\n if (BuildBlock.isInvalid()) {\n Diag(CurrentLocation, diag::note_lambda_to_block_conv);"},{r,15701,"void Sema::DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLocation, CXXConversionDecl *Conv) {\n // ...\n if (Return.isInvalid()) {\n Diag(CurrentLocation, diag::note_lambda_to_block_conv);"},{hb,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);"}}
| | [d]={{J,1371,"void Sema::PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc) {\n // ...\n if (StartsWithPragma && IsNamespaceEnd) {\n Diag(Back->second, diag::err_pragma_push_visibility_mismatch);"}}, |
| },
| |
| ["note_lambda_variable_capture_fixit"]={
| |
| [b]={{nil,x,"note_lambda_variable_capture_fixit"}},
| |
| [h]={{nil,x,"capture %0 by %select{value|reference}1"}},
| |
| [i]={{nil,x,{"capture A by ",{"value",Hb}}}},
| |
| [c]=g,
| |
| [e]="capture (.*?) by (?:value|reference)",
| |
| [f]=a,
| |
| [d]={{nil,x,"Lambda Issue"}}, | |
| [j]={Mb,1590001902,Sb,Rb},
| |
| [k]={{A,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);"},{A,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);"}},
| |
| [l]={ | | [l]={ |
| ["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/pragma-visibility.cpp"]={"clang/test/SemaCXX/pragma-visibility.cpp:9:13: error: #pragma visibility push with no matching #pragma visibility pop"} |
| } | | } |
| }, | | }, |
| ["note_lifetime_extending_member_declared_here"]={ | | ["err_pragma_section_invalid_for_target"]={ |
| [b]="note_lifetime_extending_member_declared_here", | | [b]={{nil,U,"err_pragma_section_invalid_for_target"}}, |
| [h]={{nil,u,"%select{%select{reference|\'std::initializer_list\'}0 member|member with %select{reference|\'std::initializer_list\'}0 subobject}1 declared here"}}, | | [j]={{nil,U,"argument to #pragma section is not valid for this target: %0"}}, |
| [i]={{nil,u,{{{{Hb,"\'std::initializer_list\'"}," member"},{"member with ",{Hb,"\'std::initializer_list\'"}," subobject"}}," declared here"}}}, | | [i]={{nil,U,"argument to #pragma section is not valid for this target: A"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:(?:reference|\'std\\:\\:initializer_list\') member|member with (?:reference|\'std\\:\\:initializer_list\') subobject) declared here", | | [c]="argument to \\#pragma section is not valid for this target\\: (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]={{nil,U,m}}, |
| [j]={"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"}, | | [g]={Tb,1590001902,Ub,Vb}, |
| [k]={{ab,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;"}}, | | [d]={{J,309,"void Sema::ActOnPragmaClangSection(SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName) {\n // ...\n if (llvm::Error E = isValidSectionSpecifier(SecName)) {\n Diag(PragmaLoc, diag::err_pragma_section_invalid_for_target) << toString(std::move(E));"}}, |
| [l]={ | | [l]={ |
| ["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/Sema/pragma-clang-section-macho.c"]={"clang/test/Sema/pragma-clang-section-macho.c:5:54: error: argument to #pragma section is not valid for this target: mach-o section specifier requires a segment and section separated by a comma","clang/test/Sema/pragma-clang-section-macho.c:6:54: error: argument to #pragma section is not valid for this target: mach-o section specifier requires a section whose length is between 1 and 16 characters"} |
| } | | } |
| }, | | }, |
| ["note_local_decl_close_match"]={ | | ["err_preserve_enum_value_invalid"]={ |
| [b]="note_local_decl_close_match", | | [b]={{nil,A,"err_preserve_enum_value_invalid"}}, |
| [h]="local declaration nearly matches", | | [j]={{nil,A,"__builtin_preserve_enum_value argument %0 invalid"}}, |
| [i]="local declaration nearly matches", | | [i]={{nil,A,"__builtin_preserve_enum_value argument A invalid"}}, |
| [c]=g, | | [h]=k, |
| [e]="local declaration nearly matches", | | [c]="__builtin_preserve_enum_value argument (.*?) invalid", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,a}}, |
| [j]={"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"}, | | [g]={Ab,1582847864,Bb,Db}, |
| [k]={{C,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);"}}, | | [d]={{I,3540,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == BPF::BI__builtin_preserve_field_info) {\n // ...\n } else if (BuiltinID == BPF::BI__builtin_preserve_type_info) {\n // ...\n } else if (BuiltinID == BPF::BI__builtin_preserve_enum_value) {\n if (!isValidBPFPreserveEnumValueArg(Arg)) {\n // ...\n kind = diag::err_preserve_enum_value_invalid;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:95:40: error: __builtin_preserve_enum_value argument 1 invalid","clang/test/Sema/builtins-bpf.c:99:40: error: __builtin_preserve_enum_value argument 1 invalid"} |
| } | | } |
| }, | | }, |
| ["note_local_decl_close_param_match"]={ | | ["err_preserve_enum_value_not_const"]={ |
| [b]="note_local_decl_close_param_match", | | [b]={{nil,A,"err_preserve_enum_value_not_const"}}, |
| [h]="type of %ordinal0 parameter of local declaration does not match definition%diff{ ($ vs $)|}1,2", | | [j]={{nil,A,"__builtin_preserve_enum_value argument %0 not a constant"}}, |
| [i]={{nil,nil,{"type of A parameter of local declaration does not match definition",{" (B vs C)",a}}}}, | | [i]={{nil,A,"__builtin_preserve_enum_value argument A not a constant"}}, |
| [c]=g, | | [h]=k, |
| [e]="type of (.*?) parameter of local declaration does not match definition(?: \\((.*?) vs (.*?)\\)|)", | | [c]="__builtin_preserve_enum_value argument (.*?) not a constant", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,a}}, |
| [j]={"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"}, | | [g]={Ab,1582847864,Bb,Db}, |
| [k]={{C,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();"}} | | [d]={{I,3518,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n // ...\n else if (BuiltinID == BPF::BI__builtin_btf_type_id)\n // ...\n else if (BuiltinID == BPF::BI__builtin_preserve_type_info)\n // ...\n else\n kind = diag::err_preserve_enum_value_not_const;"}} |
| }, | | }, |
| ["note_local_var_initializer"]={ | | ["err_preserve_field_info_not_const"]={ |
| [b]={{nil,u,"note_local_var_initializer"}}, | | [b]={{nil,o,"err_preserve_field_info_not_const"}}, |
| [h]={{nil,u,"%select{via initialization of|binding reference}0 variable %select{%2 |}1here"}}, | | [j]={{nil,o,"__builtin_preserve_field_info argument %0 not a constant"}}, |
| [i]={{nil,u,{{"via initialization of","binding reference"}," variable ",{"C ",a},"here"}}}, | | [i]={{nil,o,"__builtin_preserve_field_info argument A not a constant"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:via initialization of|binding reference) variable (?:(.*?) |)here", | | [c]="__builtin_preserve_field_info argument (.*?) not a constant", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]={{nil,o,a}}, |
| [j]={"afe48f9d68e4",1532380882,"Fold -Wreturn-stack-address into general initialization lifetime","Fold -Wreturn-stack-address into general initialization lifetime\nchecking.\n\nllvm-svn: 337743"}, | | [g]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, |
| [k]={{ab,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);"}}, | | [d]={{I,3512,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n kind = diag::err_preserve_field_info_not_const;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Analysis/stack-block-returned.cpp"]={"clang/test/Analysis/stack-block-returned.cpp:7:15: note: binding reference variable \'qq\' here"} | | ["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:64:48: error: __builtin_preserve_field_info argument 2 not a constant","clang/test/Sema/builtins-bpf.c:68:48: error: __builtin_preserve_field_info argument 2 not a constant"} |
| } | | } |
| }, | | }, |
| ["note_lock_exclusive_and_shared"]={ | | ["err_preserve_field_info_not_field"]={ |
| [b]="note_lock_exclusive_and_shared", | | [b]={{nil,o,"err_preserve_field_info_not_field"}}, |
| [h]="the other acquisition of %0 \'%1\' is here", | | [j]={{nil,o,"__builtin_preserve_field_info argument %0 not a field access"}}, |
| [i]="the other acquisition of A \'B\' is here", | | [i]={{nil,o,"__builtin_preserve_field_info argument A not a field access"}}, |
| [c]=g, | | [h]=k, |
| [e]="the other acquisition of (.*?) \'(.*?)\' is here", | | [c]="__builtin_preserve_field_info argument (.*?) not a field access", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,a}}, |
| [j]={"46b057681a7f",1315505978,"Thread safety: shared vs. exclusive locks","Thread safety: shared vs. exclusive locks\n\nllvm-svn: 139307"}, | | [g]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, |
| [k]={{Zb,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);"}}, | | [d]={{I,3530,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == BPF::BI__builtin_preserve_field_info) {\n if (!isValidBPFPreserveFieldInfoArg(Arg)) {\n // ...\n kind = diag::err_preserve_field_info_not_field;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:28:40: error: __builtin_preserve_field_info argument 1 not a field access","clang/test/Sema/builtins-bpf.c:32:40: error: __builtin_preserve_field_info argument 1 not a field access"} |
| } | | } |
| }, | | }, |
| ["note_locked_here"]={ | | ["err_preserve_type_info_invalid"]={ |
| [b]="note_locked_here", | | [b]={{nil,A,"err_preserve_type_info_invalid"}}, |
| [h]="%0 acquired here", | | [j]={{nil,A,"__builtin_preserve_type_info argument %0 invalid"}}, |
| [i]="A acquired here", | | [i]={{nil,A,"__builtin_preserve_type_info argument A invalid"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) acquired here", | | [c]="__builtin_preserve_type_info argument (.*?) invalid", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,a}}, |
| [j]={"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"}, | | [g]={Ab,1582847864,Bb,Db}, |
| [k]={{Zb,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(); }"}}, | | [d]={{I,3535,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (BuiltinID == BPF::BI__builtin_preserve_field_info) {\n // ...\n } else if (BuiltinID == BPF::BI__builtin_preserve_type_info) {\n if (!isValidBPFPreserveTypeInfoArg(Arg)) {\n // ...\n kind = diag::err_preserve_type_info_invalid;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjCXX/warn-thread-safety-analysis.mm"]={"clang/test/SemaObjCXX/warn-thread-safety-analysis.mm:24:9: note: mutex acquired here"} | | ["clang/test/Sema/builtins-bpf.c"]={"clang/test/Sema/builtins-bpf.c:103:39: error: __builtin_preserve_type_info argument 1 invalid"} |
| } | | } |
| }, | | }, |
| ["note_logical_instead_of_bitwise_change_operator"]={ | | ["err_preserve_type_info_not_const"]={ |
| [b]="note_logical_instead_of_bitwise_change_operator", | | [b]={{nil,A,"err_preserve_type_info_not_const"}}, |
| [h]="use \'%0\' for a bitwise operation", | | [j]={{nil,A,"__builtin_preserve_type_info argument %0 not a constant"}}, |
| [i]="use \'A\' for a bitwise operation", | | [i]={{nil,A,"__builtin_preserve_type_info argument A not a constant"}}, |
| [c]=g, | | [h]=k, |
| [e]="use \'(.*?)\' for a bitwise operation", | | [c]="__builtin_preserve_type_info argument (.*?) not a constant", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,A,a}}, |
| [j]={"0a0ba9d883f5",1313430606,"Add fixit notes for -Wconstant-logical-operand.","Add fixit notes for -Wconstant-logical-operand.\n\nllvm-svn: 137620"}, | | [g]={Ab,1582847864,Bb,Db}, |
| [k]={{A,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 ? \"&\" : \"|\");"}}, | | [d]={{I,3516,"bool Sema::CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n if (!Value) {\n if (BuiltinID == BPF::BI__builtin_preserve_field_info)\n // ...\n else if (BuiltinID == BPF::BI__builtin_btf_type_id)\n // ...\n else if (BuiltinID == BPF::BI__builtin_preserve_type_info)\n kind = diag::err_preserve_type_info_not_const;"}} |
| [l]={
| |
| ["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:78:47: note: use \'&\' for a bitwise operation"}
| |
| }
| |
| }, | | }, |
| ["note_logical_instead_of_bitwise_remove_constant"]={ | | ["err_private_ivar_access"]={ |
| [b]="note_logical_instead_of_bitwise_remove_constant", | | [b]="err_private_ivar_access", |
| [h]="remove constant to silence this warning", | | [j]="instance variable %0 is private", |
| [i]="remove constant to silence this warning", | | [i]="instance variable A is private", |
| [c]=g, | | [h]=k, |
| [e]="remove constant to silence this warning", | | [c]="instance variable (.*?) is private", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"0a0ba9d883f5",1313430606,"Add fixit notes for -Wconstant-logical-operand.","Add fixit notes for -Wconstant-logical-operand.\n\nllvm-svn: 137620"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{A,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()));"}}, | | [d]={{O,2971,"/// The parser has read a name in, and Sema has detected that we\'re currently\n/// inside an ObjC method. Perform some additional checks and determine if we\n/// should form a reference to an ivar.\n///\n/// Ideally, most of this would be done by lookup, but there\'s\n/// actually quite a lot of extra work involved.\nDeclResult Sema::LookupIvarInObjCMethod(LookupResult &Lookup, Scope *S, IdentifierInfo *II) {\n // ...\n if (LookForIvars) {\n // ...\n if (IFace && (IV = IFace->lookupInstanceVariable(II, ClassDeclared))) {\n // ...\n // Diagnose the use of an ivar outside of the declaring class.\n if (IV->getAccessControl() == ObjCIvarDecl::Private && !declaresSameEntity(ClassDeclared, IFace) && !getLangOpts().DebuggerSupport)\n Diag(Loc, diag::err_private_ivar_access) << IV->getDeclName();"},{cb,1445,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (IV->getAccessControl() != ObjCIvarDecl::Public && IV->getAccessControl() != ObjCIvarDecl::Package) {\n // ...\n if (!S.getLangOpts().DebuggerSupport) {\n if (IV->getAccessControl() == ObjCIvarDecl::Private) {\n if (!declaresSameEntity(ClassDeclared, IDecl) || !declaresSameEntity(ClassOfMethodDecl, ClassDeclared))\n S.Diag(MemberLoc, diag::err_private_ivar_access) << IV->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/cxx2a-concept-declaration.cpp"]={"clang/test/Parser/cxx2a-concept-declaration.cpp:78:47: note: remove constant to silence this warning"} | | ["clang/test/SemaObjC/synthesized-ivar.m"]={"clang/test/SemaObjC/synthesized-ivar.m:16:26: error: instance variable \'IP\' is private","clang/test/SemaObjC/synthesized-ivar.m:48:4: error: instance variable \'_PROP_INMAIN\' is private","clang/test/SemaObjC/synthesized-ivar.m:49:4: error: instance variable \'_PROP_INCLASSEXT\' is private","clang/test/SemaObjC/synthesized-ivar.m:50:11: error: instance variable \'private_ivar\' is private"} |
| } | | } |
| }, | | }, |
| ["note_logical_not_fix"]={ | | ["err_private_module_fragment_expected_semi"]={ |
| [b]="note_logical_not_fix", | | [b]={{nil,x,"err_private_module_fragment_expected_semi"}}, |
| [h]="add parentheses after the \'!\' to evaluate the %select{comparison|bitwise operator}0 first", | | [j]={{nil,x,"expected \';\' after private module fragment declaration"}}, |
| [i]={{nil,nil,{"add parentheses after the \'!\' to evaluate the ",{"comparison","bitwise operator"}," first"}}}, | | [i]={{nil,x,"expected \';\' after private module fragment declaration"}}, |
| [c]=g, | | [h]=k, |
| [e]="add parentheses after the \'\\!\' to evaluate the (?:comparison|bitwise operator) first", | | [c]="expected \';\' after private module fragment declaration", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,x,fc}}, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{A,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, \")\");"}}, | | [d]={{"clang/lib/Parse/Parser.cpp",2438,"/// Parse a declaration beginning with the \'module\' keyword or C++20\n/// context-sensitive keyword (optionally preceded by \'export\').\n///\n/// module-declaration: [C++20]\n/// \'export\'[opt] \'module\' module-name attribute-specifier-seq[opt] \';\'\n///\n/// global-module-fragment: [C++2a]\n/// \'module\' \';\' top-level-declaration-seq[opt]\n/// module-declaration: [C++2a]\n/// \'export\'[opt] \'module\' module-name module-partition[opt]\n/// attribute-specifier-seq[opt] \';\'\n/// private-module-fragment: [C++2a]\n/// \'module\' \':\' \'private\' \';\' top-level-declaration-seq[opt]\nParser::DeclGroupPtrTy Parser::ParseModuleDecl(Sema::ModuleImportState &ImportState) {\n // ...\n // Parse a private-module-fragment, if present.\n if (getLangOpts().CPlusPlusModules && Tok.is(tok::colon) && NextToken().is(tok::kw_private)) {\n // ...\n ExpectAndConsumeSemi(diag::err_private_module_fragment_expected_semi);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_logical_not_silence_with_parens"]={ | | ["err_private_module_fragment_not_module"]={ |
| [b]="note_logical_not_silence_with_parens", | | [b]={{nil,x,"err_private_module_fragment_not_module"}}, |
| [h]="add parentheses around left hand side expression to silence this warning", | | [j]={{nil,x,"private module fragment declaration with no preceding module declaration"}}, |
| [i]="add parentheses around left hand side expression to silence this warning", | | [i]={{nil,x,"private module fragment declaration with no preceding module declaration"}}, |
| [c]=g, | | [h]=k, |
| [e]="add parentheses around left hand side expression to silence this warning", | | [c]="private module fragment declaration with no preceding module declaration", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,x,fc}}, |
| [j]={"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"}, | | [g]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, |
| [k]={{A,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, \")\");"}}, | | [d]={{"clang/lib/Sema/SemaModule.cpp",437,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleMapModule:\n case Module::ExplicitGlobalModuleFragment:\n case Module::ImplicitGlobalModuleFragment:\n case Module::ModulePartitionImplementation:\n case Module::ModulePartitionInterface:\n case Module::ModuleHeaderUnit:\n Diag(PrivateLoc, diag::err_private_module_fragment_not_module);"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/basic/basic.link/p1.cpp"]={"clang/test/CXX/basic/basic.link/p1.cpp:43:9: error: private module fragment declaration with no preceding module declaration"} |
| } | | } |
| }, | | }, |
| ["note_loop_iteration_here"]={ | | ["err_private_module_fragment_not_module_interface"]={ |
| [b]="note_loop_iteration_here", | | [b]={{nil,x,"err_private_module_fragment_not_module_interface"}}, |
| [h]="%select{decremented|incremented}0 here", | | [j]={{nil,x,"private module fragment in module implementation unit"}}, |
| [i]={{nil,nil,{{"decremented","incremented"},Wb}}}, | | [i]={{nil,x,"private module fragment in module implementation unit"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:decremented|incremented) here", | | [c]="private module fragment in module implementation unit", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,x,fc}}, |
| [j]={"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"}, | | [g]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, |
| [k]={{X,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;"}}, | | [d]={{"clang/lib/Sema/SemaModule.cpp",446,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::ModuleImplementationUnit:\n Diag(PrivateLoc, diag::err_private_module_fragment_not_module_interface);"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/basic/basic.link/p2.cpp"]={"clang/test/CXX/basic/basic.link/p2.cpp:16:9: error: private module fragment in module implementation unit"} |
| } | | } |
| }, | | }, |
| ["note_macro_expansion_here"]={ | | ["err_private_module_fragment_redefined"]={ |
| [b]={{nil,p,"note_macro_expansion_here"}}, | | [b]={{nil,x,"err_private_module_fragment_redefined"}}, |
| [h]={{nil,p,"expansion of macro %0 requested here"}}, | | [j]={{nil,x,"private module fragment redefined"}}, |
| [i]={{nil,p,"expansion of macro A requested here"}}, | | [i]={{nil,x,"private module fragment redefined"}}, |
| [c]=g, | | [h]=k, |
| [e]="expansion of macro (.*?) requested here", | | [c]="private module fragment redefined", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,Eb}}, | | [e]={{nil,x,fc}}, |
| [j]={"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"}, | | [g]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, |
| [k]={{"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();"}}, | | [d]={{"clang/lib/Sema/SemaModule.cpp",441,"Sema::DeclGroupPtrTy Sema::ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc) {\n // ...\n case Module::PrivateModuleFragment:\n Diag(PrivateLoc, diag::err_private_module_fragment_redefined);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Preprocessor/macro_arg_directive.c"]={"clang/test/Preprocessor/macro_arg_directive.c:11:1: note: expansion of macro \'M\' requested here","clang/test/Preprocessor/macro_arg_directive.c:21:10: note: expansion of macro \'MUNCH\' requested here"} | | ["clang/test/CXX/basic/basic.link/p1.cpp"]={"clang/test/CXX/basic/basic.link/p1.cpp:54:9: error: private module fragment redefined"} |
| } | | } |
| }, | | }, |
| ["note_macro_here"]={ | | ["err_probability_not_constant_float"]={ |
| [b]="note_macro_here", | | [b]={{nil,t,"err_probability_not_constant_float"}}, |
| [h]="macro %0 defined here", | | [j]={{nil,t,"probability argument to __builtin_expect_with_probability must be constant floating-point expression"}}, |
| [i]="macro A defined here", | | [i]={{nil,t,"probability argument to __builtin_expect_with_probability must be constant floating-point expression"}}, |
| [c]=g, | | [h]=k, |
| [e]="macro (.*?) defined here", | | [c]="probability argument to __builtin_expect_with_probability must be constant floating\\-point expression", |
| [f]=a, | | [f]=a, |
| [d]=Eb, | | [e]={{nil,t,a}}, |
| [j]={"19b02cd7fc91",1340409548,"Minor improvements to some C99 variadic-macro-related diagnostics.","Minor improvements to some C99 variadic-macro-related diagnostics.\n\nllvm-svn: 159054"}, | | [g]={Ab,1582847864,Bb,Db}, |
| [k]={{mc,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();"},{mc,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();"},{mc,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();"},{mc,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();"},{mc,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();"}}, | | [d]={{I,2441,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__builtin_expect_with_probability: {\n // ...\n if ((!ProbArg->EvaluateAsConstantExpr(Eval, Context)) || !Eval.Val.isFloat()) {\n Diag(ProbArg->getBeginLoc(), diag::err_probability_not_constant_float) << ProbArg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/builtin-expect-with-probability-avr.cpp"]={"clang/test/Sema/builtin-expect-with-probability-avr.cpp:8:55: error: probability argument to __builtin_expect_with_probability must be constant floating-point expression"} |
| } | | } |
| }, | | }, |
| ["note_main_change_return_type"]={ | | ["err_probability_out_of_range"]={ |
| [b]="note_main_change_return_type", | | [b]={{nil,t,"err_probability_out_of_range"}}, |
| [h]="change return type to \'int\'", | | [j]={{nil,t,"probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"}}, |
| [i]="change return type to \'int\'", | | [i]={{nil,t,"probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"}}, |
| [c]=g, | | [h]=k, |
| [e]="change return type to \'int\'", | | [c]="probability argument to __builtin_expect_with_probability is outside the range \\[0\\.0, 1\\.0\\]", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,t,a}}, |
| [j]={"ae73417b6955",1358382373,"Implement a fixit for -Wmain-return-type","Implement a fixit for -Wmain-return-type\n\nllvm-svn: 172684"}, | | [g]={Ab,1582847864,Bb,Db}, |
| [k]={{C,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\");"}}, | | [d]={{I,2453,"#include \"clang/Basic/Builtins.def\"\n // ...\n case Builtin::BI__builtin_expect_with_probability: {\n // ...\n if (!(Probability >= llvm::APFloat(0.0) && Probability <= llvm::APFloat(1.0))) {\n Diag(ProbArg->getBeginLoc(), diag::err_probability_out_of_range) << ProbArg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/gnu89.c"]={"clang/test/Sema/gnu89.c:5:1: note: change return type to \'int\'"} | | ["clang/test/Sema/builtin-expect-with-probability-avr.cpp"]={"clang/test/Sema/builtin-expect-with-probability-avr.cpp:6:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:7:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:10:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:11:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:13:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]","clang/test/Sema/builtin-expect-with-probability-avr.cpp:14:55: error: probability argument to __builtin_expect_with_probability is outside the range [0.0, 1.0]"} |
| } | | } |
| }, | | }, |
| ["note_main_remove_noreturn"]={ | | ["err_property_accessor_type"]={ |
| [b]="note_main_remove_noreturn", | | [b]="err_property_accessor_type", |
| [h]="remove \'_Noreturn\'", | | [j]="type of property %0 (%1) does not match type of accessor %2 (%3)", |
| [i]="remove \'_Noreturn\'", | | [i]="type of property A (B) does not match type of accessor C (D)", |
| [c]=g, | | [h]=k, |
| [e]="remove \'_Noreturn\'", | | [c]="type of property (.*?) \\((.*?)\\) does not match type of accessor (.*?) \\((.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{C,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);"}}, | | [d]={{wb,1727,"bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) {\n // ...\n if (!compat) {\n // ...\n if ((propertyObjCPtr = PropertyRValueType->getAs<ObjCObjectPointerType>()) && (getterObjCPtr = GetterType->getAs<ObjCObjectPointerType>()))\n // ...\n else if (CheckAssignmentConstraints(Loc, GetterType, PropertyRValueType) != Compatible) {\n Diag(Loc, diag::err_property_accessor_type) << property->getDeclName() << PropertyRValueType << GetterMethod->getSelector() << GetterType;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/warn-main.c"]={"clang/test/Sema/warn-main.c:27:1: note: remove \'_Noreturn\'"} | | ["clang/test/SemaObjC/property-impl-misuse.m"]={"clang/test/SemaObjC/property-impl-misuse.m:40:15: error: type of property \'P\' (\'int\') does not match type of accessor \'P\' (\'void\')","clang/test/SemaObjC/property-impl-misuse.m:46:15: error: type of property \'P2\' (\'int\') does not match type of accessor \'P2\' (\'double *\')"} |
| } | | } |
| }, | | }, |
| ["note_matching"]={ | | ["err_property_found_suggest"]={ |
| [b]="note_matching", | | [b]="err_property_found_suggest", |
| [h]="to match this %0", | | [j]="property %0 found on object of type %1; did you mean to access it with the \".\" operator?", |
| [i]="to match this A", | | [i]="property A found on object of type B; did you mean to access it with the \".\" operator?", |
| [c]=g, | | [h]=k, |
| [e]="to match this (.*?)", | | [c]="property (.*?) found on object of type (.*?); did you mean to access it with the \"\\.\" operator\\?", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={Hc,1236199783,Fc,Ec}, | | [g]={"c297cd883641",1309219252,"Provide fix-it for \'.\' <-> \'->\' for Objective-C ivar/property access.","Provide fix-it for \'.\' <-> \'->\' for Objective-C ivar/property access.\n// rdar://7811841\n\nllvm-svn: 133970"}, |
| [k]={{"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;"},{mc,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;"},{mc,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;"},{mc,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;"}},
| | [d]={{cb,1398,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (!IV) {\n // ...\n if (TypoCorrection Corrected = S.CorrectTypo(R.getLookupNameInfo(), Sema::LookupMemberName, nullptr, nullptr, Validator, Sema::CTK_ErrorRecovery, IDecl)) {\n // ...\n } else {\n if (IsArrow && IDecl->FindPropertyDeclaration(Member, ObjCPropertyQueryKind::OBJC_PR_query_instance)) {\n S.Diag(MemberLoc, diag::err_property_found_suggest) << Member << BaseExpr.get()->getType() << FixItHint::CreateReplacement(OpLoc, \".\");"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/MicrosoftExtensions.c"]={"clang/test/Parser/MicrosoftExtensions.c:58:1: note: to match this \'[\'"} | | ["clang/test/FixIt/fixit-objc.m"]={"clang/test/FixIt/fixit-objc.m:54:37: error: property \'y\' found on object of type \'Radar7861841 *\'; did you mean to access it with the \".\" operator?"} |
| } | | } |
| }, | | }, |
| ["note_max_tokens_total_override"]={ | | ["err_property_function_in_objc_container"]={ |
| [b]={{nil,t,"note_max_tokens_total_override"}}, | | [b]="err_property_function_in_objc_container", |
| [h]={{nil,t,"total token limit set here"}}, | | [j]="use of Objective-C property in function nested in Objective-C container not supported, move function outside its container", |
| [i]={{nil,t,"total token limit set here"}}, | | [i]="use of Objective-C property in function nested in Objective-C container not supported, move function outside its container", |
| [c]=g, | | [h]=k, |
| [e]="total token limit set here", | | [c]="use of Objective\\-C property in function nested in Objective\\-C container not supported, move function outside its container", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,a}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"555132824a9e",1401300730,"Objective-C. Diagnose use of properties in functions nested in, ","Objective-C. Diagnose use of properties in functions nested in, \nnow deprecated, ObjC containers instead of crashing. \n// rdar://16859666\n\nllvm-svn: 209758"}, |
| [k]={{"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);"}}, | | [d]={{"clang/lib/Sema/SemaPseudoObject.cpp",699,"void ObjCPropertyOpBuilder::DiagnoseUnsupportedPropertyUse() {\n if (S.getCurLexicalContext()->isObjCContainer() && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCCategoryImpl && S.getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation) {\n if (ObjCPropertyDecl *prop = RefExpr->getExplicitProperty()) {\n S.Diag(RefExpr->getLocation(), diag::err_property_function_in_objc_container);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/max-tokens.cpp"]={"clang/test/Parser/max-tokens.cpp:19:32: note: total token limit set here"} | | ["clang/test/SemaObjC/deprecate_function_containers.m"]={"clang/test/SemaObjC/deprecate_function_containers.m:34:37: error: use of Objective-C property in function nested in Objective-C container not supported, move function outside its container"} |
| } | | } |
| }, | | }, |
| ["note_meant_to_use_typename"]={ | | ["err_property_implemented"]={ |
| [b]={{nil,u,"note_meant_to_use_typename"}}, | | [b]="err_property_implemented", |
| [h]={{nil,u,"did you mean to use \'typename\'?"}}, | | [j]="property %0 is already implemented", |
| [i]={{nil,u,"did you mean to use \'typename\'?"}}, | | [i]="property A is already implemented", |
| [c]=g, | | [h]=k, |
| [e]="did you mean to use \'typename\'\\?", | | [c]="property (.*?) is already implemented", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,"Generics Issue"}}, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{"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\");"}}, | | [d]={{wb,1569,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n // ...\n if (ObjCPropertyImplDecl *PPIDecl = IC->FindPropertyImplDecl(PropertyId, QueryKind)) {\n Diag(PropertyLoc, diag::err_property_implemented) << PropertyId;"},{wb,1608,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n if (IC) {\n // ...\n } else {\n // ...\n if (ObjCPropertyImplDecl *PPIDecl = CatImplClass->FindPropertyImplDecl(PropertyId, QueryKind)) {\n Diag(PropertyDiagLoc, diag::err_property_implemented) << PropertyId;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/FixIt/fixit-typedef-instead-of-typename-typo.cpp"]={"clang/test/FixIt/fixit-typedef-instead-of-typename-typo.cpp:3:23: note: did you mean to use \'typename\'?"} | | ["clang/test/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:21:13: error: property \'prop_id\' is already implemented"} |
| } | | } |
| }, | | }, |
| ["note_member_declared_at"]={ | | ["err_property_is_variably_modified"]={ |
| [b]="note_member_declared_at", | | [b]="err_property_is_variably_modified", |
| [h]="member is declared here", | | [j]="property %0 has a variably modified type", |
| [i]="member is declared here", | | [i]="property A has a variably modified type", |
| [c]=g, | | [h]=k, |
| [e]="member is declared here", | | [c]="property (.*?) has a variably modified type", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"5e77d76c953d",1366097310,"Basic support for Microsoft property declarations and","Basic support for Microsoft property declarations and\nreferences thereto.\n\nPatch by Tong Shen!\n\nllvm-svn: 179585"}, |
| [k]={{"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);"},{A,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;"},{ab,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);"},{G,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;"}}, | | [d]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",1305,"Decl *TemplateDeclInstantiator::VisitMSPropertyDecl(MSPropertyDecl *D) {\n // ...\n if (DI->getType()->isVariablyModifiedType()) {\n SemaRef.Diag(D->getLocation(), diag::err_property_is_variably_modified) << D;"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_member_declared_here"]={ | | ["err_property_ivar_type"]={ |
| [b]="note_member_declared_here", | | [b]="err_property_ivar_type", |
| [h]="member %0 declared here", | | [j]="type of property %0 (%1) does not match type of instance variable %2 (%3)", |
| [i]="member A declared here", | | [i]="type of property A (B) does not match type of instance variable C (D)", |
| [c]=g, | | [h]=k, |
| [e]="member (.*?) declared here", | | [c]="type of property (.*?) \\((.*?)\\) does not match type of instance variable (.*?) \\((.*?)\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{ib,1270,"bool CoroutineStmtBuilder::makeReturnOnAllocFailure() {\n // ...\n if (ReturnStmt.isInvalid()) {\n S.Diag(Found.getFoundDecl()->getLocation(), diag::note_member_declared_here) << DN;"},{ib,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;"},{hb,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;"},{hb,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;"},{hb,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;"}}, | | [d]={{wb,1376,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // ...\n if (!compat) {\n Diag(PropertyDiagLoc, diag::err_property_ivar_type) << property->getDeclName() << PropType << Ivar->getDeclName() << IvarType;"},{wb,1391,"/// ActOnPropertyImplDecl - This routine performs semantic checks and\n/// builds the AST node for a property implementation declaration; declared\n/// as \\@synthesize or \\@dynamic.\n///\nDecl *Sema::ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool Synthesize, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind) {\n // ...\n // Check that we have a valid, previously declared ivar for @synthesize\n if (Synthesize) {\n // ...\n // Check that type of property and its ivar are type compatible.\n if (!Context.hasSameType(PropertyIvarType, IvarType)) {\n // ...\n if (!compat) {\n // ...\n } else {\n // ...\n if (lhsType != rhsType && lhsType->isArithmeticType()) {\n Diag(PropertyDiagLoc, diag::err_property_ivar_type) << property->getDeclName() << PropType << Ivar->getDeclName() << IvarType;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjC/property.m"]={"clang/test/SemaObjC/property.m:21:13: error: type of property \'prop_id\' (\'id\') does not match type of instance variable \'IVAR\' (\'int\')"} |
| } | | } |
| }, | | }, |
| ["note_member_def_close_const_match"]={ | | ["err_property_method_unavailable"]={ |
| [b]="note_member_def_close_const_match", | | [b]="err_property_method_unavailable", |
| [h]="member declaration does not match because it %select{is|is not}0 const qualified", | | [j]="property access is using %0 method which is unavailable", |
| [i]={{nil,nil,{"member declaration does not match because it ",{"is","is not"}," const qualified"}}}, | | [i]="property access is using A method which is unavailable", |
| [c]=g, | | [h]=k, |
| [e]="member declaration does not match because it (?:is|is not) const qualified", | | [c]="property access is using (.*?) method which is unavailable", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"89ea9610b306",1402939541,"Objective-C. Diagnose when property access is using declared","Objective-C. Diagnose when property access is using declared\nproperty accessor methods which have become deprecated\nor available. // rdar://15951801\n\nllvm-svn: 211039"}, |
| [k]={{C,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\"));"}}, | | [d]={{"clang/lib/Sema/SemaAvailability.cpp",448,"/// Actually emit an availability diagnostic for a reference to an unavailable\n/// decl.\n///\n/// \\param Ctx The context that the reference occurred in\n/// \\param ReferringDecl The exact declaration that was referenced.\n/// \\param OffendingDecl A related decl to \\c ReferringDecl that has an\n/// availability attribute corresponding to \\c K attached to it. Note that this\n/// may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and\n/// we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl\n/// and OffendingDecl is the EnumDecl.\nstatic void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) {\n // ...\n case AR_Unavailable:\n diag = !ObjCPropertyAccess ? diag::err_unavailable : diag::err_property_method_unavailable;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjC/property-deprecated-warning.m"]={"clang/test/SemaObjC/property-deprecated-warning.m:168:14: error: property access is using \'x\' method which is unavailable"} |
| } | | } |
| }, | | }, |
| ["note_member_def_close_match"]={ | | ["err_property_not_as_forward_class"]={ |
| [b]="note_member_def_close_match", | | [b]="err_property_not_as_forward_class", |
| [h]="member declaration nearly matches", | | [j]="property %0 refers to an incomplete Objective-C class %1 (with no @interface available)", |
| [i]="member declaration nearly matches", | | [i]="property A refers to an incomplete Objective-C class B (with no @interface available)", |
| [c]=g, | | [h]=k, |
| [e]="member declaration nearly matches", | | [c]="property (.*?) refers to an incomplete Objective\\-C class (.*?) \\(with no @interface available\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"05d389f407d0",1297905974,"Improve diagnostics when property names an object type of","Improve diagnostics when property names an object type of\na forward class. // rdar://8851803\n\nllvm-svn: 125699"}, |
| [k]={{C,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);"}}, | | [d]={{lb,2138,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (ObjCIvarDecl *Ivar = IFace->lookupInstanceVariable(Member, ClassDeclared)) {\n // ...\n if (const ObjCObjectPointerType *OBJPT = T->getAsObjCInterfacePointerType()) {\n if (RequireCompleteType(MemberLoc, OBJPT->getPointeeType(), diag::err_property_not_as_forward_class, MemberName, BaseExpr))"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaObjC/property-missing.m"]={"clang/test/SemaObjC/property-missing.m:32:11: error: property \'someOtherObject\' refers to an incomplete Objective-C class \'SomeOtherClass\' (with no @interface available)"} |
| } | | } |
| }, | | }, |
| ["note_member_def_close_param_match"]={ | | ["err_property_not_found"]={ |
| [b]="note_member_def_close_param_match", | | [b]="err_property_not_found", |
| [h]="type of %ordinal0 parameter of member declaration does not match definition%diff{ ($ vs $)|}1,2", | | [j]="property %0 not found on object of type %1", |
| [i]={{nil,nil,{"type of A parameter of member declaration does not match definition",{" (B vs C)",a}}}}, | | [i]="property A not found on object of type B", |
| [c]=g, | | [h]=k, |
| [e]="type of (.*?) parameter of member declaration does not match definition(?: \\((.*?) vs (.*?)\\)|)", | | [c]="property (.*?) not found on object of type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{C,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();"}},
| | [d]={{cb,1549,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (!IsArrow && (OPT = BaseType->getAs<ObjCObjectPointerType>())) {\n // ...\n // id, with and without qualifiers.\n if (OT->isObjCId()) {\n // ...\n return ExprError(S.Diag(MemberLoc, diag::err_property_not_found) << MemberName << BaseType);"},{cb,1604,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (!IsArrow && (OPT = BaseType->getAs<ObjCObjectPointerType>())) {\n // ...\n // \'Class\', unqualified only.\n if (OT->isObjCClass()) {\n // ...\n return ExprError(S.Diag(MemberLoc, diag::err_property_not_found) << MemberName << BaseType);"},{lb,2149,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n Diag(MemberLoc, diag::err_property_not_found) << MemberName << QualType(OPT, 0);"},{lb,2257,"ExprResult Sema::ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) {\n // ...\n return ExprError(Diag(propertyNameLoc, diag::err_property_not_found) << &propertyName << Context.getObjCInterfaceType(IFace));"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaObjC/conditional-expr-4.m"]={"clang/test/SemaObjC/conditional-expr-4.m:78:25: error: property \'x\' not found on object of type \'id\'"} |
| } | | } |
| }, | | }, |
| ["note_member_first_declared_here"]={ | | ["err_property_not_found_forward_class"]={ |
| [b]={{nil,y,"note_member_first_declared_here"}}, | | [b]="err_property_not_found_forward_class", |
| [h]={{nil,y,"member %0 first declared here"}}, | | [j]="property %0 cannot be found in forward class object %1", |
| [i]={{nil,y,"member A first declared here"}}, | | [i]="property A cannot be found in forward class object B", |
| [c]=g, | | [h]=k, |
| [e]="member (.*?) first declared here", | | [c]="property (.*?) cannot be found in forward class object (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{ib,1635,"bool CoroutineStmtBuilder::makeOnFallthrough() {\n // ...\n if (HasRVoid && HasRValue) {\n // ...\n S.Diag(LRVoid.getRepresentativeDecl()->getLocation(), diag::note_member_first_declared_here) << LRVoid.getLookupName();"},{ib,1638,"bool CoroutineStmtBuilder::makeOnFallthrough() {\n // ...\n if (HasRVoid && HasRValue) {\n // ...\n S.Diag(LRValue.getRepresentativeDecl()->getLocation(), diag::note_member_first_declared_here) << LRValue.getLookupName();"}}, | | [d]={{lb,1995,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (RequireCompleteType(MemberLoc, OPT->getPointeeType(), diag::err_property_not_found_forward_class, MemberName, BaseRange))"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaObjC/property-9.m"]={"clang/test/SemaObjC/property-9.m:106:21: error: property \'path\' cannot be found in forward class object \'MDAInstance\'"} |
| } | | } |
| }, | | }, |
| ["note_member_reference_arrow_from_operator_arrow"]={ | | ["err_property_not_found_suggest"]={ |
| [b]="note_member_reference_arrow_from_operator_arrow", | | [b]="err_property_not_found_suggest", |
| [h]="\'->\' applied to return value of the operator->() declared here", | | [j]="property %0 not found on object of type %1; did you mean %2?", |
| [i]="\'->\' applied to return value of the operator->() declared here", | | [i]="property A not found on object of type B; did you mean C?", |
| [c]=g, | | [h]=k, |
| [e]="\'\\-\\>\' applied to return value of the operator\\-\\>\\(\\) declared here", | | [c]="property (.*?) not found on object of type (.*?); did you mean (.*?)\\?", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"35b0bac8c51a",1262541717,"Implement typo correction for a variety of Objective-C-specific","Implement typo correction for a variety of Objective-C-specific\nconstructs:\n\n - Instance variable lookup (\"foo->ivar\" and, in instance methods, \"ivar\")\n - Property name lookup (\"foo.prop\")\n - Superclasses\n - Various places where a class name is required\n - Protocol names (e.g., id<proto>)\n\nThis seems to cover many of the common places where typos could occur.\n\nllvm-svn: 92449"}, |
| [k]={{hb,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);"}}, | | [d]={{lb,2124,"/// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an\n/// objective C interface. This is a property reference expression.\nExprResult Sema::HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super) {\n // ...\n if (TypoCorrection Corrected = CorrectTypo(DeclarationNameInfo(MemberName, MemberLoc), LookupOrdinaryName, nullptr, nullptr, CCC, CTK_ErrorRecovery, IFace, false, OPT)) {\n // ...\n if (TypoResult.isIdentifier() && TypoResult.getAsIdentifierInfo() == Member) {\n // ...\n } else {\n diagnoseTypo(Corrected, PDiag(diag::err_property_not_found_suggest) << MemberName << QualType(OPT, 0));"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaHLSL/prohibit_pointer.hlsl"]={"clang/test/SemaHLSL/prohibit_pointer.hlsl:70:3: note: \'->\' applied to return value of the operator->() declared here"} | | ["clang/test/FixIt/typo.m"]={"clang/test/FixIt/typo.m:54:8: error: property \'hisprop\' not found on object of type \'B *\'; did you mean \'his_prop\'?","clang/test/FixIt/typo.m:55:8: error: property \'herprop\' not found on object of type \'B *\'; did you mean \'her_prop\'?","clang/test/FixIt/typo.m:56:8: error: property \'s_prop\' not found on object of type \'B *\'; did you mean \'sprop\'?","clang/test/FixIt/typo.m:81:5: error: property \'valu\' not found on object of type \'Collide *\'; did you mean \'value\'?"} |
| } | | } |
| }, | | }, |
| ["note_member_synthesized_at"]={ | | ["err_property_setter_ambiguous_use"]={ |
| [b]="note_member_synthesized_at", | | [b]="err_property_setter_ambiguous_use", |
| [h]="implicit %select{default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor}0 for %1 first required here", | | [j]="synthesized properties %0 and %1 both claim setter %2 - use of this setter will cause unexpected behavior", |
| [i]={{nil,m,{"in ",{"implicit","defaulted"},rb,{wc,kc,lc,oc,pc,D}," for C first required here"}},{p,y,{"in implicit ",{wc,kc,lc,oc,pc,D}," for B first required here"}},{nil,nil,{"implicit ",{wc,kc,lc,oc,pc,D}," for B first required here"}}}, | | [i]="synthesized properties A and B both claim setter C - use of this setter will cause unexpected behavior", |
| [c]=g, | | [h]=k, |
| [e]="in (?:implicit|defaulted) (?:default constructor|copy constructor|move constructor|copy assignment operator|move assignment operator|destructor) for (.*?) first required here", | | [c]="synthesized properties (.*?) and (.*?) both claim setter (.*?) \\- use of this setter will cause unexpected behavior", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{W,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());"}}, | | [d]={{"clang/lib/Sema/SemaPseudoObject.cpp",675,"/// Try to find the most accurate setter declaration for the property\n/// reference.\n///\n/// \\return true if a setter was found, in which case Setter\nbool ObjCPropertyOpBuilder::findSetter(bool warn) {\n // ...\n // Do a normal method lookup first.\n if (ObjCMethodDecl *setter = LookupMethodInReceiverType(S, SetterSelector, RefExpr)) {\n if (setter->isPropertyAccessor() && warn)\n if (const ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) {\n // ...\n if (ObjCPropertyDecl *prop1 = IFace->FindPropertyDeclaration(AltMember, prop->getQueryKind()))\n if (prop != prop1 && (prop1->getSetterMethodDecl() == setter)) {\n S.Diag(RefExpr->getExprLoc(), diag::err_property_setter_ambiguous_use) << prop << prop1 << setter->getSelector();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjC/property-user-setter.m"]={"clang/test/SemaObjC/property-user-setter.m:130:3: error: synthesized properties \'t\' and \'T\' both claim setter \'setT:\' - use of this setter will cause unexpected behavior","clang/test/SemaObjC/property-user-setter.m:131:3: error: synthesized properties \'T\' and \'t\' both claim setter \'setT:\' - use of this setter will cause unexpected behavior","clang/test/SemaObjC/property-user-setter.m:132:3: error: synthesized properties \'Pxyz\' and \'pxyz\' both claim setter \'setPxyz:\' - use of this setter will cause unexpected behavior","clang/test/SemaObjC/property-user-setter.m:133:3: error: synthesized properties \'pxyz\' and \'Pxyz\' both claim setter \'setPxyz:\' - use of this setter will cause unexpected behavior"} |
| } | | } |
| }, | | }, |
| ["note_memsize_comparison_cast_silence"]={ | | ["err_property_type"]={ |
| [b]="note_memsize_comparison_cast_silence", | | [b]="err_property_type", |
| [h]="explicitly cast the argument to size_t to silence this warning", | | [j]="property cannot have array or function type %0", |
| [i]="explicitly cast the argument to size_t to silence this warning", | | [i]="property cannot have array or function type A", |
| [c]=g, | | [h]=k, |
| [e]="explicitly cast the argument to size_t to silence this warning", | | [c]="property cannot have array or function type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={s,1236199783,q,r}, |
| [k]={{V,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()), \")\");"}}, | | [d]={{wb,638,"ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TInfo, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC) {\n // ...\n if (T->isArrayType() || T->isFunctionType()) {\n Diag(AtLoc, diag::err_property_type) << T;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjC/rdr-6211479-array-property.m"]={"clang/test/SemaObjC/rdr-6211479-array-property.m:7:1: error: property cannot have array or function type \'T\' (aka \'int[2]\')"} |
| } | | } |
| }, | | }, |
| ["note_memsize_comparison_paren"]={ | | ["err_protected_ivar_access"]={ |
| [b]="note_memsize_comparison_paren", | | [b]="err_protected_ivar_access", |
| [h]="did you mean to compare the result of %0 instead?", | | [j]="instance variable %0 is protected", |
| [i]="did you mean to compare the result of A instead?", | | [i]="instance variable A is protected", |
| [c]=g, | | [h]=k, |
| [e]="did you mean to compare the result of (.*?) instead\\?", | | [c]="instance variable (.*?) is protected", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{V,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);"}}, | | [d]={{cb,1449,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n // ...\n if (IV->getAccessControl() != ObjCIvarDecl::Public && IV->getAccessControl() != ObjCIvarDecl::Package) {\n // ...\n if (!S.getLangOpts().DebuggerSupport) {\n if (IV->getAccessControl() == ObjCIvarDecl::Private) {\n // ...\n } else if (!IDecl->isSuperClassOf(ClassOfMethodDecl))\n // ...\n S.Diag(MemberLoc, diag::err_protected_ivar_access) << IV->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaObjC/ivar-access-tests.m"]={"clang/test/SemaObjC/ivar-access-tests.m:65:17: error: instance variable \'protected\' is protected","clang/test/SemaObjC/ivar-access-tests.m:68:17: error: instance variable \'protected\' is protected","clang/test/SemaObjC/ivar-access-tests.m:77:15: error: instance variable \'protected\' is protected"} |
| } | | } |
| }, | | }, |
| ["note_method_declared_at"]={ | | ["err_protocol_has_circular_dependency"]={ |
| [b]="note_method_declared_at", | | [b]="err_protocol_has_circular_dependency", |
| [h]="method %0 declared here", | | [j]="protocol has circular dependency", |
| [i]="method A declared here", | | [i]="protocol has circular dependency", |
| [c]=g, | | [h]=k, |
| [e]="method (.*?) declared here", | | [c]="protocol has circular dependency", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{db,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();"},{db,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();"},{db,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;"},{db,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"},{B,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();"}}, | | [d]={{Z,1205,"bool Sema::CheckForwardProtocolDeclarationForCircularDependency(IdentifierInfo *PName, SourceLocation &Ploc, SourceLocation PrevLoc, const ObjCList<ObjCProtocolDecl> &PList) {\n // ...\n for (ObjCList<ObjCProtocolDecl>::iterator I = PList.begin(), E = PList.end(); I != E; ++I) {\n if (ObjCProtocolDecl *PDecl = LookupProtocol((*I)->getIdentifier(), Ploc)) {\n if (PDecl->getIdentifier() == PName) {\n Diag(Ploc, diag::err_protocol_has_circular_dependency);"}}, |
| [l]={ | | [l]={ |
| ["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/protocols.m"]={"clang/test/SemaObjC/protocols.m:61:11: error: protocol has circular dependency"} |
| } | | } |
| }, | | }, |
| ["note_method_return_type_change"]={ | | ["err_protocol_property_mismatch"]={ |
| [b]="note_method_return_type_change", | | [b]={{nil,n,"err_protocol_property_mismatch"}}, |
| [h]="compiler has implicitly changed method %0 return type", | | [j]={{nil,n,"property %select{of type %1|with attribute \'%1\'|without attribute \'%1\'|with getter %1|with setter %1}0 was selected for synthesis"}}, |
| [i]="compiler has implicitly changed method A return type", | | [i]={{nil,n,{"property ",{"of type B","with attribute \'B\'","without attribute \'B\'","with getter B","with setter B"}," was selected for synthesis"}}}, |
| [c]=g, | | [h]=k, |
| [e]="compiler has implicitly changed method (.*?) return type", | | [c]="property (?:of type (.*?)|with attribute \'(.*?)\'|without attribute \'(.*?)\'|with getter (.*?)|with setter (.*?)) was selected for synthesis", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,n,m}}, |
| [j]={"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"}, | | [g]={"50b2dd336e39",1499943982,"[ObjC] Pick a \'readwrite\' property when synthesizing ambiguous","[ObjC] Pick a \'readwrite\' property when synthesizing ambiguous\nproperty and check for incompatible attributes\n\nThis commit changes the way ambiguous property synthesis (i.e. when synthesizing\na property that\'s declared in multiple protocols) is performed. Previously,\nClang synthesized the first property that was found. This lead to problems when\nthe property was synthesized in a class that conformed to two protocols that\ndeclared that property and a second protocols had a \'readwrite\' declaration -\nthe setter was not synthesized so the class didn\'t really conform to the second\nprotocol and user\'s code would crash at runtime when they would try to set the\nproperty.\n\nThis commit ensures that a first readwrite property is selected. This is a\nsemantic change that changes users code in this manner:\n\n```\n@protocol P @property(readonly) int p; @end\n@protocol P2 @property(readwrite) id p; @end\n@interface I <P2> @end\n@implementation I\n@syntesize p; // Users previously got a warning here, and Clang synthesized\n // readonly \'int p\' here. Now Clang synthesizes readwrite \'id\' p..\n@end\n```\n\nTo ensure that this change is safe, the warning about incompatible types is\npromoted to an error when this kind of readonly/readwrite ambiguity is detected\nin the @implementation. This will ensure that previous code that had this subtle\nbug and ignored the warning now will fail to compile with an error, and users\nshould not get suprises at runtime once they resolve the error.\n\nThe commit also extends the ambiguity checker, and now it can detect conflicts\namong the different property attributes. An error diagnostic is used for\nconflicting attributes, to ensure that the user won\'t get \"suprises\" at runtime.\n\nProtocolPropertyMap is removed in favour of a a set + vector because the map\'s\norder of iteration is non-deterministic, so it couldn\'t be used to select the\nreadwrite property.\n\nrdar://31579994\n\nDifferential Revision: https://reviews.llvm.org/D35268\n\nllvm-svn: 307903"}, |
| [k]={{ab,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();"}}, | | [d]={{wb,969,"/// SelectPropertyForSynthesisFromProtocols - Finds the most appropriate\n/// property declaration that should be synthesised in all of the inherited\n/// protocols. It also diagnoses properties declared in inherited protocols with\n/// mismatched types or attributes, since any of them can be candidate for\n/// synthesis.\nstatic ObjCPropertyDecl *SelectPropertyForSynthesisFromProtocols(Sema &S, SourceLocation AtLoc, ObjCInterfaceDecl *ClassDecl, ObjCPropertyDecl *Property) {\n // ...\n // Diagnose incompability.\n {\n // ...\n auto Diag = S.Diag(Property->getLocation(), Property != OriginalProperty || HasIncompatibleAttributes ? diag::err_protocol_property_mismatch : diag::warn_protocol_property_mismatch);"}}, |
| [l]={ | | [l]={ |
| ["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/arc-property-decl-attrs.m"]={"clang/test/SemaObjC/arc-property-decl-attrs.m:130:43: error: property with attribute \'copy\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:143:25: error: property without attribute \'retain (or strong)\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:156:42: error: property without attribute \'atomic\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:169:31: error: property with getter \'prop\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:185:46: error: property with setter \'setp:\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:198:42: error: property of type \'int\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:220:45: error: property of type \'id\' was selected for synthesis","clang/test/SemaObjC/arc-property-decl-attrs.m:264:40: error: property with attribute \'retain (or strong)\' was selected for synthesis"} |
| } | | } |
| }, | | }, |
| ["note_method_sent_forward_class"]={ | | ["err_pseudo_dtor_base_not_scalar"]={ |
| [b]="note_method_sent_forward_class", | | [b]="err_pseudo_dtor_base_not_scalar", |
| [h]="method %0 is used for the forward class", | | [j]="object expression of non-scalar type %0 cannot be used in a pseudo-destructor expression", |
| [i]="method A is used for the forward class", | | [i]="object expression of non-scalar type A cannot be used in a pseudo-destructor expression", |
| [c]=g, | | [h]=k, |
| [e]="method (.*?) is used for the forward class", | | [c]="object expression of non\\-scalar type (.*?) cannot be used in a pseudo\\-destructor expression", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"ad8a336b4037",1252085800,"Implement AST, semantics, and CodeGen for C++ pseudo-destructor","Implement AST, semantics, and CodeGen for C++ pseudo-destructor\nexpressions, e.g.,\n\n p->~T()\n\nwhen p is a pointer to a scalar type. \n\nWe don\'t currently diagnose errors when pseudo-destructor expressions\nare used in any way other than by forming a call.\n\nllvm-svn: 81009"}, |
| [k]={{B,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();"}},
| | [d]={{Q,7770,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n if (!ObjectType->isDependentType() && !ObjectType->isScalarType() && !ObjectType->isVectorType()) {\n if (getLangOpts().MSVCCompat && ObjectType->isVoidType())\n // ...\n else {\n Diag(OpLoc, diag::err_pseudo_dtor_base_not_scalar) << ObjectType << Base->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:34:6: error: object expression of non-scalar type \'void\' cannot be used in a pseudo-destructor expression","clang/test/SemaCXX/pseudo-destructors.cpp:195:19: error: object expression of non-scalar type \'void ()\' cannot be used in a pseudo-destructor expression"} |
| } | | } |
| }, | | }, |
| ["note_misaligned_member_used_here"]={ | | ["err_pseudo_dtor_call_with_args"]={ |
| [b]={{nil,w,"note_misaligned_member_used_here"}}, | | [b]="err_pseudo_dtor_call_with_args", |
| [h]={{nil,w,"passing byval argument %0 with potentially incompatible alignment here"}}, | | [j]="call to pseudo-destructor cannot have any arguments", |
| [i]={{nil,w,"passing byval argument A with potentially incompatible alignment here"}}, | | [i]="call to pseudo-destructor cannot have any arguments", |
| [c]=g, | | [h]=k, |
| [e]="passing byval argument (.*?) with potentially incompatible alignment here", | | [c]="call to pseudo\\-destructor cannot have any arguments", |
| [f]=a, | | [f]=a, |
| [d]={{nil,w,n}}, | | [e]=m, |
| [j]={Vb,1625925174,Jb,Kb}, | | [g]={"ad8a336b4037",1252085800,"Implement AST, semantics, and CodeGen for C++ pseudo-destructor","Implement AST, semantics, and CodeGen for C++ pseudo-destructor\nexpressions, e.g.,\n\n p->~T()\n\nwhen p is a pointer to a scalar type. \n\nWe don\'t currently diagnose errors when pseudo-destructor expressions\nare used in any way other than by forming a call.\n\nllvm-svn: 81009"}, |
| [k]={{V,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;"}}, | | [d]={{O,7307,"/// BuildCallExpr - Handle a call to Fn with the specified array of arguments.\n/// This provides the location of the left/right parens and a list of comma\n/// locations.\nExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig, bool IsExecConfig, bool AllowRecovery) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // If this is a pseudo-destructor expression, build the call immediately.\n if (isa<CXXPseudoDestructorExpr>(Fn)) {\n if (!ArgExprs.empty()) {\n // ...\n Diag(Fn->getBeginLoc(), diag::err_pseudo_dtor_call_with_args) << FixItHint::CreateRemoval(SourceRange(ArgExprs.front()->getBeginLoc(), ArgExprs.back()->getEndLoc()));"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:40:3: error: call to pseudo-destructor cannot have any arguments"} |
| } | | } |
| }, | | }, |
| ["note_misplaced_ellipsis_vararg_add_comma"]={ | | ["err_pseudo_dtor_destructor_non_type"]={ |
| [b]="note_misplaced_ellipsis_vararg_add_comma", | | [b]="err_pseudo_dtor_destructor_non_type", |
| [h]="insert \',\' before \'...\' to silence this warning", | | [j]="%0 does not refer to a type name in pseudo-destructor expression; expected the name of type %1", |
| [i]="insert \',\' before \'...\' to silence this warning", | | [i]="A does not refer to a type name in pseudo-destructor expression; expected the name of type B", |
| [c]=g, | | [h]=k, |
| [e]="insert \',\' before \'\\.\\.\\.\' to silence this warning", | | [c]="(.*?) does not refer to a type name in pseudo\\-destructor expression; expected the name of type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]=m, |
| [j]={"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"}, | | [g]={"0d5b0a1e5edb",1267046952,"ActOnPseudoDestructorExpr now performs all semantic analysis for","ActOnPseudoDestructorExpr now performs all semantic analysis for\npseudo-destructor expressions, and builds the CXXPseudoDestructorExpr\nnode directly. Currently, this only affects pseudo-destructor\nexpressions when they are parsed, but not after template\ninstantiation. That\'s coming next...\n\nImprove parsing of pseudo-destructor-names. When parsing the\nnested-name-specifier and we hit the sequence of tokens X :: ~, query\nthe actual module to determine whether X is a type-name (in which case\nthe X :: is part of the pseudo-destructor-name but not the\nnested-name-specifier) or not (in which case the X :: is part of the\nnested-name-specifier). \n\nllvm-svn: 97058"}, |
| [k]={{"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, \", \");"}}, | | [d]={{Q,7920,"ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName) {\n // ...\n if (SecondTypeName.getKind() == UnqualifiedIdKind::IK_Identifier) {\n // ...\n if (!T && ((SS.isSet() && !computeDeclContext(SS, false)) || (!SS.isSet() && ObjectType->isDependentType()))) {\n // ...\n } else if (!T) {\n Diag(SecondTypeName.StartLocation, diag::err_pseudo_dtor_destructor_non_type) << SecondTypeName.Identifier << ObjectType;"},{Q,7972,"ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName) {\n // ...\n if (FirstTypeName.getKind() == UnqualifiedIdKind::IK_TemplateId || FirstTypeName.Identifier) {\n if (FirstTypeName.getKind() == UnqualifiedIdKind::IK_Identifier) {\n // ...\n if (!T) {\n Diag(FirstTypeName.StartLocation, diag::err_pseudo_dtor_destructor_non_type) << FirstTypeName.Identifier << ObjectType;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp:24:30: note: insert \',\' before \'...\' to silence this warning"} | | ["clang/test/Frontend/crash-diagnostic-renderer.cpp"]={"clang/test/Frontend/crash-diagnostic-renderer.cpp:13:23: error: \'b\' does not refer to a type name in pseudo-destructor expression; expected the name of type \'volatile long\'"} |
| } | | } |
| }, | | }, |
| ["note_misplaced_ellipsis_vararg_add_ellipsis"]={ | | ["err_pseudo_dtor_type_mismatch"]={ |
| [b]="note_misplaced_ellipsis_vararg_add_ellipsis", | | [b]="err_pseudo_dtor_type_mismatch", |
| [h]="place \'...\' %select{immediately before declared identifier|here}0 to declare a function parameter pack", | | [j]="the type of object expression %diff{($) does not match the type being destroyed ($)|does not match the type being destroyed}0,1 in pseudo-destructor expression", |
| [i]={{nil,nil,{"place \'...\' ",{"immediately before declared identifier","here"}," to declare a function parameter pack"}}}, | | [i]={{nil,nil,{"the type of object expression ",{"(A) does not match the type being destroyed (B)","does not match the type being destroyed"}," in pseudo-destructor expression"}}}, |
| [c]=g, | | [h]=k, |
| [e]="place \'\\.\\.\\.\' (?:immediately before declared identifier|here) to declare a function parameter pack", | | [c]="the type of object expression (?:\\((.*?)\\) does not match the type being destroyed \\((.*?)\\)|does not match the type being destroyed) in pseudo\\-destructor expression", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]=m, |
| [j]={"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"}, | | [g]={"ad8a336b4037",1252085800,"Implement AST, semantics, and CodeGen for C++ pseudo-destructor","Implement AST, semantics, and CodeGen for C++ pseudo-destructor\nexpressions, e.g.,\n\n p->~T()\n\nwhen p is a pointer to a scalar type. \n\nWe don\'t currently diagnose errors when pseudo-destructor expressions\nare used in any way other than by forming a call.\n\nllvm-svn: 81009"}, |
| [k]={{"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();"}}, | | [d]={{Q,7805,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n // C++ [expr.pseudo]p2:\n // [...] The cv-unqualified versions of the object type and of the type\n // designated by the pseudo-destructor-name shall be the same type.\n if (DestructedTypeInfo) {\n // ...\n if (!DestructedType->isDependentType() && !ObjectType->isDependentType()) {\n if (!Context.hasSameUnqualifiedType(DestructedType, ObjectType)) {\n // Detect dot pseudo destructor calls on pointer objects, e.g.:\n // Foo *foo;\n // foo.~Foo();\n if (OpKind == tok::period && ObjectType->isPointerType() && Context.hasSameUnqualifiedType(DestructedType, ObjectType->getPointeeType())) {\n // ...\n } else {\n Diag(DestructedTypeStart, diag::err_pseudo_dtor_type_mismatch) << ObjectType << DestructedType << Base->getSourceRange() << DestructedTypeInfo->getTypeLoc().getSourceRange();"},{Q,7849,"ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeTypeInfo, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destructed) {\n // ...\n // C++ [expr.pseudo]p2:\n // [...] Furthermore, the two type-names in a pseudo-destructor-name of the\n // form\n //\n // ::[opt] nested-name-specifier[opt] type-name :: ~ type-name\n //\n // shall designate the same scalar type.\n if (ScopeTypeInfo) {\n // ...\n if (!ScopeType->isDependentType() && !ObjectType->isDependentType() && !Context.hasSameUnqualifiedType(ScopeType, ObjectType)) {\n Diag(ScopeTypeInfo->getTypeLoc().getSourceRange().getBegin(), diag::err_pseudo_dtor_type_mismatch) << ObjectType << ScopeType << Base->getSourceRange() << ScopeTypeInfo->getTypeLoc().getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/cxx11-templates.cpp"]={"clang/test/Parser/cxx11-templates.cpp:18:14: note: place \'...\' immediately before declared identifier to declare a function parameter pack","clang/test/Parser/cxx11-templates.cpp:23:15: note: place \'...\' here to declare a function parameter pack","clang/test/Parser/cxx11-templates.cpp:41:35: note: place \'...\' immediately before declared identifier to declare a function parameter pack"} | | ["clang/test/SemaCXX/pseudo-destructors.cpp"]={"clang/test/SemaCXX/pseudo-destructors.cpp:32:7: error: the type of object expression (\'int\') does not match the type being destroyed (\'Bar\' (aka \'Foo\')) in pseudo-destructor expression","clang/test/SemaCXX/pseudo-destructors.cpp:51:16: error: the type of object expression (\'int\') does not match the type being destroyed (\'Double\' (aka \'double\')) in pseudo-destructor expression"} |
| } | | } |
| }, | | }, |
| ["note_misplaced_ellipsis_vararg_existing_ellipsis"]={ | | ["err_pure_friend"]={ |
| [b]="note_misplaced_ellipsis_vararg_existing_ellipsis", | | [b]="err_pure_friend", |
| [h]="preceding \'...\' declares a function parameter pack", | | [j]="friend declaration cannot have a pure-specifier", |
| [i]="preceding \'...\' declares a function parameter pack", | | [i]="friend declaration cannot have a pure-specifier", |
| [c]=g, | | [h]=k, |
| [e]="preceding \'\\.\\.\\.\' declares a function parameter pack", | | [c]="friend declaration cannot have a pure\\-specifier", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]=m, |
| [j]={"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"}, | | [g]={"9ba0fec83e7f",1435627736,"Rework parsing of pure-specifiers. Perform the grammar matching and","Rework parsing of pure-specifiers. Perform the grammar matching and\ndisambiguation in the parser rather than trying to do it in Sema.\n\nllvm-svn: 241032"}, |
| [k]={{"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);"}}, | | [d]={{w,18148,"void Sema::ActOnPureSpecifier(Decl *D, SourceLocation ZeroLoc) {\n if (D->getFriendObjectKind())\n Diag(D->getLocation(), diag::err_pure_friend);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp:24:27: note: preceding \'...\' declares a function parameter pack"} | | ["clang/test/SemaCXX/virtuals.cpp"]={"clang/test/SemaCXX/virtuals.cpp:70:28: error: friend declaration cannot have a pure-specifier","clang/test/SemaCXX/virtuals.cpp:73:19: error: friend declaration cannot have a pure-specifier"} |
| } | | } |
| }, | | }, |
| ["note_missing_end_of_definition_before"]={ | | ["err_qualified_catch_declarator"]={ |
| [b]="note_missing_end_of_definition_before", | | [b]="err_qualified_catch_declarator", |
| [h]="still within definition of %q0 here", | | [j]="exception declarator cannot be qualified", |
| [i]="still within definition of A here", | | [i]="exception declarator cannot be qualified", |
| [c]=g, | | [h]=k, |
| [e]="still within definition of (.*?) here", | | [c]="exception declarator cannot be qualified", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{"clang/lib/Parse/ParseDeclCXX.cpp",3691,"void Parser::DiagnoseUnexpectedNamespace(NamedDecl *D) {\n // ...\n Diag(Tok.getLocation(), diag::note_missing_end_of_definition_before) << D;"}}, | | [d]={{w,16772,"/// ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch\n/// handler.\nDecl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {\n // ...\n if (D.getCXXScopeSpec().isSet() && !Invalid) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_catch_declarator) << D.getCXXScopeSpec().getRange();"}} |
| [l]={
| |
| ["clang/test/Parser/recovery.cpp"]={"clang/test/Parser/recovery.cpp:43:3: note: still within definition of \'MissingBrace::S\' here","clang/test/Parser/recovery.cpp:50:3: note: still within definition of \'MissingBrace::PR17949\' here"}
| |
| }
| |
| }, | | }, |
| ["note_missing_selector_name"]={ | | ["err_qualified_friend_def"]={ |
| [b]="note_missing_selector_name", | | [b]="err_qualified_friend_def", |
| [h]="introduce a parameter name to make %0 part of the selector", | | [j]="friend function definition cannot be qualified with \'%0\'", |
| [i]="introduce a parameter name to make A part of the selector", | | [i]="friend function definition cannot be qualified with \'A\'", |
| [c]=g, | | [h]=k, |
| [e]="introduce a parameter name to make (.*?) part of the selector", | | [c]="friend function definition cannot be qualified with \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]=Ab, | | [e]=m, |
| [j]={"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"}, | | [g]={"16e65616d64b",1318209119,"Implement the restrictions in C++ [class.friend]p6, which disallow","Implement the restrictions in C++ [class.friend]p6, which disallow\ndefining a friend function with a qualified name or in a local\nclass. Fixes PR9853. \n\nllvm-svn: 141524"}, |
| [k]={{Wc,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;"}}, | | [d]={{w,17657,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if ((SS.isInvalid() || !SS.isSet()) && (FunctionContainingLocalClass = cast<CXXRecordDecl>(CurContext)->isLocalClass())) {\n // ...\n } else if (SS.isInvalid() || !SS.isSet()) {\n // ...\n } else if (!SS.getScopeRep()->isDependent()) {\n // ...\n if (D.isFunctionDefinition()) {\n // ...\n SemaDiagnosticBuilder DB = Diag(SS.getRange().getBegin(), diag::err_qualified_friend_def);"},{w,17676,"NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams) {\n // ...\n if ((SS.isInvalid() || !SS.isSet()) && (FunctionContainingLocalClass = cast<CXXRecordDecl>(CurContext)->isLocalClass())) {\n // ...\n } else if (SS.isInvalid() || !SS.isSet()) {\n // ...\n } else if (!SS.getScopeRep()->isDependent()) {\n // ...\n } else {\n if (D.isFunctionDefinition()) {\n // ...\n Diag(SS.getRange().getBegin(), diag::err_qualified_friend_def) << SS.getScopeRep();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CXX/class.access/class.friend/p6.cpp"]={"clang/test/CXX/class.access/class.friend/p6.cpp:10:15: error: friend function definition cannot be qualified with \'::\'","clang/test/CXX/class.access/class.friend/p6.cpp:11:15: error: friend function definition cannot be qualified with \'X::\'","clang/test/CXX/class.access/class.friend/p6.cpp:15:15: error: friend function definition cannot be qualified with \'T::\'"} |
| } | | } |
| }, | | }, |
| ["note_mmap_add_framework_keyword"]={ | | ["err_qualified_friend_no_match"]={ |
| [b]={{nil,u,"note_mmap_add_framework_keyword"}}, | | [b]="err_qualified_friend_no_match", |
| [h]={{nil,u,"use \'framework module\' to declare module \'%0\'"}}, | | [j]={{nil,u,"friend declaration of %0 does not match any declaration in %1"}}, |
| [i]={{nil,u,"use \'framework module\' to declare module \'A\'"}}, | | [i]={{nil,u,"friend declaration of A does not match any declaration in B"}}, |
| [c]=g, | | [h]=k, |
| [e]="use \'framework module\' to declare module \'(.*?)\'", | | [c]="friend declaration of (.*?) does not match any declaration in (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,Eb}}, | | [e]={{nil,u,m}}, |
| [j]={"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"}, | | [g]={"8ce732b46f55",1546840846,"DR674, PR38883, PR40238: Qualified friend lookup should look for a","DR674, PR38883, PR40238: Qualified friend lookup should look for a\ntemplate specialization if there is no matching non-template function.\n\nThis exposed a couple of related bugs:\n - we would sometimes substitute into a friend template instead of a\n suitable non-friend declaration; this would now crash because we\'d\n decide the specialization of the friend is a redeclaration of itself\n - ADL failed to properly handle the case where an invisible local\n extern declaration redeclares an invisible friend\n\nBoth are fixed herein: in particular, we now never make invisible\nfriends or local extern declarations visible to name lookup unless\nthey are the only declaration of the entity. (We already mostly did\nthis for local extern declarations.)\n\nllvm-svn: 350505"}, |
| [k]={{qc,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\");"}}, | | [d]={{D,8957,"/// Generate diagnostics for an invalid function redeclaration.\n///\n/// This routine handles generating the diagnostic messages for an invalid\n/// function redeclaration, including finding possible similar declarations\n/// or performing typo correction if there are no previous declarations with\n/// the same name.\n///\n/// Returns a NamedDecl iff typo correction was performed and substituting in\n/// the new declaration name does not cause new errors.\nstatic NamedDecl *DiagnoseInvalidRedeclaration(Sema &SemaRef, LookupResult &Previous, FunctionDecl *NewFD, ActOnFDArgs &ExtraArgs, bool IsLocalFriend, Scope *S) {\n // ...\n unsigned DiagMsg = IsLocalFriend ? diag::err_no_matching_local_friend : NewFD->getFriendObjectKind() ? diag::err_qualified_friend_no_match : diag::err_member_decl_does_not_match;"},{W,9482,"/// Perform semantic analysis for the given function template\n/// specialization.\n///\n/// This routine performs all of the semantic analysis required for an\n/// explicit function template specialization. On successful completion,\n/// the function declaration \\p FD will become a function template\n/// specialization.\n///\n/// \\param FD the function declaration, which will be updated to become a\n/// function template specialization.\n///\n/// \\param ExplicitTemplateArgs the explicitly-provided template arguments,\n/// if any. Note that this may be valid info even when 0 arguments are\n/// explicitly provided as in, e.g., \\c void sort<>(char*, char*);\n/// as it anyway contains info on the angle brackets locations.\n///\n/// \\param Previous the set of declarations that may be specialized by\n/// this function specialization.\n///\n/// \\param QualifiedFriend whether this is a lookup for a qualified friend\n/// declaration with no explicit template argument list that might be\n/// befriending a function template specialization.\nbool Sema::CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend) {\n // ...\n // For a qualified friend declaration (with no explicit marker to indicate\n // that a template specialization was intended), note all (template and\n // non-template) candidates.\n if (QualifiedFriend && Candidates.empty()) {\n Diag(FD->getLocation(), diag::err_qualified_friend_no_match) << FD->getDeclName() << FDLookupContext;"}} |
| [l]={
| |
| ["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\'"}
| |
| }
| |
| }, | | }, |
| ["note_mmap_lbrace_match"]={ | | ["err_qualified_function_typeid"]={ |
| [b]="note_mmap_lbrace_match", | | [b]={{nil,o,"err_qualified_function_typeid"}}, |
| [h]="to match this \'{\'", | | [j]={{nil,o,"type operand %0 of \'typeid\' cannot have \'%1\' qualifier"}}, |
| [i]="to match this \'{\'", | | [i]={{nil,o,"type operand A of \'typeid\' cannot have \'B\' qualifier"}}, |
| [c]=g, | | [h]=k, |
| [e]="to match this \'\\{\'", | | [c]="type operand (.*?) of \'typeid\' cannot have \'(.*?)\' qualifier", |
| [f]=a, | | [f]=a, |
| [d]=Eb, | | [e]={{nil,o,m}}, |
| [j]={"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"}, | | [g]={"7c11da0cfd33",1567434909,"[clang] New __attribute__((__clang_arm_mve_alias)).","[clang] New __attribute__((__clang_arm_mve_alias)).\n\nThis allows you to declare a function with a name of your choice (say\n`foo`), but have clang treat it as if it were a builtin function (say\n`__builtin_foo`), by writing\n\n static __inline__ __attribute__((__clang_arm_mve_alias(__builtin_foo)))\n int foo(args);\n\nI\'m intending to use this for the ACLE intrinsics for MVE, which have\nto be polymorphic on their argument types and also need to be\nimplemented by builtins. To avoid having to implement the polymorphism\nwith several layers of nested _Generic and make error reporting\nhideous, I want to make all the user-facing intrinsics correspond\ndirectly to clang builtins, so that after clang resolves\n__attribute__((overloadable)) polymorphism it\'s already holding the\nright BuiltinID for the intrinsic it selected.\n\nHowever, this commit itself just introduces the new attribute, and\ndoesn\'t use it for anything.\n\nTo avoid unanticipated side effects if this attribute is used to make\naliases to other builtins, there\'s a restriction mechanism: only\n(BuiltinID, alias) pairs that are approved by the function\nArmMveAliasValid() will be permitted. At present, that function\ndoesn\'t permit anything, because the Tablegen that will generate its\nlist of valid pairs isn\'t yet implemented. So the only test of this\nfacility is one that checks that an unapproved builtin _can\'t_ be\naliased.\n\nReviewers: dmgreen, miyuki, ostannard\n\nSubscribers: cfe-commits\n\nTags: #clang\n\nDifferential Revision: https://reviews.llvm.org/D67159"}, |
| [k]={{qc,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);"},{qc,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);"},{qc,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);"},{qc,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);"}},
| | [d]={{rb,2145,"bool Sema::CheckQualifiedFunctionForTypeId(QualType T, SourceLocation Loc) {\n // ...\n Diag(Loc, diag::err_qualified_function_typeid) << T << getFunctionQualifiersAsString(FPT);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/objcxx-at.mm"]={"clang/test/Parser/objcxx-at.mm:12:10: note: to match this \'{\'"} | | ["clang/test/SemaTemplate/instantiate-expr-4.cpp"]={"clang/test/SemaTemplate/instantiate-expr-4.cpp:198:12: error: type operand \'void () const\' of \'typeid\' cannot have \'const\' qualifier","clang/test/SemaTemplate/instantiate-expr-4.cpp:198:12: error: type operand \'void () &\' of \'typeid\' cannot have \'&\' qualifier"} |
| } | | } |
| }, | | }, |
| ["note_mmap_lsquare_match"]={ | | ["err_qualified_member_nonclass"]={ |
| [b]="note_mmap_lsquare_match", | | [b]="err_qualified_member_nonclass", |
| [h]="to match this \']\'", | | [j]="qualified member access refers to a member in %0", |
| [i]="to match this \']\'", | | [i]="qualified member access refers to a member in A", |
| [c]=g,
| | [h]=k, |
| [e]="to match this \'\\]\'",
| | [c]="qualified member access refers to a member in (.*?)", |
| [f]=a,
| |
| [d]=Eb,
| |
| [j]={"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"},
| |
| [k]={{qc,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"]={
| |
| [b]="note_mmap_prev_definition",
| |
| [h]="previously defined here", | |
| [i]="previously defined here",
| |
| [c]=g, | |
| [e]="previously defined here",
| |
| [f]=a,
| |
| [d]=Eb,
| |
| [j]={"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"},
| |
| [k]={{qc,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);"},{qc,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"]={
| |
| [b]={{nil,z,"note_mmap_rename_top_level_private_module"}},
| |
| [h]={{nil,z,"rename \'%0\' to ensure it can be found by name"}},
| |
| [i]={{nil,z,"rename \'A\' to ensure it can be found by name"}},
| |
| [c]=g,
| |
| [e]="rename \'(.*?)\' to ensure it can be found by name",
| |
| [f]=a, | | [f]=a, |
| [d]={{nil,z,Eb}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"0b3d95ae64a5",1255819074,"Fix a crash with qualified member access into a non-type, from Sean Hunt!","Fix a crash with qualified member access into a non-type, from Sean Hunt!\n\nllvm-svn: 84370"}, |
| [k]={{qc,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);"}}, | | [d]={{cb,683,"static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, Expr *BaseExpr, const RecordType *RTy, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, bool HasTemplateArgs, SourceLocation TemplateKWLoc, TypoExpr *&TE) {\n // ...\n if (SS.isSet()) {\n // ...\n if (!isa<TypeDecl>(DC)) {\n SemaRef.Diag(R.getNameLoc(), diag::err_qualified_member_nonclass) << DC << SS.getRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaCXX/member-expr.cpp"]={"clang/test/SemaCXX/member-expr.cpp:43:9: error: qualified member access refers to a member in the global namespace","clang/test/SemaCXX/member-expr.cpp:44:10: error: qualified member access refers to a member in namespace \'C\'"} |
| } | | } |
| }, | | }, |
| ["note_module_cache_path"]={ | | ["err_qualified_member_of_unrelated"]={ |
| [b]="note_module_cache_path", | | [b]="err_qualified_member_of_unrelated", |
| [h]="after modifying system headers, please delete the module cache at \'%0\'", | | [j]="%q0 is not a member of class %1", |
| [i]="after modifying system headers, please delete the module cache at \'A\'", | | [i]="A is not a member of class B", |
| [c]=g, | | [h]=k, |
| [e]="after modifying system headers, please delete the module cache at \'(.*?)\'", | | [c]="(.*?) is not a member of class (.*?)", |
| [f]=a,
| |
| [d]=nb,
| |
| [j]={"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"},
| |
| [k]={{ud,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"]={
| |
| [b]="note_module_def_undef_here",
| |
| [h]="macro was %select{defined|#undef\'d}0 here",
| |
| [i]={{nil,nil,{"macro was ",{"defined","#undef\'d"},Wb}}},
| |
| [c]=g,
| |
| [e]="macro was (?:defined|\\#undef\'d) here",
| |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"1e67dd6b2f6a",1272332618,"Improve the diagnostic you get when making a qualified member access","Improve the diagnostic you get when making a qualified member access\nwith a qualifier referencing a different type.\n\nllvm-svn: 102409"}, |
| [k]={{"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;"}}, | | [d]={{cb,540,"/// We know that the given qualified member reference points only to\n/// declarations which do not belong to the static type of the base\n/// expression. Diagnose the problem.\nstatic void DiagnoseQualifiedMemberReference(Sema &SemaRef, Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, NamedDecl *rep, const DeclarationNameInfo &nameInfo) {\n // ...\n SemaRef.Diag(nameInfo.getLoc(), diag::err_qualified_member_of_unrelated) << SS.getRange() << rep << BaseType;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Modules/config_macros.m"]={"clang/test/Modules/config_macros.m:12:8: note: macro was #undef\'d here","clang/test/Modules/config_macros.m:15:9: note: macro was defined here","clang/test/Modules/config_macros.m:22:9: note: macro was defined here"} | | ["clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.general/p8-0x.cpp:33:34: error: \'PR10127::outer::middle::mfunc\' is not a member of class \'decltype(outer::middle::inner())\' (aka \'PR10127::outer::middle::inner\')"} |
| } | | } |
| }, | | }, |
| ["note_module_file_conflict"]={ | | ["err_qualified_objc_access"]={ |
| [b]={{nil,x,"note_module_file_conflict"}}, | | [b]="err_qualified_objc_access", |
| [h]={{nil,x,"this is generally caused by modules with the same name found in multiple paths"}}, | | [j]="%select{property|instance variable}0 access cannot be qualified with \'%1\'", |
| [i]={{nil,x,"this is generally caused by modules with the same name found in multiple paths"}}, | | [i]={{nil,nil,{{"property","instance variable"}," access cannot be qualified with \'B\'"}}}, |
| [c]=g, | | [h]=k, |
| [e]="this is generally caused by modules with the same name found in multiple paths", | | [c]="(?:property|instance variable) access cannot be qualified with \'(.*?)\'", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,nb}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"12340e5b1868",1318202569,"Diagnose attempts to qualify the name of an instance variable or","Diagnose attempts to qualify the name of an instance variable or\nproperty in an Objective-C++ member access expression. Fixes PR9759.\n\nllvm-svn: 141522"}, |
| [k]={{ud,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);"}}
| | [d]={{cb,1331,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n // Handle ivar access to Objective-C objects.\n if (const ObjCObjectType *OTy = BaseType->getAs<ObjCObjectType>()) {\n if (!SS.isEmpty() && !SS.isInvalid()) {\n S.Diag(SS.getRange().getBegin(), diag::err_qualified_objc_access) << 1 << SS.getScopeRep() << FixItHint::CreateRemoval(SS.getRange());"},{cb,1494,"/// Look up the given member of the given non-type-dependent\n/// expression. This can return in one of two ways:\n/// * If it returns a sentinel null-but-valid result, the caller will\n/// assume that lookup was performed and the results written into\n/// the provided structure. It will take over from there.\n/// * Otherwise, the returned expression will be produced in place of\n/// an ordinary member expression.\n///\n/// The ObjCImpDecl bit is a gross hack that will need to be properly\n/// fixed for ObjC++.\nstatic ExprResult LookupMemberExpr(Sema &S, LookupResult &R, ExprResult &BaseExpr, bool &IsArrow, SourceLocation OpLoc, CXXScopeSpec &SS, Decl *ObjCImpDecl, bool HasTemplateArgs, SourceLocation TemplateKWLoc) {\n // ...\n if (!IsArrow && (OPT = BaseType->getAs<ObjCObjectPointerType>())) {\n if (!SS.isEmpty() && !SS.isInvalid()) {\n S.Diag(SS.getRange().getBegin(), diag::err_qualified_objc_access) << 0 << SS.getScopeRep() << FixItHint::CreateRemoval(SS.getRange());"}}, |
| },
| |
| ["note_module_file_imported_by"]={
| |
| [b]="note_module_file_imported_by",
| |
| [h]="imported by %select{|module \'%2\' in }1\'%0\'",
| |
| [i]={{nil,nil,{"imported by ",{a,"module \'C\' in "},"\'A\'"}}},
| |
| [c]=g,
| |
| [e]="imported by (?:|module \'(.*?)\' in )\'(.*?)\'",
| |
| [f]=a,
| |
| [d]=nb,
| |
| [j]={"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"},
| |
| [k]={{ud,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;"}},
| |
| [l]={ | | [l]={ |
| ["clang/test/PCH/cxx-chain-function-template.cpp"]={"note: imported by \'clang/test/PCH/cxx-chain-function-template.cpp.pch-final\'"} | | ["clang/test/SemaObjCXX/propert-dot-error.mm"]={"clang/test/SemaObjCXX/propert-dot-error.mm:65:5: error: property access cannot be qualified with \'Forward::\'","clang/test/SemaObjCXX/propert-dot-error.mm:66:6: error: instance variable access cannot be qualified with \'Forward::\'"} |
| } | | } |
| }, | | }, |
| ["note_module_import_here"]={ | | ["err_qualified_objc_catch_parm"]={ |
| [b]={{nil,y,"note_module_import_here"}}, | | [b]="err_qualified_objc_catch_parm", |
| [h]={{nil,y,"module imported here"}}, | | [j]="@catch parameter declarator cannot be qualified", |
| [i]={{nil,y,"module imported here"}}, | | [i]="@catch parameter declarator cannot be qualified", |
| [c]=g, | | [h]=k, |
| [e]="module imported here", | | [c]="@catch parameter declarator cannot be qualified", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,a}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"f356419bf57b",1272303169,"Refactor Objective-C @catch parameter checking by detangling it from","Refactor Objective-C @catch parameter checking by detangling it from\nfunction-parameter checking and splitting it into the normal\nActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch\nparameter rather than the ill-fitting ParmVarDecl.\n\nllvm-svn: 102347"}, |
| [k]={{"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);"}}, | | [d]={{Z,5226,"Decl *Sema::ActOnObjCExceptionDecl(Scope *S, Declarator &D) {\n // ...\n // Parameter declarators cannot be qualified (C++ [dcl.meaning]p1).\n if (D.getCXXScopeSpec().isSet()) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_objc_catch_parm) << D.getCXXScopeSpec().getRange();"}} |
| [l]={
| |
| ["clang/test/Modules/requires-coroutines.mm"]={"clang/test/Modules/requires-coroutines.mm:6:2: note: module imported here"}
| |
| }
| |
| }, | | }, |
| ["note_module_import_not_at_top_level"]={ | | ["err_qualified_param_declarator"]={ |
| [b]="note_module_import_not_at_top_level", | | [b]="err_qualified_param_declarator", |
| [h]="%0 begins here", | | [j]="parameter declarator cannot be qualified", |
| [i]="A begins here", | | [i]="parameter declarator cannot be qualified", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) begins here", | | [c]="parameter declarator cannot be qualified", |
| [f]=a, | | [f]=a, |
| [d]=Ld, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{Qb,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;"}}, | | [d]={{D,14694,"/// Common checks for a parameter-declaration that should apply to both function\n/// parameters and non-type template parameters.\nvoid Sema::CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D) {\n // ...\n // Parameter declarators cannot be qualified (C++ [dcl.meaning]p1).\n if (D.getCXXScopeSpec().isSet()) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_param_declarator) << D.getCXXScopeSpec().getRange();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/dcl_ambig_res.cpp"]={"clang/test/SemaCXX/dcl_ambig_res.cpp:73:17: error: parameter declarator cannot be qualified"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_definition_data"]={ | | ["err_qualified_typedef_declarator"]={ |
| [b]={{nil,z,"note_module_odr_violation_definition_data"}}, | | [b]="err_qualified_typedef_declarator", |
| [h]={{nil,z,"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"}}, | | [j]="typedef declarator cannot be qualified", |
| [i]={{nil,z,{sb,{{"C base ",{wb,"classes"}},{"C virtual base ",{wb,"classes"}},"C base class with different type D",{"C ",{"non-virtual","virtual"}," base class E"},{"C base class D with ",{"public","protected","private",sc}," access specifier"}}}}}, | | [i]="typedef declarator cannot be qualified", |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="typedef declarator cannot be qualified", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,z,nb}}, | | [e]=m, |
| [j]={"e13eabe7d339",1506737957,"[ODRHash] Add base classes to hashing CXXRecordDecl.","[ODRHash] Add base classes to hashing CXXRecordDecl.\n\nllvm-svn: 314581"}, | | [g]={L,1237025389,M,N}, |
| [k]={{cb,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; };"}}, | | [d]={{D,6661,"NamedDecl *Sema::ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous) {\n // Typedef declarators cannot be qualified (C++ [dcl.meaning]p1).\n if (D.getCXXScopeSpec().isSet()) {\n Diag(D.getIdentifierLoc(), diag::err_qualified_typedef_declarator) << D.getCXXScopeSpec().getRange();"}}, |
| [l]={ | | [l]={ |
| [vd]={"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"} | | ["clang/test/SemaCXX/nested-name-spec.cpp"]={"clang/test/SemaCXX/nested-name-spec.cpp:101:18: error: typedef declarator cannot be qualified"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_different_definitions"]={ | | ["err_range_on_array_parameter"]={ |
| [b]="note_module_odr_violation_different_definitions", | | [b]="err_range_on_array_parameter", |
| [h]="definition in module \'%0\' is here",
| | [j]="cannot build range expression with array function parameter %0 since parameter with array type %1 is treated as pointer type %2", |
| [i]="definition in module \'A\' is here",
| | [i]="cannot build range expression with array function parameter A since parameter with array type B is treated as pointer type C", |
| [c]=g,
| | [h]=k, |
| [e]="definition in module \'(.*?)\' is here",
| | [c]="cannot build range expression with array function parameter (.*?) since parameter with array type (.*?) is treated as pointer type (.*?)", |
| [f]=a,
| |
| [d]={{nil,q,a},{w,nil,nb}},
| |
| [j]={"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"}, | |
| [k]={{cb,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"]={
| |
| [b]={{nil,u,"note_module_odr_violation_enum"}},
| |
| [h]={{nil,u,"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"}},
| |
| [i]={{nil,u,{sb,{{"enum that is ",{"not scoped","scoped"}},{"enum scoped with keyword ",{"struct",wb}},{"enum ",{"without","with"}," specified type"},"enum with specified type C","enum with C elementC","C element has name D",{"C element D ",{"has","does not have"}," an initializer"},"C element D has different initializer",a}}}}, | |
| [c]=g, | |
| [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, |
| [d]={{nil,q,a},{w,u,nb}}, | | [e]=m, |
| [j]={"ab4d730f14d1",1532559125,"[ODRHash] Support hashing enums.","[ODRHash] Support hashing enums.\n\nllvm-svn: 337978"}, | | [g]={"0825469126d7",1381529764,"Improve the error message for attempting to build a for range loop using a","Improve the error message for attempting to build a for range loop using a\nfunction parameter that has array type. Such a parameter will be treated as\na pointer type instead, resulting in a missing begin function error is a\nsuggestion to dereference the pointer. This provides a different,\nmore informative diagnostic as well as point to the parameter declaration.\n\nllvm-svn: 192512"}, |
| [k]={{cb,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; };"}}, | | [d]={{Eb,2926,"/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.\nStmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind) {\n // ...\n if (RangeVarType->isDependentType()) {\n // ...\n } else if (!BeginDeclStmt.get()) {\n // ...\n if (const ArrayType *UnqAT = RangeType->getAsArrayTypeUnsafe()) {\n // ...\n } else {\n // ...\n if (Kind == BFRK_Build && RangeStatus == FRS_NoViableFunction && BEFFailure == BEF_begin) {\n // If the range is being built from an array parameter, emit a\n // a diagnostic that it is being treated as a pointer.\n if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Range)) {\n if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) {\n // ...\n if (PointerTy->isPointerType() && ArrayTy->isArrayType()) {\n Diag(Range->getBeginLoc(), diag::err_range_on_array_parameter) << RangeLoc << PVD << ArrayTy << PointerTy;"}}, |
| [l]={ | | [l]={ |
| [vd]={"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"} | | ["clang/test/SemaCXX/for-range-examples.cpp"]={"clang/test/SemaCXX/for-range-examples.cpp:198:19: error: cannot build range expression with array function parameter \'arr\' since parameter with array type \'int[]\' is treated as pointer type \'int *\'","clang/test/SemaCXX/for-range-examples.cpp:209:19: error: cannot build range expression with array function parameter \'arr\' since parameter with array type \'vector[]\' is treated as pointer type \'vector *\'"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_field"]={ | | ["err_raw_delim_too_long"]={ |
| [b]={{nil,w,"note_module_odr_violation_field"}}, | | [b]="err_raw_delim_too_long", |
| [h]={{nil,q,"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"},{w,w,"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"}}, | | [j]="raw string delimiter longer than 16 characters; use PREFIX( )PREFIX to delimit raw string", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{"field D","field D with type E",{{"non-",a},"bitfield D"},"bitfield D with different width expression",{{"non-",a},"mutable field D"},{"field D with ",{sc,"an"}," initializer"},"field D with a different initializer"}}},{w,w,{sb,{"field C","field C with type D",{{"non-",a},"bitfield C"},"bitfield C with different width expression",{{"non-",a},"mutable field C"},{"field C with ",{sc,"an"}," initializer"},"field C with a different initializer"}}}}, | | [i]="raw string delimiter longer than 16 characters; use PREFIX( )PREFIX to delimit raw string", |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="raw string delimiter longer than 16 characters; use PREFIX\\( \\)PREFIX to delimit raw string", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,w,nb}}, | | [e]=p, |
| [j]={Pc,1643408541,Nc,Lc}, | | [g]={"54edccafc5e3",1313035575,"Add support for C++0x raw string literals.","Add support for C++0x raw string literals.\n\nllvm-svn: 137298"}, |
| [k]={{cb,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; };"}}, | | [d]={{"clang/lib/Lex/Lexer.cpp",2158,"/// LexRawStringLiteral - Lex the remainder of a raw string literal, after\n/// having lexed R\", LR\", u8R\", uR\", or UR\".\nbool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, tok::TokenKind Kind) {\n // ...\n // If the last character was not a \'(\', then we didn\'t lex a valid delimiter.\n if (CurPtr[PrefixLen] != \'(\') {\n if (!isLexingRawMode()) {\n // ...\n if (PrefixLen == 16) {\n Diag(PrefixEnd, diag::err_raw_delim_too_long);"}}, |
| [l]={ | | [l]={ |
| ["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/Lexer/cxx0x_raw_string_delim_length.cpp"]={"clang/test/Lexer/cxx0x_raw_string_delim_length.cpp:7:38: error: raw string delimiter longer than 16 characters; use PREFIX( )PREFIX to delimit raw string"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_function"]={ | | ["err_readonly_message_assignment"]={ |
| [b]={{nil,z,"note_module_odr_violation_function"}}, | | [b]="err_readonly_message_assignment", |
| [h]={{nil,z,"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"}}, | | [j]="assigning to \'readonly\' return result of an Objective-C message not allowed", |
| [i]={{nil,z,{sb,{"different return type C","C parameter with name D",{"C parameter with type D",{a," decayed from F"}},{"C parameter with",{"out",a}," a default argument"},"C parameter with a different default argument","a different body"}}}}, | | [i]="assigning to \'readonly\' return result of an Objective-C message not allowed", |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="assigning to \'readonly\' return result of an Objective\\-C message not allowed", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,z,nb}}, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{cb,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; };"}},
| | [d]={{O,14373,"/// CheckForModifiableLvalue - Verify that E is a modifiable lvalue. If not,\n/// emit an error and return true. If so, return false.\nstatic bool CheckForModifiableLvalue(Expr *E, SourceLocation Loc, Sema &S) {\n // ...\n case Expr::MLV_InvalidMessageExpression:\n DiagID = diag::err_readonly_message_assignment;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaObjC/assign-rvalue-message.m"]={"clang/test/SemaObjC/assign-rvalue-message.m:23:18: error: assigning to \'readonly\' return result of an Objective-C message not allowed"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_method_params"]={ | | ["err_realimag_invalid_type"]={ |
| [b]={{nil,q,"note_module_odr_violation_method_params"}}, | | [b]="err_realimag_invalid_type", |
| [h]={{nil,q,"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"}}, | | [j]="invalid type %0 to %1 operator", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{{{"method E",E,D}," that has F parameterF"},{{"method E",E,D}," with F parameter of type G",{a," decayed from I"}},{{"method E",E,D}," with F parameter named G"}}}}}, | | [i]="invalid type A to B operator", |
| [c]=g, | | [h]=k, |
| [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 (.*?))", | | [c]="invalid type (.*?) to (.*?) operator", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a}}, | | [e]=m, |
| [j]={Pc,1643408541,Nc,Lc}, | | [g]={L,1237025389,M,N}, |
| [k]={{cb,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;"}}, | | [d]={{O,4914,"static QualType CheckRealImagOperand(Sema &S, ExprResult &V, SourceLocation Loc, bool IsReal) {\n // ...\n S.Diag(Loc, diag::err_realimag_invalid_type) << V.get()->getType() << (IsReal ? \"__real\" : \"__imag\");"}}, |
| [l]={ | | [l]={ |
| [vd]={"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...\'"} | | ["clang/test/SemaCXX/unary-real-imag.cpp"]={"clang/test/SemaCXX/unary-real-imag.cpp:4:9: error: invalid type \'A\' to __real operator","clang/test/SemaCXX/unary-real-imag.cpp:5:9: error: invalid type \'A\' to __imag operator"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_mismatch_decl"]={ | | ["err_record_with_pointers_kernel_param"]={ |
| [b]={{nil,y,"note_module_odr_violation_mismatch_decl"}}, | | [b]="err_record_with_pointers_kernel_param", |
| [h]={{nil,q,"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"},{w,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|function template}1"},{z,y,"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"}}, | | [j]="%select{struct|union}0 kernel parameters may not contain pointers", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{"end of class","public access specifier","private access specifier","protected access specifier","static assert",fd,"method","type alias","typedef","data member","friend declaration","function template","method","instance variable","property"}}},{w,u,{sb,{"end of class","public access specifier","private access specifier","protected access specifier","static assert",fd,"method","type alias","typedef","data member","friend declaration","function template"}}},{z,y,{sb,{"end of class","public access specifier","private access specifier","protected access specifier","static assert",fd,"method","type alias","typedef","data member","friend declaration"}}}}, | | [i]={{nil,nil,{{"struct","union"}," kernel parameters may not contain pointers"}}}, |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="(?:struct|union) kernel parameters may not contain pointers", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,y,nb}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{cb,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;"}},
| | [d]={{D,9578,"static void checkIsValidOpenCLKernelParameter(Sema &S, Declarator &D, ParmVarDecl *Param, llvm::SmallPtrSetImpl<const Type *> &ValidTypes) {\n // ...\n do {\n // ...\n for (const auto *FD : RD->fields()) {\n // ...\n // OpenCL v1.2 s6.9.p:\n // Arguments to kernel functions that are declared to be a struct or union\n // do not allow OpenCL objects to be passed as elements of the struct or\n // union. This restriction was lifted in OpenCL v2.0 with the introduction\n // of SVM.\n if (ParamType == PtrKernelParam || ParamType == PtrPtrKernelParam || ParamType == InvalidAddrSpacePtrKernelParam) {\n S.Diag(Param->getLocation(), diag::err_record_with_pointers_kernel_param) << PT->isUnionType() << PT;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaOpenCL/invalid-kernel-parameters.cl"]={"clang/test/SemaOpenCL/invalid-kernel-parameters.cl:98:44: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:105:39: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:119:43: error: union kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:130:56: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:147:78: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:207:85: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:207:106: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:213:44: error: struct kernel parameters may not contain pointers","clang/test/SemaOpenCL/invalid-kernel-parameters.cl:219:50: error: struct kernel parameters may not contain pointers"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_mismatch_decl_unknown"]={ | | ["err_recursive_default_argument"]={ |
| [b]={{nil,y,"note_module_odr_violation_mismatch_decl_unknown"}}, | | [b]="err_recursive_default_argument", |
| [h]={{nil,q,"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"},{w,w,"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"},{U,y,"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"}}, | | [j]="recursive evaluation of default argument", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{a,a,a,a,"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"}}},{w,w,{sb,{a,a,a,a,"different static assert","different field","different method","different type alias","different typedef","different data member","different friend declaration","different function template","another unexpected decl"}}},{U,y,{sb,{a,a,a,a,"different static assert","different field","different method","different type alias","different typedef","different data member","different friend declaration","another unexpected decl"}}}}, | | [i]="recursive evaluation of default argument", |
| [c]=g, | | [h]=k, |
| [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)",
| | [c]="recursive evaluation of default argument", |
| [f]=a,
| |
| [d]={{nil,q,a},{w,y,nb}},
| |
| [j]={"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"},
| |
| [k]={{cb,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();"},{cb,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();"},{cb,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();"},{cb,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"]={
| |
| [b]="note_module_odr_violation_no_possible_decls",
| |
| [h]="definition has no member %0",
| |
| [i]="definition has no member A",
| |
| [c]=g, | |
| [e]="definition has no member (.*?)",
| |
| [f]=a, | | [f]=a, |
| [d]=nb, | | [e]=m, |
| [j]={"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"}, | | [g]={"b82a9401dfb7",1465872956,"Detect recursive default argument definition","Detect recursive default argument definition\n\nIf definition of default function argument uses itself, clang crashed,\nbecause corresponding function parameter is not associated with the default\nargument yet. With this fix clang emits appropriate error message.\n\nThis change fixes PR28105.\n\nDifferential Revision: http://reviews.llvm.org/D21301\n\nllvm-svn: 272623"}, |
| [k]={{ud,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;"}}, | | [d]={{O,6027,"bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param, Expr *RewrittenInit, bool SkipImmediateInvocations) {\n if (Param->hasUnparsedDefaultArg()) {\n // ...\n // If we\'ve already cleared out the location for the default argument,\n // that means we\'re parsing it right now.\n if (!UnparsedDefaultArgLocs.count(Param)) {\n Diag(Param->getBeginLoc(), diag::err_recursive_default_argument) << FD;"},{"clang/lib/Sema/SemaTemplateInstantiate.cpp",2966,"/// Substitute the given template arguments into the default argument.\nbool Sema::SubstDefaultArgument(SourceLocation Loc, ParmVarDecl *Param, const MultiLevelTemplateArgumentList &TemplateArgs, bool ForCallExpr) {\n // ...\n if (Inst.isAlreadyInstantiating()) {\n Diag(Param->getBeginLoc(), diag::err_recursive_default_argument) << FD;"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp"]={"clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp:46:17: error: recursive evaluation of default argument"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_objc_interface"]={ | | ["err_recursive_superclass"]={ |
| [b]={{nil,q,"note_module_odr_violation_objc_interface"}}, | | [b]="err_recursive_superclass", |
| [h]={{nil,q,"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"}}, | | [j]="trying to recursively use %0 as superclass of %1", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{{{"no super class","super class with type E"}},{"instance variable \'D\' access control is ",{a,"@private","@protected","@public","@package"}}}}}}, | | [i]="trying to recursively use A as superclass of B", |
| [c]=g, | | [h]=k, |
| [e]="but in (?:\'(.*?)\'|definition here) found (?:(?:no super class|super class with type (.*?))|instance variable \'(.*?)\' access control is (?:|@private|@protected|@public|@package))", | | [c]="trying to recursively use (.*?) as superclass of (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a}}, | | [e]=m, |
| [j]={rc,1662843785,ec,vc}, | | [g]={"5582f231f2b2",1247177306,"don\'t crash if class is using itself as its super class.","don\'t crash if class is using itself as its super class.\n\nllvm-svn: 75178"}, |
| [k]={{cb,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; };"}}, | | [d]={{Z,570,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n // ...\n if (declaresSameEntity(PrevDecl, IDecl)) {\n Diag(SuperLoc, diag::err_recursive_superclass) << SuperName << ClassName << SourceRange(AtInterfaceLoc, ClassLoc);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Modules/method_pool.m"]={"clang/test/Modules/Inputs/MethodPoolA.h:10:12: note: but in \'MethodPoolA\' found super class with type \'A\'"} | | ["clang/test/SemaObjC/undef-superclass-1.m"]={"clang/test/SemaObjC/undef-superclass-1.m:29:29: error: trying to recursively use \'RecursiveClass\' as superclass of \'RecursiveClass\'"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_objc_method"]={ | | ["err_redeclaration_different_type"]={ |
| [b]={{nil,q,"note_module_odr_violation_objc_method"}}, | | [b]="err_redeclaration_different_type", |
| [h]={{nil,q,"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"}}, | | [j]="redeclaration of %0 with a different type%diff{: $ vs $|}1,2", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{"method D with different return type E",{"method D as ",{wb,"instance"}," method"},{{sc,"\'required\'","\'optional\'"}," method control"},{"method D with ",{"no designated initializer","designated initializer"}},{{"regular","direct"}," method D"},"different method D"}}}}, | | [i]={{nil,nil,{"redeclaration of A with a different type",{": B vs C",a}}}}, |
| [c]=g, | | [h]=k, |
| [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 (.*?))", | | [c]="redeclaration of (.*?) with a different type(?:\\: (.*?) vs (.*?)|)", |
| [f]=a,
| |
| [d]={{nil,q,a}},
| |
| [j]={Pc,1643408541,Nc,Lc},
| |
| [k]={{cb,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"]={
| |
| [b]={{nil,q,"note_module_odr_violation_objc_property"}},
| |
| [h]={{nil,q,"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"}},
| |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{"property D","property D with type E",{{sc,"\'required\'","\'optional\'"}," property control"},{"property D with different \'",{"none","readonly","getter","assign","readwrite","retain",fc,"nonatomic","setter","atomic","weak","strong","unsafe_unretained","nullability","null_resettable",wb,"direct"},"\' attribute"}}}}},
| |
| [c]=g,
| |
| [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,
| |
| [d]={{nil,q,a}},
| |
| [j]={"dcb71b5e1d13",1657144706,"[ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches.","[ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches.\n\nDifferential Revision: https://reviews.llvm.org/D130326"},
| |
| [k]={{cb,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"]={
| |
| [b]="note_module_odr_violation_possible_decl",
| |
| [h]="declaration of %0 does not match",
| |
| [i]="declaration of A does not match",
| |
| [c]=g,
| |
| [e]="declaration of (.*?) does not match",
| |
| [f]=a, | | [f]=a, |
| [d]=nb, | | [e]=m, |
| [j]={"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"}, | | [g]={"38a50c0a1620",1436904529,"[Sema] Emit a better diagnostic when variable redeclarations disagree","[Sema] Emit a better diagnostic when variable redeclarations disagree\n\nWe referred to all declaration in definitions in our diagnostic messages\nwhich is can be inaccurate. Instead, classify the declaration and emit\nan appropriate diagnostic for the new declaration and an appropriate\nnote pointing to the old one.\n\nThis fixes PR24116.\n\nllvm-svn: 242190"}, |
| [k]={{ud,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];"}}, | | [d]={{D,4383,"static void diagnoseVarDeclTypeMismatch(Sema &S, VarDecl *New, VarDecl *Old) {\n // ...\n S.Diag(New->getLocation(), New->isThisDeclarationADefinition() ? diag::err_redefinition_different_type : diag::err_redeclaration_different_type) << New->getDeclName() << New->getType() << Old->getType();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Modules/odr.cpp"]={"clang/test/Modules/Inputs/odr/a.h:3:9: note: declaration of \'f\' does not match"} | | ["clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:162:14: error: redeclaration of \'n_var\' with a different type: \'double\' vs \'int\'","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:214:24: error: redeclaration of \'arr\' with a different type: \'int[3]\' vs \'int[2]\'","clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:149:14: error: redeclaration of \'arrX\' with a different type: \'int[4]\' vs \'int[3]\'"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_record"]={ | | ["err_redeclaration_non_exported"]={ |
| [b]={{nil,w,"note_module_odr_violation_record"}}, | | [b]={{nil,F,"err_redeclaration_non_exported"}}, |
| [h]={{nil,q,"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"},{w,w,"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"}}, | | [j]={{nil,C,"cannot export redeclaration %0 here since the previous declaration %select{is not exported|has internal linkage|has module linkage}1"},{F,F,"cannot export redeclaration %0 here since the previous declaration is not exported"}}, |
| [i]={{nil,q,{sb,{"static assert with different condition","static assert with different message",{"static assert with ",{a,yc},"message"},{{L,E,D}},{{L,E,D},tb,{"not deleted","deleted"}},{{L,E,D},tb,{"not defaulted","defaulted"}},{{L,E,D},tb,{a,"pure "},{"not virtual","virtual"}},{{L,E,D},tb,{"not static","static"}},{{L,E,D},tb,{"not volatile",Dd}},{{L,E,D},tb,{"not const","const"}},{{L,E,D},tb,{"not inline","inline"}},{{L,E,D}," with E parameter with",{"out",a}," a default argument"},{{L,E,D}," with E parameter with a different default argument"},{{L,E,D}," with ",{yc,a},"template arguments"},{{L,E,D}," with E template argumentE"},{{L,E,D}," with E for F template argument"},{{L,E,D}," with ",{"no body","body"}},{{L,E,D}," with different body"},{"friend ",{wb,Qc}},"friend C","friend function C","function template C with D template parameterD",{"function template C with D template paramter being a ",{"type","non-type","template"}," template parameter"},{"function template C with D template parameter ",{"with no name","named F"}},{"function template C with D template parameter with ",{yc,a},"default argument"},"function template C with D template parameter with default argument E","function template C with D template parameter with different type",{"function template C with D template parameter ",{"not ",a},"being a template parameter pack"},a}}},{w,w,{sb,{"static assert with different condition","static assert with different message",{"static assert with ",{a,yc},"message"},{{L,E,D}},{{L,E,D},tb,{"not deleted","deleted"}},{{L,E,D},tb,{"not defaulted","defaulted"}},{{L,E,D},tb,{a,"pure "},{"not virtual","virtual"}},{{L,E,D},tb,{"not static","static"}},{{L,E,D},tb,{"not volatile",Dd}},{{L,E,D},tb,{"not const","const"}},{{L,E,D},tb,{"not inline","inline"}},{{L,E,D}," that has E parameterE"},{{L,E,D}," with E parameter of type F",{a," decayed from H"}},{{L,E,D}," with E parameter named F"},{{L,E,D}," with E parameter with",{"out",a}," a default argument"},{{L,E,D}," with E parameter with a different default argument"},{{L,E,D}," with ",{yc,a},"template arguments"},{{L,E,D}," with E template argumentE"},{{L,E,D}," with E for F template argument"},{{L,E,D}," with ",{"no body","body"}},{{L,E,D}," with different body"},{"friend ",{wb,Qc}},"friend C","friend function C","function template C with D template parameterD",{"function template C with D template paramter being a ",{"type","non-type","template"}," template parameter"},{"function template C with D template parameter ",{"with no name","named F"}},{"function template C with D template parameter with ",{yc,a},"default argument"},"function template C with D template parameter with default argument E","function template C with D template parameter with different type",{"function template C with D template parameter ",{"not ",a},"being a template parameter pack"},a}}}}, | | [i]={{nil,C,{"cannot export redeclaration A here since the previous declaration ",{"is not exported","has internal linkage","has module linkage"}}},{F,F,"cannot export redeclaration A here since the previous declaration is not exported"}}, |
| [c]=g, | | [h]=k, |
| [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|)", | | [c]="cannot export redeclaration (.*?) here since the previous declaration (?:is not exported|has internal linkage|has module linkage)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,w,nb}}, | | [e]={{nil,F,m}}, |
| [j]={Pc,1643408541,Nc,Lc}, | | [g]={"f9c3310d32c6",1616787805,"[OPENMP]Fix PR49366: crash on VLAs in task untied regions.","[OPENMP]Fix PR49366: crash on VLAs in task untied regions.\n\nWe need to capture the local variables into a record in task untied\nregions but clang does not support record with VLA data members.\n\nDifferential Revision: https://reviews.llvm.org/D99436"}, |
| [k]={{cb,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; };"}}, | | [d]={{D,1735,"// [module.interface]p6:\n// A redeclaration of an entity X is implicitly exported if X was introduced by\n// an exported declaration; otherwise it shall not be exported.\nbool Sema::CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old) {\n // ...\n Diag(New->getLocation(), diag::err_redeclaration_non_exported) << New << S;"}}, |
| [l]={ | | [l]={ |
| [vd]={ | | ["clang/test/CXX/module/module.interface/p6.cpp"]={"clang/test/CXX/module/module.interface/p6.cpp:12:15: error: cannot export redeclaration \'S\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:20:15: error: cannot export redeclaration \'X\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:23:15: error: cannot export redeclaration \'Z\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:32:15: error: cannot export redeclaration \'B\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:33:15: error: cannot export redeclaration \'C\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:40:8: error: cannot export redeclaration \'TemplS\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:46:8: error: cannot export redeclaration \'TemplS2\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:49:13: error: cannot export redeclaration \'baz\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:54:13: error: cannot export redeclaration \'bar\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:66:16: error: cannot export redeclaration \'f1\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:72:6: error: cannot export redeclaration \'TemplFunc\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:79:6: error: cannot export redeclaration \'TemplFunc2\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:85:9: error: cannot export redeclaration \'TemplFunc3\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:88:12: error: cannot export redeclaration \'var\' here since the previous declaration has module linkage","clang/test/CXX/module/module.interface/p6.cpp:93:3: error: cannot export redeclaration \'TemplVar\' here since the previous declaration has module linkage"} |
| [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",
| |
| [3]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:131:17: note: but in \'FirstModule\' found static assert with different condition",
| |
| [4]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:437:8: note: but in \'FirstModule\' found method \'A\'",
| |
| [5]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:453:15: note: but in \'FirstModule\' found method \'A\' is static",
| |
| [6]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:469:16: note: but in \'FirstModule\' found method \'A\' is virtual",
| |
| [7]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:485:16: note: but in \'FirstModule\' found method \'A\' is pure virtual",
| |
| [8]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:501:15: note: but in \'FirstModule\' found method \'A\' is inline",
| |
| [9]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:515:8: note: but in \'FirstModule\' found method \'A\' is volatile",
| |
| [10]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:531:8: note: but in \'FirstModule\' found method \'A\' is const",
| |
| [11]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:701:7: note: but in \'SecondModule\' found method \'BothBodies\' with different body",
| |
| [12]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:715:7: note: but in \'SecondModule\' found method \'FirstBody\' with no body",
| |
| [13]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:729:7: note: but in \'SecondModule\' found method \'SecondBody\' with body",
| |
| [14]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:739:7: note: but in \'FirstModule\' found method \'FirstBodySecondOutOfLine\' with body",
| |
| [15]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:759:7: note: but in \'SecondModule\' found method \'FirstOutOfLineSecondBody\' with body",
| |
| [16]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:785:7: note: but in \'FirstModule\' found method \'FirstBodySecondOutOfLine\' with body",
| |
| [17]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:805:7: note: but in \'SecondModule\' found method \'FirstOutOfLineSecondBody\' with body",
| |
| [18]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:821:3: note: but in \'SecondModule\' found constructor is not deleted",
| |
| [19]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/second.h:835:3: note: but in \'SecondModule\' found constructor is not defaulted",
| |
| [20]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:881:3: note: but in \'FirstModule\' found constructor",
| |
| [21]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:940:3: note: but in \'FirstModule\' found destructor",
| |
| [22]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:956:11: note: but in \'FirstModule\' found destructor is virtual",
| |
| [23]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1856:19: note: but in \'FirstModule\' found method \'run\' with template arguments",
| |
| [24]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1874:19: note: but in \'FirstModule\' found method \'run\' with 1 template argument",
| |
| [25]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1893:19: note: but in \'FirstModule\' found method \'run\' with \'a\' for 1st template argument",
| |
| [26]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1911:19: note: but in \'FirstModule\' found method \'run\' with \'a\' for 2nd template argument",
| |
| [27]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1929:19: note: but in \'FirstModule\' found method \'run\' with 2 template arguments",
| |
| [28]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1946:20: note: but in \'FirstModule\' found method \'f\' with 1 for 1st template argument",
| |
| [29]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:1976:20: note: but in \'FirstModule\' found method \'f\' with 1 for 1st template argument",
| |
| [30]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2021:20: note: but in \'FirstModule\' found method \'f\' with \'x\' for 1st template argument",
| |
| [31]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2071:20: note: but in \'FirstModule\' found method \'f\' with 36893488147419103230 for 1st template argument",
| |
| [32]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2394:3: note: but in \'FirstModule\' found friend \'class T1\'",
| |
| [33]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2410:3: note: but in \'FirstModule\' found friend \'class T2\'",
| |
| [34]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2426:3: note: but in \'FirstModule\' found friend class",
| |
| [35]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2440:3: note: but in \'FirstModule\' found friend function \'T5a\'",
| |
| [36]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:2986:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter named \'x\'",
| |
| [37]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3029:36: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument",
| |
| [38]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3043:37: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument \'void\'",
| |
| [39]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3059:46: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument \'U8\'",
| |
| [40]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3077:46: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument",
| |
| [41]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3091:41: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with different type",
| |
| [42]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3107:41: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter named \'x\'",
| |
| [43]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3121:25: note: but in \'FirstModule\' found function template \'foo\' with 1 template parameter",
| |
| [44]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3137:31: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument \'int\'",
| |
| [45]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3151:32: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument",
| |
| [46]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3165:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with no default argument",
| |
| [47]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3179:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with no default argument",
| |
| [48]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3193:29: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with default argument 2",
| |
| [49]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3207:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter with different type",
| |
| [50]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3223:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter not being a template parameter pack",
| |
| [51]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3239:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter not being a template parameter pack",
| |
| [52]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3255:44: note: but in \'FirstModule\' found function template \'foo\' with 1st template parameter being a template parameter pack",
| |
| [53]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3271:41: note: but in \'FirstModule\' found function template \'foo\' with 1st template paramter being a template template parameter",
| |
| [54]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3289:25: note: but in \'FirstModule\' found function template \'foo\' with 1st template paramter being a type template parameter",
| |
| [55]="build/tools/clang/test/Modules/Output/odr_hash.cpp.tmp/Inputs/first.h:3307:23: note: but in \'FirstModule\' found function template \'foo\' with 1st template paramter being a non-type template parameter"
| |
| }
| |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_referenced_protocols"]={ | | ["err_redefinition"]={ |
| [b]={{nil,q,"note_module_odr_violation_referenced_protocols"}}, | | [b]="err_redefinition", |
| [h]={{nil,q,"but in %select{\'%1\'|definition here}0 found %select{%3 referenced %plural{1:protocol|:protocols}3|%ordinal3 referenced protocol with different name %4}2"}}, | | [j]="redefinition of %0", |
| [i]={{nil,q,{Jc,{Rc,Tc},Mc,{{"D referenced ",{"protocol","protocols"}},"D referenced protocol with different name E"}}}}, | | [i]="redefinition of A", |
| [c]=g, | | [h]=k, |
| [e]="but in (?:\'(.*?)\'|definition here) found (?:(.*?) referenced (?:protocol|protocols)|(.*?) referenced protocol with different name (.*?))", | | [c]="redefinition of (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a}}, | | [e]=m, |
| [j]={Pc,1643408541,Nc,Lc}, | | [g]={L,1237025389,M,N}, |
| [k]={{cb,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; };"}} | | [d]={{D,2719,"/// MergeTypedefNameDecl - We just parsed a typedef \'New\' which has the\n/// same name and scope as a previous declaration \'Old\'. Figure out\n/// how to resolve this situation, merging decls or emitting\n/// diagnostics as appropriate. If there was an error, set New to be invalid.\n///\nvoid Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls) {\n // ...\n if (getLangOpts().CPlusPlus) {\n // ...\n Diag(New->getLocation(), diag::err_redefinition) << New->getDeclName();"},{D,3042,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n // ...\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n // ...\n if (isa<AliasAttr>(NewAttribute) || isa<IFuncAttr>(NewAttribute)) {\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(New)) {\n // ...\n } else {\n // ...\n unsigned Diag = cast<VarDecl>(Def)->isThisDeclarationADefinition() == VarDecl::TentativeDefinition ? diag::err_alias_after_tentative : diag::err_redefinition;"},{D,3044,"/// checkNewAttributesAfterDef - If we already have a definition, check that\n/// there are no new attributes in this declaration.\nstatic void checkNewAttributesAfterDef(Sema &S, Decl *New, const Decl *Old) {\n // ...\n for (unsigned I = 0, E = NewAttributes.size(); I != E;) {\n // ...\n if (isa<AliasAttr>(NewAttribute) || isa<IFuncAttr>(NewAttribute)) {\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(New)) {\n // ...\n } else {\n // ...\n if (Diag == diag::err_redefinition)"},{D,4683,"/// MergeVarDecl - We just parsed a variable \'New\' which has the same name\n/// and scope as a previous declaration \'Old\'. Figure out how to resolve this\n/// situation, merging decls or emitting diagnostics as appropriate.\n///\n/// Tentative definition rules (C99 6.9.2p2) are checked by\n/// FinalizeDeclaratorGroup. Unfortunately, we can\'t analyze tentative\n/// definitions here, since the initializer hasn\'t been attached.\n///\nvoid Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {\n // ...\n // FIXME: The test for external storage here seems wrong? We still\n // need to check for mismatches.\n if (!New->hasExternalStorage() && !New->isFileVarDecl() &&\n // ...\n Diag(New->getLocation(), diag::err_redefinition) << New->getDeclName();"},{D,4837,"/// We\'ve just determined that \\p Old and \\p New both appear to be definitions\n/// of the same variable. Either diagnose or fix the problem.\nbool Sema::checkVarDeclRedefinition(VarDecl *Old, VarDecl *New) {\n if (!hasVisibleDefinition(Old) && (New->getFormalLinkage() == InternalLinkage || New->isInline() || isa<VarTemplateSpecializationDecl>(New) || New->getDescribedVarTemplate() || New->getNumTemplateParameterLists() || New->getDeclContext()->isDependentContext())) {\n // ...\n } else {\n Diag(New->getLocation(), diag::err_redefinition) << New;"},{D,15170,"void Sema::CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition, SkipBodyInfo *SkipBody) {\n // ...\n if (getLangOpts().GNUMode && Definition->isInlineSpecified() && Definition->getStorageClass() == SC_Extern)\n // ...\n else\n Diag(FD->getLocation(), diag::err_redefinition) << FD;"},{D,17369,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // If this is a use of a previous tag, or if the tag is already declared\n // in the same scope (so that the definition/declaration completes or\n // rementions the tag), reuse the decl.\n if (TUK == TUK_Reference || TUK == TUK_Friend || isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n if (!Invalid) {\n // ...\n // Diagnose attempts to redefine a tag.\n if (TUK == TUK_Definition) {\n if (NamedDecl *Def = PrevTagDecl->getDefinition()) {\n // ...\n if (SkipBody && !hasVisibleDefinition(Def, &Hidden)) {\n // ...\n } else if (!IsExplicitSpecializationAfterInstantiation) {\n // A redeclaration in function prototype scope in C isn\'t\n // visible elsewhere, so merely issue a warning.\n if (!getLangOpts().CPlusPlus && S->containedInPrototypeScope())\n // ...\n else\n Diag(NameLoc, diag::err_redefinition) << Name;"},{D,19504,"Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val) {\n // ...\n if (PrevDecl) {\n // ...\n if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S)) {\n if (isa<EnumConstantDecl>(PrevDecl))\n // ...\n else\n Diag(IdLoc, diag::err_redefinition) << Id;"},{w,909,"NamedDecl *Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists) {\n // ...\n // Build the BindingDecls.\n for (auto &B : D.getDecompositionDeclarator().bindings()) {\n // ...\n if (!Previous.empty()) {\n // ...\n Diag(B.NameLoc, diag::err_redefinition) << B.Name;"},{w,12947,"/// Checks that the given using declaration is not an invalid\n/// redeclaration. Note that this is checking only for the using decl\n/// itself, not for any ill-formedness among the UsingShadowDecls.\nbool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Prev) {\n // ...\n // C++03 [namespace.udecl]p8:\n // C++0x [namespace.udecl]p10:\n // A using-declaration is a declaration and can therefore be used\n // repeatedly where (and only where) multiple declarations are\n // allowed.\n //\n // That\'s in non-member contexts.\n if (!CurContext->getRedeclContext()->isRecord()) {\n // A dependent qualifier outside a class can only ever resolve to an\n // enumeration type. Therefore it conflicts with any other non-type\n // declaration in the same scope.\n // FIXME: How should we check for dependent type-type conflicts at block\n // scope?\n if (Qual->isDependent() && !HasTypenameKeyword) {\n for (auto *D : Prev) {\n if (!isa<TypeDecl>(D) && !isa<UsingDecl>(D) && !isa<UsingPackDecl>(D)) {\n // ...\n Diag(NameLoc, OldCouldBeEnumerator ? diag::err_redefinition : diag::err_redefinition_different_kind) << Prev.getLookupName();"},{w,13443,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // ...\n } else if (isVisible(PrevDecl)) {\n unsigned DiagID = isa<NamespaceDecl>(PrevDecl->getUnderlyingDecl()) ? diag::err_redefinition : diag::err_redefinition_different_kind;"},{w,16762,"/// ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch\n/// handler.\nDecl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {\n // ...\n if (NamedDecl *PrevDecl = LookupSingleName(S, II, D.getIdentifierLoc(), LookupOrdinaryName, ForVisibleRedeclaration)) {\n // ...\n if (isDeclInScope(PrevDecl, CurContext, S)) {\n Diag(D.getIdentifierLoc(), diag::err_redefinition) << D.getIdentifier();"},{O,5565,"ExprResult Sema::ActOnOMPIteratorExpr(Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef<OMPIteratorData> Data) {\n // ...\n for (const OMPIteratorData &D : Data) {\n // ...\n if (S) {\n // ...\n if (!Previous.empty()) {\n // ...\n Diag(D.DeclIdentLoc, diag::err_redefinition) << VD->getDeclName();"},{W,2028,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevClassTemplate) {\n // ...\n // Check for redefinition of this class template.\n if (TUK == TUK_Definition) {\n if (TagDecl *Def = PrevRecordDecl->getDefinition()) {\n // ...\n if (SkipBody && !hasVisibleDefinition(Def, &Hidden)) {\n // ...\n } else {\n Diag(NameLoc, diag::err_redefinition) << Name;"},{W,8904,"DeclResult Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody) {\n // ...\n // Check that this isn\'t a redefinition of this specialization.\n if (TUK == TUK_Definition) {\n // ...\n if (Def && SkipBody && !hasVisibleDefinition(Def, &Hidden)) {\n // ...\n } else if (Def) {\n // ...\n Diag(TemplateNameLoc, diag::err_redefinition) << Specialization << Range;"},{W,9077,"void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) {\n // ...\n if (hasReachableDefinition(OldConcept) && IsRedefinitionInModule(NewDecl, OldConcept)) {\n Diag(NewDecl->getLocation(), diag::err_redefinition) << NewDecl->getDeclName();"},{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",3838,"Decl *TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D) {\n // ...\n // If PrevDecl was a definition and D is also a definition, diagnose.\n // This happens in cases like:\n //\n // template<typename T, typename U>\n // struct Outer {\n // template<typename X> struct Inner;\n // template<> struct Inner<T> {};\n // template<> struct Inner<U> {};\n // };\n //\n // Outer<int, int> outer; // error: the explicit specializations of Inner\n // // have the same signature.\n if (PrevDecl && PrevDecl->getDefinition() && D->isThisDeclarationADefinition()) {\n SemaRef.Diag(D->getLocation(), diag::err_redefinition) << PrevDecl;"}}, |
| },
| |
| ["note_module_odr_violation_template_parameter"]={
| |
| [b]={{nil,z,"note_module_odr_violation_template_parameter"}},
| |
| [h]={{nil,w,"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"},{U,z,"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"}},
| |
| [i]={{nil,w,{sb,{"unnamed template parameter C","template parameter D",{"template parameter with ",{yc,a},"default argument"},"template parameter with different default argument"}}},{U,z,{sb,{"unnamed template parameter C","template parameter C",{"template parameter with ",{yc,a},"default argument"},"template parameter with different default argument"}}}},
| |
| [c]=g,
| |
| [e]="but in \'(.*?)\' found (?:unnamed template parameter (.*?)|template parameter (.*?)|template parameter with (?:no |)default argument|template parameter with different default argument)",
| |
| [f]=a,
| |
| [d]={{nil,q,a},{w,z,nb}},
| |
| [j]={"498117bf11d8",1503456239,"[ODRHash] Diagnose differing template parameters.","[ODRHash] Diagnose differing template parameters.\n\nllvm-svn: 311519"},
| |
| [k]={{cb,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;"}},
| |
| [l]={ | | [l]={ |
| [vd]={"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"} | | ["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:6:9: error: redefinition of \'binding_a\'"} |
| } | | } |
| }, | | }, |
| ["note_module_odr_violation_typedef"]={ | | ["err_redefinition_different_concept"]={ |
| [b]={{nil,w,"note_module_odr_violation_typedef"}}, | | [b]={{nil,C,"err_redefinition_different_concept"}}, |
| [h]={{nil,w,"but in \'%0\' found %select{%select{typedef|type alias}2 name %3|%select{typedef|type alias}2 %3 with different underlying type %4}1"}}, | | [j]={{nil,C,"redefinition of concept %0 with different template parameters or requirements"}}, |
| [i]={{nil,w,{sb,{{{"typedef","type alias"}," name D"},{{"typedef","type alias"}," D with different underlying type E"}}}}}, | | [i]={{nil,C,"redefinition of concept A with different template parameters or requirements"}}, |
| [c]=g, | | [h]=k, |
| [e]="but in \'(.*?)\' found (?:(?:typedef|type alias) name (.*?)|(?:typedef|type alias) (.*?) with different underlying type (.*?))", | | [c]="redefinition of concept (.*?) with different template parameters or requirements", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,w,nb}}, | | [e]={{nil,C,m}}, |
| [j]={Pc,1643408541,Nc,Lc}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{cb,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; };"}}, | | [d]={{W,9069,"void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) {\n // ...\n if (!IsSame) {\n Diag(NewDecl->getLocation(), diag::err_redefinition_different_concept) << NewDecl->getDeclName();"}} |
| [l]={
| |
| ["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>\'"}
| |
| }
| |
| }, | | }, |
| ["note_module_odr_violation_variable"]={ | | ["err_redefinition_different_kind"]={ |
| [b]={{nil,w,"note_module_odr_violation_variable"}}, | | [b]="err_redefinition_different_kind", |
| [h]={{nil,w,"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"}}, | | [j]="redefinition of %0 as different kind of symbol", |
| [i]={{nil,w,{sb,{"data member with name C","data member C with different type D",{"data member C with",{"out",a}," an initializer"},"data member C with a different initializer",{"data member C ",{"is constexpr","is not constexpr"}}}}}}, | | [i]="redefinition of A as different kind of symbol", |
| [c]=g, | | [h]=k, |
| [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))", | | [c]="redefinition of (.*?) as different kind of symbol", |
| [f]=a, | | [f]=a, |
| [d]={{nil,q,a},{w,w,nb}}, | | [e]=m, |
| [j]={Pc,1643408541,Nc,Lc},
| | [g]={L,1237025389,M,N}, |
| [k]={{cb,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; };"}},
| | [d]={{D,2624,"/// MergeTypedefNameDecl - We just parsed a typedef \'New\' which has the\n/// same name and scope as a previous declaration \'Old\'. Figure out\n/// how to resolve this situation, merging decls or emitting\n/// diagnostics as appropriate. If there was an error, set New to be invalid.\n///\nvoid Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls) {\n // ...\n if (!Old) {\n Diag(New->getLocation(), diag::err_redefinition_different_kind) << New->getDeclName();"},{D,3661,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n if (!Old) {\n if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(OldD)) {\n // ...\n } else {\n Diag(New->getLocation(), diag::err_redefinition_different_kind) << New->getDeclName();"},{D,4557,"/// MergeVarDecl - We just parsed a variable \'New\' which has the same name\n/// and scope as a previous declaration \'Old\'. Figure out how to resolve this\n/// situation, merging decls or emitting diagnostics as appropriate.\n///\n/// Tentative definition rules (C99 6.9.2p2) are checked by\n/// FinalizeDeclaratorGroup. Unfortunately, we can\'t analyze tentative\n/// definitions here, since the initializer hasn\'t been attached.\n///\nvoid Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {\n // ...\n if (!Old) {\n Diag(New->getLocation(), diag::err_redefinition_different_kind) << New->getDeclName();"},{D,17460,"/// This is invoked when we see \'struct foo\' or \'struct {\'. In the\n/// former case, Name will be non-null. In the later case, Name will be null.\n/// TagSpec indicates what kind of tag this is. TUK indicates whether this is a\n/// reference/declaration/definition of a tag.\n///\n/// \\param IsTypeSpecifier \\c true if this is a type-specifier (or\n/// trailing-type-specifier) other than one in an alias-declaration.\n///\n/// \\param SkipBody If non-null, will be set to indicate if the caller should\n/// skip the definition of this tag and treat it as if it were a declaration.\nDeclResult Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attrs, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, OffsetOfKind OOK, SkipBodyInfo *SkipBody) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) {\n // ...\n } else {\n // Use a better diagnostic if an elaborated-type-specifier\n // found the wrong kind of type on the first\n // (non-redeclaration) lookup.\n if ((TUK == TUK_Reference || TUK == TUK_Friend) && !Previous.isForRedeclaration()) {\n // ...\n } else if (!isDeclInScope(DirectPrevDecl, SearchDC, S, SS.isNotEmpty() || isMemberSpecialization)) {\n // ...\n } else if (TUK == TUK_Reference || TUK == TUK_Friend) {\n // ...\n } else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(PrevDecl)) {\n // ...\n } else {\n // ...\n Diag(NameLoc, diag::err_redefinition_different_kind) << Name;"},{w,11434,"/// ActOnStartNamespaceDef - This is called at the start of a namespace\n/// definition.\nDecl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *II, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UD, bool IsNested) {\n // ...\n if (II) {\n // ...\n if (PrevNS) {\n // ...\n } else if (PrevDecl) {\n // ...\n Diag(Loc, diag::err_redefinition_different_kind) << II;"},{w,12948,"/// Checks that the given using declaration is not an invalid\n/// redeclaration. Note that this is checking only for the using decl\n/// itself, not for any ill-formedness among the UsingShadowDecls.\nbool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Prev) {\n // ...\n // C++03 [namespace.udecl]p8:\n // C++0x [namespace.udecl]p10:\n // A using-declaration is a declaration and can therefore be used\n // repeatedly where (and only where) multiple declarations are\n // allowed.\n //\n // That\'s in non-member contexts.\n if (!CurContext->getRedeclContext()->isRecord()) {\n // A dependent qualifier outside a class can only ever resolve to an\n // enumeration type. Therefore it conflicts with any other non-type\n // declaration in the same scope.\n // FIXME: How should we check for dependent type-type conflicts at block\n // scope?\n if (Qual->isDependent() && !HasTypenameKeyword) {\n for (auto *D : Prev) {\n if (!isa<TypeDecl>(D) && !isa<UsingDecl>(D) && !isa<UsingPackDecl>(D)) {\n // ...\n Diag(NameLoc, OldCouldBeEnumerator ? diag::err_redefinition : diag::err_redefinition_different_kind) << Prev.getLookupName();"},{w,13317,"Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, MultiTemplateParamsArg TemplateParamLists, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec) {\n // ...\n if (TemplateParamLists.size()) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (!OldDecl && !Invalid) {\n Diag(UsingLoc, diag::err_redefinition_different_kind) << Name.Identifier;"},{w,13444,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // ...\n } else if (isVisible(PrevDecl)) {\n unsigned DiagID = isa<NamespaceDecl>(PrevDecl->getUnderlyingDecl()) ? diag::err_redefinition : diag::err_redefinition_different_kind;"},{Z,610,"void Sema::ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange) {\n // ...\n if (declaresSameEntity(PrevDecl, IDecl)) {\n // ...\n } else {\n // ...\n if (PrevDecl && !SuperClassDecl) {\n // ...\n // This handles the following case:\n //\n // typedef int SuperClass;\n // @interface MyClass : SuperClass {} @end\n //\n if (!SuperClassDecl) {\n Diag(SuperLoc, diag::err_redefinition_different_kind) << SuperName;"},{Z,991,"ObjCInterfaceDecl *Sema::ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n Diag(ClassLoc, diag::err_redefinition_different_kind) << ClassName;"},{Z,1993,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n Diag(ClassLoc, diag::err_redefinition_different_kind) << ClassName;"},{Z,2026,"ObjCImplementationDecl *Sema::ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &Attrs) {\n // ...\n if (SuperClassname) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n Diag(SuperClassLoc, diag::err_redefinition_different_kind) << SuperClassname;"},{Z,3082,"Sema::DeclGroupPtrTy Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef<ObjCTypeParamList *> TypeParamLists, unsigned NumElts) {\n // ...\n for (unsigned i = 0; i != NumElts; ++i) {\n // ...\n if (PrevDecl && !isa<ObjCInterfaceDecl>(PrevDecl)) {\n // ...\n if (!TDD || !TDD->getUnderlyingType()->isObjCObjectType()) {\n Diag(AtClassLoc, diag::err_redefinition_different_kind) << IdentList[i];"},{W,2042,"DeclResult Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody) {\n // ...\n if (PrevClassTemplate) {\n // ...\n } else if (PrevDecl) {\n // ...\n Diag(NameLoc, diag::err_redefinition_different_kind) << Name;"},{W,9060,"void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, LookupResult &Previous, bool &AddToScope) {\n // ...\n if (!OldConcept) {\n // ...\n Diag(NewDecl->getLocation(), diag::err_redefinition_different_kind) << NewDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| [vd]={"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"} | | ["clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp"]={"clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:8:10: error: redefinition of \'binding_b\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:11:28: error: redefinition of \'vartemplate_a\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:13:10: error: redefinition of \'vartemplate_b\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:16:24: error: redefinition of \'aliastemplate_a\' as different kind of symbol","clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp:18:10: error: redefinition of \'aliastemplate_b\' as different kind of symbol"} |
| } | | } |
| }, | | }, |
| ["note_mt_message"]={ | | ["err_redefinition_different_namespace_alias"]={ |
| [b]="note_mt_message", | | [b]="err_redefinition_different_namespace_alias", |
| [h]="[rewriter] %0", | | [j]="redefinition of %0 as an alias for a different namespace", |
| [i]="[rewriter] A", | | [i]="redefinition of A as an alias for a different namespace", |
| [c]=g, | | [h]=k, |
| [e]="\\[rewriter\\] (.*?)", | | [c]="redefinition of (.*?) as an alias for a different namespace", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"f463436d9c02",1409785882,"[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes","[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes\nmerging of namespace aliases across modules and improves source fidelity.\nIncidentally also fixes PR20816.\n\nllvm-svn: 217103"}, |
| [k]={{"clang/lib/ARCMigrate/TransformActions.cpp",700,"void TransformActions::reportNote(StringRef message, SourceLocation loc, SourceRange range) { report(loc, diag::note_mt_message, range) << message; }"}},
| | [d]={{w,13435,"Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident) {\n // ...\n if (PrevR.isSingleResult()) {\n // ...\n if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {\n // We already have an alias with the same name that points to the same\n // namespace; check that it matches.\n if (AD->getNamespace()->Equals(getNamespaceDecl(ND))) {\n // ...\n } else if (isVisible(PrevDecl)) {\n Diag(AliasLoc, diag::err_redefinition_different_namespace_alias) << Alias;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/ARCMT/nonobjc-to-objc-cast-2.m"]={"clang/test/ARCMT/nonobjc-to-objc-cast-2.m:53:3: note: [rewriter] remove the cast and change return type of function to \'NSString *\' to have the object automatically autoreleased"} | | ["clang/test/SemaCXX/namespace-alias.cpp"]={"clang/test/SemaCXX/namespace-alias.cpp:43:13: error: redefinition of \'B\' as an alias for a different namespace"} |
| } | | } |
| }, | | }, |
| ["note_multiversioning_caused_here"]={ | | ["err_redefinition_different_type"]={ |
| [b]={{nil,u,"note_multiversioning_caused_here"}}, | | [b]="err_redefinition_different_type", |
| [h]={{nil,u,"function multiversioning caused by this declaration"}}, | | [j]="redefinition of %0 with a different type%diff{: $ vs $|}1,2", |
| [i]={{nil,u,"function multiversioning caused by this declaration"}}, | | [i]={{nil,nil,{"redefinition of A with a different type",{": B vs C",a}}}}, |
| [c]=g, | | [h]=k, |
| [e]="function multiversioning caused by this declaration", | | [c]="redefinition of (.*?) with a different type(?:\\: (.*?) vs (.*?)|)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,a}}, | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{C,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);"},{C,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)),"},{C,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);"},{C,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);"}}, | | [d]={{D,4382,"static void diagnoseVarDeclTypeMismatch(Sema &S, VarDecl *New, VarDecl *Old) {\n // ...\n S.Diag(New->getLocation(), New->isThisDeclarationADefinition() ? diag::err_redefinition_different_type : diag::err_redeclaration_different_type) << New->getDeclName() << New->getType() << Old->getType();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp"]={"clang/test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp:173:9: error: redefinition of \'o_var\' with a different type: \'float\' vs \'int\'"} |
| } | | } |
| }, | | }, |
| ["note_musttail_callconv_mismatch"]={ | | ["err_redefinition_different_typedef"]={ |
| [b]={{nil,x,"note_musttail_callconv_mismatch"}}, | | [b]="err_redefinition_different_typedef", |
| [h]={{nil,x,"target function has calling convention %1 (expected %0)"}}, | | [j]="%select{typedef|type alias|type alias template}0 redefinition with different types%diff{ ($ vs $)|}1,2", |
| [i]={{nil,x,"target function has calling convention B (expected A)"}}, | | [i]={{nil,nil,{{"typedef","type alias","type alias template"}," redefinition with different types",{" (B vs C)",a}}}}, |
| [c]=g, | | [h]=k, |
| [e]="target function has calling convention (.*?) \\(expected (.*?)\\)", | | [c]="(?:typedef|type alias|type alias template) redefinition with different types(?: \\((.*?) vs (.*?)\\)|)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,n}}, | | [e]=m, |
| [j]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | | [g]={L,1237025389,M,N}, |
| [k]={{X,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());"}},
| | [d]={{D,2559,"bool Sema::isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New) {\n // ...\n if (OldType != NewType && !OldType->isDependentType() && !NewType->isDependentType() && !Context.hasSameType(OldType, NewType)) {\n // ...\n Diag(New->getLocation(), diag::err_redefinition_different_typedef) << Kind << NewType << OldType;"},{w,13343,"Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, MultiTemplateParamsArg TemplateParamLists, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec) {\n // ...\n if (TemplateParamLists.size()) {\n // ...\n if (!Previous.empty()) {\n // ...\n if (!Invalid && OldDecl && !OldDecl->isInvalidDecl()) {\n // ...\n if (!Invalid && !Context.hasSameType(OldTD->getUnderlyingType(), NewTD->getUnderlyingType())) {\n // ...\n Diag(NewTD->getLocation(), diag::err_redefinition_different_typedef) << 2 << NewTD->getUnderlyingType() << OldTD->getUnderlyingType();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/attr-musttail.cpp"]={"clang/test/SemaCXX/attr-musttail.cpp:154:1: note: target function has calling convention regcall (expected cdecl)"} | | ["clang/test/SemaCXX/libstdcxx_common_type_hack.cpp"]={"clang/test/SemaCXX/libstdcxx_common_type_hack.cpp:31:7: error: type alias redefinition with different types (\'decltype(true ? std::declval<int>() : std::declval<int>())\' (aka \'int &&\') vs \'int\')"} |
| } | | } |
| }, | | }, |
| ["note_musttail_callee_defined_here"]={ | | ["err_redefinition_extern_inline"]={ |
| [b]="note_musttail_callee_defined_here", | | [b]="err_redefinition_extern_inline", |
| [h]={{nil,x,"%0 declared here"}}, | | [j]="redefinition of a \'extern inline\' function %0 is not supported in %select{C99 mode|C++}1", |
| [i]={{nil,x,"A declared here"}}, | | [i]={{nil,nil,{"redefinition of a \'extern inline\' function A is not supported in ",{"C99 mode","C++"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) declared here", | | [c]="redefinition of a \'extern inline\' function (.*?) is not supported in (?:C99 mode|C\\+\\+)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,n}}, | | [e]=m, |
| [j]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | | [g]={"a7d6e3d0f526",1283874661,"Provide a specific diagnostic when trying to redefine an \"extern","Provide a specific diagnostic when trying to redefine an \"extern\ninline\" function outside of GNU89 mode. Fixes\n<rdar://problem/6880464>.\n\nllvm-svn: 113204"}, |
| [k]={{X,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();"}}
| | [d]={{D,15167,"void Sema::CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition, SkipBodyInfo *SkipBody) {\n // ...\n if (getLangOpts().GNUMode && Definition->isInlineSpecified() && Definition->getStorageClass() == SC_Extern)\n Diag(FD->getLocation(), diag::err_redefinition_extern_inline) << FD << getLangOpts().CPlusPlus;"}}, |
| },
| |
| ["note_musttail_fix_non_prototype"]={
| |
| [b]={{nil,x,"note_musttail_fix_non_prototype"}},
| |
| [h]={{nil,x,"add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype"}},
| |
| [i]={{nil,x,"add \'void\' to the parameter list to turn an old-style K&R function declaration into a prototype"}}, | |
| [c]=g,
| |
| [e]="add \'void\' to the parameter list to turn an old\\-style K&R function declaration into a prototype",
| |
| [f]=a,
| |
| [d]={{nil,x,n}},
| |
| [j]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier","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"},
| |
| [k]={{X,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);"},{X,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);"}},
| |
| [l]={ | | [l]={ |
| ["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/redefinition.c"]={"clang/test/Sema/redefinition.c:14:5: error: redefinition of a \'extern inline\' function \'g\' is not supported in C99 mode"} |
| } | | } |
| }, | | }, |
| ["note_musttail_mismatch"]={ | | ["err_redefinition_of_enumerator"]={ |
| [b]={{nil,x,"note_musttail_mismatch"}}, | | [b]="err_redefinition_of_enumerator", |
| [h]={{nil,x,"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"}}, | | [j]="redefinition of enumerator %0", |
| [i]={{nil,x,{"target function ",{{"is a member of different class",{" (expected B but has C)",a}},"has different number of parameters (expected B but has C)",{"has type mismatch at D parameter",{" (expected B but has C)",a}},{"has different return type",{" (B expected but has C)",a}}}}}}, | | [i]="redefinition of enumerator A", |
| [c]=g, | | [h]=k, |
| [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 (.*?)\\)|))", | | [c]="redefinition of enumerator (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,n}}, | | [e]=m, |
| [j]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | | [g]={L,1237025389,M,N}, |
| [k]={{X,851,"bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {\n // ...\n PartialDiagnostic PD = PDiag(diag::note_musttail_mismatch);"}}, | | [d]={{D,19502,"Decl *Sema::ActOnEnumConstant(Scope *S, Decl *theEnumDecl, Decl *lastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val) {\n // ...\n if (PrevDecl) {\n // ...\n if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S)) {\n if (isa<EnumConstantDecl>(PrevDecl))\n Diag(IdLoc, diag::err_redefinition_of_enumerator) << Id;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/enum.c"]={"clang/test/Sema/enum.c:159:5: error: redefinition of enumerator \'PR15071_One\'"} |
| } | | } |
| }, | | }, |
| ["note_musttail_structors_forbidden"]={ | | ["err_redefinition_of_label"]={ |
| [b]={{nil,x,"note_musttail_structors_forbidden"}}, | | [b]="err_redefinition_of_label", |
| [h]={{nil,x,"target %select{constructor|destructor}0 is declared here"}}, | | [j]="redefinition of label %0", |
| [i]={{nil,x,{"target ",{E,D}," is declared here"}}}, | | [i]="redefinition of label A", |
| [c]=g, | | [h]=k, |
| [e]="target (?:constructor|destructor) is declared here", | | [c]="redefinition of label (.*?)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,x,n}}, | | [e]=m, |
| [j]={"b83b23275b74",1607502387,"Introduce -Wreserved-identifier","Introduce -Wreserved-identifier\n\nWarn when a declaration uses an identifier that doesn\'t obey the reserved\nidentifier rule from C and/or C++.\n\nDifferential Revision: https://reviews.llvm.org/D93095"}, | | [g]={L,1237025389,M,N}, |
| [k]={{X,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);"}}, | | [d]={{Eb,559,"StmtResult Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt) {\n // If the label was multiply defined, reject it now.\n if (TheDecl->getStmt()) {\n Diag(IdentLoc, diag::err_redefinition_of_label) << TheDecl->getDeclName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/goto.c"]={"clang/test/Parser/goto.c:26:3: error: redefinition of label \'l\'"} |
| } | | } |
| }, | | }, |
| ["note_namespace_defined_here"]={ | | ["err_redefinition_variably_modified_typedef"]={ |
| [b]="note_namespace_defined_here", | | [b]="err_redefinition_variably_modified_typedef", |
| [h]="namespace %0 defined here", | | [j]="redefinition of %select{typedef|type alias}0 for variably-modified type %1", |
| [i]="namespace A defined here", | | [i]={{nil,nil,{"redefinition of ",{"typedef","type alias"}," for variably-modified type B"}}}, |
| [c]=g, | | [h]=k, |
| [e]="namespace (.*?) defined here", | | [c]="redefinition of (?:typedef|type alias) for variably\\-modified type (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"aab36986ab66",1326321228,"Improve the diagnostic when trying to redefine a typedef with a","Improve the diagnostic when trying to redefine a typedef with a\nvariably-modified type.\n\nllvm-svn: 147973"}, |
| [k]={{r,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));"},{r,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));"}}, | | [d]={{D,2546,"bool Sema::isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New) {\n // ...\n if (NewType->isVariablyModifiedType()) {\n // ...\n Diag(New->getLocation(), diag::err_redefinition_variably_modified_typedef) << Kind << NewType;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Parser/cxx-using-directive.cpp"]={"clang/test/Parser/cxx-using-directive.cpp:6:13: note: namespace \'::B::A\' defined here","clang/test/Parser/cxx-using-directive.cpp:11:11: note: namespace \'C\' defined here","clang/test/Parser/cxx-using-directive.cpp:6:13: note: namespace \'B::A\' defined here","clang/test/Parser/cxx-using-directive.cpp:6:13: note: namespace \'B::A\' defined here"} | | ["clang/test/Sema/c11-typedef-redef.c"]={"clang/test/Sema/c11-typedef-redef.c:13:15: error: redefinition of typedef for variably-modified type \'int[N]\'","clang/test/Sema/c11-typedef-redef.c:17:16: error: redefinition of typedef for variably-modified type \'vla2\' (aka \'int[N]\')"} |
| } | | } |
| }, | | }, |
| ["note_neon_vector_initializer_non_portable"]={ | | ["err_ref_array_type"]={ |
| [b]="note_neon_vector_initializer_non_portable", | | [b]="err_ref_array_type", |
| [h]="consider using vld1_%0%1() to initialize a vector from memory, or vcreate_%0%1() to initialize from an integer constant", | | [j]="cannot refer to declaration with an array type inside block", |
| [i]="consider using vld1_AB() to initialize a vector from memory, or vcreate_AB() to initialize from an integer constant", | | [i]="cannot refer to declaration with an array type inside block", |
| [c]=g, | | [h]=k, |
| [e]="consider using vld1_(.*?)(.*?)\\(\\) to initialize a vector from memory, or vcreate_(.*?)(.*?)\\(\\) to initialize from an integer constant", | | [c]="cannot refer to declaration with an array type inside block", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"8971a8653847",1262661036,"Disallow captured arrays in blocks as well. Radar 7438948.","Disallow captured arrays in blocks as well. Radar 7438948.\n\nllvm-svn: 92677"}, |
| [k]={{ab,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;"}}, | | [d]={{O,19231,"// Returns true if the capture by block was successful.\nstatic bool captureInBlock(BlockScopeInfo *BSI, ValueDecl *Var, SourceLocation Loc, const bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const bool Nested, Sema &S, bool Invalid) {\n // ...\n // Blocks are not allowed to capture arrays, excepting OpenCL.\n // OpenCL v2.0 s1.12.5 (revision 40): arrays are captured by reference\n // (decayed to pointers).\n if (!Invalid && !S.getLangOpts().OpenCL && CaptureType->isArrayType()) {\n if (BuildAndDiagnose) {\n S.Diag(Loc, diag::err_ref_array_type);"}}, |
| [l]={ | | [l]={ |
| ["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/block-misc.c"]={"clang/test/Sema/block-misc.c:220:11: error: cannot refer to declaration with an array type inside block","clang/test/Sema/block-misc.c:221:11: error: cannot refer to declaration with an array type inside block"} |
| } | | } |
| }, | | }, |
| ["note_neon_vector_initializer_non_portable_q"]={ | | ["err_ref_bad_target"]={ |
| [b]="note_neon_vector_initializer_non_portable_q", | | [b]="err_ref_bad_target", |
| [h]="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", | | [j]={{nil,A,"reference to %select{__device__|__global__|__host__|__host__ __device__}0 %select{function|variable}1 %2 in %select{__device__|__global__|__host__|__host__ __device__}3 function"},{Gb,nil,"reference to %select{__device__|__global__|__host__|__host__ __device__}0 function %1 in %select{__device__|__global__|__host__|__host__ __device__}2 function"}}, |
| [i]="consider using vld1q_AB() to initialize a vector from memory, or vcombine_AB(vcreate_AB(), vcreate_AB()) to initialize from integer constants", | | [i]={{nil,A,{"reference to ",{jc,gc,hc,ic}," ",{"function","variable"}," C in ",{jc,gc,hc,ic}," function"}},{Gb,nil,{"reference to ",{jc,gc,hc,ic}," function B in ",{jc,gc,hc,ic}," function"}}}, |
| [c]=g, | | [h]=k, |
| [e]="consider using vld1q_(.*?)(.*?)\\(\\) to initialize a vector from memory, or vcombine_(.*?)(.*?)\\(vcreate_(.*?)(.*?)\\(\\), vcreate_(.*?)(.*?)\\(\\)\\) to initialize from integer constants", | | [c]="reference to (?:__device__|__global__|__host__|__host__ __device__) (?:function|variable) (.*?) in (?:__device__|__global__|__host__|__host__ __device__) function", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"7277fe8aed6e",1317599380,"CUDA: diagnose invalid calls across targets","CUDA: diagnose invalid calls across targets\n\nllvm-svn: 140978"}, |
| [k]={{ab,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;"}},
| | [d]={{"clang/lib/Sema/SemaCUDA.cpp",835,"bool Sema::CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee) {\n // ...\n SemaDiagnosticBuilder(DiagKind, Loc, diag::err_ref_bad_target, Caller, *this) << IdentifyCUDATarget(Callee) << /*function*/ 0 << Callee << IdentifyCUDATarget(Caller);"},{O,19015,"/// Directly mark a variable odr-used. Given a choice, prefer to use\n/// MarkVariableReferenced since it does additional checks and then\n/// calls MarkVarDeclODRUsed.\n/// If the variable must be captured:\n/// - if FunctionScopeIndexToStopAt is null, capture it in the CurContext\n/// - else capture it in the DeclContext that maps to the\n/// *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.\nstatic void MarkVarDeclODRUsed(ValueDecl *V, SourceLocation Loc, Sema &SemaRef, const unsigned *const FunctionScopeIndexToStopAt = nullptr) {\n // ...\n if (SemaRef.LangOpts.CUDA && Var->hasGlobalStorage()) {\n // ...\n if (VarTarget == Sema::CVT_Host && (UserTarget == Sema::CFT_Device || UserTarget == Sema::CFT_HostDevice || UserTarget == Sema::CFT_Global)) {\n // Diagnose ODR-use of host global variables in device functions.\n // Reference of device global variables in host functions is allowed\n // through shadow variables therefore it is not diagnosed.\n if (SemaRef.LangOpts.CUDAIsDevice) {\n SemaRef.targetDiag(Loc, diag::err_ref_bad_target) << /*host*/ 2 << /*variable*/ 1 << Var << UserTarget;"}}, |
| [l]={ | | [l]={ |
| ["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/Parser/cuda-force-host-device-templates.cu"]={"clang/test/Parser/cuda-force-host-device-templates.cu:18:11: error: reference to __host__ function \'foo<int>\' in __host__ __device__ function","clang/test/Parser/cuda-force-host-device-templates.cu:19:12: error: reference to __host__ function \'foo\' in __host__ __device__ function","clang/test/Parser/cuda-force-host-device-templates.cu:38:11: error: reference to __host__ function \'bar<int>\' in __host__ __device__ function","clang/test/Parser/cuda-force-host-device-templates.cu:39:12: error: reference to __host__ function \'bar\' in __host__ __device__ function"} |
| } | | } |
| }, | | }, |
| ["note_nested_requirement_here"]={ | | ["err_ref_bad_target_global_initializer"]={ |
| [b]={{nil,m,"note_nested_requirement_here"}}, | | [b]="err_ref_bad_target_global_initializer", |
| [h]={{nil,m,"while checking the satisfaction of nested requirement requested here"}}, | | [j]="reference to %select{__device__|__global__|__host__|__host__ __device__}0 function %1 in global initializer", |
| [i]={{nil,m,"while checking the satisfaction of nested requirement requested here"}}, | | [i]={{nil,nil,{"reference to ",{jc,gc,hc,ic}," function B in global initializer"}}}, |
| [c]=g, | | [h]=k, |
| [e]="while checking the satisfaction of nested requirement requested here", | | [c]="reference to (?:__device__|__global__|__host__|__host__ __device__) function (.*?) in global initializer", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={ac,1576172311,Ib,bc}, | | [g]={"c989c3e78475",1470791361,"[CUDA] Reject calls to __device__ functions from host variable global initializers.","[CUDA] Reject calls to __device__ functions from host variable global initializers.\n\nReviewers: tra\n\nSubscribers: cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D23335\n\nllvm-svn: 278196"}, |
| [k]={{W,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;"},{W,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;"}},
| | [d]={{"clang/lib/Sema/SemaCUDA.cpp",639,"void Sema::checkAllowedCUDAInitializer(VarDecl *VD) {\n // ...\n if (IsDeviceOrConstantVar || IsSharedVar) {\n // ...\n } else {\n // ...\n if (InitFn) {\n // ...\n if (InitFnTarget != CFT_Host && InitFnTarget != CFT_HostDevice) {\n Diag(VD->getLocation(), diag::err_ref_bad_target_global_initializer) << InitFnTarget << InitFn;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCUDA/global-initializers-host.cu"]={"clang/test/SemaCUDA/global-initializers-host.cu:13:3: error: reference to __device__ function \'S\' in global initializer","clang/test/SemaCUDA/global-initializers-host.cu:26:3: error: reference to __device__ function \'U\' in global initializer","clang/test/SemaCUDA/global-initializers-host.cu:31:5: error: reference to __device__ function \'device_fn\' in global initializer"} |
| } | | } |
| }, | | }, |
| ["note_nested_requirement_substitution_error"]={ | | ["err_ref_flexarray_type"]={ |
| [b]="note_nested_requirement_substitution_error", | | [b]="err_ref_flexarray_type", |
| [h]={{nil,q,"%select{and|because}0 \'%1\' would be invalid%2"},{w,m,"%select{and|because}0 \'%1\' would be invalid: %2"}}, | | [j]="cannot refer to declaration of structure variable with flexible array member inside block", |
| [i]={{nil,q,{{yb,zb}," \'B\' would be invalidC"}},{w,m,{{yb,zb}," \'B\' would be invalid: C"}}}, | | [i]="cannot refer to declaration of structure variable with flexible array member inside block", |
| [c]=g, | | [h]=k, |
| [e]="(?:and|because) \'(.*?)\' would be invalid(.*?)", | | [c]="cannot refer to declaration of structure variable with flexible array member inside block", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]=m, |
| [j]={ac,1576172311,Ib,bc}, | | [g]={"a716a345276c",1357687071,"objectiveC blocks: It is impractical to capture ","objectiveC blocks: It is impractical to capture \nstruct variables with flexiable array members in\nblocks (and lambdas). Issue error instead of\ncrashing in IRGen. // rdar://12655829\n\nllvm-svn: 171912"}, |
| [k]={{vb,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;"}}
| | [d]={{O,19177,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n // Prohibit structs with flexible array members too.\n // We cannot capture what is in the tail end of the struct.\n if (const RecordType *VTTy = Var->getType()->getAs<RecordType>()) {\n if (VTTy->getDecl()->hasFlexibleArrayMember()) {\n if (Diagnose) {\n if (IsBlock)\n S.Diag(Loc, diag::err_ref_flexarray_type);"}}, |
| },
| |
| ["note_nested_requirement_unknown_substitution_error"]={
| |
| [b]="note_nested_requirement_unknown_substitution_error",
| |
| [h]={{nil,m,"%select{and|because}0 \'%1\' would be invalid"}},
| |
| [i]={{nil,m,{{yb,zb}," \'B\' would be invalid"}}},
| |
| [c]=g,
| |
| [e]="(?:and|because) \'(.*?)\' would be invalid",
| |
| [f]=a,
| |
| [d]={{nil,m,n}},
| |
| [j]={ac,1576172311,Ib,bc}
| |
| },
| |
| ["note_next_field_declaration"]={
| |
| [b]={{nil,z,"note_next_field_declaration"}},
| |
| [h]={{nil,z,"next field declaration is here"}},
| |
| [i]={{nil,z,"next field declaration is here"}},
| |
| [c]=g,
| |
| [e]="next field declaration is here",
| |
| [f]=a,
| |
| [d]={{nil,z,n}},
| |
| [j]={"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"},
| |
| [k]={{C,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);"}}, | |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/flexible-array-test.cpp"]={"clang/test/SemaCXX/flexible-array-test.cpp:71:7: note: next field declaration is here"} | | ["clang/test/SemaObjCXX/capturing-flexible-array-in-block.mm"]={"clang/test/SemaObjCXX/capturing-flexible-array-in-block.mm:6:12: error: cannot refer to declaration of structure variable with flexible array member inside block"} |
| } | | } |
| }, | | }, |
| ["note_next_ivar_declaration"]={ | | ["err_ref_init_ambiguous"]={ |
| [b]={{nil,z,"note_next_ivar_declaration"}}, | | [b]="err_ref_init_ambiguous", |
| [h]={{nil,z,"next %select{instance variable declaration|synthesized instance variable}0 is here"}}, | | [j]="reference initialization of type %0 with initializer of type %1 is ambiguous", |
| [i]={{nil,z,{"next ",{"instance variable declaration","synthesized instance variable"}," is here"}}}, | | [i]="reference initialization of type A with initializer of type B is ambiguous", |
| [c]=g, | | [h]=k, |
| [e]="next (?:instance variable declaration|synthesized instance variable) is here", | | [c]="reference initialization of type (.*?) with initializer of type (.*?) is ambiguous", |
| [f]=a, | | [f]=a, |
| [d]={{nil,z,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"31481d8b22a9",1255481563,"Handle ambiguity of reference initialization.","Handle ambiguity of reference initialization.\nRemoves a FIXME.\n\nllvm-svn: 84068"}, |
| [k]={{db,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();"}}, | | [d]={{P,9651,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitOverloadFailed:\n case FK_UserConversionOverloadFailed:\n // ...\n case OR_Ambiguous:\n FailedCandidateSet.NoteCandidates(PartialDiagnosticAt(Kind.getLocation(), Failure == FK_UserConversionOverloadFailed ? (S.PDiag(diag::err_typecheck_ambiguous_condition) << OnlyArg->getType() << DestType << Args[0]->getSourceRange()) : (S.PDiag(diag::err_ref_init_ambiguous) << DestType << OnlyArg->getType() << Args[0]->getSourceRange())), S, OCD_AmbiguousCandidates, Args);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaCXX/ref-init-ambiguous.cpp"]={"clang/test/SemaCXX/ref-init-ambiguous.cpp:17:13: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous","clang/test/SemaCXX/ref-init-ambiguous.cpp:23:9: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous","clang/test/SemaCXX/ref-init-ambiguous.cpp:25:12: error: reference initialization of type \'const E2 &\' with initializer of type \'C\' is ambiguous"} |
| } | | } |
| }, | | }, |
| ["note_non_c_like_anon_struct"]={ | | ["err_ref_non_value"]={ |
| [b]={{nil,t,"note_non_c_like_anon_struct"}}, | | [b]="err_ref_non_value", |
| [h]={{nil,t,"type is not C-compatible due to this %select{base class|default member initializer|lambda expression|friend declaration|member declaration}0"}}, | | [j]="%0 does not refer to a value", |
| [i]={{nil,t,{"type is not C-compatible due to this ",{Ub,"default member initializer","lambda expression","friend declaration","member declaration"}}}}, | | [i]="A does not refer to a value", |
| [c]=g, | | [h]=k, |
| [e]="type is not C\\-compatible due to this (?:base class|default member initializer|lambda expression|friend declaration|member declaration)", | | [c]="(.*?) does not refer to a value", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"e7488b904ca9",1259686698,"Don\'t automatically assume that an id-expression refers to a","Don\'t automatically assume that an id-expression refers to a\nValueDecl, because that isn\'t always the case in ill-formed\ncode. Diagnose a common mistake (forgetting to provide a template\nargument list for a class template, PR5655) and dyn_cast so that we\nhandle the general problem of referring to a non-value declaration\ngracefully.\n\nllvm-svn: 90239"}, |
| [k]={{C,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;"}}, | | [d]={{O,3387,"/// Complete semantic analysis for a reference to the given declaration.\nExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D, NamedDecl *FoundD, const TemplateArgumentListInfo *TemplateArgs, bool AcceptInvalidDecl) {\n // ...\n // Make sure that we\'re referring to a value.\n if (!isa<ValueDecl, UnresolvedUsingIfExistsDecl>(D)) {\n Diag(Loc, diag::err_ref_non_value) << D << SS.getRange();"}}, |
| [l]={ | | [l]={ |
| ["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/SemaHLSL/cb_error.hlsl"]={"clang/test/SemaHLSL/cb_error.hlsl:10:17: error: \'a\' does not refer to a value"} |
| } | | } |
| }, | | }, |
| ["note_non_deducible_parameter"]={ | | ["err_ref_qualifier_comparison_operator"]={ |
| [b]={{nil,y,"note_non_deducible_parameter"}}, | | [b]="err_ref_qualifier_comparison_operator", |
| [h]={{nil,y,"non-deducible template parameter %0"}}, | | [j]="ref-qualifier \'&&\' is not allowed on a defaulted comparison operator", |
| [i]={{nil,y,"non-deducible template parameter A"}}, | | [i]="ref-qualifier \'&&\' is not allowed on a defaulted comparison operator", |
| [c]=g, | | [h]=k, |
| [e]="non\\-deducible template parameter (.*?)", | | [c]="ref\\-qualifier \'&&\' is not allowed on a defaulted comparison operator", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{G,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();"},{G,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)\";"}}, | | [d]={{w,8708,"bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, DefaultedComparisonKind DCK) {\n // ...\n if (IsMethod) {\n // ...\n if (MD->getRefQualifier() == RQ_RValue) {\n Diag(MD->getLocation(), diag::err_ref_qualifier_comparison_operator);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/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/class/class.compare/class.compare.default/p1.cpp"]={"clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:18:8: error: ref-qualifier \'&&\' is not allowed on a defaulted comparison operator","clang/test/CXX/class/class.compare/class.compare.default/p1.cpp:202:10: error: ref-qualifier \'&&\' is not allowed on a defaulted comparison operator"} |
| } | | } |
| }, | | }, |
| ["note_non_instantiated_member_here"]={ | | ["err_ref_qualifier_constructor"]={ |
| [b]="note_non_instantiated_member_here", | | [b]="err_ref_qualifier_constructor", |
| [h]="not-yet-instantiated member is declared here", | | [j]="ref-qualifier \'%select{&&|&}0\' is not allowed on a constructor", |
| [i]="not-yet-instantiated member is declared here", | | [i]={{nil,nil,{"ref-qualifier \'",{"&&","&"},"\' is not allowed on a constructor"}}}, |
| [c]=g, | | [h]=k, |
| [e]="not\\-yet\\-instantiated member is declared here", | | [c]="ref\\-qualifier \'(?:&&|&)\' is not allowed on a constructor", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"db9d66424425",1296018118,"Rvalue references for *this: ","Rvalue references for *this: \n\n - Add ref-qualifiers to the type system; they are part of the\n canonical type. Print & profile ref-qualifiers\n - Translate the ref-qualifier from the Declarator chunk for\n functions to the function type. \n - Diagnose mis-uses of ref-qualifiers w.r.t. static member\n functions, free functions, constructors, destructors, etc.\n - Add serialization and deserialization of ref-qualifiers.\n\nllvm-svn: 124281"}, |
| [k]={{"clang/lib/Sema/SemaTemplateInstantiateDecl.cpp",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);"}}, | | [d]={{w,10747,"/// CheckConstructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formedness of the constructor declarator @p D with type @p\n/// R. If there are any errors in the declarator, this routine will\n/// emit diagnostics and set the invalid bit to true. In any case, the type\n/// will be updated to reflect a well-formed type for the constructor and\n/// returned.\nQualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n // ...\n if (FTI.hasRefQualifier()) {\n Diag(FTI.getRefQualifierLoc(), diag::err_ref_qualifier_constructor) << FTI.RefQualifierIsLValueRef << FixItHint::CreateRemoval(FTI.getRefQualifierLoc());"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CXX/special/class.ctor/p4-0x.cpp"]={"clang/test/CXX/special/class.ctor/p4-0x.cpp:5:7: error: ref-qualifier \'&\' is not allowed on a constructor","clang/test/CXX/special/class.ctor/p4-0x.cpp:6:10: error: ref-qualifier \'&&\' is not allowed on a constructor"} |
| } | | } |
| }, | | }, |
| ["note_non_literal_base_class"]={ | | ["err_ref_qualifier_destructor"]={ |
| [b]="note_non_literal_base_class", | | [b]="err_ref_qualifier_destructor", |
| [h]="%0 is not literal because it has base class %1 of non-literal type", | | [j]="ref-qualifier \'%select{&&|&}0\' is not allowed on a destructor", |
| [i]="A is not literal because it has base class B of non-literal type", | | [i]={{nil,nil,{"ref-qualifier \'",{"&&","&"},"\' is not allowed on a destructor"}}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not literal because it has base class (.*?) of non\\-literal type", | | [c]="ref\\-qualifier \'(?:&&|&)\' is not allowed on a destructor", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={hc,1317436288,dc,ic}, | | [g]={"db9d66424425",1296018118,"Rvalue references for *this: ","Rvalue references for *this: \n\n - Add ref-qualifiers to the type system; they are part of the\n canonical type. Print & profile ref-qualifiers\n - Translate the ref-qualifier from the Declarator chunk for\n functions to the function type. \n - Diagnose mis-uses of ref-qualifiers w.r.t. static member\n functions, free functions, constructors, destructors, etc.\n - Add serialization and deserialization of ref-qualifiers.\n\nllvm-svn: 124281"}, |
| [k]={{Y,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();"}},
| | [d]={{w,10924,"/// CheckDestructorDeclarator - Called by ActOnDeclarator to check\n/// the well-formednes of the destructor declarator @p D with type @p\n/// R. If there are any errors in the declarator, this routine will\n/// emit diagnostics and set the declarator to invalid. Even if this happens,\n/// will be updated to reflect a well-formed type for the destructor and\n/// returned.\nQualType Sema::CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC) {\n // ...\n if (FTI.hasRefQualifier()) {\n Diag(FTI.getRefQualifierLoc(), diag::err_ref_qualifier_destructor) << FTI.RefQualifierIsLValueRef << FixItHint::CreateRemoval(FTI.getRefQualifierLoc());"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/special/class.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.dtor/p2-0x.cpp"]={"clang/test/CXX/special/class.dtor/p2-0x.cpp:5:8: error: ref-qualifier \'&\' is not allowed on a destructor","clang/test/CXX/special/class.dtor/p2-0x.cpp:9:8: error: ref-qualifier \'&&\' is not allowed on a destructor"} |
| } | | } |
| }, | | }, |
| ["note_non_literal_field"]={ | | ["err_ref_qualifier_overload"]={ |
| [b]="note_non_literal_field", | | [b]="err_ref_qualifier_overload", |
| [h]="%0 is not literal because it has data member %1 of %select{non-literal|volatile}3 type %2", | | [j]="cannot overload a member function %select{without a ref-qualifier|with ref-qualifier \'&\'|with ref-qualifier \'&&\'}0 with a member function %select{without a ref-qualifier|with ref-qualifier \'&\'|with ref-qualifier \'&&\'}1", |
| [i]={{nil,nil,{"A is not literal because it has data member B of ",{"non-literal",Dd}," type C"}}}, | | [i]={{nil,nil,{"cannot overload a member function ",{"without a ref-qualifier","with ref-qualifier \'&\'","with ref-qualifier \'&&\'"}," with a member function ",{"without a ref-qualifier","with ref-qualifier \'&\'","with ref-qualifier \'&&\'"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not literal because it has data member (.*?) of (?:non\\-literal|volatile) type (.*?)", | | [c]="cannot overload a member function (?:without a ref\\-qualifier|with ref\\-qualifier \'&\'|with ref\\-qualifier \'&&\') with a member function (?:without a ref\\-qualifier|with ref\\-qualifier \'&\'|with ref\\-qualifier \'&&\')", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={hc,1317436288,dc,ic}, | | [g]={"c83f9865a0da",1296076837,"Implement the restriction that a function with a ref-qualifier cannot","Implement the restriction that a function with a ref-qualifier cannot\noverload a function without a ref-qualifier (C++0x\n[over.load]p2). This, apparently, completes the implementation of\nrvalue references for *this.\n\nllvm-svn: 124321"}, |
| [k]={{Y,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();"}},
| | [d]={{E,1356,"bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old, bool UseMemberUsingDeclRules, bool ConsiderCudaAttrs, bool ConsiderRequiresClauses) {\n // ...\n if (OldMethod && NewMethod && !OldMethod->isStatic() && !NewMethod->isStatic()) {\n if (OldMethod->getRefQualifier() != NewMethod->getRefQualifier()) {\n if (!UseMemberUsingDeclRules && (OldMethod->getRefQualifier() == RQ_None || NewMethod->getRefQualifier() == RQ_None)) {\n // ...\n Diag(NewMethod->getLocation(), diag::err_ref_qualifier_overload) << NewMethod->getRefQualifier() << OldMethod->getRefQualifier();"}}, |
| [l]={ | | [l]={ |
| [zd]={"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]\'"} | | ["clang/test/CXX/over/over.load/p2-0x.cpp"]={"clang/test/CXX/over/over.load/p2-0x.cpp:15:8: error: cannot overload a member function without a ref-qualifier with a member function with ref-qualifier \'&\'","clang/test/CXX/over/over.load/p2-0x.cpp:21:29: error: cannot overload a member function without a ref-qualifier with a member function with ref-qualifier \'&\'","clang/test/CXX/over/over.load/p2-0x.cpp:24:8: error: cannot overload a member function with ref-qualifier \'&&\' with a member function without a ref-qualifier"} |
| } | | } |
| }, | | }, |
| ["note_non_literal_incomplete"]={ | | ["err_ref_vm_type"]={ |
| [b]="note_non_literal_incomplete", | | [b]="err_ref_vm_type", |
| [h]="incomplete type %0 is not a literal type", | | [j]="cannot refer to declaration with a variably modified type inside block", |
| [i]="incomplete type A is not a literal type", | | [i]="cannot refer to declaration with a variably modified type inside block", |
| [c]=g, | | [h]=k, |
| [e]="incomplete type (.*?) is not a literal type", | | [c]="cannot refer to declaration with a variably modified type inside block", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"7dafa0d04810",1262660195,"Disallow capturing vlas inside blocks.","Disallow capturing vlas inside blocks.\n\nllvm-svn: 92676"}, |
| [k]={{Y,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))"}}, | | [d]={{O,19165,"// Certain capturing entities (lambdas, blocks etc.) are not allowed to capture\n// certain types of variables (unnamed, variably modified types etc.)\n// so check for eligibility.\nstatic bool isVariableCapturable(CapturingScopeInfo *CSI, ValueDecl *Var, SourceLocation Loc, const bool Diagnose, Sema &S) {\n // ...\n // Prohibit variably-modified types in blocks; they\'re difficult to deal with.\n if (Var->getType()->isVariablyModifiedType() && IsBlock) {\n if (Diagnose) {\n S.Diag(Loc, diag::err_ref_vm_type);"}}, |
| [l]={ | | [l]={ |
| [zd]={"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"} | | ["clang/test/Sema/block-misc.c"]={"clang/test/Sema/block-misc.c:209:11: error: cannot refer to declaration with a variably modified type inside block","clang/test/Sema/block-misc.c:210:12: error: cannot refer to declaration with a variably modified type inside block"} |
| } | | } |
| }, | | }, |
| ["note_non_literal_lambda"]={ | | ["err_refactor_code_outside_of_function"]={ |
| [b]={{nil,u,"note_non_literal_lambda"}}, | | [b]={{nil,B,"err_refactor_code_outside_of_function"}}, |
| [h]={{nil,u,"lambda closure types are non-literal types before C++17"}}, | | [j]={{nil,B,"the selected code is not a part of a function\'s / method\'s body"}}, |
| [i]={{nil,u,"lambda closure types are non-literal types before C++17"}}, | | [i]={{nil,B,"the selected code is not a part of a function\'s / method\'s body"}}, |
| [c]=g, | | [h]=k, |
| [e]="lambda closure types are non\\-literal types before C\\+\\+17", | | [c]="the selected code is not a part of a function\'s \\/ method\'s body", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]={{nil,B,Fb}}, |
| [j]={"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"}, | | [g]={"7fe441b20d2d",1508865525,"[refactor] Initial outline of implementation of \"extract function\" refactoring","[refactor] Initial outline of implementation of \"extract function\" refactoring\n\nThis commit adds an initial, skeleton outline of the \"extract function\"\nrefactoring. The extracted function doesn\'t capture variables / rewrite code\nyet, it just basically does a simple copy-paste.\nThe following initiation rules are specified:\n\n- extraction can only be done for executable code in a function/method/block.\n This means that you can\'t extract a global variable initialize into a function\n right now.\n- simple literals and references are not extractable.\n\nThis commit also adds support for full source ranges to clang-refactor\'s test\nmode.\n\nDifferential Revision: https://reviews.llvm.org/D38982\n\nllvm-svn: 316465"}, |
| [k]={{Y,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);"}},
| | [d]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",79,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // We would like to extract code out of functions/methods/blocks.\n // Prohibit extraction from things like global variable / field\n // initializers and other top-level expressions.\n if (!Code.isInFunctionLikeBodyOfCode())\n return Context.createDiagnosticError(diag::err_refactor_code_outside_of_function);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_non_literal_no_constexpr_ctors"]={ | | ["err_refactor_extract_prohibited_expression"]={ |
| [b]="note_non_literal_no_constexpr_ctors", | | [b]={{nil,B,"err_refactor_extract_prohibited_expression"}}, |
| [h]="%0 is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors", | | [j]={{nil,B,"the selected expression can\'t be extracted"}}, |
| [i]="A is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors", | | [i]={{nil,B,"the selected expression can\'t be extracted"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors", | | [c]="the selected expression can\'t be extracted", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,B,Fb}}, |
| [j]={hc,1317436288,dc,ic}, | | [g]={"1e416fe23df4",1509495655,"[refactor][extract] prohibit extraction of ObjC property setters","[refactor][extract] prohibit extraction of ObjC property setters\n\nllvm-svn: 317056"}, |
| [k]={{Y,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;"}}, | | [d]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",91,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // ...\n if (Code.size() == 1) {\n // ...\n // Property setters can\'t be extracted.\n if (const auto *PRE = dyn_cast<ObjCPropertyRefExpr>(Code[0])) {\n if (!PRE->isMessagingGetter())\n return Context.createDiagnosticError(diag::err_refactor_extract_prohibited_expression);"}} |
| [l]={
| |
| ["clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp: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"}
| |
| }
| |
| }, | | }, |
| ["note_non_literal_non_constexpr_dtor"]={ | | ["err_refactor_extract_simple_expression"]={ |
| [b]={{nil,m,"note_non_literal_non_constexpr_dtor"}}, | | [b]={{nil,B,"err_refactor_extract_simple_expression"}}, |
| [h]={{nil,m,"%0 is not literal because its destructor is not constexpr"}}, | | [j]={{nil,B,"the selected expression is too simple to extract"}}, |
| [i]={{nil,m,"A is not literal because its destructor is not constexpr"}}, | | [i]={{nil,B,"the selected expression is too simple to extract"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not literal because its destructor is not constexpr", | | [c]="the selected expression is too simple to extract", |
| [f]=a, | | [f]=a, |
| [d]={{nil,m,n}}, | | [e]={{nil,B,Fb}}, |
| [j]={ad,1567434909,Vc,Xc}, | | [g]={"7fe441b20d2d",1508865525,"[refactor] Initial outline of implementation of \"extract function\" refactoring","[refactor] Initial outline of implementation of \"extract function\" refactoring\n\nThis commit adds an initial, skeleton outline of the \"extract function\"\nrefactoring. The extracted function doesn\'t capture variables / rewrite code\nyet, it just basically does a simple copy-paste.\nThe following initiation rules are specified:\n\n- extraction can only be done for executable code in a function/method/block.\n This means that you can\'t extract a global variable initialize into a function\n right now.\n- simple literals and references are not extractable.\n\nThis commit also adds support for full source ranges to clang-refactor\'s test\nmode.\n\nDifferential Revision: https://reviews.llvm.org/D38982\n\nllvm-svn: 316465"}, |
| [k]={{Y,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;"}},
| | [d]={{"clang/lib/Tooling/Refactoring/Extract/Extract.cpp",85,"Expected<ExtractFunction> ExtractFunction::initiate(RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional<std::string> DeclName) {\n // ...\n if (Code.size() == 1) {\n // Avoid extraction of simple literals and references.\n if (isSimpleExpression(dyn_cast<Expr>(Code[0])))\n return Context.createDiagnosticError(diag::err_refactor_extract_simple_expression);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_non_literal_nontrivial_dtor"]={ | | ["err_refactor_no_selection"]={ |
| [b]="note_non_literal_nontrivial_dtor", | | [b]={{nil,B,"err_refactor_no_selection"}}, |
| [h]="%0 is not literal because it has a non-trivial destructor", | | [j]={{nil,B,"refactoring action can\'t be initiated without a selection"}}, |
| [i]="A is not literal because it has a non-trivial destructor", | | [i]={{nil,B,"refactoring action can\'t be initiated without a selection"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not literal because it has a non\\-trivial destructor", | | [c]="refactoring action can\'t be initiated without a selection", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,B,Fb}}, |
| [j]={hc,1317436288,dc,ic},
| | [g]={"f5ca27cc3785",1508178506,"[refactor] allow the use of refactoring diagnostics","[refactor] allow the use of refactoring diagnostics\n\nThis commit allows the refactoring library to use its own set of\nrefactoring-specific diagnostics to reports things like initiation errors.\n\nDifferential Revision: https://reviews.llvm.org/D38772\n\nllvm-svn: 315924"}, |
| [k]={{Y,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;"}}, | | [d]={{"clang/unittests/Tooling/RefactoringActionRulesTest.cpp",145,"TEST_F(RefactoringActionRulesTest, MyFirstRefactoringRule) {\n // ...\n // When one of the requirements is not satisfied, invoke should return a\n // valid error.\n {\n // ...\n EXPECT_EQ(DiagID, diag::err_refactor_no_selection);"}} |
| [l]={
| |
| [zd]={"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"]={ | | ["err_refactor_selection_invalid_ast"]={ |
| [b]="note_non_literal_user_provided_dtor", | | [b]={{nil,B,"err_refactor_selection_invalid_ast"}}, |
| [h]="%0 is not literal because it has a user-provided destructor", | | [j]={{nil,B,"the provided selection does not overlap with the AST nodes of interest"}}, |
| [i]="A is not literal because it has a user-provided destructor", | | [i]={{nil,B,"the provided selection does not overlap with the AST nodes of interest"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not literal because it has a user\\-provided destructor", | | [c]="the provided selection does not overlap with the AST nodes of interest", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,B,Fb}}, |
| [j]={hc,1317436288,dc,ic},
| | [g]={"7fe441b20d2d",1508865525,"[refactor] Initial outline of implementation of \"extract function\" refactoring","[refactor] Initial outline of implementation of \"extract function\" refactoring\n\nThis commit adds an initial, skeleton outline of the \"extract function\"\nrefactoring. The extracted function doesn\'t capture variables / rewrite code\nyet, it just basically does a simple copy-paste.\nThe following initiation rules are specified:\n\n- extraction can only be done for executable code in a function/method/block.\n This means that you can\'t extract a global variable initialize into a function\n right now.\n- simple literals and references are not extractable.\n\nThis commit also adds support for full source ranges to clang-refactor\'s test\nmode.\n\nDifferential Revision: https://reviews.llvm.org/D38982\n\nllvm-svn: 316465"}, |
| [k]={{Y,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;"}}, | | [d]={{"clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp",29,"Expected<SelectedASTNode> ASTSelectionRequirement::evaluate(RefactoringRuleContext &Context) const {\n // ...\n if (!Selection)\n return Context.createDiagnosticError(Range->getBegin(), diag::err_refactor_selection_invalid_ast);"},{"clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp",48,"Expected<CodeRangeASTSelection> CodeRangeASTSelectionRequirement::evaluate(RefactoringRuleContext &Context) const {\n // ...\n if (!CodeRange)\n return Context.createDiagnosticError(Context.getSelectionRange().getBegin(), diag::err_refactor_selection_invalid_ast);"}} |
| [l]={
| |
| [zd]={"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"]={ | | ["err_refactor_selection_no_symbol"]={ |
| [b]="note_non_literal_virtual_base", | | [b]={{nil,B,"err_refactor_selection_no_symbol"}}, |
| [h]="%select{struct|interface|class}0 with virtual base %plural{1:class|:classes}1 is not a literal type", | | [j]={{nil,B,"there is no symbol at the given location"}}, |
| [i]={{nil,nil,{{"struct","interface",wb}," with virtual base ",{wb,"classes"}," is not a literal type"}}}, | | [i]={{nil,B,"there is no symbol at the given location"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:struct|interface|class) with virtual base (?:class|classes) is not a literal type", | | [c]="there is no symbol at the given location", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,B,Fb}}, |
| [j]={hc,1317436288,dc,ic},
| | [g]={"f5ca27cc3785",1508178506,"[refactor] allow the use of refactoring diagnostics","[refactor] allow the use of refactoring diagnostics\n\nThis commit allows the refactoring library to use its own set of\nrefactoring-specific diagnostics to reports things like initiation errors.\n\nDifferential Revision: https://reviews.llvm.org/D38772\n\nllvm-svn: 315924"}, |
| [k]={{Y,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();"}}, | | [d]={{"clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp",73,"Expected<RenameOccurrences> RenameOccurrences::initiate(RefactoringRuleContext &Context, SourceRange SelectionRange, std::string NewName) {\n // ...\n if (!ND)\n return Context.createDiagnosticError(SelectionRange.getBegin(), diag::err_refactor_selection_no_symbol);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_non_null_attribute_failed"]={ | | ["err_reference_bind_drops_quals"]={ |
| [b]={{nil,p,"note_non_null_attribute_failed"}}, | | [b]="err_reference_bind_drops_quals", |
| [h]={{nil,p,"null passed to a callee that requires a non-null argument"}}, | | [j]={{nil,o,"binding reference %diff{of type $ to value of type $|to value}0,1 %select{drops %3 qualifier%plural{1:|2:|4:|:s}4|changes address space|not permitted due to incompatible qualifiers}2"},{x,x,"binding reference %diff{of type $ to value of type $|to value}0,1 %select{drops %3 qualifier%plural{1:|2:|4:|:s}4|changes address space}2"},{u,nil,"binding value %diff{of type $ to reference to type $|to reference}0,1 drops %select{<<ERROR>>|\'const\'|\'restrict\'|\'const\' and \'restrict\'|\'volatile\'|\'const\' and \'volatile\'|\'restrict\' and \'volatile\'|\'const\', \'restrict\', and \'volatile\'}2 qualifier%plural{1:|2:|4:|:s}2"}}, |
| [i]={{nil,p,"null passed to a callee that requires a non-null argument"}},
| | [i]={{nil,o,{"binding reference ",{"of type A to value of type B","to value"}," ",{{"drops D qualifier",{a,a,a,"s"}},"changes address space","not permitted due to incompatible qualifiers"}}},{x,x,{"binding reference ",{"of type A to value of type B","to value"}," ",{{"drops D qualifier",{a,a,a,"s"}},"changes address space"}}},{u,nil,{"binding value ",{"of type A to reference to type B","to reference"}," drops ",{"\'const\'","\'restrict\'","\'const\' and \'restrict\'","\'volatile\'","\'const\' and \'volatile\'","\'restrict\' and \'volatile\'","\'const\', \'restrict\', and \'volatile\'"}," qualifier",{a,a,a,"s"}}}}, |
| [c]=g, | | [h]=k, |
| [e]="null passed to a callee that requires a non\\-null argument", | | [c]="binding reference (?:of type (.*?) to value of type (.*?)|to value) (?:drops (.*?) qualifier(?:|||s)|changes address space|not permitted due to incompatible qualifiers)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,a}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{o,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);"}}, | | [d]={{P,9756,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitDropsQualifiers: {\n // ...\n if (!NonRefType.getQualifiers().isAddressSpaceSupersetOf(SourceType.getQualifiers()))\n S.Diag(Kind.getLocation(), diag::err_reference_bind_drops_quals) << NonRefType << SourceType << 1 /*addr space*/"},{P,9760,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitDropsQualifiers: {\n // ...\n if (!NonRefType.getQualifiers().isAddressSpaceSupersetOf(SourceType.getQualifiers()))\n // ...\n else if (DroppedQualifiers.hasQualifiers())\n S.Diag(Kind.getLocation(), diag::err_reference_bind_drops_quals) << NonRefType << SourceType << 0 /*cv quals*/"},{P,9767,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitDropsQualifiers: {\n // ...\n if (!NonRefType.getQualifiers().isAddressSpaceSupersetOf(SourceType.getQualifiers()))\n // ...\n else if (DroppedQualifiers.hasQualifiers())\n // ...\n else\n // ...\n S.Diag(Kind.getLocation(), diag::err_reference_bind_drops_quals) << NonRefType << SourceType << 2 /*incompatible quals*/"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaCXX/attr-nonnull.cpp"]={"clang/test/SemaCXX/attr-nonnull.cpp:65:28: note: null passed to a callee that requires a non-null argument","clang/test/SemaCXX/attr-nonnull.cpp:76:27: note: null passed to a callee that requires a non-null argument","clang/test/SemaCXX/attr-nonnull.cpp:83:27: note: null passed to a callee that requires a non-null argument","clang/test/SemaCXX/attr-nonnull.cpp:84:24: note: null passed to a callee that requires a non-null argument"} | | ["clang/test/SemaCXX/builtins-arm.cpp"]={"clang/test/SemaCXX/builtins-arm.cpp:5:27: error: binding reference of type \'__builtin_va_list\' to value of type \'const __builtin_va_list\' drops \'const\' qualifier"} |
| } | | } |
| }, | | }, |
| ["note_non_template_in_template_id_found"]={ | | ["err_reference_bind_failed"]={ |
| [b]={{nil,y,"note_non_template_in_template_id_found"}}, | | [b]="err_reference_bind_failed", |
| [h]={{nil,y,"non-template declaration found by name lookup"}}, | | [j]={{nil,x,"reference %diff{to %select{type|incomplete type}1 $ could not bind to an %select{rvalue|lvalue}2 of type $|could not bind to %select{rvalue|lvalue}2 of incompatible type}0,3"},{u,nil,"reference %diff{to type $ could not bind to an %select{rvalue|lvalue}1 of type $|could not bind to %select{rvalue|lvalue}1 of incompatible type}0,2"}}, |
| [i]={{nil,y,"non-template declaration found by name lookup"}},
| | [i]={{nil,x,{"reference ",{{"to ",{"type","incomplete type"}," A could not bind to an ",{cc,bc}," of type D"},{"could not bind to ",{cc,bc}," of incompatible type"}}}},{u,nil,{"reference ",{{"to type A could not bind to an ",{cc,bc}," of type C"},{"could not bind to ",{cc,bc}," of incompatible type"}}}}}, |
| [c]=g, | | [h]=k, |
| [e]="non\\-template declaration found by name lookup", | | [c]="reference (?:to (?:type|incomplete type) (.*?) could not bind to an (?:rvalue|lvalue) of type (.*?)|could not bind to (?:rvalue|lvalue) of incompatible type)", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{G,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);"},{G,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);"}},
| | [d]={{P,9774,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceInitFailed:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_failed) << DestType.getNonReferenceType() << DestType.getNonReferenceType()->isIncompleteType() << OnlyArg->isLValue() << OnlyArg->getType() << Args[0]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CXX/expr/p13.cpp"]={"clang/test/CXX/expr/p13.cpp:28:12: error: reference to type \'const A\' (aka \'void (*const)() noexcept\') could not bind to an rvalue of type \'void (*)()\'"} |
| } | | } |
| }, | | }, |
| ["note_non_trivial_c_union"]={ | | ["err_reference_bind_init_list"]={ |
| [b]={{nil,p,"note_non_trivial_c_union"}}, | | [b]="err_reference_bind_init_list", |
| [h]={{nil,p,"%select{%2 has subobjects that are|%3 has type %2 that is}0 non-trivial to %select{default-initialize|destruct|copy}1"}}, | | [j]="reference to type %0 cannot bind to an initializer list", |
| [i]={{nil,p,{{"C has subobjects that are","D has type C that is"}," non-trivial to ",{"default-initialize","destruct",fc}}}}, | | [i]="reference to type A cannot bind to an initializer list", |
| [c]=g, | | [h]=k, |
| [e]="(?:(.*?) has subobjects that are|(.*?) has type (.*?) that is) non\\-trivial to (?:default\\-initialize|destruct|copy)", | | [c]="reference to type (.*?) cannot bind to an initializer list", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"51e77d5ab0a0",1260467815,"Move initialization via initializer list over to InitializationSequences.","Move initialization via initializer list over to InitializationSequences.\n\nllvm-svn: 91050"}, |
| [k]={{C,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();"},{C,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();"},{C,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() << \"\";"},{C,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();"},{C,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();"},{C,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() << \"\";"},{C,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();"},{C,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();"},{C,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() << \"\";"}}, | | [d]={{P,9828,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceBindingToInitList:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_init_list) << DestType.getNonReferenceType() << Args[0]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/non-trivial-c-union.m"]={ | | ["clang/test/SemaCXX/cxx0x-initializer-references.cpp"]={"clang/test/SemaCXX/cxx0x-initializer-references.cpp:141:16: error: reference to type \'const int\' cannot bind to an initializer list"} |
| [1]=Cb,
| |
| [2]=Bb,
| |
| [3]=Fb,
| |
| [4]=Cb,
| |
| [5]=Bb,
| |
| [6]=Fb,
| |
| [7]=Cb,
| |
| [8]=Bb,
| |
| [9]=Fb,
| |
| [10]=H,
| |
| [11]=I,
| |
| [12]=J,
| |
| [13]=R,
| |
| [14]=S,
| |
| [15]=T,
| |
| [16]=H,
| |
| [17]=I,
| |
| [18]=J,
| |
| [19]=R,
| |
| [20]=S,
| |
| [21]=T,
| |
| [22]=H,
| |
| [23]=I,
| |
| [24]=J,
| |
| [25]=R,
| |
| [26]=S,
| |
| [27]=T,
| |
| [28]=H,
| |
| [29]=I,
| |
| [30]=J,
| |
| [31]=R,
| |
| [32]=S,
| |
| [33]=T,
| |
| [34]=H,
| |
| [35]=I,
| |
| [36]=J,
| |
| [37]=R,
| |
| [38]=S,
| |
| [39]=T,
| |
| [40]=H,
| |
| [41]=I,
| |
| [42]=J,
| |
| [43]=R,
| |
| [44]=S,
| |
| [45]=T,
| |
| [46]=H,
| |
| [47]=I,
| |
| [48]=J,
| |
| [49]=R,
| |
| [50]=S,
| |
| [51]=T,
| |
| [52]=H,
| |
| [53]=I,
| |
| [54]=J,
| |
| [55]=R,
| |
| [56]=S,
| |
| [57]=T,
| |
| [58]=H,
| |
| [59]=I,
| |
| [60]=J,
| |
| [61]=R,
| |
| [62]=S,
| |
| [63]=T,
| |
| [64]=H,
| |
| [65]=I,
| |
| [66]=J,
| |
| [67]=R,
| |
| [68]=S,
| |
| [69]=T,
| |
| [70]=H,
| |
| [71]=I,
| |
| [72]=J,
| |
| [73]=R,
| |
| [74]=S,
| |
| [75]=T,
| |
| [76]=H,
| |
| [77]=I,
| |
| [78]=J,
| |
| [79]=R,
| |
| [80]=S,
| |
| [81]=T,
| |
| [82]=H,
| |
| [83]=I,
| |
| [84]=J,
| |
| [85]=Cb,
| |
| [86]=Bb,
| |
| [87]=Fb,
| |
| [88]=H,
| |
| [89]=I,
| |
| [90]=J,
| |
| [91]=R,
| |
| [92]=S,
| |
| [93]=T,
| |
| [94]=H,
| |
| [95]=I,
| |
| [96]=J,
| |
| [97]=H,
| |
| [98]=I,
| |
| [99]=J,
| |
| [100]=H,
| |
| [101]=I,
| |
| [102]=J,
| |
| [103]=Cb,
| |
| [104]=Bb,
| |
| [105]=Fb,
| |
| [106]=H,
| |
| [107]=I,
| |
| [108]=J,
| |
| [109]=R,
| |
| [110]=S,
| |
| [111]=T,
| |
| [112]=H,
| |
| [113]=I,
| |
| [114]=J,
| |
| [115]=R,
| |
| [116]=S,
| |
| [117]=T,
| |
| [118]=H,
| |
| [119]=I,
| |
| [120]=J,
| |
| [121]=R,
| |
| [122]=S,
| |
| [123]=T,
| |
| [124]=H,
| |
| [125]=I,
| |
| [126]=J,
| |
| [127]=Cb,
| |
| [128]=Bb,
| |
| [129]=Fb,
| |
| [130]=R,
| |
| [131]=S,
| |
| [132]=T,
| |
| [133]=R,
| |
| [134]=S,
| |
| [135]=T,
| |
| [136]=R,
| |
| [137]=S,
| |
| [138]=T,
| |
| [139]=R,
| |
| [140]=S,
| |
| [141]=T,
| |
| [142]=Cb,
| |
| [143]=Bb,
| |
| [144]=Fb,
| |
| [145]=H,
| |
| [146]=I,
| |
| [147]=J,
| |
| [148]=H,
| |
| [149]=I,
| |
| [150]=J,
| |
| [151]=H,
| |
| [152]=I,
| |
| [153]=J,
| |
| [154]=R,
| |
| [155]=S,
| |
| [156]=T,
| |
| [157]=H,
| |
| [158]=I,
| |
| [159]=J,
| |
| [160]=Cb,
| |
| [161]=Bb,
| |
| [162]=Fb,
| |
| [163]=H,
| |
| [164]=I,
| |
| [165]=J,
| |
| [166]=Cb,
| |
| [167]=Bb,
| |
| [168]=Fb,
| |
| [169]=H,
| |
| [170]=I,
| |
| [171]=J,
| |
| [172]=Cb,
| |
| [173]=Bb,
| |
| [174]=Fb,
| |
| [175]=H,
| |
| [176]=I,
| |
| [177]=J,
| |
| [178]=Cb,
| |
| [179]=Bb,
| |
| [180]=Fb,
| |
| [181]=H,
| |
| [182]=I,
| |
| [183]=J,
| |
| [184]=Cb,
| |
| [185]=Bb,
| |
| [186]=Fb,
| |
| [187]=H,
| |
| [188]=I,
| |
| [189]=J,
| |
| [190]=R,
| |
| [191]=S,
| |
| [192]=T,
| |
| [193]=H,
| |
| [194]=I,
| |
| [195]=J,
| |
| [196]=R,
| |
| [197]=S,
| |
| [198]=T,
| |
| [199]=H,
| |
| [200]=I,
| |
| [201]=J,
| |
| [202]=R,
| |
| [203]=S,
| |
| [204]=T,
| |
| [205]=H,
| |
| [206]=I,
| |
| [207]=J,
| |
| [208]=R,
| |
| [209]=S,
| |
| [210]=T,
| |
| [211]=H,
| |
| [212]=I,
| |
| [213]=J,
| |
| [214]=R,
| |
| [215]=S,
| |
| [216]=T,
| |
| [217]=H,
| |
| [218]=I,
| |
| [219]=J,
| |
| [220]=R,
| |
| [221]=S,
| |
| [222]=T,
| |
| [223]=H,
| |
| [224]=I,
| |
| [225]=J,
| |
| [226]=R,
| |
| [227]=S,
| |
| [228]=T,
| |
| [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",
| |
| [231]="clang/test/SemaObjC/Inputs/non-trivial-c-union.h:16:9: note: \'U1_SystemHeader\' has subobjects that are non-trivial to copy",
| |
| [232]="clang/test/SemaObjC/Inputs/non-trivial-c-union.h:17:15: note: f0 has type \'__strong id\' that is non-trivial to copy"
| |
| }
| |
| } | | } |
| }, | | }, |
| ["note_non_usual_function_declared_here"]={ | | ["err_reference_bind_temporary_addrspace"]={ |
| [b]={{nil,u,"note_non_usual_function_declared_here"}}, | | [b]={{nil,x,"err_reference_bind_temporary_addrspace"}}, |
| [h]={{nil,u,"non-usual %0 declared here"}}, | | [j]={{nil,x,"reference of type %0 cannot bind to a temporary object because of address space mismatch"}}, |
| [i]={{nil,u,"non-usual A declared here"}}, | | [i]={{nil,x,"reference of type A cannot bind to a temporary object because of address space mismatch"}}, |
| [c]=g, | | [h]=k, |
| [e]="non\\-usual (.*?) declared here", | | [c]="reference of type (.*?) cannot bind to a temporary object because of address space mismatch", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]={{nil,x,m}}, |
| [j]={"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"}, | | [g]={"5145b1e4421a",1559743414,"[Sema] Prevent binding incompatible addr space ref to temporaries","[Sema] Prevent binding incompatible addr space ref to temporaries\n\nReferences to arbitrary address spaces can\'t always be bound to\ntemporaries. This change extends the reference binding logic to\ncheck that the address space of a temporary can be implicitly\nconverted to the address space in a reference when temporary\nmaterialization is performed.\n\nDifferential Revision: https://reviews.llvm.org/D61318\n\nllvm-svn: 362604"}, |
| [k]={{hb,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();"}}, | | [d]={{P,9744,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_ReferenceAddrspaceMismatchTemporary:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_temporary_addrspace) << DestType << Args[0]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaOpenCLCXX/address-space-references.clcpp"]={"clang/test/SemaOpenCLCXX/address-space-references.clcpp:4:10: error: reference of type \'const __global int &\' cannot bind to a temporary object because of address space mismatch"} |
| } | | } |
| }, | | }, |
| ["note_nontemplate_decl_here"]={ | | ["err_reference_bind_to_bitfield"]={ |
| [b]="note_nontemplate_decl_here", | | [b]="err_reference_bind_to_bitfield", |
| [h]="non-templated declaration is here", | | [j]="%select{non-const|volatile}0 reference cannot bind to bit-field%select{| %1}2", |
| [i]="non-templated declaration is here", | | [i]={{nil,nil,{{"non-const","volatile"}," reference cannot bind to bit-field",{a,vb}}}}, |
| [c]=g, | | [h]=k, |
| [e]="non\\-templated declaration is here", | | [c]="(?:non\\-const|volatile) reference cannot bind to bit\\-field(?:| (.*?))", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{G,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);"}}, | | [d]={{P,9716,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToBitfield: {\n // ...\n S.Diag(Kind.getLocation(), diag::err_reference_bind_to_bitfield) << DestType.isVolatileQualified() << (BitField ? BitField->getDeclName() : DeclarationName()) << (BitField != nullptr) << Args[0]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaTemplate/temp_explicit.cpp"]={"clang/test/SemaTemplate/temp_explicit.cpp:112:10: note: non-templated declaration is here"} | | ["clang/test/SemaObjCXX/references.mm"]={"clang/test/SemaObjCXX/references.mm:74:13: error: non-const reference cannot bind to bit-field \'bf\'"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_default_arg"]={ | | ["err_reference_bind_to_matrix_element"]={ |
| [b]="note_nontrivial_default_arg",
| | [b]={{nil,t,"err_reference_bind_to_matrix_element"}}, |
| [h]="because it has a default argument",
| | [j]={{nil,t,"%select{non-const|volatile}0 reference cannot bind to matrix element"}}, |
| [i]="because it has a default argument",
| | [i]={{nil,t,{{"non-const","volatile"}," reference cannot bind to matrix element"}}}, |
| [c]=g,
| | [h]=k, |
| [e]="because it has a default argument",
| | [c]="(?:non\\-const|volatile) reference cannot bind to matrix element", |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Oc,1354935182,Sc,Ic},
| |
| [k]={{r,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"]={
| |
| [b]={{nil,s,"note_nontrivial_default_member_init"}}, | |
| [h]={{nil,s,"because field %0 has an initializer"}}, | |
| [i]={{nil,s,"because field A has an initializer"}}, | |
| [c]=g,
| |
| [e]="because field (.*?) has an initializer",
| |
| [f]=a,
| |
| [d]={{nil,s,n}},
| |
| [j]={Pb,1582847864,Ob,Nb},
| |
| [k]={{r,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"]={
| |
| [b]={{nil,u,"note_nontrivial_field"}},
| |
| [h]={{nil,u,"field is non-trivial to %select{copy|default-initialize}0"}},
| |
| [i]={{nil,u,{"field is non-trivial to ",{fc,"default-initialize"}}}}, | |
| [c]=g, | |
| [e]="field is non\\-trivial to (?:copy|default\\-initialize)",
| |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,n}}, | | [e]={{nil,t,m}}, |
| [j]={"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"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{V,12257,"struct SearchNonTrivialToInitializeField : DefaultInitializedTypeVisitor<SearchNonTrivialToInitializeField> {\n // ...\n void visitARCStrong(QualType FT, SourceLocation SL) { S.DiagRuntimeBehavior(SL, E, S.PDiag(diag::note_nontrivial_field) << 1); }"},{V,12260,"struct SearchNonTrivialToInitializeField : DefaultInitializedTypeVisitor<SearchNonTrivialToInitializeField> {\n // ...\n void visitARCWeak(QualType FT, SourceLocation SL) { S.DiagRuntimeBehavior(SL, E, S.PDiag(diag::note_nontrivial_field) << 1); }"},{V,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); }"},{V,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); }"}}, | | [d]={{P,9733,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToMatrixElement:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_to_matrix_element) << DestType.isVolatileQualified() << Args[0]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaCXX/matrix-type-operators.cpp"]={"clang/test/SemaCXX/matrix-type-operators.cpp:236:10: error: non-const reference cannot bind to matrix element"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_has_virtual"]={ | | ["err_reference_bind_to_vector_element"]={ |
| [b]="note_nontrivial_has_virtual", | | [b]="err_reference_bind_to_vector_element", |
| [h]="because type %0 has a virtual %select{member function|base class}1", | | [j]="%select{non-const|volatile}0 reference cannot bind to vector element", |
| [i]={{nil,nil,{"because type A has a virtual ",{"member function",Ub}}}}, | | [i]={{nil,nil,{{"non-const","volatile"}," reference cannot bind to vector element"}}}, |
| [c]=g, | | [h]=k, |
| [e]="because type (.*?) has a virtual (?:member function|base class)", | | [c]="(?:non\\-const|volatile) reference cannot bind to vector element", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"8abde4b447db",1264958329,"Diagnose binding a non-const reference to a vector element.","Diagnose binding a non-const reference to a vector element.\n\nllvm-svn: 94963"}, |
| [k]={{r,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;"},{r,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;"}}, | | [d]={{P,9727,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_NonConstLValueReferenceBindingToVectorElement:\n S.Diag(Kind.getLocation(), diag::err_reference_bind_to_vector_element) << DestType.isVolatileQualified() << Args[0]->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| [pd]={"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"} | | ["clang/test/SemaCXX/references.cpp"]={"clang/test/SemaCXX/references.cpp:149:8: error: non-const reference cannot bind to vector element","clang/test/SemaCXX/references.cpp:153:8: error: non-const reference cannot bind to vector element"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_no_copy"]={ | | ["err_reference_capture_with_reference_default"]={ |
| [b]="note_nontrivial_no_copy", | | [b]="err_reference_capture_with_reference_default", |
| [h]="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", | | [j]="\'&\' cannot precede a capture when the capture default is \'&\'", |
| [i]={{nil,nil,{"because no ",{E,E,"assignment operator","assignment operator"}," can be used to ",{fc,"move",fc,"move"},rb,{Ub,fd,"an object"}," of type D"}}}, | | [i]="\'&\' cannot precede a capture when the capture default is \'&\'", |
| [c]=g, | | [h]=k, |
| [e]="because no (?:constructor|constructor|assignment operator|assignment operator) can be used to (?:copy|move|copy|move) (?:base class|field|an object) of type (.*?)", | | [c]="\'&\' cannot precede a capture when the capture default is \'&\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]="Lambda Issue", |
| [j]={Oc,1354935182,Sc,Ic}, | | [g]={"44803326d4e8",1325898497,"Lambdas: semantic analysis of explicit captures.","Lambdas: semantic analysis of explicit captures.\n\nThis patch (and some of my other commits related to lambdas) is heavily based off of John Freeman\'s work-in-progress patches.\n\nllvm-svn: 147706"}, |
| [k]={{r,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;"}}, | | [d]={{"clang/lib/Sema/SemaLambda.cpp",1117,"void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, Scope *CurrentScope) {\n // ...\n for (auto C = Intro.Captures.begin(), E = Intro.Captures.end(); C != E; PrevCaptureLoc = C->Loc, ++C) {\n // ...\n if (C->Init.isUsable()) {\n // ...\n } else {\n // ...\n // C++11 [expr.prim.lambda]p8:\n // If a lambda-capture includes a capture-default that is &, the\n // identifiers in the lambda-capture shall not be preceded by &.\n // If a lambda-capture includes a capture-default that is =, [...]\n // each identifier it contains shall be preceded by &.\n if (C->Kind == LCK_ByRef && Intro.Default == LCD_ByRef) {\n Diag(C->Loc, diag::err_reference_capture_with_reference_default) << FixItHint::CreateRemoval(SourceRange(getLocForEndOfToken(PrevCaptureLoc), C->Loc));"}}, |
| [l]={ | | [l]={ |
| [pd]={"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\'"} | | ["clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:13:16: error: \'&\' cannot precede a capture when the capture default is \'&\'","clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp:25:14: error: \'&\' cannot precede a capture when the capture default is \'&\'"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_no_def_ctor"]={ | | ["err_reference_has_multiple_inits"]={ |
| [b]="note_nontrivial_no_def_ctor", | | [b]="err_reference_has_multiple_inits", |
| [h]="because %select{base class of |field of |}0type %1 has no default constructor", | | [j]="reference cannot be initialized with multiple values", |
| [i]={{nil,nil,{"because ",{"base class of ","field of ",a},"type B has no default constructor"}}}, | | [i]="reference cannot be initialized with multiple values", |
| [c]=g, | | [h]=k, |
| [e]="because (?:base class of |field of |)type (.*?) has no default constructor", | | [c]="reference cannot be initialized with multiple values", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={Oc,1354935182,Sc,Ic}, | | [g]={"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"}, |
| [k]={{r,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();"}},
| | [d]={{P,9569,"bool InitializationSequence::Diagnose(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef<Expr *> Args) {\n // ...\n case FK_TooManyInitsForReference:\n // FIXME: Customize for the initialized entity?\n if (Args.empty()) {\n // ...\n } else // FIXME: diagnostic below could be better!\n S.Diag(Kind.getLocation(), diag::err_reference_has_multiple_inits) << SourceRange(Args.front()->getBeginLoc(), Args.back()->getEndLoc());"}} |
| [l]={
| |
| [pd]={"clang/test/CXX/class/class.union/p1.cpp:22:7: note: because type \'CtorTmpl\' has no default constructor"}
| |
| }
| |
| }, | | }, |
| ["note_nontrivial_objc_ownership"]={ | | ["err_reference_pipe_type"]={ |
| [b]="note_nontrivial_objc_ownership", | | [b]="err_reference_pipe_type", |
| [h]="because type %0 has a member with %select{no|no|__strong|__weak|__autoreleasing}1 ownership", | | [j]="pipes packet types cannot be of reference type", |
| [i]={{nil,nil,{"because type A has a member with ",{sc,sc,"__strong","__weak","__autoreleasing"}," ownership"}}}, | | [i]="pipes packet types cannot be of reference type", |
| [c]=g, | | [h]=k, |
| [e]="because type (.*?) has a member with (?:no|no|__strong|__weak|__autoreleasing) ownership", | | [c]="pipes packet types cannot be of reference type", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"cff00d9c127c",1308874139,"Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about \'ownership\', not \'lifet...","Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about \'ownership\', not \'lifetime\'.\n\nrdar://9477613.\n\nllvm-svn: 133779"}, | | [g]={"9c14e282112c",1452343997,"[OpenCL] Pipe type support","[OpenCL] Pipe type support\n\nSummary:\nSupport for OpenCL 2.0 pipe type.\nThis is a bug-fix version for bader\'s patch reviews.llvm.org/D14441\n\n\nReviewers: pekka.jaaskelainen, Anastasia\n\nSubscribers: bader, Anastasia, cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D15603\n\nllvm-svn: 257254"}, |
| [k]={{r,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();"}}, | | [d]={{D,10746,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n for (const ParmVarDecl *Param : NewFD->parameters()) {\n // ...\n // OpenCL 2.0 pipe restrictions forbids pipe packet types to be non-value\n // types.\n if (getLangOpts().getOpenCLCompatibleVersion() >= 200) {\n if (const PipeType *PipeTy = PT->getAs<PipeType>()) {\n // ...\n if (ElemTy->isReferenceType() || ElemTy->isPointerType()) {\n Diag(Param->getTypeSpecStartLoc(), diag::err_reference_pipe_type);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjCXX/objc-weak.mm"]={"clang/test/SemaObjCXX/objc-weak.mm:12:13: note: because type \'S\' has a member with __weak ownership"} | | ["clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl"]={"clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl:22:17: error: pipes packet types cannot be of reference type"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_param_type"]={ | | ["err_reference_to_function_with_unsatisfied_constraints"]={ |
| [b]="note_nontrivial_param_type", | | [b]={{nil,o,"err_reference_to_function_with_unsatisfied_constraints"}}, |
| [h]="because its parameter is %diff{of type $, not $|of the wrong type}2,3", | | [j]={{nil,o,"invalid reference to function %0: constraints not satisfied"}}, |
| [i]={{nil,nil,{"because its parameter is ",{"of type C, not D","of the wrong type"}}}}, | | [i]={{nil,o,"invalid reference to function A: constraints not satisfied"}}, |
| [c]=g, | | [h]=k, |
| [e]="because its parameter is (?:of type (.*?), not (.*?)|of the wrong type)", | | [c]="invalid reference to function (.*?)\\: constraints not satisfied", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,m}}, |
| [j]={Oc,1354935182,Sc,Ic},
| | [g]={"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"}, |
| [k]={{r,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());"},{r,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));"}} | | [d]={{O,297,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {\n // ...\n // [expr.prim.id]p4\n // A program that refers explicitly or implicitly to a function with a\n // trailing requires-clause whose constraint-expression is not satisfied,\n // other than to declare it, is ill-formed. [...]\n //\n // See if this is a function with constraints that need to be satisfied.\n // Check this before deducing the return type, as it might instantiate the\n // definition.\n if (!SkipTrailingRequiresClause && FD->getTrailingRequiresClause()) {\n // ...\n if (!Satisfaction.IsSatisfied) {\n Diag(Loc, diag::err_reference_to_function_with_unsatisfied_constraints) << D;"}}, |
| },
| |
| ["note_nontrivial_subobject"]={
| |
| [b]="note_nontrivial_subobject",
| |
| [h]="because the function selected to %select{construct|copy|move|copy|move|destroy}2 %select{base class|field}0 of type %1 is not trivial",
| |
| [i]={{nil,nil,{"because the function selected to ",{"construct",fc,"move",fc,"move","destroy"},rb,{Ub,fd}," of type B is not trivial"}}},
| |
| [c]=g,
| |
| [e]="because the function selected to (?:construct|copy|move|copy|move|destroy) (?:base class|field) of type (.*?) is not trivial",
| |
| [f]=a,
| |
| [d]=n,
| |
| [j]={Oc,1354935182,Sc,Ic},
| |
| [k]={{r,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;"}},
| |
| [l]={ | | [l]={ |
| [pd]={"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"} | | ["clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp"]={"clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp:10:11: error: invalid reference to function \'f\': constraints not satisfied","clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp:11:29: error: invalid reference to function \'f\': constraints not satisfied","clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp:12:31: error: invalid reference to function \'f\': constraints not satisfied","clang/test/SemaCXX/cxx20-check-fptr-constraints.cpp:13:20: error: invalid reference to function \'f\': constraints not satisfied"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_user_provided"]={ | | ["err_reference_to_local_in_enclosing_context"]={ |
| [b]="note_nontrivial_user_provided", | | [b]="err_reference_to_local_in_enclosing_context", |
| [h]="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", | | [j]="reference to local %select{variable|binding}1 %0 declared in enclosing %select{%3|block literal|lambda expression|context}2", |
| [i]={{nil,nil,{"because ",{"base class of ","field of ",a},"type B has a user-provided ",{wc,kc,lc,oc,pc,D}}}}, | | [i]={{nil,nil,{"reference to local ",{"variable","binding"}," A declared in enclosing ",{"D","block literal","lambda expression","context"}}}}, |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="reference to local (?:variable|binding) (.*?) declared in enclosing (?:(.*?)|block literal|lambda expression|context)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={Oc,1354935182,Sc,Ic}, | | [g]={"1879f1069b60",1471228463,"Disable lambda-capture of decomposition declaration bindings for now, until CWG","Disable lambda-capture of decomposition declaration bindings for now, until CWG\nagrees on how they\'re supposed to work.\n\nllvm-svn: 278648"}, |
| [k]={{r,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;"},{r,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;"}},
| | [d]={{O,19081,"void diagnoseUncapturableValueReferenceOrBinding(Sema &S, SourceLocation loc, ValueDecl *var) {\n // ...\n S.Diag(loc, diag::err_reference_to_local_in_enclosing_context) << var << ValueKind << ContextKind << VarDC;"}}, |
| [l]={ | | [l]={ |
| [pd]={"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"} | | ["clang/test/CXX/class/class.local/p1.cpp"]={"clang/test/CXX/class/class.local/p1.cpp:11:22: error: reference to local variable \'x\' declared in enclosing function \'f\'"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_variadic"]={ | | ["err_reference_to_void"]={ |
| [b]="note_nontrivial_variadic", | | [b]="err_reference_to_void", |
| [h]="because it is a variadic function", | | [j]="cannot form a reference to \'void\'", |
| [i]="because it is a variadic function", | | [i]="cannot form a reference to \'void\'", |
| [c]=g, | | [h]=k, |
| [e]="because it is a variadic function", | | [c]="cannot form a reference to \'void\'", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={Oc,1354935182,Sc,Ic}, | | [g]={L,1237025389,M,N}, |
| [k]={{r,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);"}}, | | [d]={{rb,2270,"/// Build a reference type.\n///\n/// \\param T The type to which we\'ll be building a reference.\n///\n/// \\param Loc The location of the entity whose type involves this\n/// reference type or, if there is no such entity, the location of the\n/// type that will have reference type.\n///\n/// \\param Entity The name of the entity that involves the reference\n/// type, if known.\n///\n/// \\returns A suitable reference type, if there are no\n/// errors. Otherwise, returns a NULL type.\nQualType Sema::BuildReferenceType(QualType T, bool SpelledAsLValue, SourceLocation Loc, DeclarationName Entity) {\n // ...\n // C++ [dcl.ref]p1:\n // A declarator that specifies the type \"reference to cv void\"\n // is ill-formed.\n if (T->isVoidType()) {\n Diag(Loc, diag::err_reference_to_void);"}}, |
| [l]={ | | [l]={ |
| [pd]={"clang/test/CXX/class/class.union/p1.cpp:95:5: note: because it is a variadic function"} | | ["clang/test/SemaTemplate/metafun-apply.cpp"]={"clang/test/SemaTemplate/metafun-apply.cpp:13:14: error: cannot form a reference to \'void\'"} |
| } | | } |
| }, | | }, |
| ["note_nontrivial_virtual_dtor"]={ | | ["err_reference_var_requires_init"]={ |
| [b]="note_nontrivial_virtual_dtor", | | [b]="err_reference_var_requires_init", |
| [h]="destructor for %0 is not trivial because it is virtual", | | [j]="declaration of reference variable %0 requires an initializer", |
| [i]="destructor for A is not trivial because it is virtual", | | [i]="declaration of reference variable A requires an initializer", |
| [c]=g, | | [h]=k, |
| [e]="destructor for (.*?) is not trivial because it is virtual", | | [c]="declaration of reference variable (.*?) requires an initializer", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={Oc,1354935182,Sc,Ic}, | | [g]={s,1236199783,q,r}, |
| [k]={{r,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;"}}, | | [d]={{D,13842,"void Sema::ActOnUninitializedDecl(Decl *RealDecl) {\n // ...\n if (VarDecl *Var = dyn_cast<VarDecl>(RealDecl)) {\n // ...\n // Provide a specific diagnostic for uninitialized variable\n // definitions with reference type.\n if (Type->isReferenceType()) {\n Diag(Var->getLocation(), diag::err_reference_var_requires_init) << Var << SourceRange(Var->getLocation(), Var->getLocation());"}}, |
| [l]={ | | [l]={ |
| [zd]={"clang/test/CXX/basic/basic.types/p10.cpp:46:11: note: destructor for \'NonTrivDtor\' is not trivial because it is virtual"} | | ["clang/test/SemaTemplate/instantiate-member-template.cpp"]={"clang/test/SemaTemplate/instantiate-member-template.cpp:72:21: error: declaration of reference variable \'value\' requires an initializer"} |
| } | | } |
| }, | | }, |
| ["note_not_found_by_two_phase_lookup"]={ | | ["err_reference_without_init"]={ |
| [b]="note_not_found_by_two_phase_lookup", | | [b]="err_reference_without_init", |
| [h]="%0 should be declared prior to the call site%select{| or in %2| or in an associated namespace of one of its arguments}1", | | [j]="reference to type %0 requires an initializer", |
| [i]={{nil,nil,{"A should be declared prior to the call site",{a," or in C"," or in an associated namespace of one of its arguments"}}}}, | | [i]="reference to type A requires an initializer", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) should be declared prior to the call site(?:| or in (.*?)| or in an associated namespace of one of its arguments)", | | [c]="reference to type (.*?) requires an initializer", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"7ae2d7758f3f",1264929171,"Rework base and member initialization in constructors, with several","Rework base and member initialization in constructors, with several\n(necessarily simultaneous) changes:\n\n - CXXBaseOrMemberInitializer now contains only a single initializer\n rather than a set of initialiation arguments + a constructor. The\n single initializer covers all aspects of initialization, including\n constructor calls as necessary but also cleanup of temporaries\n created by the initializer (which we never handled\n before!).\n\n - Rework + simplify code generation for CXXBaseOrMemberInitializers,\n since we can now just emit the initializer as an initializer.\n\n - Switched base and member initialization over to the new\n initialization code (InitializationSequence), so that it\n\n - Improved diagnostics for the new initialization code when\n initializing bases and members, to match the diagnostics produced\n by the previous (special-purpose) code.\n\n - Simplify the representation of type-checked constructor initializers in\n templates; instead of keeping the fully-type-checked AST, which is\n rather hard to undo at template instantiation time, throw away the\n type-checked AST and store the raw expressions in the AST. This\n simplifies instantiation, but loses a little but of information in\n the AST.\n\n - When type-checking implicit base or member initializers within a\n dependent context, don\'t add the generated initializers into the\n AST, because they\'ll look like they were explicit.\n\n - Record in CXXConstructExpr when the constructor call is to\n initialize a base class, so that CodeGen does not have to infer it\n from context. This ensures that we call the right kind of\n constructor.\n\nThere are also a few \"opportunity\" fixes here that were needed to not\nregress, for example:\n\n - Diagnose default-initialization of a const-qualified class that\n does not have a user-declared default constructor. We had this\n diagnostic specifically for bases and members, but missed it for\n variables. That\'s fixed now.\n\n - When defining the implicit constructors, destructor, and\n copy-assignment operator, set the CurContext to that constructor\n when we\'re defining the body.\n\nllvm-svn: 94952"}, |
| [k]={{xb,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;"},{xb,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();"},{xb,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;"}},
| | [d]={{P,9431,"/// Somewhere within T there is an uninitialized reference subobject.\n/// Dig it out and diagnose it.\nstatic bool DiagnoseUninitializedReference(Sema &S, SourceLocation Loc, QualType T) {\n if (T->isReferenceType()) {\n S.Diag(Loc, diag::err_reference_without_init) << T.getNonReferenceType();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaObjCXX/property-synthesis-error.mm"]={"clang/test/SemaObjCXX/property-synthesis-error.mm:94:47: error: reference to type \'int\' requires an initializer"} |
| } | | } |
| }, | | }, |
| ["note_not_module_interface_add_export"]={ | | ["err_regparm_mismatch"]={ |
| [b]={{nil,p,"note_not_module_interface_add_export"}}, | | [b]="err_regparm_mismatch", |
| [h]={{nil,p,"add \'export\' here if this is intended to be a module interface unit"}}, | | [j]="function declared with regparm(%0) attribute was previously declared %plural{0:without the regparm|:with the regparm(%1)}1 attribute", |
| [i]={{nil,p,"add \'export\' here if this is intended to be a module interface unit"}}, | | [i]={{nil,nil,{"function declared with regparm(A) attribute was previously declared ",{"without the regparm","with the regparm(B)"}," attribute"}}}, |
| [c]=g, | | [h]=k, |
| [e]="add \'export\' here if this is intended to be a module interface unit", | | [c]="function declared with regparm\\((.*?)\\) attribute was previously declared (?:without the regparm|with the regparm\\((.*?)\\)) attribute", |
| [f]=a, | | [f]=a, |
| [d]={{nil,p,Ld}}, | | [e]=m, |
| [j]={"a5bbbfef156c",1555621974,"[c++2a] Add semantic support for private module fragments.","[c++2a] Add semantic support for private module fragments.\n\nllvm-svn: 358713"}, | | [g]={"77e274fbc67d",1276896625,"Merge the \"regparm\" attribute from a previous declaration of a","Merge the \"regparm\" attribute from a previous declaration of a\nfunction to redeclarations of that function. Fixes PR7025.\n\nllvm-svn: 106317"}, |
| [k]={{Qb,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 \");"},{Qb,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 \");"}}, | | [d]={{D,3831,"/// MergeFunctionDecl - We just parsed a function \'New\' from\n/// declarator D which has the same name and scope as a previous\n/// declaration \'Old\'. Figure out how to resolve this situation,\n/// merging decls or emitting diagnostics as appropriate.\n///\n/// In C++, New and Old must be declarations that are not\n/// overloaded. Use IsOverload to determine whether New and Old are\n/// overloaded, and to select the Old declaration that New should be\n/// merged with.\n///\n/// Returns true if there was an error, false otherwise.\nbool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, bool MergeTypeWithOld, bool NewDeclIsDefn) {\n // ...\n // Merge regparm attribute.\n if (OldTypeInfo.getHasRegParm() != NewTypeInfo.getHasRegParm() || OldTypeInfo.getRegParm() != NewTypeInfo.getRegParm()) {\n if (NewTypeInfo.getHasRegParm()) {\n Diag(New->getLocation(), diag::err_regparm_mismatch) << NewType->getRegParmType() << OldType->getRegParmType();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/attr-regparm.c"]={"clang/test/Sema/attr-regparm.c:11:34: error: function declared with regparm(2) attribute was previously declared with the regparm(3) attribute","clang/test/Sema/attr-regparm.c:14:26: error: function declared with regparm(2) attribute was previously declared with the regparm(3) attribute"} |
| } | | } |
| }, | | }, |
| ["note_not_structural_mutable_field"]={ | | ["err_relocatable_without_isysroot"]={ |
| [b]={{nil,s,"note_not_structural_mutable_field"}}, | | [b]="err_relocatable_without_isysroot", |
| [h]={{nil,s,"%0 is not a structural type because it has a mutable non-static data member"}}, | | [j]="must specify system root with -isysroot when building a relocatable PCH file", |
| [i]={{nil,s,"A is not a structural type because it has a mutable non-static data member"}}, | | [i]="must specify system root with -isysroot when building a relocatable PCH file", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not a structural type because it has a mutable non\\-static data member", | | [c]="must specify system root with \\-isysroot when building a relocatable PCH file", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]=a, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={"ea68af43e80d",1282067738,"Fix a typo in a diag name.","Fix a typo in a diag name.\n\nllvm-svn: 111257"}, |
| [k]={{G,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;"}}, | | [d]={{"clang/lib/Frontend/FrontendActions.cpp",156,"bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, std::string &Sysroot) {\n // ...\n if (CI.getFrontendOpts().RelocatablePCH && Sysroot.empty()) {\n CI.getDiagnostics().Report(diag::err_relocatable_without_isysroot);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_not_structural_non_public"]={ | | ["err_repeat_attribute"]={ |
| [b]={{nil,s,"note_not_structural_non_public"}}, | | [b]="err_repeat_attribute", |
| [h]={{nil,s,"%0 is not a structural type because it has a %select{non-static data member|base class}1 that is not public"}}, | | [j]="%0 attribute cannot be repeated", |
| [i]={{nil,s,{"A is not a structural type because it has a ",{"non-static data member",Ub}," that is not public"}}}, | | [i]="A attribute cannot be repeated", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not a structural type because it has a (?:non\\-static data member|base class) that is not public", | | [c]="(.*?) attribute cannot be repeated", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]=m, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={"54a025488774",1259122827,"Parse C++ member check attributes - base_check, hiding, and override.","Parse C++ member check attributes - base_check, hiding, and override.\nThe attributes are currently ignored.\n\nllvm-svn: 89837"}, |
| [k]={{G,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;"},{G,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;"}},
| | [d]={{dc,2287,"// PS3 PPU-specific.\nstatic void handleVecReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {\n // ...\n if (VecReturnAttr *A = D->getAttr<VecReturnAttr>()) {\n S.Diag(AL.getLoc(), diag::err_repeat_attribute) << A;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaCXX/cxx-altivec.cpp"]={"clang/test/SemaCXX/cxx-altivec.cpp:5:45: error: \'vecreturn\' attribute cannot be repeated"} |
| } | | } |
| }, | | }, |
| ["note_not_structural_rvalue_ref_field"]={ | | ["err_require_constant_init_failed"]={ |
| [b]={{nil,s,"note_not_structural_rvalue_ref_field"}}, | | [b]="err_require_constant_init_failed", |
| [h]={{nil,s,"%0 is not a structural type because it has a non-static data member of rvalue reference type"}}, | | [j]="variable does not have a constant initializer", |
| [i]={{nil,s,"A is not a structural type because it has a non-static data member of rvalue reference type"}}, | | [i]="variable does not have a constant initializer", |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not a structural type because it has a non\\-static data member of rvalue reference type", | | [c]="variable does not have a constant initializer", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]=m, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={"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"}, |
| [k]={{G,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;"}},
| | [d]={{D,14227,"void Sema::CheckCompleteVariableDeclaration(VarDecl *var) {\n // ...\n // Check whether the initializer is sufficiently constant.\n if (getLangOpts().CPlusPlus && !type->isDependentType() && Init && !Init->isValueDependent() && (GlobalStorage || var->isConstexpr() || var->mightBeUsableInConstantExpressions(Context))) {\n // ...\n if (HasConstInit) {\n // ...\n } else if (var->isConstexpr()) {\n // ...\n } else if (GlobalStorage && var->hasAttr<ConstInitAttr>()) {\n // ...\n Diag(var->getLocation(), diag::err_require_constant_init_failed) << Init->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["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/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp"]={"clang/test/CXX/dcl.dcl/dcl.spec/dcl.constinit/p3.cpp:6:23: error: variable does not have a constant initializer"} |
| } | | } |
| }, | | }, |
| ["note_not_structural_subobject"]={ | | ["err_requires_clause_inside_parens"]={ |
| [b]={{nil,s,"note_not_structural_subobject"}}, | | [b]={{nil,o,"err_requires_clause_inside_parens"}}, |
| [h]={{nil,s,"%0 is not a structural type because it has a %select{non-static data member|base class}1 of non-structural type %2"}}, | | [j]={{nil,o,"trailing requires clause should be placed outside parentheses"}}, |
| [i]={{nil,s,{"A is not a structural type because it has a ",{"non-static data member",Ub}," of non-structural type C"}}}, | | [i]={{nil,o,"trailing requires clause should be placed outside parentheses"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is not a structural type because it has a (?:non\\-static data member|base class) of non\\-structural type (.*?)", | | [c]="trailing requires clause should be placed outside parentheses", |
| [f]=a, | | [f]=a, |
| [d]={{nil,s,n}}, | | [e]={{nil,o,y}}, |
| [j]={Pb,1582847864,Ob,Nb}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{G,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;"}}, | | [d]={{Kb,6714,"PastIdentifier:\n // ...\n while (true) {\n if (Tok.is(tok::l_paren)) {\n // ...\n } else if (Tok.is(tok::l_square)) {\n // ...\n } else if (Tok.isRegularKeywordAttribute()) {\n // ...\n } else if (Tok.is(tok::kw_requires) && D.hasGroupingParens()) {\n // ...\n Diag(Tok, diag::err_requires_clause_inside_parens);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/CXX/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/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:18:21: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:43:12: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:44:12: error: trailing requires clause should be placed outside parentheses","clang/test/CXX/dcl/dcl.decl/p3.cpp:49:30: error: trailing requires clause should be placed outside parentheses"} |
| } | | } |
| }, | | }, |
| ["note_nsdictionary_duplicate_key_here"]={ | | ["err_requires_clause_must_appear_after_trailing_return"]={ |
| [b]={{nil,t,"note_nsdictionary_duplicate_key_here"}}, | | [b]={{nil,o,"err_requires_clause_must_appear_after_trailing_return"}}, |
| [h]={{nil,t,"previous equal key is here"}}, | | [j]={{nil,o,"trailing return type must appear before trailing requires clause"}}, |
| [i]={{nil,t,"previous equal key is here"}}, | | [i]={{nil,o,"trailing return type must appear before trailing requires clause"}}, |
| [c]=g, | | [h]=k, |
| [e]="previous equal key is here", | | [c]="trailing return type must appear before trailing requires clause", |
| [f]=a, | | [f]=a, |
| [d]={{nil,t,n}}, | | [e]={{nil,o,y}}, |
| [j]={wd,1576908663,td,rd}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{B,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);"}}, | | [d]={{kc,4142,"/// Parse a requires-clause as part of a function declaration.\nvoid Parser::ParseTrailingRequiresClause(Declarator &D) {\n // ...\n // Did the user swap the trailing return type and requires clause?\n if (D.isFunctionDeclarator() && Tok.is(tok::arrow) && D.getDeclSpec().getTypeSpecType() == TST_auto) {\n // ...\n if (!TrailingReturnType.isInvalid()) {\n Diag(ArrowLoc, diag::err_requires_clause_must_appear_after_trailing_return) << Range;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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",xd,xd,xd,xd,xd,xd,"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"} | | ["clang/test/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:15:40: error: trailing return type must appear before trailing requires clause","clang/test/CXX/dcl/dcl.decl/p3.cpp:37:30: error: trailing return type must appear before trailing requires clause"} |
| } | | } |
| }, | | }, |
| ["note_nullability_fix_it"]={ | | ["err_requires_clause_on_declarator_not_declaring_a_function"]={ |
| [b]="note_nullability_fix_it", | | [b]={{nil,o,"err_requires_clause_on_declarator_not_declaring_a_function"}}, |
| [h]="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", | | [j]={{nil,o,"trailing requires clause can only be used when declaring a function"}}, |
| [i]={{nil,nil,{"insert \'",{"_Nonnull","_Nullable","_Null_unspecified"},"\' if the ",{Md,"block pointer","member pointer","array parameter"},rb,{"should never be null","may be null","should not declare nullability"}}}}, | | [i]={{nil,o,"trailing requires clause can only be used when declaring a function"}}, |
| [c]=g, | | [h]=k, |
| [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)", | | [c]="trailing requires clause can only be used when declaring a function", |
| [f]=a, | | [f]=a, |
| [d]="Nullability Issue", | | [e]={{nil,o,y}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{Y,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);"}},
| | [d]={{Kb,7375,"/// ParseParameterDeclarationClause - Parse a (possibly empty) parameter-list\n/// after the opening parenthesis. This function will not parse a K&R-style\n/// identifier list.\n///\n/// DeclContext is the context of the declarator being parsed. If FirstArgAttrs\n/// is non-null, then the caller parsed those attributes immediately after the\n/// open paren - they will be applied to the DeclSpec of the first parameter.\n///\n/// After returning, ParamInfo will hold the parsed parameters. EllipsisLoc will\n/// be the location of the ellipsis, if any was parsed.\n///\n/// parameter-type-list: [C99 6.7.5]\n/// parameter-list\n/// parameter-list \',\' \'...\'\n/// [C++] parameter-list \'...\'\n///\n/// parameter-list: [C99 6.7.5]\n/// parameter-declaration\n/// parameter-list \',\' parameter-declaration\n///\n/// parameter-declaration: [C99 6.7.5]\n/// declaration-specifiers declarator\n/// [C++] declaration-specifiers declarator \'=\' assignment-expression\n/// [C++11] initializer-clause\n/// [GNU] declaration-specifiers declarator attributes\n/// declaration-specifiers abstract-declarator[opt]\n/// [C++] declaration-specifiers abstract-declarator[opt]\n/// \'=\' assignment-expression\n/// [GNU] declaration-specifiers abstract-declarator[opt] attributes\n/// [C++11] attribute-specifier-seq parameter-declaration\n///\nvoid Parser::ParseParameterDeclarationClause(DeclaratorContext DeclaratorCtx, ParsedAttributes &FirstArgAttrs, SmallVectorImpl<DeclaratorChunk::ParamInfo> &ParamInfo, SourceLocation &EllipsisLoc, bool IsACXXFunctionDeclaration) {\n // ...\n do {\n // ...\n if (Tok.is(tok::kw_requires)) {\n // ...\n Diag(Tok, diag::err_requires_clause_on_declarator_not_declaring_a_function);"},{kc,4122,"/// Parse a requires-clause as part of a function declaration.\nvoid Parser::ParseTrailingRequiresClause(Declarator &D) {\n // ...\n if (!D.isDeclarationOfFunction()) {\n Diag(RequiresKWLoc, diag::err_requires_clause_on_declarator_not_declaring_a_function);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CXX/dcl/dcl.decl/p3.cpp"]={"clang/test/CXX/dcl/dcl.decl/p3.cpp:46:14: error: trailing requires clause can only be used when declaring a function","clang/test/CXX/dcl/dcl.decl/p3.cpp:47:25: error: trailing requires clause can only be used when declaring a function","clang/test/CXX/dcl/dcl.decl/p3.cpp:48:30: error: trailing requires clause can only be used when declaring a function"} |
| } | | } |
| }, | | }, |
| ["note_nullability_here"]={ | | ["err_requires_expr_expected_type_constraint"]={ |
| [b]="note_nullability_here", | | [b]={{nil,o,"err_requires_expr_expected_type_constraint"}}, |
| [h]="%0 specified here", | | [j]={{nil,o,"expected concept name with optional arguments"}}, |
| [i]="A specified here", | | [i]={{nil,o,"expected concept name with optional arguments"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) specified here", | | [c]="expected concept name with optional arguments", |
| [f]=a, | | [f]=a, |
| [d]="Nullability Issue", | | [e]={{nil,o,y}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{Y,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);"}},
| | [d]={{Ob,3591,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n case tok::l_brace: {\n // ...\n if (!isTypeConstraintAnnotation()) {\n Diag(Tok, diag::err_requires_expr_expected_type_constraint);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/Sema/nullability.c"]={"clang/test/Sema/nullability.c:15:24: note: \'_Nonnull\' specified here"} | | [Pb]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:97:38: error: expected concept name with optional arguments"} |
| } | | } |
| }, | | }, |
| ["note_nullability_type_specifier"]={ | | ["err_requires_expr_in_simple_requirement"]={ |
| [b]="note_nullability_type_specifier", | | [b]={{nil,F,"err_requires_expr_in_simple_requirement"}}, |
| [h]="use nullability type specifier %0 to affect the innermost pointer type of %1", | | [j]={{nil,F,"requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)"}}, |
| [i]="use nullability type specifier A to affect the innermost pointer type of B", | | [i]={{nil,F,"requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)"}}, |
| [c]=g, | | [h]=k, |
| [e]="use nullability type specifier (.*?) to affect the innermost pointer type of (.*?)", | | [c]="requires expression in requirement body; did you intend to place it in a nested requirement\\? \\(add another \'requires\' before the expression\\)", |
| [f]=a, | | [f]=a, |
| [d]="Nullability Issue", | | [e]={{nil,F,y}}, |
| [j]={"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"}, | | [g]={"69350e569dc4",1612659633,"[C++20][Modules][3/8] Initial handling for module partitions.","[C++20][Modules][3/8] Initial handling for module partitions.\n\nThis implements the parsing and recognition of module partition CMIs\nand removes the FIXMEs in the parser.\n\nModule partitions are recognised in the base computation of visibility,\nhowever additional amendments to visibility follow in subsequent patches.\n\nDifferential Revision: https://reviews.llvm.org/D118586"}, |
| [k]={{Y,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));"}}, | | [d]={{Ob,3736,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n default: {\n // ...\n if (!Expression.isInvalid() && PossibleRequiresExprInSimpleRequirement)\n Diag(StartLoc, diag::err_requires_expr_in_simple_requirement) << FixItHint::CreateInsertion(StartLoc, \"requires\");"}}, |
| [l]={ | | [l]={ |
| ["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]\'"} | | [Pb]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:137:23: error: requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:140:23: error: requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:143:23: error: requires expression in requirement body; did you intend to place it in a nested requirement? (add another \'requires\' before the expression)"} |
| } | | } |
| }, | | }, |
| ["note_objc_circular_container_declared_here"]={ | | ["err_requires_expr_local_parameter_default_argument"]={ |
| [b]="note_objc_circular_container_declared_here", | | [b]={{nil,o,"err_requires_expr_local_parameter_default_argument"}}, |
| [h]={{nil,u,"%0 declared here"},{z,nil,"\'%0\' declared here"}}, | | [j]={{nil,o,"default arguments not allowed for parameters of a requires expression"}}, |
| [i]={{nil,u,"A declared here"},{z,nil,"\'A\' declared here"}}, | | [i]={{nil,o,"default arguments not allowed for parameters of a requires expression"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) declared here", | | [c]="default arguments not allowed for parameters of a requires expression", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,m}}, |
| [j]={"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"}, | | [g]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk","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"}, |
| [k]={{V,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;"},{V,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;"}}
| | [d]={{Q,9162,"RequiresExprBodyDecl *Sema::ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, ArrayRef<ParmVarDecl *> LocalParameters, Scope *BodyScope) {\n // ...\n for (ParmVarDecl *Param : LocalParameters) {\n if (Param->hasDefaultArg())\n // ...\n Diag(Param->getDefaultArgRange().getBegin(), diag::err_requires_expr_local_parameter_default_argument);"}}, |
| },
| |
| ["note_objc_container_start"]={
| |
| [b]="note_objc_container_start",
| |
| [h]="%select{class|protocol|category|class extension|implementation|category implementation}0 started here",
| |
| [i]={{nil,nil,{{wb,"protocol","category","class extension","implementation","category implementation"}," started here"}}},
| |
| [c]=g,
| |
| [e]="(?:class|protocol|category|class extension|implementation|category implementation) started here",
| |
| [f]=a,
| |
| [d]=Ab, | |
| [j]={"c6c8d9356dc0",1323163523,"Extend warnings for missing \'@end\'.","Extend warnings for missing \'@end\'.\nFixes PR2709.\n\nllvm-svn: 145928"},
| |
| [k]={{Wc,204,"void Parser::CheckNestedObjCContexts(SourceLocation AtLoc) {\n // ...\n if (Decl)\n Diag(Decl->getBeginLoc(), diag::note_objc_container_start) << (int)ock;"},{Wc,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();"},{Wc,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();"},{Wc,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;"}},
| |
| [l]={ | | [l]={ |
| ["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"} | | [Pb]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:37:30: error: default arguments not allowed for parameters of a requires expression"} |
| } | | } |
| }, | | }, |
| ["note_objc_designated_init_marked_here"]={ | | ["err_requires_expr_missing_arrow"]={ |
| [b]="note_objc_designated_init_marked_here", | | [b]={{nil,o,"err_requires_expr_missing_arrow"}}, |
| [h]="method marked as designated initializer of the class here", | | [j]={{nil,o,"expected \'->\' before expression type requirement"}}, |
| [i]="method marked as designated initializer of the class here", | | [i]={{nil,o,"expected \'->\' before expression type requirement"}}, |
| [c]=g, | | [h]=k, |
| [e]="method marked as designated initializer of the class here", | | [c]="expected \'\\-\\>\' before expression type requirement", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,y}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{C,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);"},{B,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);"},{qb,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);"}}, | | [d]={{Ob,3583,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n case tok::l_brace: {\n // ...\n if (!TryConsumeToken(tok::arrow))\n // ...\n Diag(Tok, diag::err_requires_expr_missing_arrow) << FixItHint::CreateInsertion(Tok.getLocation(), \"->\");"}}, |
| [l]={ | | [l]={ |
| ["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",Ad,"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",Ad,Ad,"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",Ad,"clang/test/SemaObjC/attr-designated-init.m:43:1: note: method marked as designated initializer of the class here",Ad,Ad,"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"} | | [Pb]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:97:38: error: expected \'->\' before expression type requirement","clang/test/Parser/cxx2a-concepts-requires-expr.cpp:107:38: error: expected \'->\' before expression type requirement"} |
| } | | } |
| }, | | }, |
| ["note_objc_literal_comparison_isequal"]={ | | ["err_requires_expr_parameter_list_ellipsis"]={ |
| [b]="note_objc_literal_comparison_isequal", | | [b]={{nil,o,"err_requires_expr_parameter_list_ellipsis"}}, |
| [h]="use \'isEqual:\' instead", | | [j]={{nil,o,"varargs not allowed in requires expression"}}, |
| [i]="use \'isEqual:\' instead", | | [i]={{nil,o,"varargs not allowed in requires expression"}}, |
| [c]=g, | | [h]=k, |
| [e]="use \'isEqual\\:\' instead", | | [c]="varargs not allowed in requires expression", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,y}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{A,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, \"]\");"}},
| | [d]={{Ob,3511,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::l_paren)) {\n // ...\n if (!Tok.is(tok::r_paren)) {\n // ...\n if (EllipsisLoc.isValid())\n Diag(EllipsisLoc, diag::err_requires_expr_parameter_list_ellipsis);"}}, |
| [l]={ | | [l]={ |
| ["clang/test/FixIt/fixit-nsstring-compare.m"]={"clang/test/FixIt/fixit-nsstring-compare.m:16:28: note: use \'isEqual:\' instead"} | | [Pb]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:8:28: error: varargs not allowed in requires expression"} |
| } | | } |
| }, | | }, |
| ["note_objc_literal_method_param"]={ | | ["err_requires_expr_parameter_referenced_in_evaluated_context"]={ |
| [b]="note_objc_literal_method_param", | | [b]={{nil,o,"err_requires_expr_parameter_referenced_in_evaluated_context"}}, |
| [h]="%select{first|second|third}0 parameter has unexpected type %1 (should be %2)", | | [j]={{nil,o,"constraint variable %0 cannot be used in an evaluated context"}}, |
| [i]={{nil,nil,{{"first","second","third"}," parameter has unexpected type B (should be C)"}}}, | | [i]={{nil,o,"constraint variable A cannot be used in an evaluated context"}}, |
| [c]=g, | | [h]=k, |
| [e]="(?:first|second|third) parameter has unexpected type (.*?) \\(should be (.*?)\\)", | | [c]="constraint variable (.*?) cannot be used in an evaluated context", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,m}}, |
| [j]={"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"}, | | [g]={"6d485ff455ea",1576172311,"Improve static checks for sprintf and __builtin___sprintf_chk","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"}, |
| [k]={{B,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());"},{B,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\";"},{B,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());"},{B,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());"},{B,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\";"}}, | | [d]={{O,404,"/// Determine whether the use of this declaration is valid, and\n/// emit any corresponding diagnostics.\n///\n/// This routine diagnoses various problems with referencing\n/// declarations that can occur when using a declaration. For example,\n/// it might warn if a deprecated or unavailable declaration is being\n/// used, or produce an error (and return true) if a C++0x deleted\n/// function is being used.\n///\n/// \\returns true if there was an error (this declaration cannot be\n/// referenced), false otherwise.\n///\nbool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks, ObjCInterfaceDecl *ClassReceiver, bool SkipTrailingRequiresClause) {\n // ...\n if (isa<ParmVarDecl>(D) && isa<RequiresExprBodyDecl>(D->getDeclContext()) && !isUnevaluatedContext()) {\n // ...\n Diag(Loc, diag::err_requires_expr_parameter_referenced_in_evaluated_context) << D;"}}, |
| [l]={ | | [l]={ |
| ["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/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp"]={"clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp:104:65: error: constraint variable \'x\' cannot be used in an evaluated context"} |
| } | | } |
| }, | | }, |
| ["note_objc_literal_method_return"]={ | | ["err_requires_expr_simple_requirement_noexcept"]={ |
| [b]="note_objc_literal_method_return", | | [b]={{nil,o,"err_requires_expr_simple_requirement_noexcept"}}, |
| [h]="method returns unexpected type %0 (should be an object type)", | | [j]={{nil,o,"\'noexcept\' can only be used in a compound requirement (with \'{\' \'}\' around the expression)"}}, |
| [i]="method returns unexpected type A (should be an object type)", | | [i]={{nil,o,"\'noexcept\' can only be used in a compound requirement (with \'{\' \'}\' around the expression)"}}, |
| [c]=g, | | [h]=k, |
| [e]="method returns unexpected type (.*?) \\(should be an object type\\)", | | [c]="\'noexcept\' can only be used in a compound requirement \\(with \'\\{\' \'\\}\' around the expression\\)", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]={{nil,o,y}}, |
| [j]={"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"}, | | [g]={gb,1570627358,hb,db}, |
| [k]={{B,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;"}},
| | [d]={{Ob,3746,"/// ParseRequiresExpression - Parse a C++2a requires-expression.\n/// C++2a [expr.prim.req]p1\n/// A requires-expression provides a concise way to express requirements on\n/// template arguments. A requirement is one that can be checked by name\n/// lookup (6.4) or by checking properties of types and expressions.\n///\n/// requires-expression:\n/// \'requires\' requirement-parameter-list[opt] requirement-body\n///\n/// requirement-parameter-list:\n/// \'(\' parameter-declaration-clause[opt] \')\'\n///\n/// requirement-body:\n/// \'{\' requirement-seq \'}\'\n///\n/// requirement-seq:\n/// requirement\n/// requirement-seq requirement\n///\n/// requirement:\n/// simple-requirement\n/// type-requirement\n/// compound-requirement\n/// nested-requirement\nExprResult Parser::ParseRequiresExpression() {\n // ...\n if (Tok.is(tok::r_brace)) {\n // ...\n } else {\n while (!Tok.is(tok::r_brace)) {\n // ...\n default: {\n // ...\n // User may have tried to put some compound requirement stuff here\n if (Tok.is(tok::kw_noexcept)) {\n Diag(Tok, diag::err_requires_expr_simple_requirement_noexcept) << FixItHint::CreateInsertion(StartLoc, \"{\") << FixItHint::CreateInsertion(Tok.getLocation(), \"}\");"}}, |
| [l]={ | | [l]={ |
| ["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)"} | | [Pb]={"clang/test/Parser/cxx2a-concepts-requires-expr.cpp:122:25: error: \'noexcept\' can only be used in a compound requirement (with \'{\' \'}\' around the expression)"} |
| } | | } |
| }, | | }, |
| ["note_objc_needs_superclass"]={ | | ["err_restricted_superclass_mismatch"]={ |
| [b]="note_objc_needs_superclass", | | [b]="err_restricted_superclass_mismatch", |
| [h]="add a super class to fix this problem", | | [j]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", |
| [i]="add a super class to fix this problem", | | [i]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", |
| [c]=g, | | [h]=k, |
| [e]="add a super class to fix this problem", | | [c]="cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute", |
| [f]=a, | | [f]=a, |
| [d]=n, | | [e]=m, |
| [j]={"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"}, | | [g]={"a8c44ba2c01e",1477650310,"[Objective-C] Add objc_subclassing_restricted attribute","[Objective-C] Add objc_subclassing_restricted attribute\n\nThis patch adds an objc_subclassing_restricted attribute into clang. This\nattribute acts similarly to \'final\' - Objective-C classes with this attribute\ncan\'t be subclassed. However, @interface declarations that have\nobjc_subclassing_restricted but don\'t have @implementation are allowed to\ninherit other @interface declarations with objc_subclassing_restricted. This is\nneeded to describe the Swift class hierarchy in clang while making sure that\nthe Objective-C classes cannot subclass the Swift classes.\n\nThis attribute is already implemented in a fork of clang that\'s used for Swift\n(https://github.com/apple/swift-clang) and this patch moves that code to the\nupstream clang repository.\n\nrdar://28937548\n\nDifferential Revision: https://reviews.llvm.org/D25993\n\nllvm-svn: 285391"}, |
| [k]={{db,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 \");"},{db,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);"}}, | | [d]={{Z,4165,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n if (ObjCInterfaceDecl *IDecl = IC->getClassInterface()) {\n // ...\n if (const ObjCInterfaceDecl *Super = IDecl->getSuperClass()) {\n // An interface can subclass another interface with a\n // objc_subclassing_restricted attribute when it has that attribute as\n // well (because of interfaces imported from Swift). Therefore we have\n // to check if we can subclass in the implementation as well.\n if (IDecl->hasAttr<ObjCSubclassingRestrictedAttr>() && Super->hasAttr<ObjCSubclassingRestrictedAttr>()) {\n Diag(IC->getLocation(), diag::err_restricted_superclass_mismatch);"},{Z,4197,"// Note: For class/category implementations, allMethods is always null.\nDecl *Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef<Decl *> allMethods, ArrayRef<DeclGroupPtrTy> allTUVars) {\n // ...\n if (ObjCImplementationDecl *IC = dyn_cast<ObjCImplementationDecl>(ClassDecl)) {\n // ...\n } else if (ObjCCategoryImplDecl *CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {\n // ...\n } else if (const auto *IntfDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {\n if (const ObjCInterfaceDecl *Super = IntfDecl->getSuperClass()) {\n if (!IntfDecl->hasAttr<ObjCSubclassingRestrictedAttr>() && Super->hasAttr<ObjCSubclassingRestrictedAttr>()) {\n Diag(IntfDecl->getLocation(), diag::err_restricted_superclass_mismatch);"}}, |
| [l]={ | | [l]={ |
| ["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/subclassing-restricted-attr.m"]={"clang/test/SemaObjC/subclassing-restricted-attr.m:14:12: error: cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute","clang/test/SemaObjC/subclassing-restricted-attr.m:35:17: error: cannot subclass a class that was declared with the \'objc_subclassing_restricted\' attribute"} |
| } | | } |
| }, | | }, |
| ["note_objc_type_param_here"]={ | | ["err_ret_local_block"]={ |
| [b]="note_objc_type_param_here", | | [b]="err_ret_local_block", |
| [h]="type parameter %0 declared here", | | [j]="returning block that lives on the local stack", |
| [i]="type parameter A declared here", | | [i]="returning block that lives on the local stack", |
| [c]=g, | | [h]=k, |
| [e]="type parameter (.*?) declared here", | | [c]="returning block that lives on the local stack", |
| [f]=a, | | [f]=a, |
| [d]="Generics Issue", | | [e]=m, |
| [j]={"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"}, | | [g]={L,1237025389,M,N}, |
| [k]={{db,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();"},{db,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();"},{db,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();"},{Y,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();"},{Y,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();"}}, | | [d]={{P,8262,"void Sema::checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init) {\n // ...\n auto TemporaryVisitor = [&](IndirectLocalPath &Path, Local L, ReferenceKind RK) -> bool {\n // ...\n case LK_Return:\n case LK_StmtExprResult:\n if (auto *DRE = dyn_cast<DeclRefExpr>(L)) {\n // ...\n } else if (isa<BlockExpr>(L)) {\n Diag(DiagLoc, diag::err_ret_local_block) << DiagRange;"}}, |
| [l]={ | | [l]={ |
| ["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/Analysis/stack-block-returned.cpp"]={"clang/test/Analysis/stack-block-returned.cpp:8:10: error: returning block that lives on the local stack"} |
| } | | } |
| }, | | }, |
| ["note_objc_unsafe_perform_selector_method_declared_here"]={ | | ["err_rethrow_used_outside_catch"]={ |
| [b]={{nil,y,"note_objc_unsafe_perform_selector_method_declared_here"}}, | | [b]="err_rethrow_used_outside_catch", |
| [h]={{nil,y,"method %0 that returns %1 declared here"}}, | | [j]="@throw (rethrow) used outside of a @catch block", |
| [i]={{nil,y,"method A that returns B declared here"}}, | | [i]="@throw (rethrow) used outside of a @catch block", |
| [c]=g, | | [h]=k, |
| [e]="method (.*?) that returns (.*?) declared here", | | [c]="@throw \\(rethrow\\) used outside of a @catch block", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,n}}, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{B,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;"}}, | | [d]={{Eb,4292,"StmtResult Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, Scope *CurScope) {\n // ...\n if (!Throw) {\n // ...\n if (!AtCatchParent)\n return StmtError(Diag(AtLoc, diag::err_rethrow_used_outside_catch));"}}, |
| [l]={ | | [l]={ |
| ["clang/test/SemaObjC/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/try-catch.m"]={"clang/test/SemaObjC/try-catch.m:51:3: error: @throw (rethrow) used outside of a @catch block"} |
| } | | } |
| }, | | }, |
| ["note_odr_base"]={ | | ["err_return_block_has_expr"]={ |
| [b]="note_odr_base", | | [b]="err_return_block_has_expr", |
| [h]="class has base type %0", | | [j]="void block should not return a value", |
| [i]="class has base type A", | | [i]="void block should not return a value", |
| [c]=g, | | [h]=k, |
| [e]="class has base type (.*?)", | | [c]="void block should not return a value", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={ld,1265916115,kd,hd}, | | [g]={L,1237025389,M,N}, |
| [k]={{K,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();"},{K,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();"},{K,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();"},{K,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();"}} | | [d]={{Eb,3688,"/// ActOnCapScopeReturnStmt - Utility routine to type-check return statements\n/// for capturing scopes.\n///\nStmtResult Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves) {\n // ...\n // Otherwise, verify that this result type matches the previous one. We are\n // pickier with blocks than for normal functions because we don\'t have GCC\n // compatibility to worry about here.\n if (FnRetType->isDependentType()) {\n // ...\n } else if (FnRetType->isVoidType()) {\n if (RetValExp && !isa<InitListExpr>(RetValExp) && !(getLangOpts().CPlusPlus && (RetValExp->isTypeDependent() || RetValExp->getType()->isVoidType()))) {\n if (!getLangOpts().CPlusPlus && RetValExp->getType()->isVoidType())\n // ...\n else {\n Diag(ReturnLoc, diag::err_return_block_has_expr);"}} |
| }, | | }, |
| ["note_odr_enumerator"]={ | | ["err_return_in_captured_stmt"]={ |
| [b]="note_odr_enumerator", | | [b]="err_return_in_captured_stmt", |
| [h]="enumerator %0 with value %1 here", | | [j]="cannot return from %0", |
| [i]="enumerator A with value B here", | | [i]="cannot return from A", |
| [c]=g, | | [h]=k, |
| [e]="enumerator (.*?) with value (.*?) here", | | [c]="cannot return from (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"6dfa25a19f3f",1366141058,"Sema for Captured Statements","Sema for Captured Statements\n\nAdd CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic\nanalysis. Currently captures all variables by reference.\n\nTODO: templates\n\nAuthor: Ben Langmuir <ben.langmuir@intel.com>\n\nDifferential Revision: http://llvm-reviews.chandlerc.com/D433\n\nllvm-svn: 179618"}, |
| [k]={{K,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);"},{K,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);"},{K,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);"},{K,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);"}},
| | [d]={{Eb,3661,"/// ActOnCapScopeReturnStmt - Utility routine to type-check return statements\n/// for capturing scopes.\n///\nStmtResult Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves) {\n // ...\n if (auto *CurBlock = dyn_cast<BlockScopeInfo>(CurCap)) {\n // ...\n } else if (auto *CurRegion = dyn_cast<CapturedRegionScopeInfo>(CurCap)) {\n Diag(ReturnLoc, diag::err_return_in_captured_stmt) << CurRegion->getRegionName();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/captured-statements.c"]={"clang/test/Sema/captured-statements.c:30:7: error: cannot return from default captured statement"} |
| } | | } |
| }, | | }, |
| ["note_odr_field"]={ | | ["err_return_in_constructor_handler"]={ |
| [b]="note_odr_field", | | [b]="err_return_in_constructor_handler", |
| [h]="field %0 has type %1 here", | | [j]="return in the catch of a function try block of a constructor is illegal", |
| [i]="field A has type B here", | | [i]="return in the catch of a function try block of a constructor is illegal", |
| [c]=g, | | [h]=k, |
| [e]="field (.*?) has type (.*?) here", | | [c]="return in the catch of a function try block of a constructor is illegal", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={ld,1265916115,kd,hd}, | | [g]={"4c018663b22c",1240868004,"Track down return statements in the handlers of a function-try-block of constructors. Meh ...","Track down return statements in the handlers of a function-try-block of constructors. Meh ...\n\nllvm-svn: 70256"}, |
| [k]={{K,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();"},{K,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();"},{K,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();"},{K,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();"}},
| | [d]={{w,17943,"static void SearchForReturnInStmt(Sema &Self, Stmt *S) {\n for (Stmt *SubStmt : S->children()) {\n // ...\n if (isa<ReturnStmt>(SubStmt))\n Self.Diag(SubStmt->getBeginLoc(), diag::err_return_in_constructor_handler);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:86:11: error: return in the catch of a function try block of a constructor is illegal","clang/test/SemaCXX/exceptions.cpp:98:5: error: return in the catch of a function try block of a constructor is illegal","clang/test/SemaCXX/exceptions.cpp:102:9: error: return in the catch of a function try block of a constructor is illegal"} |
| } | | } |
| }, | | }, |
| ["note_odr_field_name"]={ | | ["err_return_in_coroutine"]={ |
| [b]={{nil,y,"note_odr_field_name"}}, | | [b]="err_return_in_coroutine", |
| [h]={{nil,y,"field has name %0 here"}}, | | [j]="return statement not allowed in coroutine; did you mean \'co_return\'?", |
| [i]={{nil,y,"field has name A here"}}, | | [i]="return statement not allowed in coroutine; did you mean \'co_return\'?", |
| [c]=g, | | [h]=k, |
| [e]="field has name (.*?) here", | | [c]="return statement not allowed in coroutine; did you mean \'co_return\'\\?", |
| [f]=a, | | [f]=a, |
| [d]={{nil,y,a}}, | | [e]="Coroutines Issue", |
| [j]={"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"}, | | [g]={"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"}, |
| [k]={{K,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();"},{K,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();"}}, | | [d]={{"clang/lib/Sema/SemaCoroutine.cpp",1123,"void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body) {\n // ...\n // [stmt.return.coroutine]p1:\n // A coroutine shall not enclose a return statement ([stmt.return]).\n if (Fn->FirstReturnLoc.isValid()) {\n // ...\n Diag(Fn->FirstReturnLoc, diag::err_return_in_coroutine);"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/coroutines.cpp"]={"clang/test/SemaCXX/coroutines.cpp:200:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:206:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:213:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:220:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:227:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:232:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:238:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:245:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:252:3: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:264:5: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:272:5: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:281:5: error: return statement not allowed in coroutine; did you mean \'co_return\'?","clang/test/SemaCXX/coroutines.cpp:291:5: error: return statement not allowed in coroutine; did you mean \'co_return\'?"} |
| } | | } |
| }, | | }, |
| ["note_odr_friend"]={ | | ["err_return_init_list"]={ |
| [b]={{nil,u,"note_odr_friend"}}, | | [b]="err_return_init_list", |
| [h]={{nil,u,"friend declared here"}}, | | [j]="%select{void function|void method|constructor|destructor}1 %0 must not return a value", |
| [i]={{nil,u,"friend declared here"}}, | | [i]={{nil,nil,{{"void function","void method","constructor","destructor"}," A must not return a value"}}}, |
| [c]=g, | | [h]=k, |
| [e]="friend declared here", | | [c]="(?:void function|void method|constructor|destructor) (.*?) must not return a value", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,a}}, | | [e]=m, |
| [j]={"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"}, | | [g]={"eef474ce1bc8",1329907808,"Fix parsing and processing initializer lists in return statements and as direct member initializers.","Fix parsing and processing initializer lists in return statements and as direct member initializers.\n\nllvm-svn: 151155"}, |
| [k]={{K,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);"},{K,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);"},{K,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);"},{K,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);"}}, | | [d]={{Eb,4063,"StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery) {\n // ...\n if (FnRetType->isVoidType()) {\n if (RetValExp) {\n if (auto *ILE = dyn_cast<InitListExpr>(RetValExp)) {\n // ...\n Diag(ReturnLoc, diag::err_return_init_list) << CurDecl << FunctionKind << RetValExp->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaCXX/return-void.cpp"]={"clang/test/SemaCXX/return-void.cpp:3:13: error: void function \'f1\' must not return a value","clang/test/SemaCXX/return-void.cpp:5:35: error: void function \'f2\' must not return a value","clang/test/SemaCXX/return-void.cpp:7:32: error: void function \'f2<float>\' must not return a value","clang/test/SemaCXX/return-void.cpp:15:15: error: void function \'f3\' must not return a value","clang/test/SemaCXX/return-void.cpp:16:9: error: constructor \'S\' must not return a value","clang/test/SemaCXX/return-void.cpp:17:10: error: destructor \'~S\' must not return a value","clang/test/SemaCXX/return-void.cpp:21:15: error: void function \'f4\' must not return a value","clang/test/SemaCXX/return-void.cpp:22:10: error: constructor \'ST<T>\' must not return a value","clang/test/SemaCXX/return-void.cpp:23:11: error: destructor \'~ST<T>\' must not return a value"} |
| } | | } |
| }, | | }, |
| ["note_odr_missing_base"]={ | | ["err_return_value_with_address_space"]={ |
| [b]="note_odr_missing_base", | | [b]={{nil,mb,"err_return_value_with_address_space"}}, |
| [h]="no corresponding base class here", | | [j]={{nil,mb,"return type cannot be qualified with address space"}}, |
| [i]="no corresponding base class here", | | [i]={{nil,mb,"return type cannot be qualified with address space"}}, |
| [c]=g, | | [h]=k, |
| [e]="no corresponding base class here", | | [c]="return type cannot be qualified with address space", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,mb,m}}, |
| [j]={ld,1265916115,kd,hd}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{K,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);"}} | | [d]={{D,10253,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().OpenCL) {\n // ...\n if (AddressSpace != LangAS::Default) {\n Diag(NewFD->getLocation(), diag::err_return_value_with_address_space);"},{D,10287,"NamedDecl *Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamListsRef, bool &AddToScope) {\n // ...\n if (getLangOpts().HLSL) {\n // ...\n if (AddressSpace != LangAS::Default) {\n Diag(NewFD->getLocation(), diag::err_return_value_with_address_space);"},{"clang/lib/Sema/SemaLambda.cpp",876,"static TypeSourceInfo *getLambdaType(Sema &S, LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope, SourceLocation Loc, bool &ExplicitResultType) {\n // ...\n if (ParamInfo.getNumTypeObjects() == 0) {\n // ...\n } else {\n // ...\n if (ExplicitResultType && S.getLangOpts().HLSL) {\n // ...\n if (!RetTy.isNull()) {\n // ...\n if (AddressSpace != LangAS::Default)\n S.Diag(FTI.getTrailingReturnTypeLoc(), diag::err_return_value_with_address_space);"}}, |
| },
| |
| ["note_odr_missing_enumerator"]={
| |
| [b]="note_odr_missing_enumerator",
| |
| [h]="no corresponding enumerator here",
| |
| [i]="no corresponding enumerator here",
| |
| [c]=g,
| |
| [e]="no corresponding enumerator here",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{K,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);"},{K,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);"}},
| |
| [l]={ | | [l]={ |
| ["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/SemaHLSL/group_shared.hlsl"]={"clang/test/SemaHLSL/group_shared.hlsl:14:20: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:20:20: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:25:21: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:32:24: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:35:24: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:38:31: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:41:31: error: return type cannot be qualified with address space","clang/test/SemaHLSL/group_shared.hlsl:80:18: error: return type cannot be qualified with address space"} |
| } | | } |
| }, | | }, |
| ["note_odr_missing_field"]={ | | ["err_right_angle_bracket_equal_needs_space"]={ |
| [b]="note_odr_missing_field", | | [b]="err_right_angle_bracket_equal_needs_space", |
| [h]="no corresponding field here", | | [j]="a space is required between a right angle bracket and an equals sign (use \'> =\')", |
| [i]="no corresponding field here", | | [i]="a space is required between a right angle bracket and an equals sign (use \'> =\')", |
| [c]=g, | | [h]=k, |
| [e]="no corresponding field here", | | [c]="a space is required between a right angle bracket and an equals sign \\(use \'\\> \\=\'\\)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=y, |
| [j]={ld,1265916115,kd,hd}, | | [g]={"7b3f322517c2",1339999864,"Extend the error recovery for a template-argument-list terminated by \'>>\' to","Extend the error recovery for a template-argument-list terminated by \'>>\' to\nalso deal with \'>>>\' (in CUDA), \'>=\', and \'>>=\'. Fix the FixItHints logic to\ndeal with cases where the token is followed by an adjacent \'=\', \'==\', \'>=\',\n\'>>=\', or \'>>>\' token, where a naive fix-it would result in a differing token\nstream on a re-lex.\n\nllvm-svn: 158652"}, |
| [k]={{K,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);"},{K,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);"}}, | | [d]={{"clang/lib/Parse/ParseTemplate.cpp",1209,"/// Parses a \'>\' at the end of a template list.\n///\n/// If this function encounters \'>>\', \'>>>\', \'>=\', or \'>>=\', it tries\n/// to determine if these tokens were supposed to be a \'>\' followed by\n/// \'>\', \'>>\', \'>=\', or \'>=\'. It emits an appropriate diagnostic if necessary.\n///\n/// \\param RAngleLoc the location of the consumed \'>\'.\n///\n/// \\param ConsumeLastToken if true, the \'>\' is consumed.\n///\n/// \\param ObjCGenericList if true, this is the \'>\' closing an Objective-C\n/// type parameter or type argument list, rather than a C++ template parameter\n/// or argument list.\n///\n/// \\returns true, if current token does not start with \'>\', false otherwise.\nbool Parser::ParseGreaterThanInTemplateList(SourceLocation LAngleLoc, SourceLocation &RAngleLoc, bool ConsumeLastToken, bool ObjCGenericList) {\n // ...\n // Diagnose this situation as appropriate.\n if (!ObjCGenericList) {\n // ...\n if (getLangOpts().CPlusPlus11 && (Tok.is(tok::greatergreater) || Tok.is(tok::greatergreatergreater)))\n // ...\n else if (Tok.is(tok::greaterequal))\n DiagId = diag::err_right_angle_bracket_equal_needs_space;"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Parser/cxx-template-argument.cpp"]={"clang/test/Parser/cxx-template-argument.cpp:22:15: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:23:18: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:30:18: error: a space is required between a right angle bracket and an equals sign (use \'> =\')","clang/test/Parser/cxx-template-argument.cpp:36:21: error: a space is required between a right angle bracket and an equals sign (use \'> =\')"} |
| } | | } |
| }, | | }, |
| ["note_odr_missing_friend"]={ | | ["err_riscv_builtin_invalid_lmul"]={ |
| [b]={{nil,u,"note_odr_missing_friend"}}, | | [b]={{nil,U,"err_riscv_builtin_invalid_lmul"}}, |
| [h]={{nil,u,"no corresponding friend here"}}, | | [j]={{nil,U,"LMUL argument must be in the range [0,3] or [5,7]"}}, |
| [i]={{nil,u,"no corresponding friend here"}}, | | [i]={{nil,U,"LMUL argument must be in the range [0,3] or [5,7]"}}, |
| [c]=g, | | [h]=k, |
| [e]="no corresponding friend here", | | [c]="LMUL argument must be in the range \\[0,3\\] or \\[5,7\\]", |
| [f]=a, | | [f]=a, |
| [d]={{nil,u,a}}, | | [e]={{nil,U,a}}, |
| [j]={"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"}, | | [g]={"3dbcea8b957a",1615397021,"Reland [clang] Check unsupported types in expressions","Reland [clang] Check unsupported types in expressions\n\nThis was committed as ec6c847179fd, but then reverted after a failure\nin: https://lab.llvm.org/buildbot/#/builders/84/builds/13983\n\nI was not able to reproduce the problem, but I added an extra check\nfor a NULL QualType just in case.\n\nOriginal comit message:\n\nThe patch adds missing diagnostics for cases like:\n\n float F3 = ((__float128)F1 * (__float128)F2) / 2.0f;\n\nSema::checkDeviceDecl (renamed to checkTypeSupport) is changed to work\nwith a type without the corresponding ValueDecl. It is also refactored\nso that host diagnostics for unsupported types can be added here as\nwell.\n\nDifferential Revision: https://reviews.llvm.org/D109315"}, |
| [k]={{K,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);"},{K,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);"}},
| | [d]={{I,4493,"bool Sema::CheckRISCVLMUL(CallExpr *TheCall, unsigned ArgNum) {\n // ...\n return Diag(TheCall->getBeginLoc(), diag::err_riscv_builtin_invalid_lmul) << Arg->getSourceRange();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c"]={"clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:6:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:7:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:8:3: error: LMUL argument must be in the range [0,3] or [5,7]","clang/test/CodeGen/RISCV/rvv-intrinsics-handcrafted/rvv-errors.c:9:3: error: LMUL argument must be in the range [0,3] or [5,7]"} |
| } | | } |
| }, | | }, |
| ["note_odr_number_of_bases"]={ | | ["err_riscv_builtin_requires_extension"]={ |
| [b]="note_odr_number_of_bases", | | [b]={{nil,U,"err_riscv_builtin_requires_extension"}}, |
| [h]="class has %0 base %plural{1:class|:classes}0", | | [j]={{nil,mb,"builtin requires%select{| at least one of the following extensions to be enabled}0: %1"},{C,F,"builtin requires at least one of the following extensions support to be enabled : %0"},{U,U,"builtin requires \'%0\' extension support to be enabled"}}, |
| [i]={{nil,nil,{"class has A base ",{wb,"classes"}}}}, | | [i]={{nil,mb,{"builtin requires",{a," at least one of the following extensions to be enabled"},": B"}},{C,F,"builtin requires at least one of the following extensions support to be enabled : A"},{U,U,"builtin requires \'A\' extension support to be enabled"}}, |
| [c]=g, | | [h]=k, |
| [e]="class has (.*?) base (?:class|classes)", | | [c]="builtin requires(?:| at least one of the following extensions to be enabled)\\: (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,U,a}}, |
| [j]={ld,1265916115,kd,hd}, | | [g]={Tb,1590001902,Ub,Vb}, |
| [k]={{K,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();"},{K,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();"}} | | [d]={{I,4542,"bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n // Check if each required feature is included\n for (StringRef F : ReqFeatures) {\n // ...\n if (llvm::none_of(ReqOpFeatures, [&TI](StringRef OF) { return TI.hasFeature(OF); })) {\n // ...\n Diag(TheCall->getBeginLoc(), diag::err_riscv_builtin_requires_extension) << IsExtension << TheCall->getSourceRange() << StringRef(FeatureStrs);"},{I,4611,"bool Sema::CheckRISCVBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) {\n // ...\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_tu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_tu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_m:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_m:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_mu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_mu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_tum:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_tum:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vmulhsu_vx_tumu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_tu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_tu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_m:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_m:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_mu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_mu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_tum:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_tum:\n case RISCVVector::BI__builtin_rvv_vmulhu_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vmulhu_vx_tumu:\n case RISCVVector::BI__builtin_rvv_vmulh_vv:\n case RISCVVector::BI__builtin_rvv_vmulh_vx:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_tu:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_tu:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_m:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_m:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_mu:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_mu:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_tum:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_tum:\n case RISCVVector::BI__builtin_rvv_vmulh_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vmulh_vx_tumu:\n case RISCVVector::BI__builtin_rvv_vsmul_vv:\n case RISCVVector::BI__builtin_rvv_vsmul_vx:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_tu:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_tu:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_m:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_m:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_mu:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_mu:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_tum:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_tum:\n case RISCVVector::BI__builtin_rvv_vsmul_vv_tumu:\n case RISCVVector::BI__builtin_rvv_vsmul_vx_tumu: {\n // ...\n if (RequireV && !TI.hasFeature(\"v\"))\n return Diag(TheCall->getBeginLoc(), diag::err_riscv_builtin_requires_extension) << /* IsExtension */ false << TheCall->getSourceRange() << \"v\";"}}, |
| },
| |
| ["note_odr_objc_method_here"]={
| |
| [b]="note_odr_objc_method_here",
| |
| [h]="%select{class|instance}0 method %1 also declared here",
| |
| [i]={{nil,nil,{{wb,"instance"}," method B also declared here"}}},
| |
| [c]=g,
| |
| [e]="(?:class|instance) method (.*?) also declared here",
| |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"},
| |
| [k]={{fb,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;"},{fb,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;"},{fb,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;"}},
| |
| [l]={ | | [l]={ |
| ["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/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb-error.c"]={"clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb-error.c:5:10: error: builtin requires: \'RV64\'"} |
| } | | } |
| }, | | }, |
| ["note_odr_objc_missing_superclass"]={ | | ["err_riscv_type_requires_extension"]={ |
| [b]="note_odr_objc_missing_superclass", | | [b]="err_riscv_type_requires_extension", |
| [h]="no corresponding superclass here",
| | [j]="RISC-V type %0 requires the \'%1\' extension", |
| [i]="no corresponding superclass here",
| | [i]="RISC-V type A requires the \'B\' extension", |
| [c]=g,
| | [h]=k, |
| [e]="no corresponding superclass here",
| | [c]="RISC\\-V type (.*?) requires the \'(.*?)\' extension", |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"}, | |
| [k]={{fb,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);"},{fb,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);"},{fb,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);"},{fb,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"]={
| |
| [b]="note_odr_objc_property_impl_kind",
| |
| [h]="property %0 is implemented with %select{@synthesize|@dynamic}1 here", | |
| [i]={{nil,nil,{"property A is implemented with ",{"@synthesize","@dynamic"},Wb}}},
| |
| [c]=g, | |
| [e]="property (.*?) is implemented with (?:@synthesize|@dynamic) here",
| |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=a, |
| [j]={"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"}, | | [g]={ib,1625925174,kb,jb}, |
| [k]={{fb,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);"}}, | | [d]={{I,5427,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n // (ELEN, LMUL) pairs of (8, mf8), (16, mf4), (32, mf2), (64, m1) requires at\n // least zve64x\n if ((Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ false) || Ty->isRVVType(/* ElementCount */ 1)) && !TI.hasFeature(\"zve64x\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve64x\";"},{I,5430,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n if (Ty->isRVVType(/* Bitwidth */ 16, /* IsFloat */ true) && !TI.hasFeature(\"zvfh\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zvfh\";"},{I,5433,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n if (Ty->isRVVType(/* Bitwidth */ 32, /* IsFloat */ true) && !TI.hasFeature(\"zve32f\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve32f\";"},{I,5436,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n if (Ty->isRVVType(/* Bitwidth */ 64, /* IsFloat */ true) && !TI.hasFeature(\"zve64d\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve64d\";"},{I,5440,"void Sema::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {\n // ...\n // Given that caller already checked isRVVType() before calling this function,\n // if we don\'t have at least zve32x supported, then we need to emit error.\n if (!TI.hasFeature(\"zve32x\"))\n Diag(Loc, diag::err_riscv_type_requires_extension, D) << Ty << \"zve32x\";"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/riscv-vector-zve64x-check.c"]={"clang/test/Sema/riscv-vector-zve64x-check.c:10:19: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:12:9: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:14:10: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:9:17: error: RISC-V type \'__rvv_int8mf8_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:18:20: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:20:9: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:22:10: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:17:18: error: RISC-V type \'__rvv_int16mf4_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:26:20: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:28:9: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:30:10: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:25:18: error: RISC-V type \'__rvv_int32mf2_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:34:19: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:36:9: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:38:10: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension","clang/test/Sema/riscv-vector-zve64x-check.c:33:17: error: RISC-V type \'__rvv_int64m1_t\' requires the \'zve64x\' extension"} |
| } | | } |
| }, | | }, |
| ["note_odr_objc_superclass"]={ | | ["err_root_class_cannot_use_super"]={ |
| [b]="note_odr_objc_superclass", | | [b]="err_root_class_cannot_use_super", |
| [h]="inherits from superclass %0 here", | | [j]="%0 cannot use \'super\' because it is a root class", |
| [i]="inherits from superclass A here", | | [i]="A cannot use \'super\' because it is a root class", |
| [c]=g, | | [h]=k, |
| [e]="inherits from superclass (.*?) here", | | [c]="(.*?) cannot use \'super\' because it is a root class", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={bb,1480718311,eb,fb}, |
| [k]={{fb,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();"},{fb,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();"},{fb,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();"},{fb,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();"}}, | | [d]={{lb,2178,"ExprResult Sema::ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc) {\n // ...\n if (!IFace) {\n // If the \"receiver\" is \'super\' in a method, handle it as an expression-like\n // property reference.\n if (receiverNamePtr->isStr(\"super\")) {\n if (ObjCMethodDecl *CurMethod = tryCaptureObjCSelf(receiverNameLoc)) {\n if (auto classDecl = CurMethod->getClassInterface()) {\n // ...\n if (CurMethod->isInstanceMethod()) {\n if (SuperType.isNull()) {\n // ...\n Diag(receiverNameLoc, diag::err_root_class_cannot_use_super) << CurMethod->getClassInterface()->getIdentifier();"},{lb,2405,"ExprResult Sema::ActOnSuperMessage(Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef<SourceLocation> SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args) {\n // ...\n if (SuperTy.isNull()) {\n // ...\n Diag(SuperLoc, diag::err_root_class_cannot_use_super) << Class->getIdentifier();"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/SemaObjC/super-property-notation.m"]={"clang/test/SemaObjC/super-property-notation.m:38:3: error: \'ClassBase\' cannot use \'super\' because it is a root class","clang/test/SemaObjC/super-property-notation.m:39:4: error: \'ClassBase\' cannot use \'super\' because it is a root class"} |
| } | | } |
| }, | | }, |
| ["note_odr_objc_synthesize_ivar_here"]={ | | ["err_roptr_cannot_build_shared"]={ |
| [b]="note_odr_objc_synthesize_ivar_here", | | [b]="err_roptr_cannot_build_shared", |
| [h]="property is synthesized to ivar %0 here", | | [j]="-mxcoff-roptr is not supported with -shared", |
| [i]="property is synthesized to ivar A here", | | [i]="-mxcoff-roptr is not supported with -shared", |
| [c]=g, | | [h]=k, |
| [e]="property is synthesized to ivar (.*?) here", | | [c]="\\-mxcoff\\-roptr is not supported with \\-shared", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=a, |
| [j]={"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"}, | | [g]={"9715af434579",1684163645,"[AIX][clang] Storage Locations for Constant Pointers","[AIX][clang] Storage Locations for Constant Pointers\n\nThis patch adds clang options `-mxcoff-roptr` and `-mno-xcoff-roptr` to specify storage locations for constant pointers on AIX.\n\nWhen the `-mxcoff-roptr` option is in effect, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. When the `-mno-xcoff-roptr` option is in effect, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.\n\nThis patch depends on https://reviews.llvm.org/D144189.\n\nReviewed By: hubert.reinterpretcast, stephenpeckham\n\nDifferential Revision: https://reviews.llvm.org/D144190"}, |
| [k]={{fb,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();"}}, | | [d]={{"clang/lib/Driver/ToolChains/AIX.cpp",141,"void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const ArgList &Args, const char *LinkingOutput) const {\n // ...\n if (Args.hasFlag(options::OPT_mxcoff_roptr, options::OPT_mno_xcoff_roptr, false)) {\n if (Args.hasArg(options::OPT_shared))\n D.Diag(diag::err_roptr_cannot_build_shared);"}} |
| [l]={
| |
| ["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"}
| |
| }
| |
| }, | | }, |
| ["note_odr_parameter_pack_non_pack"]={ | | ["err_roptr_requires_data_sections"]={ |
| [b]="note_odr_parameter_pack_non_pack", | | [b]="err_roptr_requires_data_sections", |
| [h]="%select{parameter|parameter pack}0 declared here", | | [j]="-mxcoff-roptr is supported only with -fdata-sections", |
| [i]={{nil,nil,{{"parameter","parameter pack"}," declared here"}}}, | | [i]="-mxcoff-roptr is supported only with -fdata-sections", |
| [c]=g, | | [h]=k, |
| [e]="(?:parameter|parameter pack) declared here", | | [c]="\\-mxcoff\\-roptr is supported only with \\-fdata\\-sections", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=a, |
| [j]={"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"}, | | [g]={"9715af434579",1684163645,"[AIX][clang] Storage Locations for Constant Pointers","[AIX][clang] Storage Locations for Constant Pointers\n\nThis patch adds clang options `-mxcoff-roptr` and `-mno-xcoff-roptr` to specify storage locations for constant pointers on AIX.\n\nWhen the `-mxcoff-roptr` option is in effect, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. When the `-mno-xcoff-roptr` option is in effect, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.\n\nThis patch depends on https://reviews.llvm.org/D144189.\n\nReviewed By: hubert.reinterpretcast, stephenpeckham\n\nDifferential Revision: https://reviews.llvm.org/D144190"}, |
| [k]={{K,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();"},{K,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();"},{K,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();"}}, | | [d]={{"clang/lib/Driver/ToolChains/CommonArgs.cpp",766,"#endif\n // ...\n if (Args.hasArg(options::OPT_mxcoff_roptr) || Args.hasArg(options::OPT_mno_xcoff_roptr)) {\n // ...\n if (HasRoptr) {\n // The data sections option is on by default on AIX. We only need to error\n // out when -fno-data-sections is specified explicitly to turn off data\n // sections.\n if (DataSectionsTurnedOff)\n D.Diag(diag::err_roptr_requires_data_sections);"},{"clang/lib/Frontend/CompilerInvocation.cpp",1947,"#include \"clang/Driver/Options.inc\"\n // ...\n if (Arg *A = Args.getLastArg(OPT_mxcoff_roptr)) {\n // ...\n // Since the storage mapping class is specified per csect,\n // without using data sections, it is less effective to use read-only\n // pointers. Using read-only pointers may cause other RO variables in the\n // same csect to become RW when the linker acts upon `-bforceimprw`;\n // therefore, we require that separate data sections\n // are used when `-mxcoff-roptr` is in effect. We respect the setting of\n // data-sections since we have not found reasons to do otherwise that\n // overcome the user surprise of not respecting the setting.\n if (!Args.hasFlag(OPT_fdata_sections, OPT_fno_data_sections, false))\n Diags.Report(diag::err_roptr_requires_data_sections);"}} |
| [l]={
| |
| ["clang/test/SemaObjC/arc-decls.m"]={"clang/test/SemaObjC/arc-decls.m:117:17: note: parameter declared here"}
| |
| }
| |
| }, | | }, |
| ["note_odr_tag_kind_here"]={ | | ["err_rotation_argument_to_cadd"]={ |
| [b]="note_odr_tag_kind_here", | | [b]={{nil,t,"err_rotation_argument_to_cadd"}}, |
| [h]="%0 is a %select{struct|interface|union|class|enum}1 here", | | [j]={{nil,t,"argument should be the value 90 or 270"}}, |
| [i]={{nil,nil,{"A is a ",{"struct","interface","union",wb,"enum"},Wb}}}, | | [i]={{nil,t,"argument should be the value 90 or 270"}}, |
| [c]=g, | | [h]=k, |
| [e]="(.*?) is a (?:struct|interface|union|class|enum) here", | | [c]="argument should be the value 90 or 270", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,t,m}}, |
| [j]={ld,1265916115,kd,hd}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{K,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();"}}, | | [d]={{I,2992,"#include \"clang/Basic/arm_sme_sema_rangechecks.inc\"\n // ...\n for (auto &I : ImmChecks) {\n // ...\n case SVETypeFlags::ImmCheckComplexRot90_270:\n if (CheckImmediateInSet([](int64_t V) { return V == 90 || V == 270; }, diag::err_rotation_argument_to_cadd))"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp"]={"clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:18:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:20:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:22:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:24:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:26:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:28:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:30:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:32:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:34:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:36:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:38:17: error: argument should be the value 90 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:40:17: error: argument should be the value 90 or 270"} |
| } | | } |
| }, | | }, |
| ["note_odr_template_parameter_here"]={ | | ["err_rotation_argument_to_cmla"]={ |
| [b]="note_odr_template_parameter_here", | | [b]={{nil,t,"err_rotation_argument_to_cmla"}}, |
| [h]="template parameter declared here", | | [j]={{nil,t,"argument should be the value 0, 90, 180 or 270"}}, |
| [i]="template parameter declared here", | | [i]={{nil,t,"argument should be the value 0, 90, 180 or 270"}}, |
| [c]=g, | | [h]=k, |
| [e]="template parameter declared here", | | [c]="argument should be the value 0, 90, 180 or 270", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]={{nil,t,m}}, |
| [j]={"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"}, | | [g]={qb,1576908663,sb,nb}, |
| [k]={{K,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);"}}, | | [d]={{I,3000,"#include \"clang/Basic/arm_sme_sema_rangechecks.inc\"\n // ...\n for (auto &I : ImmChecks) {\n // ...\n case SVETypeFlags::ImmCheckComplexRotAll90:\n if (CheckImmediateInSet([](int64_t V) { return V == 0 || V == 90 || V == 180 || V == 270; }, diag::err_rotation_argument_to_cmla))"}}, |
| [l]={ | | [l]={ |
| ["clang/test/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/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp"]={"clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:46:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:48:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:50:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:52:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:54:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:56:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:58:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:60:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:62:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:64:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:66:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:68:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:70:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:72:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:74:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:76:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:78:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:80:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:82:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:84:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:86:17: error: argument should be the value 0, 90, 180 or 270","clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_rotation.cpp:88:17: error: argument should be the value 0, 90, 180 or 270"} |
| } | | } |
| }, | | }, |
| ["note_odr_template_parameter_list"]={ | | ["err_rref_in_exception_spec"]={ |
| [b]="note_odr_template_parameter_list", | | [b]="err_rref_in_exception_spec", |
| [h]="template parameter list also declared here",
| | [j]="rvalue reference type %0 is not allowed in exception specification", |
| [i]="template parameter list also declared here",
| | [i]="rvalue reference type A is not allowed in exception specification", |
| [c]=g,
| | [h]=k, |
| [e]="template parameter list also declared here",
| | [c]="rvalue reference type (.*?) is not allowed in exception specification", |
| [f]=a,
| |
| [d]=a,
| |
| [j]={"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"}, | |
| [k]={{K,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"]={
| |
| [b]="note_odr_value_here",
| |
| [h]="declared here with type %0",
| |
| [i]="declared here with type A", | |
| [c]=g, | |
| [e]="declared here with type (.*?)", | |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={"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"}, | | [g]={"a118c6a8c0e9",1354143162,"Per C++11 [except.spec]p2, rvalue references are not permitted in exception specifications.","Per C++11 [except.spec]p2, rvalue references are not permitted in exception specifications.\n\nllvm-svn: 168824"}, |
| [k]={{fb,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();"},{fb,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();"},{fb,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();"},{fb,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();"},{fb,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();"},{fb,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();"},{fb,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();"},{K,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();"}}, | | [d]={{"clang/lib/Sema/SemaExceptionSpec.cpp",152,"/// CheckSpecifiedExceptionType - Check if the given type is valid in an\n/// exception specification. Incomplete types, or pointers to incomplete types\n/// other than void are not allowed.\n///\n/// \\param[in,out] T The exception type. This will be decayed to a pointer type\n/// when the input is an array or a function type.\nbool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) {\n // ...\n if (const PointerType *PT = T->getAs<PointerType>()) {\n // ...\n } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) {\n // ...\n if (RT->isRValueReferenceType()) {\n // ...\n Diag(Range.getBegin(), diag::err_rref_in_exception_spec) << T << Range;"}}, |
| [l]={ | | [l]={ |
| ["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/SemaCXX/exceptions.cpp"]={"clang/test/SemaCXX/exceptions.cpp:164:24: error: rvalue reference type \'int &&\' is not allowed in exception specification"} |
| } | | } |
| }, | | }, |
| ["note_odr_virtual_base"]={ | | ["err_sampler_argument_required"]={ |
| [b]="note_odr_virtual_base", | | [b]="err_sampler_argument_required", |
| [h]="%select{non-virtual|virtual}0 derivation here", | | [j]="sampler_t variable required - got %0", |
| [i]={{nil,nil,{{"non-virtual","virtual"}," derivation here"}}}, | | [i]="sampler_t variable required - got A", |
| [c]=g, | | [h]=k, |
| [e]="(?:non\\-virtual|virtual) derivation here", | | [c]="sampler_t variable required \\- got (.*?)", |
| [f]=a, | | [f]=a, |
| [d]=a, | | [e]=m, |
| [j]={ld,1265916115,kd,hd}, | | [g]={"610541989a52",1360234547,"Add OpenCL samplers as Clang builtin types and check sampler related restrictions.","Add OpenCL samplers as Clang builtin types and check sampler related restrictions.\n\nllvm-svn: 174601"}, |
| [k]={{K,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();"}} | | [d]={{P,9310,"ExprResult InitializationSequence::Perform(Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType) {\n // ...\n for (step_iterator Step = step_begin(), StepEnd = step_end(); Step != StepEnd; ++Step) {\n // ...\n case SK_OCLSamplerInit: {\n // ...\n // Case 1\n if (Entity.isParameterKind()) {\n if (!SourceType->isSamplerT() && !SourceType->isIntegerType()) {\n S.Diag(Kind.getLocation(), diag::err_sampler_argument_required) << SourceType;"}} |
| },
| |
| ["note_omp_assumption_clause_continue_here"]={
| |
| [b]={{nil,s,"note_omp_assumption_clause_continue_here"}},
| |
| [h]={{nil,s,"the ignored tokens spans until here"}},
| |
| [i]={{nil,s,"the ignored tokens spans until here"}},
| |
| [c]=g,
| |
| [e]="the ignored tokens spans until here",
| |
| [f]=a,
| |
| [d]={{nil,s,Ab}},
| |
| [j]={"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"},
| |
| [k]={{"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);"}},
| |
| [l]={
| |
| ["clang/test/OpenMP/assumes_messages_attr.c"]={"clang/test/OpenMP/assumes_messages_attr.c:13:48: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:14:42: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:17:37: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:18:47: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:25:48: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:25:76: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:26:42: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:26:70: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:49:45: note: the ignored tokens spans until here","clang/test/OpenMP/assumes_messages_attr.c:50:51: note: the ignored tokens spans until here"}
| |
| }
| |
| } | | } |
| }; | | }; |